/* ============================================================
   LocalLift SEO Dashboard — style.css
   Design System: Premium dark SaaS, geometric accents
   Fonts: DM Sans (body) + Syne (display)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-base:       #fff;
  --bg-panel:      #ECFDF5;
  --bg-card:       #fff;
  --bg-hover:      #ECFDF5;
  --border:        #D1FAE5;
  --border-light:  #A7F3D0;

  --text-primary:  #222;
  --text-secondary:#059669;
  --text-muted:    #666;

  --accent:        #10B981;
  --accent-soft:   rgba(16,185,129,0.12);
  --accent-glow:   rgba(16,185,129,0.25);

  --green:         #10B981;
  --green-soft:    rgba(16,185,129,0.12);
  --red:           #ef4444;
  --red-soft:      rgba(239,68,68,0.12);
  --amber:         #f59e0b;
  --amber-soft:    rgba(245,158,11,0.12);

  --gradient-hero: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --gradient-card: linear-gradient(135deg, #fff 0%, #ECFDF5 100%);
  --gradient-accent: linear-gradient(135deg, #10B981 0%, #059669 100%);

  --shadow-sm:     0 1px 3px rgba(16,185,129,0.08);
  --shadow-md:     0 4px 16px rgba(16,185,129,0.12);
  --shadow-lg:     0 8px 32px rgba(16,185,129,0.16);
  --shadow-glow:   0 0 24px rgba(16,185,129,0.12);

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     20px;

  --sidebar-w:     240px;
  --header-h:      60px;

  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'Space Grotesk', sans-serif;

  --transition:    0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }
input, textarea { font-family: var(--font-body); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

/* Animated mesh background */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(59,130,246,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(29,78,216,0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* Grid dots */
.login-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 0 24px;
  animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-brand {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--gradient-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.logo-mark svg { width: 22px; height: 22px; color: white; }

.logo-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.login-tagline {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.login-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.login-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-input-group {
  position: relative;
}

.form-input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}
.form-input-icon:hover { color: var(--text-secondary); }

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.form-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.form-remember input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.form-forgot {
  font-size: 13px;
  color: var(--accent);
  transition: opacity var(--transition);
}
.form-forgot:hover { opacity: 0.8; }

.btn-primary {
  width: 100%;
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16,185,129,0.18);
}
.btn-primary:hover {
  background: #ECFDF5;
  color: #10B981;
  box-shadow: 0 8px 16px rgba(16,185,129,0.18);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.loading {
  opacity: 0.7;
  pointer-events: none;
}

.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.login-footer a { color: var(--accent); }

.login-demo-hint {
  margin-top: 16px;
  padding: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.error-message {
  background: var(--red-soft);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #fca5a5;
  margin-bottom: 16px;
  display: none;
}
.error-message.visible { display: block; }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-base);
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--gradient-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(59,130,246,0.3);
}

.sidebar-logo-mark svg { width: 17px; height: 17px; color: white; }

.sidebar-brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sidebar-brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 450;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 2px;
  border: 1px solid transparent;
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-soft);
  color: #93c5fd;
  border-color: rgba(59,130,246,0.15);
}

.nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 20px;
  line-height: 1.4;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}

.user-card:hover { background: var(--bg-hover); }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); }

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */
.top-header {
  height: var(--header-h);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb-sep { color: var(--border-light); }
.breadcrumb-current { color: var(--text-primary); font-weight: 500; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.header-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.header-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.header-btn svg { width: 14px; height: 14px; }

.notif-btn {
  position: relative;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.notif-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.notif-btn svg { width: 16px; height: 16px; }

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 1.5px solid var(--bg-panel);
}

.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.mobile-menu-btn svg { width: 18px; height: 18px; }

/* ── Page Content ── */
.page-content {
  padding: 28px;
  flex: 1;
}

.page-section {
  display: none;
}
.page-section.active { display: block; }

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.period-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.period-badge svg { width: 12px; height: 12px; color: var(--green); }

/* ── Overview Cards ── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card:hover::before { opacity: 1; }

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

.stat-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon svg { width: 16px; height: 16px; }
.stat-icon.blue { background: var(--accent-soft); color: var(--accent); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.purple { background: rgba(168,85,247,0.12); color: #a855f7; }

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
}
.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--red); }
.stat-trend svg { width: 12px; height: 12px; }
.stat-trend-label { color: var(--text-muted); font-weight: 400; margin-left: 2px; }

/* ── Content Grid ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  margin-bottom: 20px;
}

.content-grid-full {
  margin-bottom: 20px;
}

/* ── Panel ── */
.panel {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title svg { width: 15px; height: 15px; color: var(--accent); }

.panel-action {
  font-size: 12px;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
  font-weight: 500;
}
.panel-action:hover { opacity: 0.8; }

.panel-body { padding: 20px 22px; }

/* ── Keyword Table ── */
.kw-table {
  width: 100%;
  border-collapse: collapse;
}

.kw-table th {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  text-align: left;
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--border);
}

.kw-table th:first-child { padding-left: 0; }
.kw-table th:last-child { text-align: center; }

.kw-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-secondary);
  vertical-align: middle;
}

.kw-table td:first-child { padding-left: 0; color: var(--text-primary); font-weight: 450; }

.kw-table tr:last-child td { border-bottom: none; }

.kw-table tr { transition: background var(--transition); }
.kw-table tbody tr:hover { background: rgba(255,255,255,0.015); }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
}

.rank-badge.top3 { background: var(--amber-soft); color: var(--amber); }
.rank-badge.top10 { background: var(--green-soft); color: var(--green); }
.rank-badge.top20 { background: var(--accent-soft); color: var(--accent); }
.rank-badge.other { background: var(--bg-hover); color: var(--text-secondary); }

.trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  margin: 0 auto;
}
.trend-pill.up { background: var(--green-soft); color: var(--green); }
.trend-pill.down { background: var(--red-soft); color: var(--red); }
.trend-pill.flat { background: var(--bg-hover); color: var(--text-muted); }
.trend-pill svg { width: 10px; height: 10px; }

/* ── Chart Panel ── */
.chart-wrapper {
  position: relative;
  height: 200px;
}

/* ── Score Ring ── */
.score-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.score-ring-svg { transform: rotate(-90deg); }
.score-ring-track { fill: none; stroke: var(--border); stroke-width: 8; }
.score-ring-fill { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 283; stroke-dashoffset: 65; transition: stroke-dashoffset 1.5s cubic-bezier(0.4,0,0.2,1); }

.score-ring-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-ring-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.score-ring-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.score-ring-container { position: relative; width: 110px; height: 110px; }

.score-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 8px;
  width: 100%;
}

.score-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.score-item-label { flex: 1; color: var(--text-secondary); }

.score-bar-track {
  flex: 2;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 3px;
  transition: width 1s ease;
}

.score-bar-fill.green { background: linear-gradient(90deg, #16a34a, #22c55e); }
.score-bar-fill.amber { background: linear-gradient(90deg, #b45309, #f59e0b); }

.score-item-val { color: var(--text-primary); font-weight: 600; min-width: 28px; text-align: right; font-size: 11px; }

/* ── Tasks ── */
.task-list { display: flex; flex-direction: column; gap: 2px; }

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }

.task-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--green-soft);
  border: 1px solid rgba(34,197,94,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.task-check svg { width: 11px; height: 11px; color: var(--green); }

.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 13.5px; color: var(--text-primary); font-weight: 450; }
.task-meta { display: flex; align-items: center; gap: 10px; margin-top: 3px; }
.task-date { font-size: 11.5px; color: var(--text-muted); }
.task-tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 500;
}
.task-tag.on-page { background: var(--accent-soft); color: #93c5fd; }
.task-tag.local { background: var(--green-soft); color: #86efac; }
.task-tag.technical { background: var(--amber-soft); color: #fcd34d; }
.task-tag.content { background: rgba(168,85,247,0.12); color: #d8b4fe; }

/* ── Reports ── */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition);
  cursor: pointer;
}

.report-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.report-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-soft);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.report-icon svg { width: 20px; height: 20px; color: var(--accent); }

.report-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.report-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.report-dl-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  width: fit-content;
  transition: all var(--transition);
}
.report-dl-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.report-dl-btn svg { width: 13px; height: 13px; }

/* ── Settings ── */
.settings-form { display: flex; flex-direction: column; gap: 20px; }

.settings-field { display: flex; flex-direction: column; gap: 6px; }
.settings-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.settings-input {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.settings-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.settings-section {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.settings-section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-section-title svg { width: 15px; height: 15px; color: var(--accent); }

.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn-save {
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity var(--transition), transform var(--transition);
  width: fit-content;
}
.btn-save:hover { opacity: 0.9; transform: translateY(-1px); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 13.5px; color: var(--text-primary); }
.toggle-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.toggle {
  width: 38px;
  height: 21px;
  background: var(--border-light);
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle.on { background: var(--accent); }
.toggle::after {
  content: '';
  width: 15px;
  height: 15px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle.on::after { transform: translateX(17px); }

/* ── Status Bar ── */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--green-soft);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: #86efac;
  margin-bottom: 20px;
}
.status-bar svg { width: 13px; height: 13px; }
.status-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: pulse-dot 2s ease infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

/* ── Tag Chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
}
.chip.blue { background: var(--accent-soft); color: #93c5fd; border: 1px solid rgba(59,130,246,0.2); }
.chip.green { background: var(--green-soft); color: #86efac; border: 1px solid rgba(34,197,94,0.2); }

/* ── Sidebar Overlay (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; opacity: 0.4; }
.empty-state p { font-size: 13px; }

/* ── Loading Skeleton ── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-card) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 240px; }

  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .top-header { padding: 0 16px; }
  .page-content { padding: 16px; }

  .header-breadcrumb { display: none; }
}

@media (max-width: 600px) {
  .overview-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .reports-grid { grid-template-columns: 1fr; }
  .settings-row { grid-template-columns: 1fr; }
  .stat-value { font-size: 22px; }
  .section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .overview-grid { grid-template-columns: 1fr; }
}
