/* ═══════════════════════════════════════════════════════════════
   CSS Custom Properties – Light Mode (default)
═══════════════════════════════════════════════════════════════ */
:root {
  --bg-primary:        #f1f5f9;
  --bg-secondary:      #ffffff;
  --sidebar-bg:        #1e293b;
  --sidebar-text:      #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-hover:     rgba(255,255,255,0.08);
  --sidebar-active-bg: rgba(99,102,241,0.18);
  --sidebar-active-border: #6366f1;
  --accent:            #6366f1;
  --accent-hover:      #4f46e5;
  --accent-soft:       #eef2ff;
  --text-primary:      #0f172a;
  --text-secondary:    #475569;
  --text-muted:        #94a3b8;
  --border:            #e2e8f0;
  --card-bg:           #ffffff;
  --card-shadow:       0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --top-bar-bg:        #ffffff;
  --top-bar-shadow:    0 1px 3px rgba(0,0,0,0.08);
  --sidebar-width:     268px;
  --top-bar-height:    56px;
  --radius-sm:         6px;
  --radius:            10px;
  --radius-lg:         14px;
  --transition:        180ms ease;
  --transition-slow:   280ms ease;
  --badge-core-bg:     #fef3c7;
  --badge-core-text:   #92400e;
  --badge-advanced-bg: #dbeafe;
  --badge-advanced-text: #1e40af;
  --badge-ai-bg:       #ede9fe;
  --badge-ai-text:     #5b21b6;
  --badge-role-bg:     #f1f5f9;
  --badge-role-text:   #475569;
  --kpi-green:         #059669;
  --kpi-red:           #dc2626;
  --kpi-blue:          #2563eb;
  --kpi-purple:        #7c3aed;
  --kpi-orange:        #d97706;
}

/* ═══════════════════════════════════════════════════════════════
   Dark Mode Overrides
═══════════════════════════════════════════════════════════════ */
.app-shell.dark-mode {
  --bg-primary:        #0f172a;
  --bg-secondary:      #1e293b;
  --sidebar-bg:        #0c1524;
  --sidebar-text:      #94a3b8;
  --sidebar-text-active: #e2e8f0;
  --sidebar-hover:     rgba(255,255,255,0.06);
  --sidebar-active-bg: rgba(129,140,248,0.15);
  --sidebar-active-border: #818cf8;
  --accent:            #818cf8;
  --accent-hover:      #6366f1;
  --accent-soft:       #1e1b4b;
  --text-primary:      #e2e8f0;
  --text-secondary:    #94a3b8;
  --text-muted:        #64748b;
  --border:            #334155;
  --card-bg:           #1e293b;
  --card-shadow:       0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  --top-bar-bg:        #1e293b;
  --top-bar-shadow:    0 1px 3px rgba(0,0,0,0.3);
  --badge-core-bg:     #451a03;
  --badge-core-text:   #fbbf24;
  --badge-advanced-bg: #1e3a5f;
  --badge-advanced-text: #93c5fd;
  --badge-ai-bg:       #2e1065;
  --badge-ai-text:     #c4b5fd;
  --badge-role-bg:     #334155;
  --badge-role-text:   #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════
   Reset & Base
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { border: none; outline: none; cursor: pointer; background: none; padding: 0; }
button:focus { outline: none; }
a { text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════
   App Shell Layout
═══════════════════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* ═══════════════════════════════════════════════════════════════
   Sidebar
═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  transition: transform var(--transition-slow), background-color var(--transition-slow);
  z-index: 200;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

@media (max-width: 640px) {
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100%;
    transform: translateX(-100%); z-index: 300;
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .app-shell.sidebar-open .sidebar-overlay { display: block; }
}

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 250;
  backdrop-filter: blur(2px);
  animation: fadeIn var(--transition) ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: var(--top-bar-height);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 20px; line-height: 1; }
.logo-text { font-size: 15px; font-weight: 700; color: #ffffff; letter-spacing: -0.01em; }

.sidebar-close-btn {
  display: none; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px;
  color: var(--sidebar-text);
  transition: background-color var(--transition), color var(--transition);
}
.sidebar-close-btn:hover { background-color: var(--sidebar-hover); color: white; }
@media (max-width: 640px) { .sidebar-close-btn { display: flex; } }

/* ═══════════════════════════════════════════════════════════════
   Nav Menu
═══════════════════════════════════════════════════════════════ */
.nav-menu { padding: 12px 0 24px; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; margin: 0 8px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-size: 13.5px; font-weight: 500;
  transition: background-color var(--transition), color var(--transition); cursor: pointer;
}
.nav-item:hover { background-color: var(--sidebar-hover); color: #ffffff; }
.nav-item.active {
  background-color: var(--sidebar-active-bg); color: var(--sidebar-text-active);
  border-left: 3px solid var(--sidebar-active-border); padding-left: 13px;
}
.nav-item-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-group { margin: 4px 0; }
.nav-group-header {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 16px; border-radius: 0;
  color: var(--sidebar-text); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  transition: background-color var(--transition), color var(--transition);
  cursor: pointer; text-align: left;
}
.nav-group-header:hover { background-color: var(--sidebar-hover); color: #ffffff; }
.nav-group-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-group-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-group-badge {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 9999px; flex-shrink: 0; line-height: 1.6;
}
.nav-group-badge--core    { background-color: rgba(251,191,36,0.2);  color: #fbbf24; }
.nav-group-badge--advanced { background-color: rgba(59,130,246,0.2); color: #60a5fa; }
.nav-group-badge--ai       { background-color: rgba(139,92,246,0.2); color: #a78bfa; }
.nav-group-chevron {
  font-size: 16px; font-weight: 700; color: var(--sidebar-text);
  transition: transform var(--transition); display: inline-block; line-height: 1;
}
.chevron-open { transform: rotate(90deg); }
.nav-group-items { max-height: 0; overflow: hidden; transition: max-height var(--transition-slow) ease; }
.nav-group-items--open { max-height: 2000px; }

.nav-sub-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 16px 7px 44px;
  color: var(--sidebar-text); font-size: 12.5px; font-weight: 400;
  transition: background-color var(--transition), color var(--transition);
  line-height: 1.4; cursor: pointer;
}
.nav-sub-item:hover { background-color: var(--sidebar-hover); color: #e2e8f0; }
.nav-sub-item.active {
  color: #ffffff; background-color: var(--sidebar-active-bg);
  border-left: 2px solid var(--sidebar-active-border); padding-left: 42px;
}
.nav-sub-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.nav-sub-label { flex: 1; line-height: 1.35; }
.nav-sub-item--all { color: var(--accent); font-size: 12px; font-style: italic; opacity: 0.85; }
.nav-sub-item--all:hover { opacity: 1; color: var(--accent-hover); }
.nav-divider { height: 1px; background-color: rgba(255,255,255,0.06); margin: 10px 16px; }

/* ═══════════════════════════════════════════════════════════════
   Main Wrapper & Top Bar
═══════════════════════════════════════════════════════════════ */
.main-wrapper {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background-color: var(--bg-primary);
  transition: background-color var(--transition-slow);
}

.top-bar {
  position: sticky; top: 0; z-index: 100;
  height: var(--top-bar-height);
  background-color: var(--top-bar-bg);
  box-shadow: var(--top-bar-shadow);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 12px;
  transition: background-color var(--transition-slow), box-shadow var(--transition-slow);
}
.top-bar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.top-bar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.hamburger-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background-color var(--transition), color var(--transition); flex-shrink: 0;
}
.hamburger-btn:hover { background-color: var(--border); color: var(--text-primary); }
@media (min-width: 641px) { .hamburger-btn { display: none; } }

.app-title-text {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.theme-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}
.theme-toggle-btn:hover { background-color: var(--border); color: var(--accent); transform: rotate(15deg); }

.user-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background-color: var(--accent); color: #ffffff; font-size: 13px;
  cursor: pointer; transition: transform var(--transition), box-shadow var(--transition);
}
.user-avatar:hover { transform: scale(1.05); box-shadow: 0 0 0 3px rgba(99,102,241,0.2); }

/* ═══════════════════════════════════════════════════════════════
   Content Area
═══════════════════════════════════════════════════════════════ */
.content-area { flex: 1; padding: 28px 28px 40px; overflow-x: hidden; }
@media (max-width: 640px) { .content-area { padding: 16px 16px 32px; } }

/* ═══════════════════════════════════════════════════════════════
   Page Headers
═══════════════════════════════════════════════════════════════ */
.page-header { margin-bottom: 24px; }

.page-header h1 {
  font-size: 22px; font-weight: 800; color: var(--text-primary);
  margin: 0 0 5px; letter-spacing: -0.03em;
}
.page-header p { font-size: 13.5px; color: var(--text-secondary); margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   Generic Card (static content only – no hover lift)
═══════════════════════════════════════════════════════════════ */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
@media (max-width: 480px) { .card-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════
   KPI Cards – 4-column grid with accent left border
═══════════════════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.kpi-card--green  { border-left-color: var(--kpi-green); }
.kpi-card--blue   { border-left-color: var(--kpi-blue); }
.kpi-card--orange { border-left-color: var(--kpi-orange); }
.kpi-card--purple { border-left-color: var(--kpi-purple); }
.kpi-card--red    { border-left-color: var(--kpi-red); }

.kpi-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kpi-card-title {
  font-size: 11.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.4; flex: 1;
}
.kpi-card-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.kpi-icon-blue   { background-color: #dbeafe; }
.kpi-icon-green  { background-color: #d1fae5; }
.kpi-icon-purple { background-color: #ede9fe; }
.kpi-icon-orange { background-color: #fef3c7; }
.kpi-icon-red    { background-color: #fee2e2; }

.kpi-card-value {
  font-size: 28px; font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.04em; line-height: 1.1;
}
.kpi-card-change { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.kpi-change-positive { color: var(--kpi-green); }
.kpi-change-negative { color: var(--kpi-red); }

/* ═══════════════════════════════════════════════════════════════
   Report Cards (clickable, whole-card CTA)
═══════════════════════════════════════════════════════════════ */
.report-card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  color: inherit; text-decoration: none; cursor: pointer;
}
.report-card:hover {
  transform: translateY(-3px); box-shadow: var(--card-shadow-hover);
  border-color: var(--accent); text-decoration: none; color: inherit;
}

.report-card-header { display: flex; align-items: flex-start; gap: 12px; }
.report-card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.report-icon-core     { background-color: #fef3c7; }
.report-icon-advanced { background-color: #dbeafe; }
.report-icon-ai       { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }

.report-card-title-area { flex: 1; min-width: 0; }
.report-card-id {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.05em;
  display: flex; align-items: center; gap: 6px;
}
.report-card-title { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.35; margin: 0; }
.report-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0; flex: 1; }
.report-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px;
  border-top: 1px solid var(--border);
}
.report-card-arrow {
  font-size: 12px; font-weight: 700; color: var(--accent);
  white-space: nowrap; flex-shrink: 0; transition: transform var(--transition);
}
.report-card:hover .report-card-arrow { transform: translateX(3px); }
.roles-list { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }

/* ═══════════════════════════════════════════════════════════════
   Badges
═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 9999px;
  font-size: 11px; font-weight: 600; white-space: nowrap; line-height: 1.6;
}
.badge-core     { background-color: var(--badge-core-bg);     color: var(--badge-core-text); }
.badge-advanced { background-color: var(--badge-advanced-bg); color: var(--badge-advanced-text); }
.badge-ai       { background-color: var(--badge-ai-bg);       color: var(--badge-ai-text); }
.badge-role     { background-color: var(--badge-role-bg);     color: var(--badge-role-text); }

/* ═══════════════════════════════════════════════════════════════
   Buttons
═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  border: none; white-space: nowrap; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background-color: var(--accent); color: #ffffff; }
.btn-primary:hover { background-color: var(--accent-hover); box-shadow: 0 4px 12px rgba(99,102,241,0.35); }
.btn-outline { background-color: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background-color: var(--accent-soft); }
.btn-ghost { background-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background-color: var(--border); color: var(--text-primary); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════
   Section Headers (page-level)
═══════════════════════════════════════════════════════════════ */
.section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; margin-top: 8px;
}
.section-header-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.section-header-icon--core     { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.section-header-icon--advanced { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.section-header-icon--ai       { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.section-header h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin: 0 0 2px; letter-spacing: -0.01em; }
.section-header p { font-size: 12.5px; color: var(--text-muted); margin: 0; }
.section-badge { margin-left: auto; }

/* Card-level section label (inside cards) */
.section-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   Dashboard Category Cards
═══════════════════════════════════════════════════════════════ */
.category-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer; text-decoration: none; color: inherit;
}
.category-card:hover {
  transform: translateY(-3px); box-shadow: var(--card-shadow-hover);
  border-color: var(--accent); text-decoration: none; color: inherit;
}
.category-card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.category-card-icon--core     { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.category-card-icon--advanced { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.category-card-icon--ai       { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.category-card h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0 0 3px; }
.category-card p  { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.category-card-count {
  font-size: 30px; font-weight: 800; color: var(--accent);
  letter-spacing: -0.04em; line-height: 1;
}
.category-card-count span { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.category-card-arrow {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 600; color: var(--accent);
  transition: gap var(--transition);
}
.category-card:hover .category-card-arrow { gap: 8px; }

/* ═══════════════════════════════════════════════════════════════
   Report Detail Page
═══════════════════════════════════════════════════════════════ */
.report-detail-header {
  display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px;
  padding: 20px; background-color: var(--card-bg);
  border-radius: var(--radius); box-shadow: var(--card-shadow); border: 1px solid var(--border);
}
.report-detail-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.report-detail-meta { flex: 1; min-width: 0; }
.report-detail-meta h1 {
  font-size: 20px; font-weight: 800; color: var(--text-primary);
  margin: 0 0 5px; letter-spacing: -0.025em;
}
.report-detail-meta p { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 10px; line-height: 1.5; }

/* 2-column layout for detail page on desktop */
.detail-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (min-width: 900px) {
  .detail-cols { grid-template-columns: 3fr 2fr; }
}

/* ═══════════════════════════════════════════════════════════════
   Chart Components
═══════════════════════════════════════════════════════════════ */
.chart-card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 20px;
}

.chart-title {
  font-size: 13.5px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 16px; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 6px;
}

.chart-container {
  width: 100%; overflow: hidden;
}
.chart-container svg {
  width: 100%; height: auto; display: block;
}
.chart-gridline { stroke: var(--border); stroke-width: 1; fill: none; }
.chart-axis-text {
  font-size: 10px; fill: var(--text-muted);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.chart-bar { transition: opacity 0.15s ease; }
.chart-bar:hover { opacity: 0.8; }
.chart-line {
  fill: none; stroke-width: 2.5;
  stroke-linejoin: round; stroke-linecap: round;
}
.chart-line-forecast {
  fill: none; stroke-width: 2; stroke-dasharray: 6 3;
  stroke-linejoin: round; stroke-linecap: round;
}
.chart-area { pointer-events: none; }
.chart-dot { stroke: var(--card-bg); stroke-width: 1.5; }

.chart-legend {
  display: flex; gap: 16px; margin-top: 8px;
  font-size: 11.5px; color: var(--text-muted); flex-wrap: wrap;
}
.chart-legend-item { display: flex; align-items: center; gap: 5px; }
.chart-legend-line {
  display: inline-block; width: 20px; height: 2.5px;
  border-radius: 2px; vertical-align: middle;
}
.chart-legend-dash {
  display: inline-block; width: 20px; height: 0;
  border-top: 2.5px dashed currentColor; vertical-align: middle;
}

/* Donut chart – side-by-side layout */
.donut-wrap {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.donut-svg-wrap {
  flex-shrink: 0; width: 180px;
}
.donut-svg-wrap svg { width: 100%; height: auto; display: block; }

.donut-legend {
  flex: 1; min-width: 120px;
  display: flex; flex-direction: column; gap: 8px;
}
.donut-legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-secondary);
}
.donut-legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.donut-legend-label { flex: 1; }
.donut-legend-pct { font-weight: 700; color: var(--text-primary); font-size: 12.5px; }

/* ═══════════════════════════════════════════════════════════════
   Business Context / Insights
═══════════════════════════════════════════════════════════════ */
.context-card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 20px;
  height: 100%;
}

.insight-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.insight-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.45;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
}
.insight-list li::before {
  content: "→"; color: var(--accent); flex-shrink: 0; margin-top: 1px;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   Data Table
═══════════════════════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-sm); }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; color: var(--text-primary);
}
.data-table th {
  padding: 10px 14px; text-align: left;
  color: var(--text-muted); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
  background-color: var(--bg-primary);
  white-space: nowrap;
}
.data-table th.th-right, .data-table td.td-right { text-align: right; }
.data-table th.th-hl { color: var(--accent); }
.data-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle; line-height: 1.4;
}
.data-table td.td-hl { font-weight: 700; color: var(--accent); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background-color: var(--bg-primary); }

/* ═══════════════════════════════════════════════════════════════
   Placeholder (fallback chart state)
═══════════════════════════════════════════════════════════════ */
.chart-placeholder {
  background: var(--bg-primary);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-muted);
}
.chart-placeholder-icon { font-size: 36px; opacity: 0.4; }
.chart-placeholder p { font-size: 14px; font-weight: 500; margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   Utility
═══════════════════════════════════════════════════════════════ */
.mt-0  { margin-top: 0; }       .mb-0  { margin-bottom: 0; }
.mt-4  { margin-top: 4px; }     .mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }    .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }    .mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.text-muted { color: var(--text-muted); font-size: 13px; }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   Blazor Error UI
═══════════════════════════════════════════════════════════════ */
#blazor-error-ui {
  color-scheme: light only; background: #fef9c3; bottom: 0;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.15); box-sizing: border-box;
  display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed; width: 100%; z-index: 1000;
  font-size: 13px; color: #713f12;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; font-size: 16px; }
#blazor-error-ui .reload  { font-weight: 600; color: #6366f1; margin-left: 8px; }

.valid.modified:not([type=checkbox]) { outline: 1.5px solid #10b981; }
.invalid { outline: 1.5px solid #ef4444; }
.validation-message { color: #ef4444; font-size: 12px; margin-top: 4px; }
.blazor-error-boundary { background: #b32121; padding: 1rem 1rem 1rem 3.7rem; color: white; }
.blazor-error-boundary::after { content: "Đã xảy ra lỗi chưa được xử lý."; }

.chart-val-text {
  font-size: 9.5px;
  font-weight: 700;
  fill: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   Filter Bar (report list pages + interactive table)
═══════════════════════════════════════════════════════════════ */
.report-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.filter-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
  transition: border-color var(--transition);
}
.filter-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.filter-icon { font-size: 13px; flex-shrink: 0; color: var(--text-muted); }

.filter-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-primary);
  min-width: 0;
}
.filter-input::placeholder { color: var(--text-muted); }

.filter-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  transition: color var(--transition);
  flex-shrink: 0;
}
.filter-clear-btn:hover { color: var(--kpi-red); }

.filter-group-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.filter-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 28px 6px 10px;
  font-size: 12.5px;
  color: var(--text-primary);
  background-color: var(--card-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.filter-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: auto;
  font-weight: 600;
}

/* Search input for report list pages */
.report-search-input {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px 8px 36px;
  font-size: 13px;
  color: var(--text-primary);
  background-color: var(--card-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.report-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.report-search-input::placeholder { color: var(--text-muted); }

.report-role-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 28px 8px 10px;
  font-size: 12.5px;
  color: var(--text-primary);
  background-color: var(--card-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.report-role-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.report-filter-result {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-left: auto;
  font-weight: 600;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   Sortable Column Headers
═══════════════════════════════════════════════════════════════ */
.th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color var(--transition), background-color var(--transition);
}
.th-sortable:hover {
  color: var(--accent);
  background-color: var(--accent-soft);
}

.sort-indicator {
  display: inline-block;
  margin-left: 5px;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity var(--transition), color var(--transition);
  vertical-align: middle;
}
.sort-indicator.sort-active {
  opacity: 1;
  color: var(--accent);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   Group-by Row Header
═══════════════════════════════════════════════════════════════ */
.group-header-row {
  background-color: var(--accent-soft) !important;
}
.group-header-cell {
  padding: 8px 14px !important;
  font-size: 12px !important;
}
.group-header-label {
  color: var(--text-muted);
  margin-right: 4px;
}
.group-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 8px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 1px 6px;
}

/* Table empty state */
.table-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.table-empty p { font-size: 13px; margin: 0; }

/* Interactive table outer wrapper */
.interactive-table-wrap { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   Home Page – Hero & Features
═══════════════════════════════════════════════════════════════ */
.home-hero {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-secondary) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px 40px;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(99,102,241,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.home-hero-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(99,102,241,0.25);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.home-hero-title {
  font-size: 40px;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 14px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.home-hero-title-accent { color: var(--accent); }
.home-hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 28px;
}
.home-hero-cta { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.home-cta-btn { font-size: 14px; padding: 10px 24px; }

/* Stats row */
.home-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
@media (max-width: 768px) { .home-stats-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .home-stats-row { grid-template-columns: 1fr; } }

.home-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.home-stat-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.home-stat-value {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}
.home-stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* Feature grid */
.home-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .home-features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .home-features-grid { grid-template-columns: 1fr; } }

.home-feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.home-feature-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.home-feature-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}
.home-feature-card h3 {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  margin: 0 0 8px; letter-spacing: -0.01em;
}
.home-feature-card p {
  font-size: 13px; color: var(--text-secondary); margin: 0 0 14px; line-height: 1.55;
}
.home-feature-link {
  font-size: 12.5px; font-weight: 600; color: var(--accent);
  text-decoration: none; transition: color var(--transition);
}
.home-feature-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* Provider chips */
.home-providers-row {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.home-provider-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.home-provider-chip:hover {
  border-color: var(--chip-color, var(--accent));
  color: var(--chip-color, var(--accent));
  background: var(--bg-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   Sync Config Page
═══════════════════════════════════════════════════════════════ */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.provider-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column; gap: 12px;
}
.provider-card:hover { box-shadow: var(--card-shadow-hover); }
.provider-card--error { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.02); }
.provider-card--disabled { opacity: 0.6; }
.provider-card--add {
  border-style: dashed; cursor: pointer;
  align-items: center; justify-content: center;
  min-height: 160px;
  transition: border-color var(--transition), background var(--transition);
}
.provider-card--add:hover { border-color: var(--accent); background: var(--accent-soft); }

.provider-card-header { display: flex; align-items: center; gap: 12px; }
.provider-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.provider-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.provider-status { font-size: 11.5px; font-weight: 600; margin-top: 1px; }
.provider-status--connected    { color: #10b981; }
.provider-status--error        { color: #ef4444; }
.provider-status--syncing      { color: #f59e0b; }
.provider-status--disconnected { color: var(--text-muted); }

.provider-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; margin: 0; }

.provider-stats { display: flex; gap: 16px; }
.provider-stat { display: flex; flex-direction: column; gap: 1px; }
.provider-stat-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.provider-stat-value { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.provider-objects { display: flex; flex-wrap: wrap; gap: 4px; }
.provider-endpoint {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.provider-endpoint-label { font-size: 10.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.provider-endpoint-url { font-size: 11px; color: var(--accent); font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-actions { display: flex; gap: 8px; margin-top: auto; }

/* Toggle Switch */
.toggle-switch {
  position: relative; display: inline-block;
  width: 38px; height: 22px; cursor: pointer; flex-shrink: 0;
}
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute; inset: 0;
  background-color: var(--border);
  border-radius: 9999px;
  transition: background-color var(--transition);
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* Tabs */
.sync-tab-bar {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}
.sync-tab {
  background: none; border: none; cursor: pointer;
  padding: 9px 18px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.sync-tab:hover { color: var(--text-primary); background: var(--accent-soft); }
.sync-tab--active { color: var(--accent); border-bottom-color: var(--accent); }

/* Modal */
.sync-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}
.sync-modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  width: 480px; max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sync-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px; color: var(--text-primary);
}
.sync-modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--text-muted); line-height: 1;
  transition: color var(--transition);
}
.sync-modal-close:hover { color: var(--kpi-red); }
.sync-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.sync-modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

/* Form elements */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.form-input {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 13px; color: var(--text-primary);
  background: var(--card-bg); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.sync-checkbox-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  transition: background var(--transition), border-color var(--transition);
}
.sync-checkbox-label:hover { background: var(--accent-soft); border-color: var(--accent); }
.sync-checkbox-label input { accent-color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   Landing Layout Shell
═══════════════════════════════════════════════════════════════ */
.landing-shell {
  min-height: 100vh;
  background: #ffffff;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   Landing Page – Animations
═══════════════════════════════════════════════════════════════ */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatBlob {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-18px) scale(1.04); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes countUp {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.lp-anim-fade-down { animation: fadeDown 0.55s cubic-bezier(0.16,1,0.3,1) both; }
.lp-anim-fade-up   { animation: fadeUp  0.55s cubic-bezier(0.16,1,0.3,1) both; }
.lp-anim-fade-in   { animation: fadeIn  0.5s ease both; }
.lp-anim-count     { animation: countUp 0.6s cubic-bezier(0.34,1.56,0.64,1) both; }

/* ═══════════════════════════════════════════════════════════════
   Landing Page – Colors & Utils
═══════════════════════════════════════════════════════════════ */
.lp-root { display: flex; flex-direction: column; min-height: 100vh; }
.lp-text-gradient {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 20px; border-radius: 9999px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; border: none;
  transition: all 0.2s ease; white-space: nowrap;
}
.lp-btn-primary { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,0.35); }
.lp-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.45); }
.lp-btn-outline { background: transparent; color: #6366f1; border: 1.5px solid #6366f1; }
.lp-btn-outline:hover { background: #eef2ff; }
.lp-btn-ghost { background: transparent; color: #475569; }
.lp-btn-ghost:hover { background: #f1f5f9; color: #0f172a; }
.lp-btn-lg { padding: 13px 28px; font-size: 15px; }
.lp-btn-full { width: 100%; display: flex; }

/* ─── Nav ─────────────────────────────────────────────────────── */
.lp-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
}
.lp-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  padding: 14px 24px;
}
.lp-nav-logo {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 800; font-size: 16px; color: #0f172a; flex-shrink: 0;
}
.lp-nav-logo-icon { font-size: 22px; }
.lp-nav-logo-text { letter-spacing: -0.03em; }
.lp-nav-links {
  display: flex; gap: 28px; margin-left: 8px;
}
.lp-nav-link {
  font-size: 14px; font-weight: 500; color: #475569;
  text-decoration: none; transition: color 0.15s;
}
.lp-nav-link:hover { color: #6366f1; }
.lp-nav-actions { display: flex; gap: 8px; margin-left: auto; }
.lp-nav-hamburger {
  display: none; flex-direction: column; gap: 4px; padding: 4px;
  background: none; border: none; cursor: pointer; margin-left: auto;
}
.lp-nav-hamburger span { display: block; width: 22px; height: 2px; background: #475569; border-radius: 2px; }
.lp-nav-mobile {
  border-top: 1px solid #e2e8f0;
  display: flex; flex-direction: column; padding: 8px 0;
}
.lp-nav-mobile-link {
  padding: 10px 20px; font-size: 14px; font-weight: 500; color: #475569;
  text-decoration: none;
}
.lp-nav-mobile-link:hover { background: #f1f5f9; }
@media (max-width: 768px) {
  .lp-nav-links, .lp-nav-actions { display: none; }
  .lp-nav-hamburger { display: flex; }
}

/* ─── Hero ────────────────────────────────────────────────────── */
.lp-hero {
  position: relative; overflow: hidden;
  padding: 80px 24px 60px;
  background: linear-gradient(160deg, #fafbff 0%, #f0f4ff 40%, #faf5ff 100%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 48px;
}
.lp-hero-blob {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  animation: floatBlob 7s ease-in-out infinite;
}
.lp-blob-1 { width:480px; height:480px; top:-100px; left:-100px; background:radial-gradient(circle,rgba(99,102,241,0.12) 0%,transparent 70%); animation-delay:0s; }
.lp-blob-2 { width:360px; height:360px; top:20%; right:-60px; background:radial-gradient(circle,rgba(139,92,246,0.1) 0%,transparent 70%); animation-delay:2s; }
.lp-blob-3 { width:280px; height:280px; bottom:-40px; left:30%; background:radial-gradient(circle,rgba(6,182,212,0.08) 0%,transparent 70%); animation-delay:4s; }
.lp-hero-content {
  max-width: 540px; position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
}
.lp-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e0e7ff; border-radius: 9999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; color: #4338ca;
  box-shadow: 0 2px 8px rgba(99,102,241,0.12);
}
.lp-hero-badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
  animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
  0%,100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
  50%      { box-shadow: 0 0 0 6px rgba(16,185,129,0.05); }
}
.lp-hero-title {
  font-size: 46px; font-weight: 900; line-height: 1.1; letter-spacing: -0.04em;
  color: #0f172a; margin: 0;
}
.lp-hero-sub {
  font-size: 16px; color: #475569; line-height: 1.65; margin: 0;
}
.lp-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-hero-trust { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lp-trust-item { font-size: 12.5px; color: #64748b; font-weight: 500; }
.lp-trust-sep  { color: #cbd5e1; }

/* Hero mockup */
.lp-hero-mockup {
  max-width: 460px; width: 100%;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(15,23,42,0.14), 0 4px 16px rgba(15,23,42,0.08);
  border: 1px solid #e2e8f0;
  position: relative; z-index: 1;
}
.lp-mockup-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.lp-mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.lp-mockup-url {
  font-size: 11px; color: #94a3b8; margin-left: 6px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 2px 10px; flex: 1; text-align: center;
}
.lp-mockup-body { padding: 16px; }
.lp-mockup-kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 16px; }
.lp-mkpi { border-radius: 8px; padding: 10px 8px; text-align: center; }
.lp-mkpi-green  { background: #d1fae5; }
.lp-mkpi-blue   { background: #dbeafe; }
.lp-mkpi-purple { background: #ede9fe; }
.lp-mkpi-orange { background: #ffedd5; }
.lp-mkpi-val  { font-size: 13px; font-weight: 800; color: #0f172a; }
.lp-mkpi-lbl  { font-size: 9px; color: #64748b; font-weight: 600; text-transform: uppercase; margin-top: 1px; }
.lp-mkpi-chg  { font-size: 9.5px; color: #10b981; font-weight: 700; margin-top: 2px; }
.lp-mockup-chart { margin-bottom: 12px; }
.lp-chart-label { font-size: 11px; color: #475569; font-weight: 600; margin-bottom: 8px; }
.lp-chart-bars {
  display: flex; align-items: flex-end; gap: 2px;
  height: 70px; padding: 0 2px;
}
.lp-bar {
  flex: 1; background: linear-gradient(to top,#6366f1,#8b5cf6);
  border-radius: 3px 3px 0 0; min-width: 4px;
  transition: height 0.3s ease;
  opacity: 0.8;
}
.lp-bar:nth-child(3n+1) { opacity: 1; }
.lp-bar:nth-child(even) { background: linear-gradient(to top,#818cf8,#a78bfa); opacity: 0.65; }
.lp-chart-axis { font-size: 9px; color: #94a3b8; margin-top: 4px; display: flex; justify-content: space-between; }
.lp-mockup-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lp-mbadge { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 9999px; }
.lp-mbadge-green  { background: #d1fae5; color: #065f46; }
.lp-mbadge-blue   { background: #dbeafe; color: #1e40af; }
.lp-mbadge-orange { background: #ffedd5; color: #9a3412; }

@media (max-width: 900px) {
  .lp-hero { padding: 60px 20px 40px; }
  .lp-hero-title { font-size: 34px; }
  .lp-hero-mockup { max-width: 100%; }
}

/* ─── Stats ───────────────────────────────────────────────────── */
.lp-stats { background: #0f172a; padding: 40px 24px; }
.lp-stats-inner {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 20px;
}
.lp-stat { text-align: center; }
.lp-stat-num {
  font-size: 40px; font-weight: 900; color: #fff;
  letter-spacing: -0.04em; line-height: 1;
}
.lp-stat-plus { color: #6366f1; }
.lp-stat-lbl { font-size: 13px; color: #64748b; margin-top: 4px; font-weight: 500; }
@media (max-width: 600px) { .lp-stats-inner { grid-template-columns: repeat(2,1fr); } }

/* ─── Sections ────────────────────────────────────────────────── */
.lp-section { padding: 80px 24px; background: #fff; }
.lp-section-alt { background: #f8fafc; }
.lp-section-inner { max-width: 1100px; margin: 0 auto; }
.lp-section-header { text-align: center; margin-bottom: 52px; }
.lp-section-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: #6366f1; margin-bottom: 12px;
}
.lp-section-title {
  font-size: 36px; font-weight: 900; color: #0f172a;
  letter-spacing: -0.04em; line-height: 1.15; margin: 0 0 16px;
}
.lp-section-sub { font-size: 16px; color: #475569; max-width: 540px; margin: 0 auto; line-height: 1.65; }
@media (max-width: 768px) { .lp-section { padding: 56px 20px; } .lp-section-title { font-size: 28px; } }

/* ─── Features grid ───────────────────────────────────────────── */
.lp-features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width: 900px) { .lp-features-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px) { .lp-features-grid { grid-template-columns: 1fr; } }
.lp-feature-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.lp-feature-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.lp-feature-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 14px;
}
.lp-feature-card h3 { font-size: 16px; font-weight: 700; color: #0f172a; margin: 0 0 8px; }
.lp-feature-card p  { font-size: 13.5px; color: #475569; margin: 0 0 14px; line-height: 1.6; }
.lp-feature-link    { font-size: 13px; font-weight: 700; color: #6366f1; text-decoration: none; }
.lp-feature-link:hover { text-decoration: underline; }

/* ─── How it works ────────────────────────────────────────────── */
.lp-steps { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; justify-content: center; }
.lp-step {
  flex: 1; min-width: 200px; max-width: 260px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
}
.lp-step-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}
.lp-step-content h3 { font-size: 15px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.lp-step-content p  { font-size: 13px; color: #475569; margin: 0; line-height: 1.55; }
.lp-step-arrow { font-size: 24px; color: #cbd5e1; align-self: center; padding-top: 4px; }
@media (max-width: 600px) { .lp-step-arrow { display: none; } }

/* ─── Integrations ────────────────────────────────────────────── */
.lp-integrations-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 14px; }
@media (max-width: 900px) { .lp-integrations-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 480px) { .lp-integrations-grid { grid-template-columns: repeat(2,1fr); } }
.lp-integration-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 16px 12px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.lp-integration-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
.lp-int-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 8px; }
.lp-int-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.lp-int-desc { font-size: 11px; color: #64748b; margin-top: 2px; line-height: 1.4; }
.lp-int-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 9999px; font-size: 10px; font-weight: 700; }
.lp-int-badge-connected { background: #d1fae5; color: #065f46; }
.lp-int-badge-coming    { background: #f1f5f9; color: #64748b; }

/* ─── Pricing ─────────────────────────────────────────────────── */
.lp-pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; max-width: 860px; margin: 0 auto; }
@media (max-width: 768px) { .lp-pricing-grid { grid-template-columns: 1fr; max-width: 400px; } }
.lp-plan {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 16px;
  padding: 28px 24px; position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.lp-plan:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(0,0,0,0.1); }
.lp-plan-featured {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08), 0 4px 20px rgba(99,102,241,0.18);
  transform: scale(1.03);
}
.lp-plan-featured:hover { transform: scale(1.03) translateY(-3px); }
.lp-plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff;
  padding: 4px 14px; border-radius: 9999px; font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.lp-plan-name  { font-size: 18px; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.lp-plan-price { font-size: 28px; font-weight: 900; color: #6366f1; margin-bottom: 6px; }
.lp-plan-period { font-size: 14px; font-weight: 500; color: #94a3b8; }
.lp-plan-desc  { font-size: 13px; color: #64748b; margin-bottom: 20px; }
.lp-plan-features { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.lp-plan-features li { font-size: 13.5px; color: #334155; }
.lp-plan-disabled { color: #94a3b8 !important; text-decoration: line-through; }

/* ─── CTA section ─────────────────────────────────────────────── */
.lp-cta-section {
  background: linear-gradient(135deg,#1e1b4b 0%,#312e81 50%,#1e3a5f 100%);
  padding: 80px 24px; text-align: center; position: relative; overflow: hidden;
}
.lp-cta-blob {
  position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle,rgba(139,92,246,0.25) 0%,transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  animation: floatBlob 8s ease-in-out infinite;
  pointer-events: none;
}
.lp-cta-inner { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.lp-cta-section h2 { font-size: 36px; font-weight: 900; color: #fff; margin: 0 0 16px; letter-spacing: -0.04em; line-height: 1.2; }
.lp-cta-section p  { font-size: 16px; color: #94a3b8; margin: 0 0 32px; line-height: 1.65; }
.lp-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Footer ──────────────────────────────────────────────────── */
.lp-footer { background: #0f172a; padding: 56px 24px 0; margin-top: auto; }
.lp-footer-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 48px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid #1e293b; }
.lp-footer-brand { max-width: 280px; }
.lp-footer-logo { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.lp-footer-brand p { font-size: 13px; color: #64748b; line-height: 1.6; margin: 0; }
.lp-footer-links { display: flex; gap: 40px; flex: 1; justify-content: flex-end; flex-wrap: wrap; }
.lp-footer-col { display: flex; flex-direction: column; gap: 10px; }
.lp-footer-col-title { font-size: 12px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.lp-footer-col a { font-size: 13px; color: #64748b; text-decoration: none; transition: color 0.15s; }
.lp-footer-col a:hover { color: #e2e8f0; }
.lp-footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; gap: 8px; }
.lp-footer-bottom span { font-size: 12.5px; color: #475569; }
.lp-footer-bottom-links { display: flex; gap: 16px; }
.lp-footer-bottom-links a { font-size: 12.5px; color: #475569; text-decoration: none; }
.lp-footer-bottom-links a:hover { color: #94a3b8; }

/* ─── Legal pages ─────────────────────────────────────────────── */
.lp-legal-page { min-height: 100vh; background: #fff; }
.lp-legal-content { max-width: 720px; margin: 0 auto; padding: 40px 24px 80px; }
.lp-legal-header { margin-bottom: 32px; padding-bottom: 20px; border-bottom: 2px solid #e2e8f0; }
.lp-legal-header h1 { font-size: 30px; font-weight: 900; color: #0f172a; margin: 0 0 6px; letter-spacing: -0.03em; }
.lp-legal-header p  { font-size: 13px; color: #64748b; margin: 0; }
.lp-legal-body h2 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 28px 0 10px; }
.lp-legal-body p  { font-size: 14px; color: #334155; line-height: 1.7; margin: 0 0 12px; }
.lp-legal-body ul { margin: 0 0 12px; padding-left: 20px; }
.lp-legal-body ul li { font-size: 14px; color: #334155; line-height: 1.7; margin-bottom: 4px; }
.lp-legal-footer { display: flex; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid #e2e8f0; }

/* ═══════════════════════════════════════════════════════════════
   Auth Pages (Login, Register, Forgot Password)
═══════════════════════════════════════════════════════════════ */
.auth-shell {
  display: flex; min-height: 100vh;
}
.auth-shell-centered {
  align-items: center; justify-content: center; background: #f8fafc;
}
.auth-single-panel {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 440px; padding: 36px 36px 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}
/* Left gradient panel */
.auth-panel-left {
  flex: 0 0 420px; position: relative; overflow: hidden;
  background: linear-gradient(160deg,#1e1b4b 0%,#312e81 50%,#1a365d 100%);
  display: flex; flex-direction: column;
}
.auth-panel-blob {
  position: absolute; border-radius: 50%; pointer-events: none;
  animation: floatBlob 8s ease-in-out infinite;
}
.auth-blob-1 { width: 320px; height: 320px; top: -60px; left: -60px; background: radial-gradient(circle,rgba(139,92,246,0.3) 0%,transparent 70%); }
.auth-blob-2 { width: 240px; height: 240px; bottom: 30px; right: -40px; background: radial-gradient(circle,rgba(6,182,212,0.2) 0%,transparent 70%); animation-delay: 3s; }
.auth-panel-content {
  position: relative; z-index: 1; padding: 40px;
  display: flex; flex-direction: column; gap: 32px; height: 100%;
}
.auth-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 16px; font-weight: 800; color: #fff; }
.auth-logo-center { justify-content: center; margin-bottom: 24px; }
.auth-panel-tagline h2 { font-size: 26px; font-weight: 900; color: #fff; margin: 0 0 10px; letter-spacing: -0.03em; line-height: 1.2; }
.auth-panel-tagline p  { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.6; margin: 0; }
.auth-panel-features { display: flex; flex-direction: column; gap: 12px; }
.auth-panel-feat { display: flex; align-items: center; gap: 12px; }
.auth-feat-icon { font-size: 20px; width: 36px; height: 36px; background: rgba(255,255,255,0.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-panel-feat span:last-child { font-size: 13.5px; color: rgba(255,255,255,0.85); font-weight: 500; }
/* Right form panel */
.auth-panel-right {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: #fff; padding: 40px 24px;
}
.auth-form-wrap { width: 100%; max-width: 380px; }
.auth-form-header { margin-bottom: 28px; }
.auth-form-header h1 { font-size: 26px; font-weight: 900; color: #0f172a; margin: 0 0 6px; letter-spacing: -0.03em; }
.auth-form-header p  { font-size: 14px; color: #64748b; margin: 0; }
.auth-form-header a  { color: #6366f1; font-weight: 600; text-decoration: none; }
.auth-form-header a:hover { text-decoration: underline; }
.auth-alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; font-weight: 500; }
.auth-alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.auth-field { margin-bottom: 14px; }
.auth-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 700; color: #374151;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 5px;
}
.auth-label-link { font-size: 12px; font-weight: 600; color: #6366f1; text-decoration: none; text-transform: none; letter-spacing: 0; }
.auth-label-link:hover { text-decoration: underline; }
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-icon {
  position: absolute; left: 12px; color: #94a3b8;
  display: flex; align-items: center; pointer-events: none;
}
.auth-input {
  width: 100%; padding: 10px 12px 10px 38px;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 14px; color: #0f172a; background: #fff; outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.auth-input-simple { padding: 10px 12px; }
.auth-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.auth-input-toggle {
  position: absolute; right: 10px; font-size: 16px; background: none; border: none;
  cursor: pointer; color: #94a3b8; padding: 2px; line-height: 1;
}
.auth-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.auth-pwd-strength { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.auth-pwd-bar { flex: 1; height: 4px; background: #e2e8f0; border-radius: 9999px; overflow: hidden; }
.auth-pwd-fill { height: 100%; border-radius: 9999px; transition: width 0.3s ease; }
.auth-pwd-label { font-size: 11px; font-weight: 700; white-space: nowrap; }
.auth-remember, .auth-tos { margin-bottom: 16px; }
.auth-checkbox-label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: #475569; cursor: pointer;
}
.auth-checkbox-label input { margin-top: 2px; accent-color: #6366f1; flex-shrink: 0; }
.auth-checkbox-label a { color: #6366f1; }
.auth-submit {
  width: 100%; padding: 13px; border-radius: 10px;
  background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff;
  font-size: 15px; font-weight: 700; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: opacity 0.18s, transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.auth-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.45); }
.auth-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.auth-spinner {
  width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; font-size: 12px; color: #94a3b8;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.auth-social { margin-bottom: 16px; }
.auth-social-btn {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1.5px solid #e2e8f0; background: #fff; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: #374151;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: border-color 0.18s, background 0.18s;
}
.auth-social-btn:hover { border-color: #94a3b8; background: #f8fafc; }
.auth-footer-links { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 12px; color: #94a3b8; margin-top: 14px; }
.auth-footer-links a { color: #64748b; text-decoration: none; }
.auth-footer-links a:hover { color: #6366f1; }
.auth-form-footer a { color: #6366f1; text-decoration: none; font-size: 13.5px; }
.auth-form-footer a:hover { text-decoration: underline; }
@media (max-width: 768px) {
  .auth-shell { flex-direction: column; }
  .auth-panel-left { flex: none; min-height: 200px; }
  .auth-panel-right { padding: 28px 20px; }
  .auth-panel-content { padding: 28px 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   Slide-in Drawer (replaces modals)
═══════════════════════════════════════════════════════════════ */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}
/* Desktop: slide from right */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 440px; max-width: 95vw;
  background: var(--card-bg, #fff);
  border-left: 1px solid var(--border, #e2e8f0);
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  z-index: 501;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.drawer-open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border, #e2e8f0);
  flex-shrink: 0;
}
.drawer-header-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary, #0f172a);
  display: flex; align-items: center; gap: 8px;
}
.drawer-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted, #94a3b8); padding: 4px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: flex; align-items: center;
}
.drawer-close:hover { color: var(--kpi-red, #dc2626); background: rgba(239,68,68,0.08); }
.drawer-body {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.drawer-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px; border-top: 1px solid var(--border, #e2e8f0);
  flex-shrink: 0; background: var(--bg-primary, #f1f5f9);
}
/* Mobile: slide from bottom */
@media (max-width: 600px) {
  .drawer {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    max-height: 88vh; border-left: none; border-top: 1px solid var(--border, #e2e8f0);
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
  }
  .drawer-open { transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   User Dropdown Menu (Logout / Change Password)
═══════════════════════════════════════════════════════════════ */
.user-menu-wrap { position: relative; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  min-width: 200px; z-index: 200;
  animation: fadeDown 0.2s cubic-bezier(0.16,1,0.3,1) both;
}
.user-dropdown-header { padding: 12px 14px; }
.user-dropdown-name  { font-size: 13px; font-weight: 700; color: var(--text-primary, #0f172a); }
.user-dropdown-email { font-size: 11.5px; color: var(--text-muted, #94a3b8); margin-top: 1px; }
.user-dropdown-divider { height: 1px; background: var(--border, #e2e8f0); margin: 2px 0; }
.user-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary, #475569); cursor: pointer;
  text-decoration: none; background: none; border: none; width: 100%; text-align: left;
  transition: background 0.12s, color 0.12s;
}
.user-dropdown-item:hover { background: var(--bg-primary, #f1f5f9); color: var(--text-primary, #0f172a); }
.user-dropdown-logout { color: var(--kpi-red, #dc2626) !important; }
.user-dropdown-logout:hover { background: rgba(239,68,68,0.06) !important; }
.user-dropdown-overlay {
  position: fixed; inset: 0; z-index: 199;
}

/* ═══════════════════════════════════════════════════════════════
   Report Date Filter Bar
═══════════════════════════════════════════════════════════════ */
.report-date-filter {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 10px);
  margin-bottom: 18px;
  box-shadow: var(--card-shadow, 0 1px 3px rgba(0,0,0,0.07));
}
.report-date-filter-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--text-muted, #94a3b8);
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.report-date-inputs { display: flex; align-items: center; gap: 8px; }
.report-date-input {
  border: 1.5px solid var(--border, #e2e8f0); border-radius: 7px;
  padding: 6px 10px; font-size: 13px; color: var(--text-primary, #0f172a);
  background: var(--bg-primary, #f8fafc); outline: none;
  transition: border-color 0.15s;
}
.report-date-input:focus { border-color: var(--accent, #6366f1); }
.report-date-sep { color: var(--text-muted, #94a3b8); font-size: 14px; }
.report-date-presets { display: flex; gap: 6px; }
.report-date-preset {
  padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  color: var(--text-muted, #94a3b8); background: var(--bg-primary, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0); cursor: pointer;
  transition: all 0.15s;
}
.report-date-preset:hover { background: var(--accent-soft, #eef2ff); color: var(--accent, #6366f1); border-color: var(--accent, #6366f1); }
.report-date-preset--active { background: var(--accent, #6366f1); color: #fff; border-color: var(--accent, #6366f1); }
.report-date-info {
  font-size: 12px; color: var(--text-muted, #94a3b8);
  margin-left: auto; white-space: nowrap;
}
.report-date-info strong { color: var(--text-secondary, #475569); }
@media (max-width: 680px) {
  .report-date-filter { flex-direction: column; align-items: flex-start; gap: 8px; }
  .report-date-info { margin-left: 0; }
}
