/* ═══════════════════════════════════════════════════════════════════════════
   DriveNexus Office — Design System v2.0
   Typography: Inter (Google Fonts)
   Brand: Teal #0D9488 · Navy Sidebar #0F172A
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens — Light Mode (default) ─────────────────────────────── */
:root {
  /* Page */
  --bg:        #F8FAFC;
  --bg-2:      #F1F5F9;

  /* Panels & surfaces */
  --panel:     #FFFFFF;
  --panel-2:   #F8FAFC;
  --panel-3:   #F1F5F9;

  /* Borders */
  --line:      #E2E8F0;
  --line-soft: #F1F5F9;

  /* Typography */
  --ink:       #0F172A;
  --ink-2:     #475569;
  --ink-3:     #64748B; /* #94A3B8 fails WCAG AA contrast (2.6:1) on white/panel backgrounds */

  /* Brand */
  --accent:      #0D9488;
  --accent-deep: #0F766E;
  --accent-light: rgba(13,148,136,.08);

  /* Semantic */
  --green:  #16A34A;
  --amber:  #D97706;
  --red:    #DC2626;
  --blue:   #2563EB;
  --green-bg:  rgba(22,163,74,.08);
  --amber-bg:  rgba(217,119,6,.08);
  --red-bg:    rgba(220,38,38,.08);
  --blue-bg:   rgba(37,99,235,.08);

  /* Sidebar — light theme (matches page surfaces) */
  --sidebar-bg:           #FFFFFF;
  --sidebar-hover:        #F1F5F9;
  --sidebar-active:       #F1F5F9;
  --sidebar-ink:          #475569;
  --sidebar-ink-2:        #0F172A;
  --sidebar-ink-3:        #64748B; /* #94A3B8 fails WCAG AA contrast (2.6:1) against white sidebar */
  --sidebar-line:         #E2E8F0;
  --sidebar-brand:        #0F172A;
  --sidebar-user:         #0F172A;
  --sidebar-active-text:  #0F766E;
  --sidebar-active-bg:    rgba(13, 148, 136, 0.12);
  --sidebar-border:       #E2E8F0;
  --sidebar-shadow:       1px 0 0 rgba(15, 23, 42, 0.04), 4px 0 20px rgba(15, 23, 42, 0.04);

  /* Geometry */
  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 14px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
  --shadow-lg: 0 4px 6px rgba(0,0,0,.07), 0 10px 30px rgba(0,0,0,.08);

  /* Typography */
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Mono', monospace;
  --display: 'Inter', system-ui, sans-serif;
}

/* ── Dark Mode (accessibility toggle) ────────────────────────────────── */
[data-theme="dark"] {
  --bg:        #0B1120;
  --bg-2:      #111827;
  --panel:     #111827;
  --panel-2:   #1E293B;
  --panel-3:   #1E293B;
  --line:      #1E293B;
  --line-soft: #162032;
  --ink:       #F1F5F9;
  --ink-2:     #94A3B8;
  --ink-3:     #94A3B8; /* #475569 fails WCAG AA contrast (2.3:1) on dark panels */
  --accent:      #0D9488;
  --accent-deep: #0F766E;
  --accent-light: rgba(13,148,136,.12);
  --green:  #4ADE80;
  --amber:  #FBBF24;
  --red:    #F87171;
  --blue:   #60A5FA;
  --green-bg:  rgba(74,222,128,.08);
  --amber-bg:  rgba(251,191,36,.08);
  --red-bg:    rgba(248,113,113,.08);
  --blue-bg:   rgba(96,165,250,.08);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow:    0 1px 3px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
  --shadow-lg: 0 4px 6px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.4);

  /* Sidebar — dark navy */
  --sidebar-bg:           #0F172A;
  --sidebar-hover:        #1E293B;
  --sidebar-active:       #1E293B;
  --sidebar-ink:          #94A3B8;
  --sidebar-ink-2:        #CBD5E1;
  --sidebar-ink-3:        #94A3B8; /* #64748B fails WCAG AA contrast (3.75:1) against navy sidebar */
  --sidebar-line:         #1E293B;
  --sidebar-brand:        #F1F5F9;
  --sidebar-user:         #CBD5E1;
  --sidebar-active-text:  #5EEAD4;
  --sidebar-active-bg:    rgba(13, 148, 136, 0.15);
  --sidebar-border:       rgba(255, 255, 255, 0.04);
  --sidebar-shadow:       4px 0 28px rgba(0, 0, 0, 0.28);
}

/* ── Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  height: 100%;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .2s, color .2s;
}

/* ── Layout ───────────────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR — follows data-theme (light panel / dark navy)
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: var(--sidebar-shadow);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: background .2s, border-color .2s, box-shadow .2s, color .2s;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sidebar-line);
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0D9488, #0891B2);
  color: #fff;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -.5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(13,148,136,.4);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand-name {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--sidebar-brand);
  letter-spacing: -.2px;
}
.brand-sub {
  font-size: 10px;
  font-weight: 600;
  color: #0D9488;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Nav sections */
.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  padding: 12px 12px 0;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sidebar-ink-3);
  padding: 16px 8px 6px;
}
/* Lighter than .nav-section-label -- groups related links within one
   section (e.g. "Records" / "Compliance desk" under "Workshop") without
   a full new section break or divider line. */
.nav-subgroup-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sidebar-ink-3);
  opacity: .7;
  padding: 12px 10px 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background .12s, color .12s;
  white-space: nowrap;
  overflow: hidden;
}
.nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-ink-2);
}
.nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}
.nav-link.active .nav-icon { color: var(--accent); }

/* Nav icon dot — replaced with FA icons in JS, fallback dot */
.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sidebar-ink-3);
  flex-shrink: 0;
  transition: background .12s;
}
.nav-link:hover .nav-dot { background: var(--sidebar-ink-2); }
.nav-link.active .nav-dot { background: #0D9488; }

/* Sidebar footer */
.sidebar-foot {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--sidebar-line);
  margin-top: auto;
}
.sidebar-user {
  margin-bottom: 10px;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sidebar-user);
  line-height: 1.3;
}
.sidebar-user-role {
  font-size: 11px;
  color: var(--sidebar-ink-3);
  margin-top: 1px;
}
.sidebar-user-company {
  font-size: 11px;
  color: #0D9488;
  margin-top: 1px;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: #0D9488;
  background: rgba(13,148,136,.12);
  border: 1px solid rgba(13,148,136,.2);
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 6px;
}
.ver {
  font-size: 10px;
  color: var(--sidebar-ink-3);
  display: block;
  margin-top: 2px;
}
.sidebar-signout {
  font-size: 11px;
  color: var(--sidebar-ink-3);
  text-decoration: none;
  display: inline-block;
  margin-top: 6px;
  transition: color .12s;
}
.sidebar-signout:hover { color: var(--sidebar-ink-2); }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid var(--sidebar-line);
  color: var(--sidebar-ink);
  font-size: 11px;
  font-family: var(--sans);
  cursor: pointer;
  transition: background .12s, color .12s;
  margin-top: 8px;
}
.theme-toggle:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-ink-2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════════ */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.3px;
  font-family: var(--sans);
}
.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Content */
.content {
  padding: 28px 32px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s, transform .05s;
  line-height: 1;
}
.btn:hover {
  background: var(--panel-2);
  border-color: #CBD5E1;
}
.btn:active { transform: translateY(1px); }
.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(13,148,136,.3);
}
.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border-color: rgba(220,38,38,.25);
}
.btn-danger:hover {
  background: rgba(220,38,38,.15);
}

.btn-sm {
  font-size: 11px;
  padding: 5px 10px;
}
.btn-lg {
  font-size: 14px;
  padding: 11px 22px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.1px;
  margin-bottom: 14px;
}

/* KPI / stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.green::before { background: var(--green); }
.stat-card.amber::before { background: var(--amber); }
.stat-card.red::before { background: var(--red); }
.stat-card.blue::before { background: var(--blue); }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -1px;
  line-height: 1;
  font-family: var(--sans);
}
.stat-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* pcard — profile/detail cards */
.pcard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.pcard-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  white-space: nowrap;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 13px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr {
  cursor: pointer;
  transition: background .1s;
}
tbody tr:hover { background: var(--panel-2); }

.muted { color: var(--ink-2); }
.mono { font-family: var(--mono); font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES & PILLS
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.badge.pass, .badge.green  { color: var(--green); background: var(--green-bg); }
.badge.fail, .badge.red    { color: var(--red);   background: var(--red-bg);   }
.badge.advisory, .badge.amber { color: var(--amber); background: var(--amber-bg); }
.badge.mode, .badge.blue   { color: var(--blue);  background: var(--blue-bg);  }
.badge.teal                { color: var(--accent); background: var(--accent-light); }
.badge.grey                { color: var(--ink-2);  background: var(--panel-3); }

/* RAG pills */
.rag-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}
.rag-green  { color: var(--green); background: var(--green-bg); }
.rag-amber  { color: var(--amber); background: var(--amber-bg); }
.rag-red    { color: var(--red);   background: var(--red-bg);   }

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS & INPUTS
   ═══════════════════════════════════════════════════════════════════════════ */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

select,
input[type=text],
input[type=number],
input[type=email],
input[type=password],
input[type=date],
input[type=tel],
textarea {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: border-color .12s, box-shadow .12s;
  outline: none;
  width: 100%;
}
select:focus,
input[type=text]:focus,
input[type=number]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=date]:focus,
input[type=tel]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

/* The browser's built-in calendar/clock icon on date/time inputs is drawn
   dark and doesn't follow theme colours, so it disappears against the dark
   theme's dark input background. */
[data-theme="dark"] input[type=date]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type=time]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type=datetime-local]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type=month]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type=week]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

/* Form grids */
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* Profile field display */
.pfield {
  margin-bottom: 10px;
}
.pfield .lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 2px;
}
.pfield .val {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCORE / RISK BARS
   ═══════════════════════════════════════════════════════════════════════════ */
.score-row { display: flex; gap: 20px; flex-wrap: wrap; }
.score { flex: 1; min-width: 120px; }
.score .lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--ink-3);
}
.score .val {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  margin: 3px 0 5px;
}
.bar {
  height: 5px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION LABELS
   ═══════════════════════════════════════════════════════════════════════════ */
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 24px 0 12px;
}
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 340px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1102;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  z-index: 9999;
  pointer-events: none;
}
[data-theme="dark"] .toast { background: #F1F5F9; color: #0F172A; }
.toast.show { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */
.empty {
  text-align: center;
  color: var(--ink-3);
  padding: 48px 20px;
}
.empty .big {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.log {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 100px;
  white-space: pre-wrap;
  color: var(--ink-2);
}

.sync-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-wide { grid-column: 1 / -1; }

/* Cat grid for licence categories */
.cat-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ADR grid */
.adr-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Interval edit */
.interval-edit { display: flex; align-items: center; gap: 6px; }
.interval-edit input { width: 70px; padding: 5px 8px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  .nav { flex-direction: row; flex-wrap: wrap; padding: 8px 0 0; }
  .nav-link { padding: 6px 10px; font-size: 12px; }
  .content { padding: 20px 16px; }
  .topbar { padding: 0 16px; }
  .form-2, .form-3 { grid-template-columns: 1fr; }
  .sync-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   TRIAL BANNER
   ═══════════════════════════════════════════════════════════════════════════ */
.trial-banner {
  background: rgba(217,119,6,.08);
  border-bottom: 1px solid rgba(217,119,6,.2);
  padding: 10px 32px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--amber);
}
.trial-banner-expired {
  background: var(--red-bg);
  border-bottom: 1px solid rgba(220,38,38,.2);
  color: var(--red);
}
