/* ============================================================
   SiriusEmail — Bright Professional Light Theme
   ============================================================ */

:root {
  /* Core backgrounds */
  --bg-base:     #F0F4FF;
  --bg-surface:  #FFFFFF;
  --bg-elevated: #F8FAFF;
  --bg-input:    #F1F5FB;

  /* Sidebar */
  --sidebar-bg:    #FFFFFF;
  --sidebar-width: 264px;

  /* Brand colors */
  --primary:       #6366F1;
  --primary-hover: #4F46E5;
  --primary-glow:  rgba(99, 102, 241, 0.12);
  --secondary:     #8B5CF6;
  --accent:        #06B6D4;
  --accent-pink:   #EC4899;

  /* Status */
  --success: #10B981;
  --warning: #F59E0B;
  --danger:  #EF4444;
  --info:    #3B82F6;

  /* Text */
  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-tertiary:  #94A3B8;
  --text-main:      #0F172A;
  --text-muted:     #64748B;

  /* Borders */
  --border:       rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.16);
  --border-color: rgba(15, 23, 42, 0.08);
  --glass-border: rgba(15, 23, 42, 0.08);

  /* Compat aliases */
  --glass:   rgba(255, 255, 255, 0.8);
  --bg-card: #FFFFFF;
  --bg-dark: #F0F4FF;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.4); }

/* ============================================================
   BACKGROUND — bright gradient mesh
   ============================================================ */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 0% 0%,    rgba(99,102,241,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 55% 40% at 100% 0%,   rgba(6,182,212,0.08)  0%, transparent 55%),
    radial-gradient(ellipse 50% 55% at 100% 100%,  rgba(139,92,246,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 100%,    rgba(236,72,153,0.05) 0%, transparent 55%),
    #F0F4FF;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.text-muted         { color: var(--text-muted) !important; }
.text-accent        { color: var(--accent) !important; }
.text-primary-color { color: var(--primary) !important; }
small, .small       { color: var(--text-secondary); font-size: 0.8125rem; }

label {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: block;
  font-size: 0.875rem;
}

h1,h2,h3,h4,h5,h6 { letter-spacing: -0.02em; font-weight: 700; color: var(--text-primary); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(99,102,241,0.06);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.5rem 1.5rem 1rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

.sidebar-logo span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 0.5rem 1rem; }

.nav-section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 1rem 0.25rem 0.4rem;
}

.nav-menu { list-style: none; }
.nav-item  { margin-bottom: 2px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.575rem 0.625rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
  margin-left: 0;
}

.nav-link .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; flex-shrink: 0;
}

.nav-link .nav-badge {
  margin-left: auto;
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 0.625rem; font-weight: 700;
  padding: 1px 6px; border-radius: 20px;
}

.nav-link:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-left-color: rgba(99,102,241,0.3);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.nav-link.active .nav-icon { color: var(--primary); }

/* Sidebar footer */
.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.user-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.25rem; }

.user-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: white;
  flex-shrink: 0; text-transform: uppercase;
}

.user-info  { flex: 1; min-width: 0; }
.user-name  { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.6875rem; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-logout {
  background: none; border: none;
  color: var(--text-tertiary);
  padding: 0.25rem; cursor: pointer;
  border-radius: 6px; transition: all 0.15s; line-height: 1;
}
.btn-logout:hover { color: var(--danger); background: rgba(239,68,68,0.08); }

/* ============================================================
   MAIN WRAPPER & HEADER
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  padding: 0 2.5rem 2.5rem;
  min-height: 100vh;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.header-left  { display: flex; align-items: center; gap: 0.75rem; }
.header-right { display: flex; align-items: center; gap: 0.75rem; }

.btn-mobile-menu {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-mobile-menu:hover { background: var(--primary-glow); color: var(--primary); }

/* Search */
.header-search { position: relative; }

.header-search input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 0.45rem 0.875rem 0.45rem 2.25rem;
  font-size: 0.8125rem;
  width: 220px;
  transition: all 0.2s;
  outline: none;
  box-shadow: 0 1px 4px rgba(99,102,241,0.06);
}
.header-search input::placeholder { color: var(--text-tertiary); }
.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  width: 280px;
}

.header-search .search-icon {
  position: absolute; left: 0.75rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary); font-size: 0.75rem;
  pointer-events: none;
}

/* Brand switcher */
.brand-switcher-wrap { display: flex; align-items: center; gap: 0.5rem; }
.brand-switcher-label { font-size: 0.75rem; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }

/* Notification button */
.btn-notification {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  cursor: pointer; transition: all 0.15s;
  text-decoration: none; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(99,102,241,0.06);
}
.btn-notification:hover { background: var(--primary-glow); color: var(--primary); border-color: rgba(99,102,241,0.25); }
.btn-notification .notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid white;
}

/* Header select */
.form-select.header-select {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: 10px !important;
  font-size: 0.8125rem;
  padding: 0.4rem 2rem 0.4rem 0.875rem;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(99,102,241,0.06);
}
.form-select.header-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
  outline: none;
}

/* ============================================================
   PAGE TITLES
   ============================================================ */
.page-title    { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-primary); margin: 0; }
.page-subtitle { font-size: 0.875rem; color: var(--text-secondary); margin: 0.25rem 0 0; }
.breadcrumb-link { color: var(--text-tertiary); text-decoration: none; font-size: 0.8125rem; transition: color 0.15s; }
.breadcrumb-link:hover { color: var(--primary); }

/* ============================================================
   CARDS
   ============================================================ */
.premium-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(99,102,241,0.05), 0 4px 16px rgba(99,102,241,0.04);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  position: relative;
}

.premium-card:hover {
  box-shadow: 0 4px 20px rgba(99,102,241,0.10), 0 1px 4px rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.18);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.375rem 1.5rem;
  box-shadow: 0 1px 3px rgba(99,102,241,0.05), 0 4px 16px rgba(99,102,241,0.04);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
  box-shadow: 0 4px 20px rgba(99,102,241,0.10);
  border-color: rgba(99,102,241,0.18);
  transform: translateY(-2px);
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; flex-shrink: 0;
}

/* Bright, vivid icon backgrounds */
.stat-icon-primary   { background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(99,102,241,0.06));   color: var(--primary); }
.stat-icon-success   { background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.06));   color: var(--success); }
.stat-icon-warning   { background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(245,158,11,0.06));   color: var(--warning); }
.stat-icon-danger    { background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.06));     color: var(--danger); }
.stat-icon-accent    { background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(6,182,212,0.06));     color: var(--accent); }
.stat-icon-secondary { background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(139,92,246,0.06));  color: var(--secondary); }

.stat-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.75rem; font-weight: 600;
  padding: 2px 7px; border-radius: 20px;
}
.stat-trend.up   { background: rgba(16,185,129,0.10); color: #059669; }
.stat-trend.down { background: rgba(239,68,68,0.10);  color: var(--danger); }
.stat-trend.flat { background: rgba(100,116,139,0.10); color: var(--text-secondary); }

.stat-value {
  font-size: 1.875rem; font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1;
  color: var(--text-primary); margin-bottom: 0.25rem;
}

.stat-label { font-size: 0.8125rem; color: var(--text-secondary); font-weight: 500; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-premium {
  background: linear-gradient(135deg, var(--primary) 0%, #818CF8 100%);
  color: white;
  border: none;
  padding: 0.5625rem 1.25rem;
  border-radius: 10px;
  font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: all 0.2s;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
  white-space: nowrap;
}
.btn-premium:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(99,102,241,0.42);
  color: white;
  background: linear-gradient(135deg, #4F46E5 0%, var(--primary) 100%);
}
.btn-premium:active { transform: translateY(0); }
.btn-premium-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; border-radius: 8px; }

/* Ghost button */
.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.5625rem 1.25rem;
  border-radius: 10px;
  font-weight: 500; font-size: 0.875rem;
  cursor: pointer; transition: all 0.15s;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.btn-ghost:hover {
  background: var(--primary-glow);
  border-color: rgba(99,102,241,0.3);
  color: var(--primary);
}

/* Outline compat */
.btn-outline-light {
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
  background: var(--bg-surface);
  transition: all 0.15s;
}
.btn-outline-light:hover {
  background: var(--primary-glow) !important;
  border-color: rgba(99,102,241,0.25) !important;
  color: var(--primary) !important;
}

/* Quick action */
.quick-action {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8125rem; font-weight: 500;
  text-decoration: none; transition: all 0.15s;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.quick-action:hover {
  border-color: rgba(99,102,241,0.3);
  color: var(--primary);
  background: rgba(99,102,241,0.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.12);
}

.quick-action .qa-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.form-control-premium,
input.form-control,
textarea.form-control,
select.form-control {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  padding: 0.625rem 0.875rem !important;
  transition: all 0.2s;
  width: 100%;
  font-size: 0.9rem;
}

.form-control-premium:focus,
input.form-control:focus,
textarea.form-control:focus,
select.form-control:focus {
  background: var(--bg-surface) !important;
  border-color: var(--primary) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
  color: var(--text-primary) !important;
}

.form-control-premium::placeholder,
input.form-control::placeholder,
textarea.form-control::placeholder { color: var(--text-tertiary) !important; }

select.form-control-premium option,
select.form-control option {
  background: white; color: var(--text-primary);
}

.input-group-text {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-tertiary) !important;
  border-radius: 10px 0 0 10px !important;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-premium {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 3px;
}

.table-responsive > .table-premium,
.table-responsive > .table,
.table-responsive-custom > .table-premium,
.table-responsive-custom > .table {
  min-width: 700px;
  white-space: nowrap;
}

.table-premium thead tr th {
  color: var(--text-tertiary);
  font-weight: 600; font-size: 0.75rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.table-premium tbody tr td {
  padding: 0.875rem 1rem;
  background: rgba(99,102,241,0.015);
  transition: background 0.15s;
  font-size: 0.8875rem;
  vertical-align: middle;
}

.table-premium tbody tr:hover td {
  background: rgba(99,102,241,0.04);
}

.table-premium tbody tr td:first-child { border-radius: 10px 0 0 10px; }
.table-premium tbody tr td:last-child  { border-radius: 0 10px 10px 0; }

/* Table toolbar */
.table-toolbar {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.table-search { position: relative; flex: 1; max-width: 320px; }

.table-search input {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  padding: 0.5rem 0.875rem 0.5rem 2.25rem !important;
  font-size: 0.8125rem; width: 100%;
  transition: all 0.15s; outline: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.table-search input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.table-search .search-icon {
  position: absolute; left: 0.75rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary); font-size: 0.75rem;
  pointer-events: none;
}

/* ============================================================
   BADGES
   ============================================================ */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
}
.status-badge::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; flex-shrink: 0;
}

.status-badge.sent      { background: rgba(16,185,129,0.10); color: #047857; border: 1px solid rgba(16,185,129,0.2); }
.status-badge.sent::before      { background: var(--success); }
.status-badge.draft     { background: rgba(100,116,139,0.08); color: #475569; border: 1px solid rgba(100,116,139,0.15); }
.status-badge.draft::before     { background: #94A3B8; }
.status-badge.sending   { background: rgba(99,102,241,0.10); color: var(--primary); border: 1px solid rgba(99,102,241,0.2); }
.status-badge.sending::before   { background: var(--primary); animation: pulse-dot 1.5s infinite; }
.status-badge.scheduled { background: rgba(245,158,11,0.10); color: #B45309; border: 1px solid rgba(245,158,11,0.2); }
.status-badge.scheduled::before { background: var(--warning); }
.status-badge.failed    { background: rgba(239,68,68,0.10);  color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.status-badge.failed::before    { background: var(--danger); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; } 50% { opacity: 0.3; }
}

.badge { font-size: 0.72rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  border-radius: 12px; padding: 0.875rem 1.25rem;
  margin-bottom: 1.5rem; border: 1px solid transparent;
  font-size: 0.875rem;
  display: flex; align-items: center; gap: 0.625rem;
}
.alert-success { background: rgba(16,185,129,0.08) !important; border-color: rgba(16,185,129,0.2) !important; color: #047857 !important; }
.alert-danger  { background: rgba(239,68,68,0.08) !important;  border-color: rgba(239,68,68,0.2)  !important; color: #DC2626 !important; }
.alert-warning { background: rgba(245,158,11,0.08) !important; border-color: rgba(245,158,11,0.2) !important; color: #B45309 !important; }
.alert-info    { background: rgba(59,130,246,0.08) !important; border-color: rgba(59,130,246,0.2) !important; color: #1D4ED8 !important; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 4rem 2rem; text-align: center;
}
.empty-state-icon {
  width: 72px; height: 72px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.06));
  color: var(--primary);
}
.empty-state-title { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; }
.empty-state-desc  { color: var(--text-secondary); font-size: 0.875rem; max-width: 320px; margin: 0 auto 1.5rem; line-height: 1.6; }

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
.activity-list { list-style: none; }
.activity-item {
  display: flex; align-items: flex-start;
  gap: 0.875rem; padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 32px; height: 32px; border-radius: 9px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; margin-top: 2px;
}
.activity-dot.sent       { background: rgba(16,185,129,0.10); color: var(--success); }
.activity-dot.draft      { background: rgba(100,116,139,0.08); color: var(--text-secondary); }
.activity-dot.subscriber { background: rgba(6,182,212,0.10);  color: var(--accent); }
.activity-dot.warning    { background: rgba(245,158,11,0.10);  color: var(--warning); }

.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 0.8125rem; color: var(--text-primary); font-weight: 500; }
.activity-time { font-size: 0.75rem; color: var(--text-tertiary); margin-top: 1px; }

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress {
  background: rgba(99,102,241,0.08) !important;
  border-radius: 99px; overflow: hidden;
}
.progress-bar { border-radius: 99px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.progress-bar.bg-primary { background: linear-gradient(90deg, var(--primary), #818CF8) !important; }
.progress-bar.bg-success { background: linear-gradient(90deg, var(--success), #34D399) !important; }
.progress-bar.bg-warning { background: linear-gradient(90deg, var(--warning), #FCD34D) !important; }
.progress-bar.bg-danger  { background: linear-gradient(90deg, var(--danger),  #F87171) !important; }

/* ============================================================
   BRAND CARDS
   ============================================================ */
.brand-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem;
  display: flex; flex-direction: column; height: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(99,102,241,0.04);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.brand-card:hover {
  box-shadow: 0 8px 28px rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.2);
  transform: translateY(-2px);
}

.brand-logo {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: white; flex-shrink: 0;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

/* ============================================================
   CHART CONTAINERS
   ============================================================ */
.chart-container { position: relative; width: 100%; height: 260px; }
.chart-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 260px;
  border: 1px dashed rgba(99,102,241,0.2);
  border-radius: 12px;
  background: rgba(99,102,241,0.02);
  color: var(--text-tertiary);
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs {
  display: flex; gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 4px;
}
.filter-tab {
  padding: 0.375rem 0.875rem; border-radius: 7px;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--text-secondary); background: none;
  border: none; cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.filter-tab:hover { color: var(--primary); }
.filter-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ============================================================
   CARD HELPERS
   ============================================================ */
.card-title      { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.card-subtitle   { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 2px; }
.card-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; gap: 0.5rem; }
.divider         { height: 1px; background: var(--border); margin: 1.25rem 0; }

/* ============================================================
   LINKS
   ============================================================ */
a { color: inherit; }
a.link-primary { color: var(--primary) !important; text-decoration: none; font-weight: 500; }
a.link-primary:hover { color: var(--primary-hover) !important; text-decoration: underline; }

.hover-text-danger:hover { color: var(--danger) !important; }

/* ============================================================
   MOBILE OVERLAY
   ============================================================ */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.4);
  z-index: 90;
  backdrop-filter: blur(4px);
  display: none;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-fade-in > * { animation: fadeIn 0.4s ease-out both; }
.animate-fade-in > *:nth-child(1) { animation-delay: 0.04s; }
.animate-fade-in > *:nth-child(2) { animation-delay: 0.08s; }
.animate-fade-in > *:nth-child(3) { animation-delay: 0.12s; }
.animate-fade-in > *:nth-child(4) { animation-delay: 0.16s; }

@keyframes pulse {
  0%, 100% { opacity: 0.6; } 50% { opacity: 1; }
}
.animate-pulse { animation: pulse 1.5s cubic-bezier(0.4,0,0.6,1) infinite; }

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 280px;
    box-shadow: 8px 0 32px rgba(99,102,241,0.12);
  }
  .sidebar.show { transform: translateX(0); }

  .main-wrapper  { margin-left: 0; padding: 0 1rem 2rem; }
  .site-header   { padding: 1rem 0; background: rgba(240,244,255,0.95); }
  .btn-mobile-menu { display: flex; }
  .header-search { display: none; }
  .brand-switcher-label { display: none; }
  .premium-card, .stat-card { padding: 1.125rem; border-radius: 14px; }
  .stat-value { font-size: 1.5rem; }
  .page-title { font-size: 1.375rem; }
  .filter-tabs { overflow-x: auto; }

  .table-responsive-custom {
    display: block; width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .main-wrapper { padding: 0 0.75rem 1.5rem; }
  .stat-value { font-size: 1.375rem; }
  .empty-state { padding: 2.5rem 1rem; }
}
