/* ===========================================================
   SER Automation Platform — design tokens & base
   =========================================================== */

:root {
  /* Brand */
  --ser-teal: #00b4a0;
  --ser-teal-600: #00a092;
  --ser-teal-50: #e6f7f5;
  --ser-navy: #1e1e5a;
  --ser-navy-700: #16164a;
  --ser-navy-900: #0e0e3a;
  --ser-gold: #f5a523;
  --ser-gold-50: #fff5e0;

  /* Neutrals — warm-cool tinted */
  --ink-900: #0e0e2a;
  --ink-700: #2a2a4a;
  --ink-500: #5a5e7a;
  --ink-400: #7e8298;
  --ink-300: #a8acc0;
  --ink-200: #d8dae6;
  --ink-100: #ebedf3;
  --ink-50:  #f4f5f9;
  --ink-25:  #fafbfd;
  --paper:   #ffffff;

  /* Specialism accents (chroma-matched) */
  --spec-seo:    #00b4a0;
  --spec-sea:    #f5a523;
  --spec-content:#7c5cff;
  --spec-data:   #2563eb;
  --spec-ai:     #ec4899;

  /* Semantic */
  --ok: #00b4a0;
  --warn: #f5a523;
  --err: #e53935;

  /* Spacing & radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(14,14,42,0.04), 0 1px 1px rgba(14,14,42,0.03);
  --shadow-md: 0 4px 14px rgba(14,14,42,0.06), 0 2px 4px rgba(14,14,42,0.04);
  --shadow-lg: 0 12px 32px rgba(14,14,42,0.10), 0 4px 8px rgba(14,14,42,0.04);
  --shadow-glow: 0 0 0 4px rgba(0,180,160,0.12);

  /* Type */
  --font-sans: 'Rubik', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--ink-25);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ===========================================================
   App shell
   =========================================================== */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink-100);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.4) blur(8px);
  background: rgba(255,255,255,0.92);
}
.topnav-left { display: flex; align-items: center; gap: 36px; }
.topnav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--ser-navy); letter-spacing: -0.01em;
  font-size: 15px;
}
.topnav-logo .logo-dot {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--ser-navy) 0%, var(--ser-teal) 100%);
  position: relative;
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 12px;
  box-shadow: var(--shadow-sm);
}
.topnav-logo .logo-dot::after {
  content: ""; position: absolute; right: -3px; bottom: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ser-gold);
  border: 2px solid white;
}
.topnav-logo .brand-stack { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.topnav-logo .brand-stack .brand-sub {
  font-size: 10px; font-weight: 500; color: var(--ink-400);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.topnav-crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-500);
}
.topnav-crumbs a { color: var(--ink-500); text-decoration: none; }
.topnav-crumbs a:hover { color: var(--ser-navy); }
.topnav-crumbs .sep { color: var(--ink-300); }
.topnav-crumbs .current { color: var(--ink-900); font-weight: 500; }

.topnav-right { display: flex; align-items: center; gap: 12px; }
.topnav-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink-50); border: 1px solid transparent;
  padding: 7px 12px; border-radius: var(--r-md);
  width: 280px; font-size: 13px; color: var(--ink-500);
  transition: 0.15s;
}
.topnav-search:hover { background: var(--ink-100); }
.topnav-search:focus-within { background: white; border-color: var(--ser-teal); box-shadow: var(--shadow-glow); }
.topnav-search input {
  border: none; background: transparent; outline: none; flex: 1;
  font-size: 13px; color: var(--ink-900);
}
.topnav-search .kbd {
  font-family: var(--font-mono); font-size: 10px;
  background: white; border: 1px solid var(--ink-200); border-radius: 4px;
  padding: 1px 6px; color: var(--ink-500);
}

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: transparent; border: 1px solid transparent;
  display: grid; place-items: center; color: var(--ink-500);
  transition: 0.15s;
}
.icon-btn:hover { background: var(--ink-50); color: var(--ser-navy); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ser-navy), var(--ser-teal));
  color: white; display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
  cursor: pointer;
}

/* ===========================================================
   Buttons
   =========================================================== */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  transition: 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ser-navy); color: white;
}
.btn-primary:hover { background: var(--ser-navy-700); }
.btn-teal {
  background: var(--ser-teal); color: white;
}
.btn-teal:hover { background: var(--ser-teal-600); }
.btn-ghost {
  background: transparent; color: var(--ink-700); border-color: var(--ink-200);
}
.btn-ghost:hover { background: var(--ink-50); border-color: var(--ink-300); }
.btn-soft {
  background: var(--ink-100); color: var(--ink-900);
}
.btn-soft:hover { background: var(--ink-200); }
.btn-lg { padding: 12px 20px; font-size: 14px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon-only { padding: 9px; }

/* ===========================================================
   Pills / chips
   =========================================================== */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
  border: 1px solid transparent;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; }

.pill-seo     { background: rgba(0,180,160,0.10);  color: #008873; border-color: rgba(0,180,160,0.25); }
.pill-seo .pill-dot { background: var(--spec-seo); }
.pill-sea     { background: rgba(245,165,35,0.12);  color: #b37800; border-color: rgba(245,165,35,0.30); }
.pill-sea .pill-dot { background: var(--spec-sea); }
.pill-content { background: rgba(124,92,255,0.10); color: #5a3fd9; border-color: rgba(124,92,255,0.25); }
.pill-content .pill-dot { background: var(--spec-content); }
.pill-data    { background: rgba(37,99,235,0.10);  color: #1e4fb8; border-color: rgba(37,99,235,0.25); }
.pill-data .pill-dot { background: var(--spec-data); }
.pill-ai      { background: rgba(236,72,153,0.10); color: #be2470; border-color: rgba(236,72,153,0.25); }
.pill-ai .pill-dot { background: var(--spec-ai); }
.pill-neutral { background: var(--ink-100); color: var(--ink-700); }
.pill-success { background: var(--ser-teal-50); color: #008873; border-color: rgba(0,180,160,0.30); }
.pill-warn    { background: var(--ser-gold-50); color: #b37800; border-color: rgba(245,165,35,0.30); }

/* ===========================================================
   Cards
   =========================================================== */

.card {
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-hoverable {
  transition: 0.18s ease;
  cursor: pointer;
}
.card-hoverable:hover {
  transform: translateY(-2px);
  border-color: var(--ink-200);
  box-shadow: var(--shadow-md);
}

/* ===========================================================
   Headings
   =========================================================== */

h1, h2, h3, h4 { margin: 0; color: var(--ink-900); letter-spacing: -0.02em; }
h1 { font-size: 32px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); }
p  { margin: 0; color: var(--ink-700); line-height: 1.55; }

.muted { color: var(--ink-500); }
.mono  { font-family: var(--font-mono); }

/* ===========================================================
   Form controls
   =========================================================== */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--ink-700); }
.field-hint  { font-size: 11px; color: var(--ink-400); }

.input, .textarea, .select {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--ink-900);
  outline: none;
  transition: 0.15s;
  width: 100%;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--ser-teal);
  box-shadow: var(--shadow-glow);
}
.textarea { resize: vertical; min-height: 80px; font-family: inherit; }

/* Segmented */
.segmented {
  display: inline-flex;
  background: var(--ink-100);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
}
.segmented button {
  background: transparent; border: none;
  padding: 6px 14px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  color: var(--ink-500);
  transition: 0.15s;
}
.segmented button.active {
  background: white; color: var(--ink-900);
  box-shadow: var(--shadow-sm);
}

/* ===========================================================
   Page layout
   =========================================================== */

.page {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

.page-narrow { max-width: 1100px; }

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px;
  gap: 24px;
}
.page-title-stack { display: flex; flex-direction: column; gap: 6px; }
.page-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--ink-400); font-weight: 600;
}
.page-subtitle { font-size: 14px; color: var(--ink-500); max-width: 640px; }

/* Divider with label */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 36px 0 16px;
}
.section-header-left { display: flex; align-items: baseline; gap: 12px; }
.section-header h2 { font-size: 16px; font-weight: 600; }
.section-header .count {
  font-size: 12px; color: var(--ink-400); font-weight: 500;
  background: var(--ink-100); padding: 1px 8px; border-radius: var(--r-pill);
}

/* ===========================================================
   Login
   =========================================================== */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-visual {
  background: var(--ser-navy);
  background-image:
    radial-gradient(at 25% 30%, rgba(0,180,160,0.35) 0%, transparent 45%),
    radial-gradient(at 80% 70%, rgba(245,165,35,0.18) 0%, transparent 50%),
    linear-gradient(180deg, var(--ser-navy-900) 0%, var(--ser-navy) 100%);
  color: white;
  padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-visual::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.login-visual > * { position: relative; z-index: 1; }
.login-visual .brand {
  display: flex; align-items: center; gap: 12px;
}
.login-visual .brand .logo-dot {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, white 0%, rgba(255,255,255,0.6) 100%);
  display: grid; place-items: center; color: var(--ser-navy);
  font-weight: 800; font-size: 14px;
  position: relative;
}
.login-visual .brand .logo-dot::after {
  content: ""; position: absolute; right: -3px; bottom: -3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ser-gold); border: 2px solid var(--ser-navy);
}
.login-visual .brand .name { font-weight: 700; font-size: 16px; }
.login-visual .brand .sub  { font-size: 11px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.10em; }

.login-hero h1 {
  color: white; font-size: 44px; font-weight: 700;
  line-height: 1.1; max-width: 500px;
}
.login-hero h1 em {
  color: var(--ser-teal); font-style: normal;
}
.login-hero p {
  color: rgba(255,255,255,0.7); font-size: 15px; max-width: 460px; margin-top: 16px;
}

.login-tools-preview {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 32px; max-width: 460px;
}
.login-tools-preview .mini {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  display: flex; flex-direction: column; gap: 6px;
}
.login-tools-preview .mini .tag {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ser-teal); font-weight: 700;
}

.login-foot { font-size: 12px; color: rgba(255,255,255,0.4); display: flex; justify-content: space-between; }

.login-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  background: var(--paper);
}
.login-form {
  width: 100%; max-width: 360px;
}
.login-form h2 { font-size: 24px; margin-bottom: 6px; }
.login-form .lead { font-size: 14px; color: var(--ink-500); margin-bottom: 28px; }
.login-form .pw-input {
  position: relative;
}
.login-form .pw-input .toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: var(--ink-400);
  padding: 4px;
}
.login-form .submit-btn {
  width: 100%;
  padding: 11px 16px;
  background: var(--ser-navy);
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 14px;
  margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: 0.15s;
}
.login-form .submit-btn:hover { background: var(--ser-navy-700); }
.login-form .helper {
  margin-top: 24px; font-size: 12px; color: var(--ink-400);
  text-align: center;
}
.login-form .err {
  background: #fdecea; color: var(--err); border: 1px solid rgba(229,57,53,0.3);
  padding: 10px 12px; border-radius: var(--r-md); font-size: 12px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* ===========================================================
   Tool grid
   =========================================================== */

.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-bar .filter-chip {
  background: white; border: 1px solid var(--ink-200);
  padding: 7px 14px; border-radius: var(--r-pill);
  font-size: 13px; color: var(--ink-700); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: 0.15s;
}
.filter-bar .filter-chip:hover { border-color: var(--ink-300); background: var(--ink-25); }
.filter-bar .filter-chip.active {
  background: var(--ser-navy); color: white; border-color: var(--ser-navy);
}
.filter-bar .filter-chip .count {
  font-size: 11px; color: var(--ink-400);
}
.filter-bar .filter-chip.active .count { color: rgba(255,255,255,0.6); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: 0.18s ease;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink-200);
  box-shadow: var(--shadow-md);
}
.tool-card .accent-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  opacity: 0.85;
}
.tool-card.t-seo     .accent-bar { background: var(--spec-seo); }
.tool-card.t-sea     .accent-bar { background: var(--spec-sea); }
.tool-card.t-content .accent-bar { background: var(--spec-content); }
.tool-card.t-data    .accent-bar { background: var(--spec-data); }
.tool-card.t-ai      .accent-bar { background: var(--spec-ai); }

.tool-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.tool-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 18px;
  color: white;
}
.tool-card.t-seo     .tool-icon { background: var(--spec-seo); }
.tool-card.t-sea     .tool-icon { background: var(--spec-sea); }
.tool-card.t-content .tool-icon { background: var(--spec-content); }
.tool-card.t-data    .tool-icon { background: var(--spec-data); }
.tool-card.t-ai      .tool-icon { background: var(--spec-ai); }

.tool-card h3 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tool-card .desc {
  font-size: 13px; color: var(--ink-500);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--ink-400);
  margin-top: auto;
}
.tool-card-foot .meta { display: flex; align-items: center; gap: 12px; }
.tool-card-foot .meta span { display: inline-flex; align-items: center; gap: 4px; }

.fav-btn {
  background: transparent; border: none; padding: 4px;
  color: var(--ink-300);
  transition: 0.15s;
}
.fav-btn:hover { color: var(--ser-gold); }
.fav-btn.active { color: var(--ser-gold); }

/* Recent strip */
.recent-strip {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 6px; margin-bottom: 4px;
  scrollbar-width: thin;
}
.recent-card {
  flex: 0 0 auto; min-width: 240px;
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: 0.15s;
}
.recent-card:hover { border-color: var(--ink-200); box-shadow: var(--shadow-sm); }
.recent-card .tool-icon-sm {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; color: white; font-size: 14px;
}
.recent-card .stack { display: flex; flex-direction: column; gap: 2px; }
.recent-card .stack .name { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.recent-card .stack .when { font-size: 11px; color: var(--ink-400); }

/* ===========================================================
   Tool detail page (SEO A/B Platform)
   =========================================================== */

.tool-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 24px;
}
.tool-header-left { display: flex; gap: 16px; align-items: flex-start; }
.tool-header .tool-icon-lg {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center; color: white; font-size: 24px;
  flex-shrink: 0;
}
.tool-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.tool-header .meta-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.tool-header .desc { font-size: 14px; color: var(--ink-500); max-width: 720px; margin-top: 8px; }
.tool-header-actions { display: flex; gap: 8px; }

/* Stepper */
.stepper {
  display: flex; align-items: center; gap: 0;
  background: white; border: 1px solid var(--ink-100); border-radius: var(--r-lg);
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.step {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  transition: 0.15s;
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
}
.step:hover { background: var(--ink-25); }
.step.active { background: var(--ser-navy); }
.step.active .step-num { background: var(--ser-teal); color: white; }
.step.active .step-title { color: white; }
.step.active .step-sub { color: rgba(255,255,255,0.6); }
.step.complete .step-num { background: var(--ser-teal-50); color: var(--ser-teal-600); }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink-100); color: var(--ink-500);
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
  flex-shrink: 0;
}
.step-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.step-title { font-size: 13px; font-weight: 600; color: var(--ink-900); white-space: nowrap; }
.step-sub   { font-size: 11px; color: var(--ink-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-sep { color: var(--ink-200); font-size: 14px; padding: 0 4px; flex-shrink: 0; }

/* Two-column working area */
.work-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.work-side { display: flex; flex-direction: column; gap: 16px; }
.work-main { display: flex; flex-direction: column; gap: 20px; }

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

.panel {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-100);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-head h3 { font-size: 14px; }
.panel-body { padding: 18px; }

/* KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.kpi {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.kpi .lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-400); font-weight: 600; margin-bottom: 8px;
}
.kpi .val {
  font-size: 26px; font-weight: 700; color: var(--ink-900);
  letter-spacing: -0.02em; line-height: 1;
}
.kpi .delta {
  font-size: 12px; margin-top: 6px;
  display: inline-flex; align-items: center; gap: 3px;
  font-weight: 600;
}
.kpi .delta.up   { color: var(--ok); }
.kpi .delta.down { color: var(--err); }

/* Table */
.table-wrap { overflow: auto; border-radius: var(--r-md); }
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
table.data th {
  text-align: left; font-weight: 600; color: var(--ink-500);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 10px 14px;
  background: var(--ink-25);
  border-bottom: 1px solid var(--ink-100);
}
table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-900);
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--ink-25); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Chart placeholder */
.chart {
  background: linear-gradient(180deg, white 0%, var(--ink-25) 100%);
  border: 1px dashed var(--ink-200);
  border-radius: var(--r-md);
  height: 240px;
  position: relative;
  overflow: hidden;
}
.chart svg { width: 100%; height: 100%; display: block; }

/* Verdict box */
.verdict {
  background: linear-gradient(135deg, var(--ser-navy) 0%, var(--ser-navy-900) 100%);
  color: white;
  border-radius: var(--r-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.verdict-big {
  font-size: 48px; font-weight: 800; line-height: 1;
  color: var(--ser-teal);
  letter-spacing: -0.02em;
}
.verdict-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: rgba(255,255,255,0.5); font-weight: 600; margin-bottom: 10px;
}
.verdict h2 { color: white; font-size: 22px; margin-bottom: 6px; }
.verdict p  { color: rgba(255,255,255,0.7); font-size: 13px; }

/* File upload area */
.upload-zone {
  border: 2px dashed var(--ink-200);
  border-radius: var(--r-md);
  padding: 24px;
  text-align: center;
  background: var(--ink-25);
  transition: 0.15s;
  cursor: pointer;
}
.upload-zone:hover {
  border-color: var(--ser-teal); background: var(--ser-teal-50);
}
.upload-zone .icon { font-size: 28px; color: var(--ink-300); margin-bottom: 8px; }
.upload-zone .ttl  { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.upload-zone .sub  { font-size: 11px; color: var(--ink-400); margin-top: 4px; }

/* Progress bar */
.bar { height: 6px; background: var(--ink-100); border-radius: var(--r-pill); overflow: hidden; }
.bar > div { height: 100%; background: var(--ser-teal); border-radius: var(--r-pill); transition: width 0.3s; }

/* Code-ish output block */
.output-block {
  background: var(--ser-navy-900); color: #c5c8e0;
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-family: var(--font-mono); font-size: 12px;
  line-height: 1.6;
  max-height: 220px; overflow: auto;
}
.output-block .ok { color: var(--ser-teal); }
.output-block .warn { color: var(--ser-gold); }
.output-block .err { color: #ff6b6b; }
.output-block .dim { color: #6b6e8c; }

/* Stat row in verdict */
.verdict-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.verdict-stats .vs {
  display: flex; flex-direction: column; gap: 2px;
}
.verdict-stats .vs .l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); font-weight: 600; }
.verdict-stats .vs .v { font-size: 16px; font-weight: 700; color: white; }

/* Misc helpers */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 6px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 20px; }

/* Scrollbar */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }
*::-webkit-scrollbar-track { background: transparent; }

/* Tweaks-controlled body class */
body.density-compact .page { padding-top: 20px; }
body.density-compact .tool-card { padding: 14px; }
body.density-compact .panel-body { padding: 14px; }
body.density-compact .topnav { padding: 10px 24px; }

/* Subtle entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.35s ease both; }

/* ===========================================================
   ANALYTICS — module-specific
   =========================================================== */

/* Module switcher in topnav */
.module-switch {
  display: inline-flex;
  background: var(--ink-50);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  margin-left: 16px;
}
.module-switch a {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.15s;
}
.module-switch a:hover { color: var(--ser-navy); }
.module-switch a.active {
  background: white;
  color: var(--ser-navy);
  box-shadow: var(--shadow-sm);
}
.module-switch a .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ser-teal);
}
.module-switch a.tools .dot { background: var(--ser-gold); }

/* Analytics layout: side rail + main */
.analytics-shell {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: calc(100vh - 60px);
  align-items: stretch;
}
.rail {
  background: white;
  border-right: 1px solid var(--ink-100);
  padding: 20px 16px;
  display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 60px;
  align-self: start;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.rail-section { display: flex; flex-direction: column; gap: 4px; }
.rail-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 700;
  color: var(--ink-400);
  padding: 0 10px 6px;
}
.rail-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-700);
  text-decoration: none;
  cursor: pointer;
  transition: 0.12s;
  border: none; background: transparent;
  text-align: left; width: 100%;
}
.rail-item:hover { background: var(--ink-25); color: var(--ink-900); }
.rail-item.active {
  background: var(--ser-teal-50);
  color: #00746a;
  font-weight: 600;
}
.rail-item.active .rail-icon { color: var(--ser-teal-600); }
.rail-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--ink-400);
}
.rail-item.active .rail-icon { color: var(--ser-teal-600); }
.rail-badge {
  margin-left: auto;
  font-size: 10px; font-weight: 700;
  background: var(--ink-100);
  color: var(--ink-500);
  padding: 1px 6px;
  border-radius: 999px;
}
.rail-item.active .rail-badge {
  background: var(--ser-teal);
  color: white;
}

.client-switch {
  background: var(--ink-25);
  border: 1px solid var(--ink-100);
  border-radius: 10px;
  padding: 12px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  transition: 0.15s;
}
.client-switch:hover { border-color: var(--ink-200); }
.client-switch .av {
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
  color: white;
  background: linear-gradient(135deg, #c2185b 0%, #e91e63 100%);
  flex-shrink: 0;
}
.client-switch .stack { flex: 1; min-width: 0; line-height: 1.2; }
.client-switch .stack .nm { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.client-switch .stack .sub { font-size: 11px; color: var(--ink-500); margin-top: 2px; }
.client-switch .ch { color: var(--ink-300); }

/* Main scroll area */
.analytics-main {
  padding: 28px 32px 80px;
  max-width: 1500px;
  width: 100%;
  display: flex; flex-direction: column; gap: 22px;
}
.analytics-main h1 { font-size: 24px; font-weight: 700; }

/* Page-level toolbar */
.dash-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-title {
  display: flex; flex-direction: column; gap: 4px;
}
.dash-title .eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--ink-400); font-weight: 700;
}
.dash-title h1 { letter-spacing: -0.02em; }
.dash-title .lead {
  font-size: 13px; color: var(--ink-500); margin-top: 2px;
}

.dash-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.daterange {
  display: flex; align-items: center; gap: 6px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px; font-weight: 600;
  color: var(--ink-700);
}
.daterange .compare {
  font-size: 11px; color: var(--ink-400); font-weight: 500;
}

/* Lens segmented (Executive/Marketeer/Data) */
.lens {
  display: inline-flex;
  background: var(--ser-navy);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.lens button {
  background: transparent; border: none;
  padding: 7px 14px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.55);
  display: inline-flex; align-items: center; gap: 6px;
  transition: 0.15s;
}
.lens button:hover { color: white; }
.lens button.active {
  background: var(--ser-teal);
  color: white;
}

/* AI insight badge */
.ai-insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, rgba(0,180,160,0.06), rgba(124,92,255,0.05));
  border: 1px solid rgba(0,180,160,0.18);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ink-700);
  line-height: 1.5;
  margin-top: 12px;
}
.ai-insight .ai-icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--ser-teal), #7c5cff);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
}
.ai-insight strong { color: var(--ink-900); font-weight: 700; }

/* Hero KPI card with breakdown */
.hero-revenue {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.hero-revenue .top {
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  border-bottom: 1px solid var(--ink-100);
  align-items: center;
}
.hero-revenue .lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--ink-400); font-weight: 700; margin-bottom: 8px;
}
.hero-revenue .big {
  font-size: 48px; font-weight: 800; letter-spacing: -0.025em;
  color: var(--ink-900); line-height: 1;
}
.hero-revenue .delta-row {
  display: flex; align-items: center; gap: 14px; margin-top: 12px;
  flex-wrap: wrap;
}
.hero-revenue .delta-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: rgba(229,57,53,0.08); color: var(--err);
  border: 1px solid rgba(229,57,53,0.2);
}
.hero-revenue .delta-pill.up {
  background: rgba(0,180,160,0.10); color: #00746a;
  border-color: rgba(0,180,160,0.28);
}
.hero-revenue .vs { font-size: 12px; color: var(--ink-500); }

.hero-revenue .chart-area {
  height: 110px;
  position: relative;
}

/* Diagnose grid: causes */
.causes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.cause-card {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: 0.15s;
}
.cause-card:hover { border-color: var(--ink-200); box-shadow: var(--shadow-sm); }
.cause-card .head {
  display: flex; align-items: center; gap: 10px;
}
.cause-card .ico {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  color: white; flex-shrink: 0;
}
.cause-card .lbl-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-400); font-weight: 700;
}
.cause-card h4 {
  font-size: 14px; font-weight: 700; color: var(--ink-900);
  text-transform: none; letter-spacing: 0;
  margin: 0;
}
.cause-card .impact {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em;
}
.cause-card .impact.neg { color: var(--err); }
.cause-card .impact.pos { color: var(--ok); }
.cause-card .impact.neu { color: var(--ink-500); }
.cause-card .desc { font-size: 12px; color: var(--ink-500); line-height: 1.5; }
.cause-card .footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--ink-100);
  margin-top: auto;
}
.cause-card .severity {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
}
.severity.high  { color: var(--err); }
.severity.med   { color: var(--warn); }
.severity.low   { color: var(--ink-500); }
.severity .dot { width: 8px; height: 8px; border-radius: 50%; }
.severity.high .dot { background: var(--err); }
.severity.med  .dot { background: var(--warn); }
.severity.low  .dot { background: var(--ink-300); }

.cause-card .findings {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: var(--ink-700);
  line-height: 1.5;
}
.cause-card .findings .item {
  display: flex; align-items: flex-start; gap: 8px;
}
.cause-card .findings .item .pip {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-300);
  margin-top: 7px; flex-shrink: 0;
}

/* Scenario cards */
.scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.scen {
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  background: white;
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  transition: 0.15s;
}
.scen.recommended {
  border-color: var(--ser-teal);
  box-shadow: 0 0 0 3px rgba(0,180,160,0.10);
}
.scen .badge-rec {
  position: absolute; top: -10px; left: 16px;
  background: var(--ser-teal); color: white;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.scen h4 {
  font-size: 14px; text-transform: none; letter-spacing: 0;
  color: var(--ink-900); font-weight: 700;
}
.scen .desc { font-size: 12px; color: var(--ink-500); line-height: 1.5; }
.scen .outcome {
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink-900);
}
.scen .outcome.neg { color: var(--err); }
.scen .outcome.pos { color: var(--ok); }
.scen .row-meta {
  display: flex; gap: 12px; font-size: 11px; color: var(--ink-500);
}
.scen .row-meta div { display: flex; flex-direction: column; gap: 2px; }
.scen .row-meta .vv { font-size: 13px; font-weight: 700; color: var(--ink-900); }

/* Waterfall (attribution) */
.waterfall {
  height: 280px;
  position: relative;
}
.waterfall svg { display: block; width: 100%; height: 100%; }

/* Cause severity bar (small horizontal bar for attribution table) */
.attr-row {
  display: grid;
  grid-template-columns: 24px 1fr 90px 100px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-100);
}
.attr-row:last-child { border-bottom: none; }
.attr-row .swatch { width: 12px; height: 12px; border-radius: 3px; }
.attr-row .name { font-size: 13px; color: var(--ink-900); font-weight: 500; }
.attr-row .bar-wrap { background: var(--ink-100); height: 6px; border-radius: 999px; overflow: hidden; }
.attr-row .bar-wrap > div { height: 100%; border-radius: inherit; }
.attr-row .val {
  font-size: 13px; font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.attr-row .val.neg { color: var(--err); }
.attr-row .val.pos { color: var(--ok); }

/* Mini-sparkline */
.sparkline {
  width: 100%; height: 36px; display: block;
}

/* Section header */
.dash-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 8px 0 4px;
  gap: 12px;
}
.dash-section-head .left { display: flex; align-items: baseline; gap: 10px; }
.dash-section-head h2 { font-size: 16px; font-weight: 700; }
.dash-section-head .sub { font-size: 12px; color: var(--ink-500); }

/* Donut */
.donut-wrap {
  display: flex; align-items: center; gap: 16px;
}
.donut-wrap svg { flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.donut-legend .row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
}
.donut-legend .row .sw { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend .row .nm { color: var(--ink-700); flex: 1; }
.donut-legend .row .vv { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-900); }

/* Comparator (channels / weeks etc.) */
.comparator {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.cmp-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.cmp-row .lbl { color: var(--ink-700); font-weight: 500; }
.cmp-row .bar { background: var(--ink-100); height: 8px; border-radius: 999px; overflow: hidden; }
.cmp-row .bar > div { height: 100%; border-radius: inherit; }
.cmp-row .vv { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-900); }

/* Severity dot */
.sev-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* Login: small variant for analytics */
.login-visual.analytics-bg {
  background-image:
    radial-gradient(at 25% 30%, rgba(124,92,255,0.30) 0%, transparent 45%),
    radial-gradient(at 80% 70%, rgba(0,180,160,0.22) 0%, transparent 50%),
    linear-gradient(180deg, var(--ser-navy-900) 0%, var(--ser-navy) 100%);
}

/* "Coming soon" skeleton frames for non-flagship dashboards */
.skeleton-dash {
  background: white;
  border: 1px dashed var(--ink-200);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.skeleton-dash .skel-head {
  display: flex; justify-content: space-between; align-items: center;
}
.skeleton-dash .skel-head .lbl-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--ser-teal); font-weight: 700;
}
.skel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.skel-block {
  background: var(--ink-25);
  border-radius: 10px;
  height: 84px;
  position: relative;
  overflow: hidden;
}
.skel-block::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: skel 1.6s infinite;
}
@keyframes skel {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skel-block.tall { height: 200px; grid-column: span 2; }

/* AI ribbon */
.ai-ribbon {
  background: linear-gradient(135deg, var(--ser-navy) 0%, #2d2a8c 60%, #5e3aa3 100%);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  color: white;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.ai-ribbon::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(at 90% 0%, rgba(0,180,160,0.30) 0%, transparent 40%),
    radial-gradient(at 10% 100%, rgba(245,165,35,0.18) 0%, transparent 40%);
}
.ai-ribbon > * { position: relative; z-index: 1; }
.ai-ribbon .eyebrow {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55); font-weight: 700; margin-bottom: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.ai-ribbon h2 { color: white; font-size: 20px; line-height: 1.3; }
.ai-ribbon p { color: rgba(255,255,255,0.75); font-size: 13px; max-width: 640px; margin-top: 6px; }
.ai-ribbon .actions { display: flex; gap: 8px; }
.ai-ribbon .btn-go {
  background: white; color: var(--ser-navy);
  padding: 9px 16px; border-radius: 8px; font-weight: 700;
  font-size: 12px; border: none;
  display: inline-flex; align-items: center; gap: 6px;
}

/* Severity legend / score column */
.score-col {
  display: flex; flex-direction: column; gap: 2px;
  align-items: flex-end;
}
.score-col .num {
  font-size: 18px; font-weight: 800; letter-spacing: -0.02em;
}
.score-col .num.neg { color: var(--err); }
.score-col .num.pos { color: var(--ok); }
.score-col .num.neu { color: var(--ink-500); }
.score-col .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-400); font-weight: 600; }

/* Action list (next-best-actions) */
.actions-list {
  display: flex; flex-direction: column; gap: 8px;
}
.action-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--ink-25);
  border: 1px solid var(--ink-100);
  border-radius: 10px;
  transition: 0.15s;
}
.action-item:hover { background: white; border-color: var(--ink-200); box-shadow: var(--shadow-sm); }
.action-item .num {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--ser-navy); color: white;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.action-item .body .ttl { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.action-item .body .meta { font-size: 11px; color: var(--ink-500); margin-top: 2px; display: flex; gap: 10px; }
.action-item .impact-pill {
  font-size: 11px; font-weight: 700;
  background: rgba(0,180,160,0.12); color: #00746a;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(0,180,160,0.25);
  white-space: nowrap;
}

/* Channel mini grid */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.channel {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: 10px;
  padding: 14px;
}
.channel .nm { font-size: 12px; font-weight: 700; color: var(--ink-700); }
.channel .vv { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.channel .delta { font-size: 11px; font-weight: 700; margin-top: 2px; }
.channel .delta.neg { color: var(--err); }
.channel .delta.pos { color: var(--ok); }

/* Compact data quality row */
.dq-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; padding: 8px 12px;
  border-radius: 8px; background: var(--ink-25);
}
.dq-row .ck {
  width: 14px; height: 14px; border-radius: 4px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.dq-row .ck.ok { background: var(--ser-teal); color: white; }
.dq-row .ck.warn { background: var(--warn); color: white; }
.dq-row .ck.err { background: var(--err); color: white; }

/* Lens hides for non-active */
.lens-hide { display: none !important; }

/* Module switch on login screen too */
.login-mod-tab {
  display: inline-flex;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  margin-top: 10px;
}
.login-mod-tab a {
  padding: 5px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.login-mod-tab a.active {
  background: rgba(255,255,255,0.10);
  color: white;
}
.login-mod-tab a .dot {
  width: 5px; height: 5px; border-radius: 50%;
}
.login-mod-tab a .dot.tools { background: var(--ser-gold); }
.login-mod-tab a .dot.analytics { background: var(--ser-teal); }
