:root {
  --gx-red: #c0392b;
  --gx-red-dark: #962d22;
  --gx-red-soft: #fbefed;
  --gx-ink: #202428;
  --gx-ink-soft: #30363b;
  --gx-muted: #6d767e;
  --gx-line: rgba(32, 36, 40, .10);
  --gx-line-strong: rgba(32, 36, 40, .20);
  --gx-bg: #ffffff;
  --gx-panel: #ffffff;
  --gx-surface: #fbfbfa;
  --gx-text-secondary: #676a6d;
  --gx-text-soft: rgba(32,36,40,.57);
  --gx-text-faint: #6f787f;
  --gx-data-label: #4d575e;
  --gx-data-value: #30363b;
  --gx-grid: rgba(32,36,40,.08);
  --gx-track: rgba(32,36,40,.10);
  --gx-decorative: rgba(32,36,40,.055);
  --gx-topbar: rgba(255,255,255,.96);
  --gx-overlay: rgba(32,36,40,.68);
  --gx-toast: rgba(255,255,255,.97);
  --gx-code-bg: #202428;
  --gx-code-text: #e3e7e9;
  --gx-live-bg: #202428;
  --gx-auth-visual-bg: #202428;
  --gx-inverse: #ffffff;
  --gx-inverse-muted: rgba(255,255,255,.58);
  --gx-green: #3f8f5a;
  --gx-green-soft: #eef8f1;
  --gx-amber: #a86f1e;
  --gx-skeleton: #ececea;
  --gx-skeleton-shine: rgba(255,255,255,.66);
  --font-title: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: Inter, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --sidebar: 278px;
  --shadow: 0 18px 46px rgba(32, 36, 40, .08);
}

* { box-sizing: border-box; }
html.theme-ready body,
html.theme-ready .dashboard,
html.theme-ready .sidebar,
html.theme-ready .topbar,
html.theme-ready .card,
html.theme-ready .auth-panel,
html.theme-ready .modal,
html.theme-ready input,
html.theme-ready select,
html.theme-ready button { transition: background-color .22s ease, color .22s ease, border-color .22s ease; }
html { color-scheme: light; background: var(--gx-bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--gx-bg);
  color: var(--gx-ink);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
small { font-size: 14px; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--gx-red); color: #fff; }

/* Loading */
.app-loading {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--gx-panel);
  transition: opacity .25s ease, visibility .25s ease;
}
.app-loading.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-mark { position: relative; width: 62px; height: 62px; }
.loader-mark::before,
.loader-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--gx-line-strong);
}
.loader-mark::after {
  inset: 11px;
  border-color: var(--gx-red);
  animation: gxLoader 1.1s cubic-bezier(.55,.05,.45,.95) infinite;
}
@keyframes gxLoader { to { transform: rotate(90deg); } }

/* Shared brand */
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-symbol {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--gx-red);
  background: var(--gx-red);
  color: #fff;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.06em;
}
.brand-copy { min-width: 0; }
.brand-copy strong {
  display: block;
  overflow: hidden;
  color: var(--gx-ink);
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.brand-copy span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--gx-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.eyebrow {
  display: inline-block;
  color: var(--gx-red);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* Auth */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(440px, 1.08fr);
  background: var(--gx-panel);
}
.auth-visual {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--gx-auth-visual-bg);
  background-size: 42px 42px;
}
.auth-visual::before {
  content: "";
  position: absolute;
  width: min(58vw, 720px);
  aspect-ratio: 1;
  right: -28%;
  top: 10%;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  box-shadow: 0 0 0 92px rgba(255,255,255,.025), 0 0 0 184px rgba(255,255,255,.018);
}
.auth-visual::after {
  content: "";
  position: absolute;
  right: clamp(34px, 7vw, 110px);
  bottom: clamp(70px, 10vw, 160px);
  width: clamp(120px, 14vw, 210px);
  height: 8px;
  background: var(--gx-red);
  box-shadow: 0 24px 0 rgba(192,57,43,.50), 0 48px 0 rgba(192,57,43,.20);
  transform: rotate(-12deg);
}
.auth-visual .brand,
.auth-pitch,
.auth-foot { position: relative; z-index: 1; }
.auth-visual .brand-symbol { border-color: #fff; }
.auth-visual .brand-copy strong { color: #fff; }
.auth-visual .brand-copy span { color: rgba(255,255,255,.43); }
.auth-pitch { max-width: 650px; margin: 80px 0; }
.auth-pitch .eyebrow { color: #ef7569; }
.auth-pitch h1 {
  margin: 20px 0 28px;
  max-width: 640px;
  font-family: var(--font-title);
  font-size: clamp(48px, 7.2vw, 104px);
  font-weight: 600;
  line-height: .90;
  letter-spacing: -.055em;
}
.auth-pitch p {
  max-width: 500px;
  margin: 0;
  color: rgba(255,255,255,.58);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
}
.auth-foot {
  color: rgba(255,255,255,.34);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.auth-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(34px, 6vw, 90px);
  border-left: 1px solid var(--gx-line);
}
.auth-box { width: min(100%, 480px); }
.auth-box h2 {
  margin: 10px 0 0;
  font-family: var(--font-title);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em;
}
.auth-box > p {
  margin: 18px 0 32px;
  color: var(--gx-text-secondary);
  font-size: 15px;
  line-height: 1.7;
}
.auth-access-note {
  display: grid;
  gap: 5px;
  margin: 0 0 28px;
  padding: 15px 16px;
  border-left: 3px solid var(--gx-red);
  background: var(--gx-surface);
}
.auth-access-note strong {
  color: var(--gx-ink);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .035em;
}
.auth-access-note span {
  color: var(--gx-text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

/* Forms */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; }
.field label {
  color: var(--gx-text-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.field input,
.field select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--gx-line-strong);
  border-radius: 0;
  padding: 0 15px;
  outline: none;
  background: var(--gx-panel);
  color: var(--gx-ink);
  font-weight: 400;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus,
.field select:focus {
  border-color: var(--gx-red);
  box-shadow: inset 3px 0 0 var(--gx-red);
}
.field input:disabled { background: var(--gx-surface); color: var(--gx-muted); }
.field small { color: var(--gx-muted); font-size: 14px; line-height: 1.55; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 50px; }
.password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--gx-muted);
  cursor: pointer;
}
.password-toggle:hover { background: var(--gx-surface); color: var(--gx-red); }
.inline-error { min-height: 18px; color: var(--gx-red-dark); font-size: 14px; line-height: 1.5; }

/* Buttons */
.btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .48; cursor: wait; transform: none; }
.btn-primary { background: var(--gx-red); color: #fff; border-color: var(--gx-red); }
.btn-primary:hover { background: var(--gx-red-dark); border-color: var(--gx-red-dark); }
.btn-dark { background: var(--gx-ink); color: #fff; border-color: var(--gx-ink); }
.btn-dark:hover { background: var(--gx-red); border-color: var(--gx-red); }
.btn-light { background: var(--gx-panel); color: var(--gx-ink); border-color: var(--gx-line-strong); }
.btn-light:hover { border-color: var(--gx-red); color: var(--gx-red); }
.btn-danger { background: var(--gx-panel); color: var(--gx-red-dark); border-color: rgba(192,57,43,.35); }
.btn-block { width: 100%; min-height: 52px; }
.btn-icon { width: 44px; height: 44px; padding: 0; }
.btn svg { width: 16px; height: 16px; }

.api-indicator {
  margin-top: 25px;
  padding-top: 17px;
  border-top: 1px solid var(--gx-line);
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gx-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a5a7a8; }
.status-dot.online { background: var(--gx-green); box-shadow: 0 0 0 4px var(--gx-green-soft); }
.status-dot.offline { background: var(--gx-red); box-shadow: 0 0 0 4px var(--gx-red-soft); }
.auth-doc-link {
  margin-top: 14px;
  min-height: 42px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gx-text-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
}
.auth-doc-link svg { width: 17px; height: 17px; color: var(--gx-red); }
.auth-doc-link:hover { color: var(--gx-red); }

/* Dashboard */
.dashboard { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); background: var(--gx-panel); }
.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 25px 18px 20px;
  display: flex;
  flex-direction: column;
  background: var(--gx-panel);
  color: var(--gx-ink);
  border-right: 1px solid var(--gx-line);
}
.sidebar .brand { padding: 0 8px 27px; border-bottom: 1px solid var(--gx-line); }
.sidebar .brand-symbol { width: 38px; height: 38px; }
.side-label {
  padding: 25px 12px 9px;
  color: var(--gx-text-faint);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .20em;
  text-transform: uppercase;
}
.nav-list { display: grid; gap: 2px; }
.nav-item {
  position: relative;
  width: 100%;
  min-height: 46px;
  border: 0;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: var(--gx-text-soft);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--gx-red);
  transform: scaleY(0);
  transition: transform .2s ease;
}
.nav-item svg { width: 17px; height: 17px; opacity: .75; }
.nav-item:hover { color: var(--gx-ink); background: var(--gx-surface); transform: translateX(2px); }
.nav-item.is-active { color: var(--gx-red); background: var(--gx-red-soft); }
.nav-item.is-active::before { transform: scaleY(1); }
.nav-item[href] { text-decoration: none; }
.global-nav-list { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gx-line); }

.side-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.side-section-head .side-label { flex: 1; }
.side-add {
  width: 28px;
  height: 28px;
  margin: 15px 7px 0 0;
  border: 1px solid var(--gx-line-strong);
  background: var(--gx-panel);
  color: var(--gx-red);
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 18px;
  line-height: 1;
}
.side-add:hover { background: var(--gx-red); border-color: var(--gx-red); color: #fff; }
.nav-sites-home { margin-bottom: 5px; }
.sidebar-site-list {
  max-height: min(31vh, 250px);
  overflow: auto;
  display: grid;
  gap: 2px;
  padding: 2px 0 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--gx-line-strong) transparent;
}
.side-site-item {
  width: 100%;
  min-height: 56px;
  border: 0;
  padding: 8px 8px 8px 12px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: var(--gx-text-soft);
  cursor: pointer;
  text-align: left;
}
.side-site-item:hover { background: var(--gx-surface); color: var(--gx-ink); }
.side-site-item.is-current { background: var(--gx-red-soft); box-shadow: inset 2px 0 0 var(--gx-red); }
.side-site-item span { min-width: 0; }
.side-site-item strong,
.side-site-item small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.side-site-item strong { color: inherit; font-family: var(--font-title); font-size: 14px; font-weight: 600; }
.side-site-item small { margin-top: 4px; color: var(--gx-muted); font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.side-site-item b { color: var(--gx-muted); font-size: 17px; font-weight: 400; text-align: center; }
.site-status { width: 6px; height: 6px; border-radius: 50%; background: var(--gx-green); box-shadow: 0 0 0 3px var(--gx-green-soft); }
.site-status.is-off { background: var(--gx-muted); box-shadow: 0 0 0 3px var(--gx-surface); }
.sidebar-sites-empty { padding: 13px 12px; color: var(--gx-muted); font-size: 14px; }
.site-nav-shell {
  margin-top: 14px;
  padding-top: 4px;
  border-top: 1px solid var(--gx-line);
}
.site-nav-shell .side-label { padding-top: 18px; }
.site-nav-list .nav-item { min-height: 42px; }
.sidebar-spacer { flex: 1; }
.user-card {
  padding: 17px 8px 0;
  border-top: 1px solid var(--gx-line);
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 30px;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gx-line-strong);
  background: var(--gx-surface);
  color: var(--gx-red);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
}
.user-info { min-width: 0; }
.user-info strong,
.user-info span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-info strong { font-family: var(--font-title); font-size: 14px; font-weight: 600; }
.user-info span { margin-top: 3px; color: var(--gx-muted); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.logout-btn {
  width: 30px;
  height: 30px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--gx-muted);
  cursor: pointer;
}
.logout-btn:hover { background: var(--gx-red-soft); color: var(--gx-red); }

.main {
  grid-column: 2;
  min-width: 0;
  padding: 0 clamp(20px, 3.4vw, 54px) 60px;
}
.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 108px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--gx-line);
  background: var(--gx-topbar);
  backdrop-filter: blur(12px);
}
.mobile-menu { display: none; }
.page-title .eyebrow { margin-bottom: 8px; }
.page-title h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(29px, 3.4vw, 48px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em;
}
.top-actions { display: flex; align-items: center; gap: 9px; }
.select-shell { position: relative; }
.select-shell select {
  appearance: none;
  min-width: 205px;
  height: 44px;
  border: 1px solid var(--gx-line-strong);
  border-radius: 0;
  padding: 0 40px 0 14px;
  outline: none;
  background: var(--gx-panel);
  color: var(--gx-ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
}
.select-shell select:focus { border-color: var(--gx-red); }
.select-shell::after { content: "⌄"; position: absolute; right: 14px; top: 10px; color: var(--gx-muted); pointer-events: none; }
.period-switch { display: flex; border: 1px solid var(--gx-line-strong); background: var(--gx-panel); }
.period-btn {
  min-width: 43px;
  height: 42px;
  border: 0;
  border-right: 1px solid var(--gx-line);
  background: transparent;
  color: var(--gx-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
}
.period-btn:last-child { border-right: 0; }
.period-btn:hover { color: var(--gx-red); }
.period-btn.is-active { background: var(--gx-ink); color: #fff; }
.view { animation: fadeView .25s ease; }
@keyframes fadeView { from { opacity: 0; transform: translateY(5px); } }

/* Empty */
.empty-state {
  min-height: 430px;
  display: grid;
  place-items: center;
  padding: 42px;
  border: 1px solid var(--gx-line-strong);
  background:
    linear-gradient(rgba(32,36,40,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,36,40,.025) 1px, transparent 1px),
    var(--gx-panel);
  background-size: 34px 34px;
  text-align: center;
}
.empty-state > div { max-width: 450px; }
.empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(192,57,43,.22);
  background: var(--gx-red-soft);
  color: var(--gx-red);
}
.empty-icon svg { width: 30px; }
.empty-state h2 { margin: 0 0 12px; font-family: var(--font-title); font-size: 30px; font-weight: 600; letter-spacing: -.04em; }
.empty-state p { margin: 0 0 25px; color: var(--gx-muted); font-size: 14px; line-height: 1.7; }

/* Cards / KPI */
.card { border: 1px solid var(--gx-line); border-radius: 0; background: var(--gx-panel); box-shadow: none; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px;
  margin-bottom: 28px;
  background: var(--gx-line);
  border: 1px solid var(--gx-line);
}
.kpi { position: relative; min-height: 162px; padding: 22px; overflow: hidden; border: 0; }
.kpi::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -45px;
  width: 110px;
  height: 110px;
  border: 1px solid var(--gx-decorative);
  border-radius: 50%;
}
.kpi::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--gx-red);
  transition: width .3s ease;
}
.kpi:hover::before { width: 100%; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kpi-label { color: var(--gx-data-label); font-size: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.kpi-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gx-line);
  background: var(--gx-surface);
  color: var(--gx-muted);
}
.kpi-icon svg { width: 16px; }
.kpi-value {
  margin-top: 24px;
  font-family: var(--font-title);
  font-size: clamp(34px, 3.5vw, 50px);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}
.kpi-sub { margin-top: 10px; color: var(--gx-data-label); font-size: 14px; line-height: 1.45; }
.kpi.live .kpi-icon { border-color: rgba(63,143,90,.22); background: var(--gx-green-soft); color: var(--gx-green); }
.kpi.live .kpi-value { color: var(--gx-green); }
.kpi.live::before { background: var(--gx-green); }

/* Main data grids */
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(300px, .72fr);
  gap: 1px;
  margin-bottom: 28px;
  background: var(--gx-line);
  border: 1px solid var(--gx-line);
}
.chart-card { min-height: 410px; padding: 26px; border: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.card-head h2 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.card-head p { margin: 7px 0 0; color: var(--gx-muted); font-size: 14px; line-height: 1.55; }
.legend { display: flex; align-items: center; gap: 16px; color: var(--gx-muted); font-size: 14px; font-weight: 600; }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 2px; background: var(--gx-red); }
.legend span:nth-child(2) i { background: var(--gx-ink); }
.chart-wrap { position: relative; min-height: 290px; }
.chart-wrap svg { width: 100%; height: 290px; overflow: visible; }
.chart-grid-line { stroke: var(--gx-grid); stroke-width: 1; }
.chart-axis { fill: #92979b; font-family: var(--font-body); font-size: 14px; }
.chart-area { fill: url(#areaGradient); }
.chart-line-views { fill: none; stroke: var(--gx-red); stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.chart-line-visitors { fill: none; stroke: var(--gx-ink); stroke-width: 1.7; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; opacity: .78; }
.chart-dot { fill: var(--gx-panel); stroke: var(--gx-red); stroke-width: 2; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gx-muted); font-size: 14px; text-align: center; }

.live-card {
  min-height: 410px;
  padding: 26px;
  border: 0;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--gx-live-bg);
  background-size: 30px 30px;
  color: #fff;
}
.live-card .card-head h2 { color: #fff; }
.live-card .card-head p { color: rgba(255,255,255,.42); }
.live-total { display: flex; align-items: baseline; gap: 11px; margin: 8px 0 27px; }
.live-total strong {
  color: #79cea9;
  font-family: var(--font-title);
  font-size: 66px;
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.075em;
}
.live-total span { color: rgba(255,255,255,.40); font-size: 14px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.live-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #70c89f; box-shadow: 0 0 0 0 rgba(112,200,159,.6); animation: gxPulse 1.8s infinite; }
@keyframes gxPulse { 70% { box-shadow: 0 0 0 10px rgba(112,200,159,0); } 100% { box-shadow: 0 0 0 0 rgba(112,200,159,0); } }
.live-list { display: grid; }
.live-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.09); }
.live-row:last-child { border-bottom: 0; }
.live-row span { overflow: hidden; color: rgba(255,255,255,.68); font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.live-row strong { color: #fff; font-size: 14px; }
.live-empty { padding: 18px 0; color: rgba(255,255,255,.36); font-size: 14px; line-height: 1.65; }

.hourly-card {
  position: relative;
  min-height: 330px;
  margin-bottom: 28px;
  padding: 26px;
  overflow: hidden;
}
.hour-peak {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--gx-line);
  color: var(--gx-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hour-chart {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 220px;
  padding-top: 4px;
}
.hour-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 8px 25px 0;
  color: var(--gx-muted);
  font-size: 14px;
  text-align: right;
}
.hour-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(7px, 1fr));
  gap: 5px;
  min-width: 570px;
  height: 220px;
  padding: 0 0 0;
  border-bottom: 1px solid var(--gx-line-strong);
  background:
    linear-gradient(to bottom, var(--gx-grid) 1px, transparent 1px) 0 0 / 100% 25%;
}
.hour-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 24px;
  min-width: 0;
}
.hour-track {
  display: flex;
  align-items: flex-end;
  min-height: 0;
}
.hour-bar {
  position: relative;
  width: 100%;
  min-height: 0;
  background: color-mix(in srgb, var(--gx-red) 64%, transparent);
  transition: height .25s ease, background .2s ease, transform .2s ease;
}
.hour-bar.is-peak { background: var(--gx-red); }
.hour-column:hover .hour-bar {
  background: var(--gx-red);
  transform: translateY(-2px);
}
.hour-bar span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  color: var(--gx-ink);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-50%);
  pointer-events: none;
}
.hour-column:hover .hour-bar span { opacity: 1; }
.hour-label {
  padding-top: 8px;
  color: var(--gx-muted);
  font-size: 14px;
  text-align: center;
}
.hour-chart > .chart-empty { left: 32px; }

.grid-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1px;
  background: var(--gx-line);
  border: 1px solid var(--gx-line);
}
.table-card,
.bars-card { min-height: 340px; padding: 26px; border: 0; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--gx-line-strong);
  color: var(--gx-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .16em;
  text-align: left;
  text-transform: uppercase;
}
.data-table th:last-child,
.data-table td:last-child { text-align: right; }
.data-table td { padding: 14px 0; border-bottom: 1px solid var(--gx-line); color: var(--gx-data-value); font-size: 14px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td:first-child { max-width: 320px; overflow: hidden; padding-right: 12px; white-space: nowrap; text-overflow: ellipsis; }
.data-table strong { color: var(--gx-data-value); font-weight: 600; }
.table-empty { padding: 46px 0 !important; color: var(--gx-muted); text-align: center !important; }
.bars { display: grid; gap: 17px; }
.bar-row { display: grid; grid-template-columns: 105px minmax(0,1fr) 38px; gap: 12px; align-items: center; }
.bar-row > span { overflow: hidden; color: var(--gx-data-value); font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.bar-track { height: 4px; overflow: hidden; background: var(--gx-track); }
.bar-fill { min-width: 2px; height: 100%; background: var(--gx-red); }
.bar-row strong { color: var(--gx-data-value); font-size: 14px; text-align: right; }
.segment-tabs { display: flex; margin-bottom: 23px; border-bottom: 1px solid var(--gx-line); }
.segment-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 9px 13px 11px;
  background: transparent;
  color: var(--gx-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.segment-tab.is-active { border-bottom-color: var(--gx-red); color: var(--gx-red); }

/* Sites */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--gx-line); }
.section-header h2 { margin: 8px 0 0; font-family: var(--font-title); font-size: clamp(31px, 4vw, 50px); font-weight: 600; line-height: 1; letter-spacing: -.045em; }
.section-header p { margin: 11px 0 0; color: var(--gx-muted); font-size: 14px; line-height: 1.65; }
.sites-toolbar {
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gx-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.sites-toolbar p {
  margin: 0;
  color: var(--gx-muted);
  font-size: 14px;
  line-height: 1.6;
}
#viewSites .btn {
  font-weight: 500;
  letter-spacing: .055em;
  text-transform: none;
}
#viewSites .badge { font-weight: 500; letter-spacing: .07em; }
#viewSites .site-card h3 { font-weight: 500; }
#viewSites .site-meta { font-weight: 400; letter-spacing: .035em; text-transform: none; }

.sites-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1px;
  background: var(--gx-line);
  border: 1px solid var(--gx-line);
}
.site-card { position: relative; padding: 24px; border: 0; outline: none; cursor: pointer; transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }
.site-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gx-red); transform: scaleY(0); transition: transform .22s ease; }
.site-card:hover { background: var(--gx-surface); transform: translateY(-2px); }
.site-card:focus-visible { box-shadow: inset 0 0 0 2px var(--gx-red); }
.site-card.is-current { background: var(--gx-red-soft); }
.site-card.is-current::before { transform: scaleY(1); }
.site-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.site-symbol { width: 45px; height: 45px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--gx-line); background: var(--gx-panel); color: var(--gx-red); }
.site-symbol svg { width: 19px; }
.site-favicon { display: block; width: 28px; height: 28px; object-fit: contain; }
.site-symbol-fallback { display: grid; width: 100%; height: 100%; place-items: center; }
.site-symbol-fallback[hidden] { display: none; }
.badge { min-height: 23px; padding: 0 9px; display: inline-flex; align-items: center; background: var(--gx-green-soft); color: var(--gx-green); font-size: 14px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.badge.off { background: var(--gx-surface); color: var(--gx-muted); }
.site-card h3 { margin: 24px 0 7px; font-family: var(--font-title); font-size: 20px; font-weight: 600; letter-spacing: -.035em; }
.site-domain { overflow: hidden; color: var(--gx-muted); font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.site-meta { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--gx-line); display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--gx-muted); font-size: 14px; font-weight: 600; letter-spacing: .10em; text-transform: uppercase; }
.site-stats { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; border: 1px solid var(--gx-line); background: var(--gx-line); }
.site-stat { min-width: 0; padding: 15px 16px; background: var(--gx-panel); }
.site-stat span, .site-stat small { display: block; color: var(--gx-muted); }
.site-stat span { font-size: 14px; line-height: 1.35; }
.site-stat strong { display: block; margin: 7px 0 4px; color: var(--gx-text); font-family: var(--font-title); font-size: 27px; font-weight: 600; line-height: 1; letter-spacing: -.04em; }
.site-stat small { font-size: 12px; line-height: 1.35; }
.site-stat-live span { display: flex; align-items: center; gap: 7px; }
.site-stat-live span i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--gx-green); box-shadow: 0 0 0 0 rgba(63,143,90,.35); animation: gxPulse 1.8s infinite; }
.site-stat-live strong { color: var(--gx-green); }

/* Cinq dernières visites */
.recent-visits-list { display: grid; background: var(--gx-line); gap: 1px; }
.recent-visit-row { display: grid; grid-template-columns: minmax(150px,.55fr) minmax(220px,1fr) minmax(240px,1fr); gap: 24px; align-items: center; min-width: 0; padding: 19px 24px; background: var(--gx-panel); }
.recent-visit-row time { color: var(--gx-text); font-family: var(--font-title); font-size: 15px; font-weight: 600; white-space: nowrap; }
.recent-visit-page, .recent-visit-details { min-width: 0; }
.recent-visit-page strong, .recent-visit-page span, .recent-visit-details span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.recent-visit-page strong { color: var(--gx-text); font-size: 15px; font-weight: 600; }
.recent-visit-page span, .recent-visit-details span { margin-top: 5px; color: var(--gx-muted); font-size: 13px; line-height: 1.4; }
.recent-visit-details span:first-child { margin-top: 0; color: var(--gx-secondary); }
.recent-visits-empty { padding: 28px 24px; background: var(--gx-panel); color: var(--gx-muted); font-size: 14px; line-height: 1.65; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(360px,1.1fr); gap: 1px; background: var(--gx-line); border: 1px solid var(--gx-line); }
.settings-grid > div { background: var(--gx-panel); }
.settings-grid > div + div { border-left: 1px solid var(--gx-line); }
.settings-card { padding: 28px; border: 0; }
.settings-card + .settings-card { margin-top: 0; border-top: 1px solid var(--gx-line); }
.settings-card h3 { margin: 0 0 8px; font-family: var(--font-title); font-size: 21px; font-weight: 600; letter-spacing: -.035em; }
.settings-card > p { margin: 0 0 25px; color: var(--gx-muted); font-size: 14px; line-height: 1.65; }
.code-box { position: relative; overflow: auto; border: 1px solid rgba(255,255,255,.08); background: var(--gx-code-bg); color: var(--gx-code-text); padding: 21px 57px 21px 20px; }
.code-box code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-btn { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: #fff; cursor: pointer; }
.copy-btn:hover { border-color: var(--gx-red); background: var(--gx-red); }
.privacy-options { display: grid; gap: 1px; border: 1px solid var(--gx-line); background: var(--gx-line); }
.radio-card { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 12px; padding: 17px; border: 0; background: var(--gx-panel); cursor: pointer; }
.radio-card:has(input:checked) { background: var(--gx-red-soft); box-shadow: inset 3px 0 0 var(--gx-red); }
.radio-card input { margin-top: 3px; accent-color: var(--gx-red); }
.radio-card strong { display: block; font-family: var(--font-title); font-size: 14px; font-weight: 600; }
.radio-card span span { display: block; margin-top: 5px; color: var(--gx-muted); font-size: 14px; line-height: 1.6; }
.toggle-row { margin-top: 22px; padding: 19px 0; border-top: 1px solid var(--gx-line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.toggle-copy strong { display: block; font-family: var(--font-title); font-size: 14px; font-weight: 600; }
.toggle-copy span { display: block; margin-top: 5px; color: var(--gx-muted); font-size: 14px; }
.switch { position: relative; width: 46px; height: 25px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch-track { position: absolute; inset: 0; border: 1px solid var(--gx-line-strong); background: var(--gx-panel); cursor: pointer; transition: .2s; }
.switch-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; background: var(--gx-muted); transition: .2s; }
.switch input:checked + .switch-track { border-color: var(--gx-green); background: var(--gx-green-soft); }
.switch input:checked + .switch-track::after { background: var(--gx-green); transform: translateX(21px); }

/* Modal / Toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; background: var(--gx-overlay); backdrop-filter: blur(7px); animation: modalIn .18s ease; }
@keyframes modalIn { from { opacity: 0; } }
.modal { width: min(100%, 540px); max-height: calc(100vh - 44px); overflow: auto; border: 1px solid var(--gx-line); background: var(--gx-panel); box-shadow: 0 30px 90px rgba(0,0,0,.22); padding: 29px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--gx-line); }
.modal-head h2 { margin: 0; font-family: var(--font-title); font-size: 30px; font-weight: 600; letter-spacing: -.04em; }
.modal-head p { margin: 9px 0 0; color: var(--gx-muted); font-size: 14px; line-height: 1.6; }
.modal-close { width: 36px; height: 36px; border: 1px solid var(--gx-line-strong); background: var(--gx-panel); cursor: pointer; font-size: 18px; }
.modal-close:hover { border-color: var(--gx-red); color: var(--gx-red); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 9px; width: min(370px, calc(100vw - 36px)); }
.toast { border: 1px solid var(--gx-line-strong); border-left: 3px solid var(--gx-ink); background: var(--gx-toast); box-shadow: var(--shadow); padding: 14px 16px; font-size: 14px; line-height: 1.6; animation: toastIn .25s ease; }
.toast.success { border-left-color: var(--gx-green); }
.toast.error { border-left-color: var(--gx-red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.skeleton { position: relative; overflow: hidden; background: var(--gx-skeleton) !important; color: transparent !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--gx-skeleton-shine), transparent); animation: shimmer 1.35s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sites-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid > div + div { border-left: 0; border-top: 1px solid var(--gx-line); }
}
@media (max-width: 920px) {
  :root { --sidebar: 0px; }
  .dashboard { display: block; }
  .sidebar { width: 276px; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(32,36,40,.18); }
  .sidebar.is-open { transform: translateX(0); }
  .main { padding: 0 18px 44px; }
  .mobile-menu { display: inline-flex; }
  .page-title { flex: 1; }
  .topbar { min-height: 88px; flex-wrap: wrap; padding: 14px 0; }
  .topbar-theme-toggle { margin-left: 0; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .select-shell { flex: 1; }
  .select-shell select { width: 100%; }
  .grid-main { grid-template-columns: 1fr; }
  .live-card { min-height: auto; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; border-left: 0; }
}
@media (max-width: 690px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .kpi-grid,
  .grid-details,
  .sites-grid { grid-template-columns: 1fr; }
  .kpi { min-height: 145px; }
  .form-row { grid-template-columns: 1fr; }
  .period-switch { width: 100%; }
  .period-btn { flex: 1; }
  .top-actions .btn-icon { flex: 0 0 auto; }
  .chart-card,
  .hourly-card,
  .live-card,
  .table-card,
  .bars-card,
  .settings-card { padding: 20px; }
  .section-header { align-items: stretch; flex-direction: column; }
  .section-header .btn { width: 100%; }
  .sites-toolbar { align-items: stretch; flex-direction: column; }
  .sites-toolbar .btn { width: 100%; }
  .legend { display: none; }
  .hourly-card .card-head { align-items: stretch; flex-direction: column; }
  .hour-peak { align-self: flex-start; }
  .hour-chart { overflow-x: auto; }
  .hour-scale { position: sticky; left: 0; z-index: 2; background: var(--gx-panel); }
  .modal { padding: 22px; }
}


/* Theme switch */
.theme-toggle {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-color: var(--gx-line-strong);
  background: var(--gx-panel);
  color: var(--gx-ink);
}
.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  background: var(--gx-surface);
  transform: scale(.78);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease, background .2s ease;
}
.theme-toggle:hover::before { transform: scale(1); opacity: 1; }
.theme-toggle:focus-visible { outline: 2px solid var(--gx-red); outline-offset: 3px; }
.topbar-theme-toggle { margin-left: auto; flex: 0 0 auto; }
.theme-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; line-height: 1; transition: opacity .2s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.theme-icon-sun { opacity: 0; transform: rotate(-40deg) scale(.7); }
.theme-icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-icon-moon { opacity: 0; transform: rotate(40deg) scale(.7); }
.auth-panel { position: relative; }
.auth-theme-toggle { position: absolute; z-index: 4; right: 28px; top: 28px; width: 44px; height: 44px; border: 1px solid var(--gx-line-strong); background: var(--gx-panel); color: var(--gx-ink); cursor: pointer; }
.compact-form { margin-bottom: 18px; }
.legal-note { margin: 0 0 14px; padding: 12px 14px; border-left: 2px solid var(--gx-red); background: var(--gx-red-soft); color: var(--gx-muted); font-size: 14px; line-height: 1.65; }
.policy-code { max-height: 430px; }
.policy-code code { display: block; }

/* Dark theme — semantic palette, no black-on-black fallbacks */
[data-theme="dark"] {
  --gx-red: #e15a4d;
  --gx-red-dark: #f07166;
  --gx-red-soft: rgba(225,90,77,.14);
  --gx-ink: #f3f5f6;
  --gx-ink-soft: #dce0e3;
  --gx-muted: #a3abb1;
  --gx-line: rgba(255,255,255,.10);
  --gx-line-strong: rgba(255,255,255,.19);
  --gx-bg: #0e1113;
  --gx-panel: #15191c;
  --gx-surface: #1b2024;
  --gx-text-secondary: #bcc2c7;
  --gx-text-soft: #a7afb5;
  --gx-text-faint: #7e878e;
  --gx-data-label: #c4cacf;
  --gx-data-value: #eef1f3;
  --gx-grid: rgba(255,255,255,.08);
  --gx-track: rgba(255,255,255,.11);
  --gx-decorative: rgba(255,255,255,.065);
  --gx-topbar: rgba(14,17,19,.94);
  --gx-overlay: rgba(0,0,0,.78);
  --gx-toast: rgba(21,25,28,.98);
  --gx-code-bg: #080a0c;
  --gx-code-text: #e8ebed;
  --gx-live-bg: #080a0c;
  --gx-auth-visual-bg: #080a0c;
  --gx-inverse: #ffffff;
  --gx-inverse-muted: rgba(255,255,255,.60);
  --gx-green: #70c89f;
  --gx-green-soft: rgba(112,200,159,.15);
  --gx-amber: #e1a65a;
  --gx-skeleton: #242a2e;
  --gx-skeleton-shine: rgba(255,255,255,.08);
  --shadow: 0 22px 62px rgba(0,0,0,.40);
}

[data-theme="dark"] body,
[data-theme="dark"] .dashboard,
[data-theme="dark"] .auth-shell { background: var(--gx-bg); color: var(--gx-ink); }
[data-theme="dark"] .main { background: var(--gx-bg); }
[data-theme="dark"] .topbar { background: var(--gx-topbar); }
[data-theme="dark"] .sidebar,
[data-theme="dark"] .auth-panel,
[data-theme="dark"] .app-loading,
[data-theme="dark"] .card,
[data-theme="dark"] .settings-grid > div,
[data-theme="dark"] .radio-card,
[data-theme="dark"] .modal,
[data-theme="dark"] .select-shell select,
[data-theme="dark"] .period-switch,
[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .switch-track,
[data-theme="dark"] .site-symbol,
[data-theme="dark"] .modal-close,
[data-theme="dark"] .btn-light,
[data-theme="dark"] .btn-danger { background: var(--gx-panel); color: var(--gx-ink); }

[data-theme="dark"] .auth-access-note { background: var(--gx-surface); }
[data-theme="dark"] .auth-access-note strong { color: var(--gx-ink); }
[data-theme="dark"] .auth-access-note span { color: var(--gx-text-secondary); }

[data-theme="dark"] .auth-box h2,
[data-theme="dark"] .page-title h1,
[data-theme="dark"] .section-header h2,
[data-theme="dark"] .card-head h2,
[data-theme="dark"] .settings-card h3,
[data-theme="dark"] .site-card h3,
[data-theme="dark"] .radio-card strong,
[data-theme="dark"] .toggle-copy strong,
[data-theme="dark"] .user-info strong,
[data-theme="dark"] .data-table td,
[data-theme="dark"] .bar-row strong,
[data-theme="dark"] .kpi-value { color: var(--gx-ink); }

[data-theme="dark"] .auth-box > p,
[data-theme="dark"] .field label,
[data-theme="dark"] .nav-item,
[data-theme="dark"] .side-label { color: var(--gx-text-secondary); }
[data-theme="dark"] .side-label { color: var(--gx-text-faint); }
[data-theme="dark"] .bar-row > span,
[data-theme="dark"] .bar-row strong,
[data-theme="dark"] .data-table td,
[data-theme="dark"] .data-table strong { color: var(--gx-data-value); }
[data-theme="dark"] .nav-item { color: var(--gx-text-soft); }
[data-theme="dark"] .nav-item:hover { color: var(--gx-ink); background: var(--gx-surface); }
[data-theme="dark"] .nav-item.is-active,
[data-theme="dark"] .side-site-item.is-current,
[data-theme="dark"] .site-card.is-current,
[data-theme="dark"] .radio-card:has(input:checked) { background: var(--gx-red-soft); color: #f28a80; }

[data-theme="dark"] .btn-dark,
[data-theme="dark"] .period-btn.is-active {
  background: #edf0f2;
  border-color: #edf0f2;
  color: #111416;
}
[data-theme="dark"] .btn-dark:hover { background: var(--gx-red); border-color: var(--gx-red); color: #fff; }
[data-theme="dark"] .btn-light:hover,
[data-theme="dark"] .modal-close:hover { background: var(--gx-surface); color: var(--gx-red); }
[data-theme="dark"] .btn-danger { color: #f07166; }
[data-theme="dark"] .field input:disabled { background: #111518; color: #737d84; }
[data-theme="dark"] input::placeholder { color: #687178; opacity: 1; }
[data-theme="dark"] select { color-scheme: dark; }

[data-theme="dark"] .empty-state {
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--gx-panel);
  background-size: 34px 34px;
}
[data-theme="dark"] .chart-axis { fill: #9ca4aa; }
[data-theme="dark"] .chart-dot { fill: var(--gx-panel); }
[data-theme="dark"] .chart-line-visitors { stroke: #f3f5f6; }
[data-theme="dark"] .kpi::after { border-color: var(--gx-decorative); }
[data-theme="dark"] .bar-track { background: var(--gx-track); }
[data-theme="dark"] .badge.off { background: #22282c; color: #9da5ab; }
[data-theme="dark"] .legal-note { background: rgba(225,90,77,.12); color: #aeb5ba; }
[data-theme="dark"] .toast { color: var(--gx-ink); }
[data-theme="dark"] .skeleton { background: var(--gx-skeleton) !important; }
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, var(--gx-skeleton-shine), transparent); }
[data-theme="dark"] .modal { box-shadow: 0 34px 100px rgba(0,0,0,.58); }
[data-theme="dark"] .sidebar { box-shadow: none; }
[data-theme="dark"] .auth-visual {
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
    var(--gx-auth-visual-bg);
  background-size: 42px 42px;
}
[data-theme="dark"] .live-card {
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--gx-live-bg);
  color: var(--gx-inverse);
}
[data-theme="dark"] .live-card .card-head h2,
[data-theme="dark"] .live-row strong { color: var(--gx-inverse); }
[data-theme="dark"] .code-box { background: var(--gx-code-bg); color: var(--gx-code-text); }
[data-theme="dark"] .auth-theme-toggle { background: var(--gx-panel); color: var(--gx-ink); }

@media (max-width: 690px) {
  .auth-theme-toggle { right: 18px; top: 18px; }
  .policy-code { max-height: 360px; }
}


/* Audience détaillée */
.audience-tabs { flex-wrap: wrap; gap: 0; }
.audience-tabs .segment-tab { flex: 1 1 auto; min-width: 72px; padding-left: 8px; padding-right: 8px; }
.audience-card .bar-row { grid-template-columns: minmax(90px, 130px) minmax(0, 1fr) 38px; }
@media (max-width: 560px) {
  .audience-tabs .segment-tab { min-width: 33.333%; }
  .audience-card .bar-row { grid-template-columns: 92px minmax(0, 1fr) 32px; }
}


/* Property deletion */
.danger-zone { background: linear-gradient(180deg, rgba(192,57,43,.035), transparent 72%), var(--gx-panel); }
.danger-kicker { display: inline-block; margin-bottom: 9px; color: var(--gx-red); font-size: 14px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.danger-zone .btn-danger { margin-top: 2px; }
.btn-danger { background: var(--gx-panel); color: var(--gx-red-dark); border-color: rgba(192,57,43,.38); }
.btn-danger:hover { background: var(--gx-red); color: #fff; border-color: var(--gx-red); }
.delete-modal { width: min(100%, 580px); }
.delete-warning { display: grid; gap: 7px; padding: 17px 18px; border-left: 3px solid var(--gx-red); background: var(--gx-red-soft); color: var(--gx-text-secondary); font-size: 14px; line-height: 1.6; }
.delete-warning strong { color: var(--gx-red-dark); font-family: var(--font-title); font-size: 16px; font-weight: 600; }
.delete-modal .field label strong { color: var(--gx-red); }
[data-theme="dark"] .danger-zone { background: linear-gradient(180deg, rgba(225,90,77,.07), transparent 72%), var(--gx-panel); }
[data-theme="dark"] .delete-warning { background: rgba(225,90,77,.10); color: var(--gx-text-secondary); }
[data-theme="dark"] .delete-warning strong { color: #f07166; }
[data-theme="dark"] .btn-danger { background: transparent; color: #f07166; border-color: rgba(240,113,102,.42); }
[data-theme="dark"] .btn-danger:hover { background: var(--gx-red); color: #fff; border-color: var(--gx-red); }


/* Navigation centrée sur les propriétés */
[data-theme="dark"] .side-add,
[data-theme="dark"] .side-site-item { color: var(--gx-text-soft); }
[data-theme="dark"] .side-site-item:hover { background: var(--gx-surface); color: var(--gx-ink); }
[data-theme="dark"] .side-site-item.is-current { background: var(--gx-red-soft); color: #f28a80; }

@media (max-height: 760px) and (min-width: 921px) {
  .sidebar { padding-top: 18px; padding-bottom: 14px; }
  .sidebar .brand { padding-bottom: 18px; }
  .side-label { padding-top: 17px; }
  .sidebar-site-list { max-height: 150px; }
  .site-nav-shell { margin-top: 10px; padding-top: 10px; }
  .site-nav-shell .side-label { padding-top: 12px; }
  .nav-item { min-height: 40px; }
}

@media (max-width: 920px) {
  .sidebar { width: min(312px, 88vw); }
  .sidebar-site-list { max-height: 32vh; }
}


/* v1.3.8 — rafraîchissement stable sans scintillement */
#refreshButton.is-refreshing svg { animation: gxRefreshSpin .75s linear infinite; transform-origin: center; }
.data-updated { animation: gxStableUpdate .34s ease-out; }
@keyframes gxRefreshSpin { to { transform: rotate(360deg); } }
@keyframes gxStableUpdate { from { transform: translateY(1px); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  #refreshButton.is-refreshing svg, .data-updated { animation: none !important; }
}

/* Site SEO / Open Graph preview */
.site-preview-card {
  margin-bottom: 1px;
  padding: 30px;
  border: 1px solid var(--gx-line);
}
.site-preview-card .data-updated { animation: none; }
.site-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gx-line);
}
.site-preview-head h3 {
  margin: 7px 0 0;
  font-family: var(--font-title);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.04em;
}
.site-preview-head p {
  max-width: 650px;
  margin: 9px 0 0;
  color: var(--gx-muted);
  font-size: 14px;
  line-height: 1.65;
}
.site-preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex: 0 0 auto;
}
.site-preview-actions > div { text-align: right; }
.site-preview-actions small {
  display: block;
  margin-top: 7px;
  color: var(--gx-muted);
  font-size: 14px;
}
.preview-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  background: var(--gx-surface);
  color: var(--gx-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.preview-status.ready { background: var(--gx-green-soft); color: var(--gx-green); }
.preview-status.error { background: var(--gx-red-soft); color: var(--gx-red); }
.preview-status.refreshing { background: rgba(168,111,30,.11); color: var(--gx-amber); }
.preview-error {
  margin-top: 20px;
  border-left: 3px solid var(--gx-red);
  background: var(--gx-red-soft);
  color: var(--gx-red-dark);
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.6;
}
.site-preview-facts {
  display: grid;
  grid-template-columns: minmax(180px,.34fr) minmax(0,1.66fr);
  gap: 1px;
  margin-top: 24px;
  border: 1px solid var(--gx-line);
  background: var(--gx-line);
}
.favicon-fact,
.metadata-list { background: var(--gx-panel); }
.favicon-fact {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
}
.favicon-frame,
.google-favicon {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--gx-line);
  background: var(--gx-surface);
}
.favicon-frame { width: 54px; height: 54px; flex: 0 0 auto; }
.favicon-frame img { width: 32px; height: 32px; object-fit: contain; }
.favicon-frame span {
  color: var(--gx-red);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
}
.favicon-fact > div:last-child span {
  display: block;
  color: var(--gx-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.favicon-fact > div:last-child strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-title);
  font-size: 14px;
}
.metadata-list {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 0;
}
.metadata-list > div { min-width: 0; padding: 19px 20px; }
.metadata-list > div + div { border-left: 1px solid var(--gx-line); }
.metadata-list dt {
  color: var(--gx-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.metadata-list dd {
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--gx-ink);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.preview-panels {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1px;
  margin-top: 1px;
  border: 1px solid var(--gx-line);
  background: var(--gx-line);
}
.preview-panel { min-width: 0; background: var(--gx-panel); padding: 22px; }
.preview-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.preview-panel-head span {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
}
.preview-panel-head small { color: var(--gx-muted); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.google-result-preview {
  min-height: 238px;
  border: 1px solid var(--gx-line);
  background: var(--gx-bg);
  padding: 20px;
}
.google-source { display: flex; align-items: center; gap: 10px; }
.google-favicon { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; }
.google-favicon img { width: 18px; height: 18px; object-fit: contain; }
.google-favicon span { color: var(--gx-muted); font-size: 14px; font-weight: 600; }
.google-source strong,
.google-source span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.google-source strong { color: var(--gx-ink); font-size: 14px; font-weight: 500; }
.google-source span { max-width: 360px; margin-top: 3px; color: var(--gx-muted); font-size: 14px; }
.google-title {
  margin-top: 14px;
  color: #1a0dab;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
}
.google-result-preview p {
  margin: 8px 0 0;
  color: var(--gx-text-secondary);
  font-size: 14px;
  line-height: 1.55;
}
.og-card-preview {
  overflow: hidden;
  min-height: 238px;
  border: 1px solid var(--gx-line);
  background: var(--gx-surface);
}
.og-image-wrap {
  position: relative;
  height: 136px;
  overflow: hidden;
  border-bottom: 1px solid var(--gx-line);
  background: var(--gx-code-bg);
}
.og-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.og-image-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--gx-inverse-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.og-card-copy { padding: 15px 17px 17px; }
.og-card-copy span,
.og-card-copy strong,
.og-card-copy p,
.og-card-copy small { display: block; overflow: hidden; text-overflow: ellipsis; }
.og-card-copy span { color: var(--gx-muted); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.og-card-copy strong { margin-top: 7px; color: var(--gx-ink); font-family: var(--font-title); font-size: 15px; line-height: 1.35; }
.og-card-copy p { margin: 6px 0 0; color: var(--gx-muted); font-size: 14px; line-height: 1.45; }
.og-card-copy small { margin-top: 8px; color: var(--gx-muted); font-size: 14px; white-space: nowrap; }
.preview-tags-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-top: 1px;
  border: 1px solid var(--gx-line);
  background: var(--gx-panel);
  padding: 20px 22px;
}
.preview-tags-block > div:first-child strong { display: block; font-family: var(--font-title); font-size: 14px; }
.preview-tags-block > div:first-child span { display: block; max-width: 490px; margin-top: 6px; color: var(--gx-muted); font-size: 14px; line-height: 1.55; }
.preview-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.preview-tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  background: var(--gx-green-soft);
  color: var(--gx-green);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .07em;
}
.preview-tag::before { content: "✓"; }
.preview-tag.missing { background: var(--gx-red-soft); color: var(--gx-red); }
.preview-tag.missing::before { content: "×"; }

@media (max-width: 980px) {
  .site-preview-head,
  .preview-tags-block { flex-direction: column; }
  .site-preview-actions { width: 100%; justify-content: space-between; }
  .site-preview-actions > div { text-align: left; }
  .site-preview-facts { grid-template-columns: 1fr; }
  .metadata-list { border-top: 1px solid var(--gx-line); }
  .preview-panels { grid-template-columns: 1fr; }
  .preview-tags { justify-content: flex-start; }
}
@media (max-width: 650px) {
  .site-preview-card { padding: 20px; }
  .site-preview-actions { align-items: stretch; flex-direction: column; }
  .site-preview-actions .btn { width: 100%; }
  .metadata-list { grid-template-columns: 1fr; }
  .metadata-list > div + div { border-left: 0; border-top: 1px solid var(--gx-line); }
  .preview-panel { padding: 15px; }
  .google-result-preview { min-height: 0; padding: 16px; }
  .google-title { font-size: 18px; }
  .og-card-preview { min-height: 0; }
}
[data-theme="dark"] .google-result-preview,
[data-theme="dark"] .favicon-fact,
[data-theme="dark"] .metadata-list,
[data-theme="dark"] .preview-panel,
[data-theme="dark"] .preview-tags-block { background: var(--gx-panel); }
[data-theme="dark"] .google-title { color: #8ab4f8; }
[data-theme="dark"] .preview-error { color: #f3a59e; }
.preview-tag.pending { background: var(--gx-surface); color: var(--gx-muted); }
.preview-tag.pending::before { content: "·"; }

/* v1.4.2 — onglet SEO, aperçus multi-plateformes et sitemap */
.sitemap-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 1px;
  border: 1px solid var(--gx-line);
  background: var(--gx-panel);
  padding: 18px 20px;
}
.sitemap-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gx-line);
  background: var(--gx-surface);
  color: var(--gx-muted);
}
.sitemap-icon svg { width: 24px; }
.sitemap-copy { min-width: 0; }
.sitemap-copy > span {
  display: block;
  color: var(--gx-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.sitemap-copy strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-title);
  font-size: 14px;
}
.sitemap-copy a {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--gx-red-dark);
  font-size: 14px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sitemap-copy a:hover { text-decoration: underline; }
.sitemap-copy small {
  display: block;
  margin-top: 6px;
  color: var(--gx-muted);
  font-size: 14px;
  line-height: 1.5;
}
.sitemap-card.is-found .sitemap-icon { background: var(--gx-green-soft); color: var(--gx-green); }
.sitemap-card.is-missing .sitemap-icon { background: var(--gx-red-soft); color: var(--gx-red); }

.seo-preview-menu {
  display: flex;
  overflow-x: auto;
  margin-top: 24px;
  border: 1px solid var(--gx-line);
  background: var(--gx-surface);
  scrollbar-width: thin;
}
.seo-preview-tab {
  min-width: 108px;
  min-height: 46px;
  flex: 1 0 auto;
  border: 0;
  border-right: 1px solid var(--gx-line);
  background: transparent;
  color: var(--gx-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.seo-preview-tab:last-child { border-right: 0; }
.seo-preview-tab:hover { color: var(--gx-ink); background: var(--gx-panel); }
.seo-preview-tab.is-active { background: var(--gx-panel); color: var(--gx-red); box-shadow: inset 0 -2px 0 var(--gx-red); }
.seo-preview-tab:focus-visible { outline: 2px solid var(--gx-red); outline-offset: -3px; }

.seo-preview-stage {
  border: 1px solid var(--gx-line);
  border-top: 0;
  background: var(--gx-panel);
  padding: 24px;
}
.platform-preview { max-width: 720px; margin: 0 auto; }
.platform-preview[hidden] { display: none !important; }
.search-result-preview {
  min-height: 220px;
  border: 1px solid var(--gx-line);
  background: var(--gx-bg);
  padding: 22px;
}
.search-result-preview p {
  margin: 8px 0 0;
  color: var(--gx-text-secondary);
  font-size: 14px;
  line-height: 1.55;
}
.search-preview-title { margin-top: 14px; font-size: 20px; font-weight: 400; line-height: 1.25; }
.bing-source { display: flex; align-items: center; gap: 10px; color: var(--gx-muted); font-size: 14px; }
.bing-favicon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--gx-line);
  background: var(--gx-surface);
}
.bing-favicon img { width: 18px; height: 18px; object-fit: contain; }
.bing-favicon span { font-size: 14px; font-weight: 600; }
.bing-source > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bing-title { color: #1a0dab; }

.social-card-preview {
  overflow: hidden;
  max-width: 620px;
  margin: 0 auto;
  border: 1px solid var(--gx-line);
  background: var(--gx-surface);
}
.social-image-wrap {
  position: relative;
  aspect-ratio: 1.91 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--gx-line);
  background: var(--gx-code-bg);
}
.social-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.social-image-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--gx-inverse-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.social-card-copy { padding: 16px 18px 18px; }
.social-card-copy span,
.social-card-copy strong,
.social-card-copy p { display: block; overflow: hidden; text-overflow: ellipsis; }
.social-card-copy span { color: var(--gx-muted); font-size: 14px; white-space: nowrap; }
.social-card-copy strong { margin-top: 6px; color: var(--gx-ink); font-size: 16px; line-height: 1.35; }
.social-card-copy p { margin: 6px 0 0; color: var(--gx-muted); font-size: 14px; line-height: 1.45; }
.facebook-card-preview .social-card-copy { background: #f0f2f5; }
.facebook-card-preview .social-card-copy strong { color: #050505; }
.facebook-card-preview .social-card-copy p,
.facebook-card-preview .social-card-copy span { color: #65676b; }
.twitter-card-preview { max-width: 560px; border-radius: 14px; }
.twitter-card-preview .social-image-wrap { aspect-ratio: 2 / 1; }
.twitter-card-preview .social-card-copy strong { margin-top: 0; }
.twitter-card-preview .social-card-copy span { margin-top: 9px; }
.linkedin-card-preview { max-width: 580px; }
.linkedin-card-preview .social-card-copy { background: var(--gx-panel); }
.linkedin-card-preview .social-card-copy strong { margin-top: 0; }
.linkedin-card-preview .social-card-copy span { margin-top: 9px; }

[data-theme="dark"] .bing-title { color: #8ab4f8; }
[data-theme="dark"] .facebook-card-preview .social-card-copy { background: #242526; }
[data-theme="dark"] .facebook-card-preview .social-card-copy strong { color: #e4e6eb; }
[data-theme="dark"] .facebook-card-preview .social-card-copy p,
[data-theme="dark"] .facebook-card-preview .social-card-copy span { color: #b0b3b8; }

@media (max-width: 650px) {
  .seo-preview-stage { padding: 15px; }
  .seo-preview-tab { min-width: 92px; }
  .sitemap-card { grid-template-columns: 42px minmax(0,1fr); padding: 16px; }
  .sitemap-icon { width: 40px; height: 40px; }
  .search-result-preview { min-height: 0; padding: 16px; }
  .search-preview-title { font-size: 18px; }
}

/* 1.4.7 — animation progressive de la page de connexion */
.auth-pitch h1 span { display: block; }
.auth-shell.is-entering .auth-visual { animation: gxAuthVisualIn .8s cubic-bezier(.2,.8,.2,1) both; }
.auth-shell.is-entering .auth-panel { animation: gxAuthPanelIn .78s cubic-bezier(.2,.8,.2,1) .08s both; }
.auth-shell.is-entering .auth-visual::before { animation: gxAuthOrbitIn 1.15s cubic-bezier(.2,.8,.2,1) .18s both, gxAuthOrbitFloat 9s ease-in-out 1.4s infinite alternate; }
.auth-shell.is-entering .auth-visual::after { animation: gxAuthBarsIn .85s cubic-bezier(.2,.8,.2,1) .5s both, gxAuthBarsFloat 5.5s ease-in-out 1.45s infinite alternate; }
.auth-shell.is-entering .auth-visual .brand-symbol { animation: gxAuthMarkIn .64s cubic-bezier(.18,.9,.28,1.25) .18s both; }
.auth-shell.is-entering .auth-visual .brand-copy strong { animation: gxAuthItemIn .55s cubic-bezier(.2,.8,.2,1) .28s both; }
.auth-shell.is-entering .auth-visual .brand-copy span { animation: gxAuthItemIn .55s cubic-bezier(.2,.8,.2,1) .36s both; }
.auth-shell.is-entering .auth-pitch .eyebrow { animation: gxAuthItemIn .58s cubic-bezier(.2,.8,.2,1) .4s both; }
.auth-shell.is-entering .auth-pitch h1 span:first-child { animation: gxAuthTitleIn .72s cubic-bezier(.16,.86,.22,1) .5s both; }
.auth-shell.is-entering .auth-pitch h1 span:last-child { animation: gxAuthTitleIn .72s cubic-bezier(.16,.86,.22,1) .62s both; }
.auth-shell.is-entering .auth-pitch p { animation: gxAuthItemIn .64s cubic-bezier(.2,.8,.2,1) .76s both; }
.auth-shell.is-entering .auth-foot { animation: gxAuthItemIn .58s cubic-bezier(.2,.8,.2,1) .92s both; }
.auth-shell.is-entering .auth-theme-toggle { animation: gxAuthMarkIn .55s cubic-bezier(.18,.9,.28,1.2) .42s both; }
.auth-shell.is-entering .auth-box > div:not([hidden]) > .eyebrow { animation: gxAuthItemIn .55s cubic-bezier(.2,.8,.2,1) .36s both; }
.auth-shell.is-entering .auth-box > div:not([hidden]) > h2 { animation: gxAuthItemIn .62s cubic-bezier(.2,.8,.2,1) .46s both; }
.auth-shell.is-entering .auth-box > div:not([hidden]) > p { animation: gxAuthItemIn .58s cubic-bezier(.2,.8,.2,1) .56s both; }
.auth-shell.is-entering .auth-access-note { animation: gxAuthCardIn .62s cubic-bezier(.2,.8,.2,1) .66s both; }
.auth-shell.is-entering .auth-box > div:not([hidden]) .form .field:nth-of-type(1) { animation: gxAuthItemIn .55s cubic-bezier(.2,.8,.2,1) .76s both; }
.auth-shell.is-entering .auth-box > div:not([hidden]) .form .field:nth-of-type(2) { animation: gxAuthItemIn .55s cubic-bezier(.2,.8,.2,1) .86s both; }
.auth-shell.is-entering .auth-box > div:not([hidden]) .form .inline-error { animation: gxAuthItemIn .5s cubic-bezier(.2,.8,.2,1) .93s both; }
.auth-shell.is-entering .auth-box > div:not([hidden]) .form .btn { animation: gxAuthButtonIn .62s cubic-bezier(.18,.9,.28,1.18) 1s both; }
.auth-shell.is-entering .api-indicator { animation: gxAuthItemIn .52s cubic-bezier(.2,.8,.2,1) 1.08s both; }
.auth-shell.is-entering .auth-doc-link { animation: gxAuthItemIn .52s cubic-bezier(.2,.8,.2,1) 1.16s both; }
.auth-shell.is-entering .status-dot.online { animation: gxStatusPulse 2.4s ease-out 1.4s infinite; }
.auth-shell.is-entering .status-dot.offline { animation: gxStatusPulseOffline 2.4s ease-out 1.4s infinite; }
.auth-shell .btn-primary { position: relative; overflow: hidden; }
.auth-shell .btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.22) 48%, transparent 72%);
  transform: translateX(-130%);
  transition: transform .65s ease;
}
.auth-shell .btn-primary:hover::before { transform: translateX(130%); }
.auth-shell .field input { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.auth-shell .field input:focus { transform: translateX(3px); }

@keyframes gxAuthVisualIn {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes gxAuthPanelIn {
  from { opacity: 0; transform: translateX(34px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes gxAuthOrbitIn {
  from { opacity: 0; transform: scale(.72) rotate(-20deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes gxAuthOrbitFloat {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(-18px,14px,0) scale(1.035); }
}
@keyframes gxAuthBarsIn {
  from { opacity: 0; transform: translate3d(90px,24px,0) rotate(-20deg) scaleX(.45); }
  to { opacity: 1; transform: translate3d(0,0,0) rotate(-12deg) scaleX(1); }
}
@keyframes gxAuthBarsFloat {
  from { transform: translate3d(0,0,0) rotate(-12deg); }
  to { transform: translate3d(-12px,-10px,0) rotate(-9deg); }
}
@keyframes gxAuthMarkIn {
  from { opacity: 0; transform: scale(.72) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes gxAuthItemIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes gxAuthTitleIn {
  from { opacity: 0; transform: translateY(34px); filter: blur(8px); letter-spacing: -.08em; }
  to { opacity: 1; transform: translateY(0); filter: blur(0); letter-spacing: -.055em; }
}
@keyframes gxAuthCardIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); border-left-width: 0; }
  to { opacity: 1; transform: translateY(0) scale(1); border-left-width: 3px; }
}
@keyframes gxAuthButtonIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes gxStatusPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--gx-green-soft); }
  50% { box-shadow: 0 0 0 8px transparent; }
}
@keyframes gxStatusPulseOffline {
  0%, 100% { box-shadow: 0 0 0 4px var(--gx-red-soft); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell.is-entering *,
  .auth-shell.is-entering *::before,
  .auth-shell.is-entering *::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
  }
}


/* Domain verification */
.domain-verification-card { position: relative; overflow: hidden; }
.verification-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.verification-head h3 { margin-bottom: 8px; }
.verification-head p { margin: 0; }
.verification-status { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--gx-line-strong); color: var(--gx-text-secondary); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.domain-verification-card[data-status="verified"] .verification-status { border-color: rgba(63,143,90,.30); background: var(--gx-green-soft); color: var(--gx-green); }
.domain-verification-card[data-status="grace"] .verification-status { border-color: rgba(168,111,30,.32); background: rgba(168,111,30,.09); color: var(--gx-amber); }
.domain-verification-card[data-status="expired"] .verification-status,
.domain-verification-card[data-status="error"] .verification-status { border-color: rgba(192,57,43,.28); background: var(--gx-red-soft); color: var(--gx-red); }
.verification-message { margin: 20px 0; padding: 14px 16px; border-left: 3px solid var(--gx-line-strong); background: var(--gx-surface); color: var(--gx-text-secondary); font-size: 14px; line-height: 1.65; }
.domain-verification-card[data-status="verified"] .verification-message { border-left-color: var(--gx-green); }
.domain-verification-card[data-status="grace"] .verification-message { border-left-color: var(--gx-amber); }
.domain-verification-card[data-status="expired"] .verification-message,
.domain-verification-card[data-status="error"] .verification-message { border-left-color: var(--gx-red); }
.dns-record-grid { border: 1px solid var(--gx-line); }
.dns-record-row { min-height: 48px; display: grid; grid-template-columns: 74px minmax(0,1fr) 42px; align-items: center; border-bottom: 1px solid var(--gx-line); }
.dns-record-row:last-child { border-bottom: 0; }
.dns-record-row > span { align-self: stretch; display: flex; align-items: center; padding: 0 13px; border-right: 1px solid var(--gx-line); color: var(--gx-text-faint); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.dns-record-row code { min-width: 0; padding: 11px 13px; color: var(--gx-ink); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.dns-record-row:first-child { grid-template-columns: 74px minmax(0,1fr); }
.dns-record-row .copy-btn {
  position: static;
  inset: auto;
  width: 42px;
  height: 100%;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--gx-line);
  background: var(--gx-panel);
  color: var(--gx-ink);
}
.dns-record-row .copy-btn:hover,
.dns-record-row .copy-btn:focus-visible { background: var(--gx-red); color: #fff; border-left-color: var(--gx-red); }
.verification-meta { min-height: 42px; margin: 12px 0 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; color: var(--gx-text-faint); font-size: 14px; line-height: 1.5; }
.warning-toggle { border-color: rgba(168,111,30,.25); background: rgba(168,111,30,.05); }

@media (max-width: 560px) {
  .verification-head { display: grid; }
  .verification-status { justify-self: start; }
  .dns-record-row { grid-template-columns: 62px minmax(0,1fr) 42px; }
  .dns-record-row:first-child { grid-template-columns: 62px minmax(0,1fr); }
  .dns-record-row > span { padding-inline: 9px; }
}


.domain-alert { margin: 20px 28px 0; min-height: 72px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 15px 18px; border: 1px solid rgba(168,111,30,.30); border-left: 4px solid var(--gx-amber); background: rgba(168,111,30,.075); }
.domain-alert[hidden] { display: none !important; }
.domain-alert[data-status="expired"] { border-color: rgba(192,57,43,.30); border-left-color: var(--gx-red); background: var(--gx-red-soft); }
.domain-alert-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--gx-amber); font-weight: 600; }
.domain-alert[data-status="expired"] .domain-alert-icon { color: var(--gx-red); }
.domain-alert-copy { min-width: 0; display: grid; gap: 4px; }
.domain-alert-copy strong { font-size: 14px; }
.domain-alert-copy span { color: var(--gx-text-secondary); font-size: 14px; line-height: 1.5; }

.settings-sections { display: grid; gap: 22px; }
.settings-section { border: 1px solid var(--gx-line); background: var(--gx-panel); }
.settings-section-head { min-height: 86px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 18px 24px; border-bottom: 1px solid var(--gx-line); background: var(--gx-surface); }
.settings-section-head > span { align-self: stretch; display: grid; place-items: center; border-right: 1px solid var(--gx-line); color: var(--gx-text-faint); font: 600 14px/1 var(--font-title); letter-spacing: .08em; }
.settings-section-head h2 { margin: 0 0 5px; font-family: var(--font-title); font-size: 20px; letter-spacing: -.035em; }
.settings-section-head p { margin: 0; color: var(--gx-muted); font-size: 14px; line-height: 1.55; }
.settings-section .settings-card { border: 0; }
.settings-card-inner { padding: 24px; }
.settings-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: end; }
.settings-form-action { grid-column: 1/-1; }
.settings-content-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--gx-line); }
.settings-content-grid > article { background: var(--gx-panel); }
.settings-toggle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.settings-section-emphasis { border-color: rgba(168,111,30,.35); }
.settings-section-emphasis .settings-section-head { background: rgba(168,111,30,.055); }
.settings-section-emphasis[data-status="verified"] { border-color: rgba(63,143,90,.34); }
.settings-section-emphasis[data-status="verified"] .settings-section-head { background: var(--gx-green-soft); }
.settings-section-emphasis[data-status="verified"] .verification-status { border-color: rgba(63,143,90,.30); background: var(--gx-green-soft); color: var(--gx-green); }
.settings-section-emphasis[data-status="expired"] .verification-status,
.settings-section-emphasis[data-status="error"] .verification-status { border-color: rgba(192,57,43,.28); background: var(--gx-red-soft); color: var(--gx-red); }
.domain-verification-card { padding: 24px; }
.verification-steps { margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; list-style: none; background: var(--gx-line); border: 1px solid var(--gx-line); counter-reset: dnsstep; }
.verification-steps li { min-width: 0; padding: 18px; display: grid; gap: 7px; background: var(--gx-panel); counter-increment: dnsstep; }
.verification-steps li::before { content: counter(dnsstep); width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--gx-ink); color: var(--gx-panel); font-size: 14px; font-weight: 600; }
.verification-steps strong { font-size: 14px; }
.verification-steps span { color: var(--gx-muted); font-size: 14px; line-height: 1.6; }
.dns-methods { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); gap: 14px; }
.dns-method { padding: 18px; border: 1px solid var(--gx-line); background: var(--gx-surface); }
.dns-method.is-recommended { background: var(--gx-panel); border-color: var(--gx-line-strong); }
.dns-method-head { margin-bottom: 13px; display: flex; justify-content: space-between; gap: 12px; }
.dns-method-head strong { font-size: 14px; }
.dns-method-head span { color: var(--gx-text-faint); font-size: 14px; text-transform: uppercase; letter-spacing: .07em; }
.dns-method > p { margin: 0; color: var(--gx-muted); font-size: 14px; line-height: 1.7; }
.verification-actions { display: flex; align-items: center; gap: 16px; }
.verification-actions small { color: var(--gx-text-faint); font-size: 14px; line-height: 1.5; }
.settings-section-danger { border-color: rgba(192,57,43,.25); }

@media (max-width: 900px) {
  .domain-alert { margin-inline: 20px; grid-template-columns: 34px minmax(0,1fr); }
  .domain-alert .btn { grid-column: 1/-1; justify-self: start; }
  .settings-form-grid, .settings-content-grid, .settings-toggle-grid, .dns-methods { grid-template-columns: 1fr; }
  .verification-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .domain-alert { margin: 14px 14px 0; padding: 14px; }
  .settings-sections { gap: 14px; }
  .settings-section-head { grid-template-columns: 34px minmax(0,1fr); padding: 15px; }
  .settings-section-head .verification-status { grid-column: 2; justify-self: start; }
  .settings-card-inner, .domain-verification-card { padding: 16px; }
  .verification-actions { align-items: flex-start; flex-direction: column; }
  .dns-method-head { display: grid; }
}

/* Brand and page identity */
.brand-logo {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  object-fit: cover;
}
.auth-visual .brand-logo { border: 0; }
.page-title { min-width: 0; }
.page-site-identity {
  min-height: 26px;
  margin-top: 11px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gx-text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
}
.page-site-identity[hidden] { display: none !important; }
.page-site-identity img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid var(--gx-line);
  border-radius: 5px;
  background: var(--gx-panel);
  object-fit: contain;
}
.page-site-identity span {
  overflow: hidden;
  max-width: min(46vw, 520px);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Lighter, unified navigation */
.nav-item {
  min-height: 44px;
  padding-inline: 13px;
  color: var(--gx-text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  text-transform: none;
}
.nav-item svg { opacity: .68; }
.nav-item.is-active { font-weight: 600; }
.side-label {
  font-weight: 600;
  letter-spacing: .15em;
}
.user-info strong { font-weight: 600; }
.user-info span { font-weight: 600; }

/* Full-width property alert */
.domain-alert {
  width: 100%;
  margin: -10px 0 28px;
}

/* Login audience animation */
.auth-story {
  width: min(100%, 680px);
  margin: clamp(34px, 6vh, 72px) 0;
  display: grid;
  gap: clamp(24px, 4vh, 38px);
}
.auth-pitch { margin: 0; }
.auth-metric-demo {
  width: min(100%, 470px);
  padding: 19px 21px 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(5,7,9,.24);
  box-shadow: 0 20px 70px rgba(0,0,0,.15);
  backdrop-filter: blur(8px);
}
.auth-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255,255,255,.62);
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.auth-metric-head small { color: rgba(255,255,255,.45); font-size: 14px; }
.auth-metric-value {
  margin-top: 14px;
  display: flex;
  align-items: end;
  gap: 12px;
}
.auth-metric-value strong {
  color: #fff;
  font-family: var(--font-title);
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
}
.auth-metric-value span {
  padding-bottom: 5px;
  color: rgba(255,255,255,.58);
  font-size: 14px;
}
.auth-metric-chart {
  position: relative;
  height: 132px;
  margin-top: 16px;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0));
}
.auth-line-chart { position: absolute; inset: 9px 54px 8px 0; width: calc(100% - 54px); height: calc(100% - 17px); overflow: visible; }
.auth-line-grid { fill: none; stroke: rgba(255,255,255,.075); stroke-width: 1; vector-effect: non-scaling-stroke; }
.auth-line-area { fill: url(#none); fill: rgba(192,57,43,.11); opacity: .9; transition: d .42s ease; }
.auth-line-complete,
.auth-line-segment { fill: none; stroke: #ef7569; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.auth-line-complete { filter: drop-shadow(0 0 7px rgba(217,75,62,.28)); }
.auth-line-segment { stroke: #fff; filter: drop-shadow(0 0 6px rgba(239,117,105,.62)); }
.auth-line-points circle { fill: #202428; stroke: #ef7569; stroke-width: 2; vector-effect: non-scaling-stroke; }
.auth-line-points circle:last-child { fill: #fff; stroke: #ef7569; }
.auth-collector {
  position: absolute;
  z-index: 4;
  right: 4px;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
}
.auth-collector img { position: relative; z-index: 2; width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 7px 14px rgba(0,0,0,.35)); }
.auth-collector-ring {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(239,117,105,.55);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(192,57,43,.08);
  animation: gxCollectorBreathe 2.2s ease-in-out infinite;
}
.auth-page-stream { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.auth-page-token {
  position: absolute;
  left: var(--start-x, 12%);
  top: var(--start-y, 70%);
  width: 25px;
  height: 31px;
  border: 1px solid rgba(255,255,255,.62);
  background: rgba(255,255,255,.12);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  opacity: 0;
  transform: translate3d(0,0,0) rotate(var(--rotate,-8deg)) scale(.86);
  animation: gxPageAbsorb .62s cubic-bezier(.3,.72,.2,1) forwards;
}
.auth-page-token::before,
.auth-page-token::after { content: ""; position: absolute; left: 5px; right: 5px; height: 1px; background: rgba(255,255,255,.52); }
.auth-page-token::before { top: 10px; box-shadow: 0 5px 0 rgba(255,255,255,.32); }
.auth-page-token::after { top: 20px; right: 10px; }
.auth-shell.is-entering .auth-metric-demo { animation: gxAuthCardIn .7s cubic-bezier(.2,.8,.2,1) .86s both; }
@keyframes gxPageAbsorb {
  0% { opacity: 0; transform: translate3d(0,8px,0) rotate(var(--rotate,-8deg)) scale(.8); }
  18% { opacity: .9; }
  100% { opacity: 0; transform: translate3d(var(--travel-x,330px),var(--travel-y,-22px),0) rotate(8deg) scale(.18); }
}
@keyframes gxCollectorBreathe {
  0%,100% { transform: scale(.92); opacity: .55; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes gxAuthLineSegment {
  from { stroke-dashoffset: var(--segment-length, 80); }
  to { stroke-dashoffset: 0; }
}
@media (max-width: 900px) {
  .domain-alert { margin: -8px 0 24px; }
}
@media (max-width: 680px) {
  .page-site-identity span { max-width: 68vw; }
  .domain-alert { margin: -4px 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-page-token,
  .auth-collector-ring,
  .auth-line-segment { animation: none !important; transition: none !important; }
}


/* Login minimal et webapp */
.auth-visual {
  isolation: isolate;
  justify-content: space-between;
  background:
    radial-gradient(circle at 72% 28%, rgba(192,57,43,.15), transparent 30%),
    linear-gradient(135deg, #202428 0%, #15191c 100%);
}
.auth-visual::before {
  z-index: -1;
  width: min(60vw, 760px);
  right: -18%;
  top: 6%;
  border-color: rgba(255,255,255,.055);
  box-shadow: 0 0 0 110px rgba(255,255,255,.018), 0 0 0 220px rgba(255,255,255,.012);
}
.auth-visual::after {
  z-index: -1;
  inset: auto 8% 12% auto;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239,117,105,.55), transparent);
  box-shadow: none;
  transform: rotate(-8deg);
}
.auth-brand-lockup {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 590px;
  margin: auto 0;
}
.auth-brand-logo {
  width: clamp(56px, 6vw, 76px);
  height: clamp(56px, 6vw, 76px);
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 35px rgba(0,0,0,.28));
}
.auth-brand-lockup h1 {
  margin: 0;
  color: #fff;
  font-family: var(--font-title);
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.055em;
}
.auth-brand-lockup p {
  max-width: 430px;
  margin: 16px 0 0;
  color: rgba(255,255,255,.58);
  font-size: clamp(14px, 1.35vw, 18px);
  font-weight: 400;
  line-height: 1.65;
}
.auth-flow-scene {
  position: absolute;
  z-index: 1;
  inset: auto clamp(28px, 5vw, 76px) clamp(72px, 10vh, 118px) clamp(28px, 5vw, 76px);
  height: clamp(170px, 25vh, 260px);
  overflow: hidden;
  opacity: .74;
}
.auth-flow-scene .auth-line-chart {
  inset: 18px 74px 24px 0;
  width: calc(100% - 74px);
  height: calc(100% - 42px);
}
.auth-flow-scene .auth-line-grid { stroke: rgba(255,255,255,.045); }
.auth-flow-scene .auth-line-complete,
.auth-flow-scene .auth-line-segment { stroke-width: 2; }
.auth-flow-counter {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: rgba(255,255,255,.45);
}
.auth-flow-counter strong {
  color: rgba(255,255,255,.86);
  font-family: var(--font-title);
  font-size: 25px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.auth-flow-counter span { font-size: 14px; font-weight: 400; }
.auth-flow-scene .auth-collector { right: 7px; }
.auth-flow-scene .auth-page-token { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.46); }
.auth-foot { z-index: 3; }
.auth-shell.is-entering .auth-brand-logo { animation: gxAuthMarkIn .7s cubic-bezier(.18,.9,.28,1.2) .18s both; }
.auth-shell.is-entering .auth-brand-lockup h1 { animation: gxAuthTitleIn .76s cubic-bezier(.16,.86,.22,1) .32s both; }
.auth-shell.is-entering .auth-brand-lockup p { animation: gxAuthItemIn .64s cubic-bezier(.2,.8,.2,1) .48s both; }
.auth-shell.is-entering .auth-flow-scene { animation: gxAuthItemIn .8s cubic-bezier(.2,.8,.2,1) .64s both; }
.auth-install-link {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.auth-doc-link,
.auth-install-link { text-decoration: none; }
@media (max-width: 1050px) {
  .auth-brand-lockup { margin-top: 26vh; }
  .auth-flow-scene { bottom: 80px; }
}
@media (max-width: 900px) {
  .auth-visual { display: none; }
}
[data-theme="dark"] .auth-visual {
  background:
    radial-gradient(circle at 72% 28%, rgba(192,57,43,.16), transparent 30%),
    linear-gradient(135deg, #111416 0%, #080a0c 100%);
}

/* Unified page composition */
.page-sections { gap: 22px; }
.unified-section-body {
  min-width: 0;
  padding: 24px;
  background: var(--gx-panel);
}
.unified-section-body-flush { padding: 0; }
.page-sections .kpi-grid,
.page-sections .grid-main,
.page-sections .hourly-card { margin-bottom: 0; }
.page-sections .hourly-card { border: 0; }
.page-sections .site-preview-card {
  margin: 0;
  border: 0;
}
.settings-section-head-action { align-items: center; }
.settings-section-head-action > .btn { justify-self: end; white-space: nowrap; }
.settings-section-head-action .site-preview-actions { justify-self: end; }

/* Stronger site identity below the page title */
.page-site-identity {
  min-height: 58px;
  margin-top: 14px;
  padding: 8px 15px 8px 8px;
  gap: 12px;
  border: 1px solid var(--gx-line);
  background: var(--gx-surface);
  color: var(--gx-ink);
}
.page-site-identity img {
  width: 42px;
  height: 42px;
  padding: 4px;
  border-radius: 7px;
  background: var(--gx-panel);
}
.page-site-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.page-site-copy strong {
  overflow: hidden;
  max-width: min(46vw, 520px);
  color: var(--gx-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.page-site-copy small {
  overflow: hidden;
  max-width: min(46vw, 520px);
  color: var(--gx-text-secondary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .settings-section-head-action { grid-template-columns: 44px minmax(0,1fr); }
  .settings-section-head-action > .btn,
  .settings-section-head-action .site-preview-actions {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .unified-section-body { padding: 16px; }
  .unified-section-body-flush { padding: 0; }
  .page-site-identity { width: 100%; max-width: 100%; }
  .page-site-copy strong,
  .page-site-copy small { max-width: calc(100vw - 138px); }
  .settings-section-head-action > .btn { width: 100%; justify-content: center; }
  .settings-section-head-action .site-preview-actions { width: 100%; }
}
.hourly-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.hourly-card-toolbar > span {
  color: var(--gx-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 560px) {
  .hourly-card-toolbar { align-items: flex-start; flex-direction: column; }
}

/* Création de propriété domaine / sous-domaine — v1.13.0 */
.property-type-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.property-type-picker > legend {
  margin-bottom: 9px;
  color: var(--gx-text);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
}
.property-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.property-type-card {
  min-height: 94px;
  border: 1px solid var(--gx-line);
}
.property-type-card code {
  padding: 1px 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--gx-panel) 78%, var(--gx-surface));
  font-size: 12px;
}
.property-auto-hint {
  margin: 9px 0 0;
  color: var(--gx-muted);
  font-size: 13px;
  line-height: 1.5;
}
.property-auto-hint.is-detected {
  color: var(--gx-text);
}
.create-dns-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--gx-line);
  background: var(--gx-line);
}
.create-dns-preview > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 15px;
  background: var(--gx-surface);
}
.create-dns-preview span {
  color: var(--gx-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.create-dns-preview strong,
.create-dns-preview code {
  overflow-wrap: anywhere;
  color: var(--gx-text);
  font-size: 14px;
}
.create-dns-preview > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 15px;
  background: var(--gx-panel);
  color: var(--gx-muted);
  font-size: 13px;
  line-height: 1.55;
}
.create-dns-preview.is-subdomain > p {
  color: var(--gx-text);
  box-shadow: inset 3px 0 0 var(--gx-red);
}
.dns-property-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--gx-line);
  background: var(--gx-line);
}
.dns-property-context > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 15px 16px;
  background: var(--gx-surface);
}
.dns-property-context > div span {
  color: var(--gx-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.dns-property-context > div strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}
.dns-conflict-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 16px;
  background: var(--gx-red-soft);
  color: var(--gx-text);
  font-size: 14px;
  line-height: 1.6;
  box-shadow: inset 3px 0 0 var(--gx-red);
}
.dns-record-row code {
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .property-type-grid,
  .create-dns-preview,
  .dns-property-context {
    grid-template-columns: 1fr;
  }
  .create-dns-preview > p,
  .dns-conflict-note {
    grid-column: 1;
  }
}
#createSiteModal .modal { width: min(100%, 720px); }


/* Responsive — statistiques des propriétés et dernières visites v1.13.4 */
@media (max-width: 900px) {
  .recent-visit-row { grid-template-columns: minmax(130px,.45fr) minmax(0,1fr); gap: 12px 20px; }
  .recent-visit-details { grid-column: 2; }
}
@media (max-width: 620px) {
  .site-stats { grid-template-columns: 1fr 1fr; }
  .site-stat { padding: 13px; }
  .site-stat strong { font-size: 24px; }
  .recent-visit-row { grid-template-columns: 1fr; gap: 10px; padding: 18px; }
  .recent-visit-details { grid-column: auto; }
  .recent-visit-page strong, .recent-visit-page span, .recent-visit-details span { white-space: normal; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .site-stat-live span i { animation: none; }
}
