/* ==========================================================================
   Search Console Studio — styles
   Jetons de couleur : palette de référence validée (light/dark)
   ========================================================================== */

:root {
  --surface-1: #fcfcfb;        /* surface des cartes et graphiques */
  --page: #f9f9f7;             /* plan de page */
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;             /* hairline */
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);

  --series-clicks: #2a78d6;        /* slot 1 — bleu */
  --series-impressions: #1baf7a;   /* slot 2 — aqua */
  --series-ctr: #eda100;           /* slot 3 — jaune */
  --series-position: #008300;      /* slot 4 — vert */

  /* Palette catégorielle générique (segmentation) — mêmes slots validés */
  --cat-1: #2a78d6;
  --cat-2: #1baf7a;
  --cat-3: #eda100;
  --cat-4: #008300;

  --seq-250: #86b6ef;          /* rampe séquentielle (barres de magnitude) */
  --seq-450: #2a78d6;

  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-serious: #ec835a;
  --status-critical: #d03b3b;
  --delta-good: #006300;
  --delta-bad: #d03b3b;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.05);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --surface-1: #1a1a19;
  --page: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --grid: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, 0.10);

  --series-clicks: #3987e5;
  --series-impressions: #199e70;
  --series-ctr: #c98500;
  --series-position: #008300;

  --cat-1: #3987e5;
  --cat-2: #199e70;
  --cat-3: #c98500;
  --cat-4: #008300;

  --seq-250: #184f95;
  --seq-450: #3987e5;

  --delta-good: #0ca30c;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --surface-1: #1a1a19;
    --page: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --grid: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.10);

    --series-clicks: #3987e5;
    --series-impressions: #199e70;
    --series-ctr: #c98500;
    --series-position: #008300;

    --cat-1: #3987e5;
    --cat-2: #199e70;
    --cat-3: #c98500;
    --cat-4: #008300;

    --seq-250: #184f95;
    --seq-450: #3987e5;

    --delta-good: #0ca30c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

/* L'attribut hidden doit gagner sur tout display: défini par classe */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--series-clicks); }
code { font-size: 0.9em; }
hr { border: none; border-top: 1px solid var(--grid); margin: 20px 0; }
.muted { color: var(--text-muted); }

/* ---------- boutons & champs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 7px 14px;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--baseline); }
.btn-primary { background: var(--series-clicks); border-color: transparent; color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-lg { padding: 11px 20px; font-size: 15px; }
.btn-icon { padding: 6px 10px; }
.btn-danger { color: var(--status-critical); }
.btn[disabled] { opacity: 0.5; cursor: default; }

input[type="text"], input[type="search"], input[type="url"], input[type="date"], select {
  font: inherit;
  color: var(--text-primary);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
}
input:focus-visible, select:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--series-clicks);
  outline-offset: 1px;
}

.field { display: block; margin: 12px 0; }
.field > span { display: block; margin-bottom: 5px; color: var(--text-secondary); font-size: 13px; }
.field input, .field select { width: 100%; }
.hint { font-size: 12.5px; color: var(--text-muted); }
.row-gap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 220px; }

/* ---------- pages légales (confidentialité, conditions) ---------- */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.legal h1 { font-size: 26px; margin-bottom: 4px; }
.legal .updated { color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }
.legal h2 { font-size: 18px; margin-top: 32px; }
.legal p, .legal li { line-height: 1.65; color: var(--text-secondary); }
.legal strong { color: var(--text-primary); }
.legal .back { display: inline-block; margin-bottom: 24px; }
.legal-nav {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--grid);
  font-size: 13px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-muted);
}

/* ---------- page d'accueil / écran de connexion ---------- */

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0 24px 24px;
}
.landing-header {
  width: 100%;
  max-width: 1080px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0;
}
.landing-header .brand { font-weight: 600; font-size: 15px; }
.landing-header nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 13.5px;
}
.landing-header nav a { color: var(--text-secondary); text-decoration: none; }
.landing-header nav a:hover { color: var(--text-primary); }

.hero {
  text-align: center;
  max-width: 720px;
  margin: 40px 0 8px;
}
.hero h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 0 0 6px; }
.hero h1 .accent { color: var(--series-clicks); }
.hero-tagline { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0 0 14px; }
.hero .hero-sub {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 auto 24px;
  max-width: 560px;
}
.hero .login-actions { flex-direction: row; justify-content: center; flex-wrap: wrap; }
.hero .login-setup-box {
  max-width: 460px;
  margin: 18px auto 0;
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 16px 12px;
}
.hero-trust { margin-top: 14px; font-size: 12.5px; color: var(--text-muted); }

.shot-frame {
  max-width: 1000px;
  width: 100%;
  margin: 36px 0 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(11, 11, 11, 0.12);
  background: var(--surface-1);
}
.shot-frame img { display: block; width: 100%; height: auto; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  max-width: 1000px;
  width: 100%;
  margin: 36px 0 0;
}
.feature-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.feature-card .f-icon { font-size: 22px; }
.feature-card h3 { margin: 8px 0 6px; font-size: 15px; }
.feature-card p { margin: 0; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

.platforms {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 30px 0 0;
  color: var(--text-secondary);
  font-size: 13.5px;
}
.platforms span { display: inline-flex; align-items: center; gap: 6px; }

.about-block {
  max-width: 760px;
  width: 100%;
  margin: 34px 0 0;
  padding: 20px 24px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.about-block h2 { font-size: 17px; margin: 0 0 10px; }
.about-block p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--text-secondary); }
.login-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px;
  max-width: 460px;
  width: 100%;
  text-align: center;
}
.login-logo { margin-bottom: 8px; }
.login-card h1 { margin: 0 0 8px; font-size: 22px; }
.login-sub { color: var(--text-secondary); margin: 0 0 20px; }
.login-card .field, .login-card .hint { text-align: left; }
.login-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.login-actions .btn { justify-content: center; }
.login-error { color: var(--status-critical); font-size: 13px; margin-top: 14px; }
.login-features {
  list-style: none;
  margin: 22px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--grid);
  text-align: left;
  font-size: 13px;
  color: var(--text-secondary);
}
.login-features li { margin: 6px 0; }
.login-footer {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.login-footer a { color: var(--text-secondary); }

/* ---------- structure de l'app ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--grid);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: wrap;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand { font-weight: 600; }
.site-select { max-width: 320px; }
.account { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 13px; }
.account img { width: 24px; height: 24px; border-radius: 50%; }

.badge {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.badge-demo { background: var(--series-ctr); color: #0b0b0b; border-color: transparent; font-weight: 600; }

.tabs {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--grid);
  overflow-x: auto;
}
.tab {
  border: none;
  background: none;
  font: inherit;
  color: var(--text-secondary);
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab.is-active { color: var(--text-primary); border-bottom-color: var(--series-clicks); font-weight: 600; }

.main { padding: 20px; max-width: 1240px; margin: 0 auto; }

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 20px;
}
.card-head h2 { margin: 0 0 12px; font-size: 17px; }
.settings-card { max-width: 560px; }
.settings-card h2 { margin-top: 0; }

/* ---------- barre de filtres ---------- */

.filterbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group-grow { flex: 1; min-width: 200px; }
.filter-label { color: var(--text-secondary); font-size: 13px; white-space: nowrap; }
.filter-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12.5px;
}
.chip button {
  border: none; background: none; cursor: pointer;
  color: var(--text-muted); font-size: 14px; padding: 0; line-height: 1;
}
.chip button:hover { color: var(--status-critical); }

.status-line { margin: 0 0 12px; color: var(--text-muted); font-size: 13px; }

/* ---------- tuiles de statistiques ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.tile {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  position: relative;
  border-top: 3px solid transparent;
}
.tile.is-active { border-top-color: var(--tile-color, var(--series-clicks)); }
.tile:hover { border-color: var(--baseline); border-top-color: var(--tile-color, var(--series-clicks)); }
.tile-label { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 13px; }
.tile-swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--tile-color); flex: none; }
.tile-value { font-size: 26px; font-weight: 600; margin-top: 4px; }
.tile-delta { font-size: 12.5px; margin-top: 2px; }
.tile-delta.up { color: var(--delta-good); }
.tile-delta.down { color: var(--delta-bad); }
.tile-delta.flat { color: var(--text-muted); }

/* ---------- graphiques (petits multiples) ---------- */

.charts { display: grid; gap: 14px; margin-bottom: 20px; }
.chart-panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px 6px;
}
.chart-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 4px;
}
.chart-title .tile-swatch { border-radius: 50%; }
.chart-legend { display: inline-flex; gap: 14px; margin-left: auto; font-size: 12px; color: var(--text-muted); }
.chart-legend .key { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend .key i { width: 14px; height: 2px; background: var(--k, var(--text-muted)); display: inline-block; }
.chart-body { position: relative; }
.chart-body svg { display: block; width: 100%; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(11, 11, 11, 0.15);
  padding: 8px 10px;
  font-size: 12.5px;
  min-width: 140px;
  z-index: 5;
  display: none;
}
.chart-tooltip .tt-date { color: var(--text-muted); margin-bottom: 4px; }
.chart-tooltip .tt-row { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.chart-tooltip .tt-row .key { display: inline-flex; align-items: center; gap: 5px; color: var(--text-secondary); }
.chart-tooltip .tt-row .key i { width: 10px; height: 10px; border-radius: 3px; background: var(--k); display: inline-block; }
.chart-tooltip .tt-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.chart-empty { padding: 40px 0; text-align: center; color: var(--text-muted); }

/* ---------- tableaux ---------- */

.table-card { padding: 0; overflow: hidden; }
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--grid);
}
.dim-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.dim-tab {
  border: none; background: none; font: inherit; cursor: pointer;
  color: var(--text-secondary);
  padding: 6px 10px; border-radius: 8px;
}
.dim-tab.is-active { background: var(--page); color: var(--text-primary); font-weight: 600; }
.table-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.table-tools input[type="search"] { width: 180px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  text-align: left;
  padding: 8px 14px;
  border-bottom: 1px solid var(--grid);
  white-space: nowrap;
}
.data-table td.key-cell { white-space: normal; word-break: break-word; min-width: 220px; max-width: 560px; }
.data-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12.5px;
  user-select: none;
  position: sticky;
  top: 0;
  background: var(--surface-1);
}
.data-table th.sortable { cursor: pointer; }
.data-table th.sortable:hover { color: var(--text-primary); }
.data-table th .arrow { font-size: 10px; }
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr:hover { background: var(--page); }

.magnitude { position: relative; }
.magnitude .bar {
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  background: var(--seq-250);
  opacity: 0.35;
  border-radius: 0 4px 4px 0;
  pointer-events: none;
}
.magnitude .val { position: relative; }

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.pager { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- badges de statut (icône + libellé, jamais couleur seule) ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.status i { font-style: normal; }
.status-ok { color: var(--delta-good); }
.status-warn { color: var(--status-serious); }
.status-err { color: var(--status-critical); }
.status-neutral { color: var(--text-secondary); }

/* ---------- drill-down dans les tableaux ---------- */

.row-filter-btn {
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-muted);
  border-radius: 6px;
  font-size: 11px;
  padding: 1px 7px;
  margin-left: 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.1s;
  vertical-align: 1px;
  white-space: nowrap;
}
.data-table tbody tr:hover .row-filter-btn { opacity: 1; }
.row-filter-btn:hover { color: var(--text-primary); border-color: var(--baseline); }
@media (hover: none) { .row-filter-btn { opacity: 1; } }

/* ---------- vue Analyses ---------- */

.insight-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 4px;
}
.insight-cols .card { margin-bottom: 16px; }
.insight-card h2 { margin: 0 0 10px; font-size: 15px; }
.insight-card h2 .muted { font-size: 12.5px; font-weight: 400; }
.insight-card .data-table th { position: static; }
.insight-card .data-table td, .insight-card .data-table th { padding: 6px 10px; }
.insight-card .table-wrap { margin: 0 -4px; }
.insight-empty { color: var(--text-muted); font-size: 13px; padding: 8px 0; }
.delta-badge { font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta-badge.up { color: var(--delta-good); }
.delta-badge.down { color: var(--delta-bad); }
.cannibal-pages { color: var(--text-muted); font-size: 12px; }
.cannibal-pages .pct { font-variant-numeric: tabular-nums; }

/* ---------- vue Tous les sites ---------- */

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.site-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.site-card:hover { border-color: var(--series-clicks); }
.site-card .site-name {
  font-weight: 600;
  margin-bottom: 2px;
  word-break: break-all;
}
.site-card .site-perm { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.site-card .site-stats { display: flex; gap: 18px; margin-bottom: 8px; }
.site-card .site-stat .lbl { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; }
.site-card .site-stat .val { font-size: 20px; font-weight: 600; }
.site-card .site-stat .d { font-size: 12px; }
.site-card .site-stat .d.up { color: var(--delta-good); }
.site-card .site-stat .d.down { color: var(--delta-bad); }
.site-card .spark { display: block; width: 100%; }
.site-card.errored { cursor: default; }
.site-card .site-error { color: var(--status-critical); font-size: 12.5px; }

/* ---------- annotations ---------- */

.ann-list { margin: 0 0 14px; padding: 0; list-style: none; max-height: 220px; overflow-y: auto; }
.ann-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--grid);
  font-size: 13px;
}
.ann-list .ann-date { color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ann-list .ann-text { flex: 1; }
.ann-list button {
  border: none; background: none; cursor: pointer;
  color: var(--text-muted); padding: 0 4px;
}
.ann-list button:hover { color: var(--status-critical); }

/* ---------- inspection d'URL ---------- */

.inspect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.inspect-block {
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.inspect-block h3 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--text-muted); margin: 0; }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- toast & modale ---------- */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--page);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13.5px;
  z-index: 100;
  box-shadow: 0 6px 20px rgba(11, 11, 11, 0.25);
  max-width: min(90vw, 560px);
}
.toast.error { background: var(--status-critical); color: #fff; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal {
  background: var(--surface-1);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(11, 11, 11, 0.3);
}
.modal h3 { margin: 0 0 12px; font-size: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------- squelette de chargement ---------- */

.skeleton {
  background: linear-gradient(90deg, var(--grid) 25%, var(--page) 50%, var(--grid) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
  color: transparent !important;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--grid);
  border-top-color: var(--series-clicks);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .main { padding: 12px; }
  .topbar { padding: 8px 12px; }
  .tabs { padding: 0 8px; }
  .site-select { max-width: 200px; }
  .account span { display: none; }
  .tile-value { font-size: 22px; }
  .table-tools input[type="search"] { width: 120px; }
}

@media print {
  .topbar, .tabs, .filterbar, .table-toolbar, .table-footer, .toast { display: none !important; }
}
