/* djag.cc admin — design system inherited from deejing-agent.com */

:root {
  --bg:           #f4f8fc;
  --bg-2:         #e8f0f7;
  --surface:      rgba(255, 255, 255, 0.78);
  --surface-2:    rgba(255, 255, 255, 0.92);
  --ink:          #17365f;
  --ink-soft:     #4e6b8c;
  --ink-muted:    #516c8c;
  --line:         rgba(23, 54, 95, 0.1);
  --accent:       #d53a43;
  --accent-deep:  #a5252d;
  --sky:          #8dc5f2;
  --warm:         #f5d6a7;
  --shadow-lg:    0 30px 70px rgba(25, 54, 89, 0.10);
  --shadow-md:    0 18px 42px rgba(25, 54, 89, 0.08);
  --shadow-sm:    0 10px 24px rgba(25, 54, 89, 0.06);
  --ease:         cubic-bezier(.22, 1, .36, 1);
  --radius-card:  18px;
  --radius-pill:  999px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background:
    radial-gradient(900px 620px at 10% -10%, rgba(141, 197, 242, 0.45), transparent 60%),
    radial-gradient(820px 560px at 96% 4%, rgba(245, 214, 167, 0.5), transparent 55%),
    radial-gradient(720px 520px at 50% 112%, rgba(213, 58, 67, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(23, 54, 95, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 54, 95, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 80%);
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 22px 70px;
}

.wrap-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}

.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.muted { color: var(--ink-muted); }

/* --- Top bar --------------------------------------------------------------- */

.topbar {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.logo {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.logo-lg { font-size: 1.6rem; display: inline-block; margin-bottom: 6px; }

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.topnav { display: flex; align-items: center; gap: 10px; }
.topnav form { margin: 0; }

/* --- Service status indicators (DB, Mail) ---------------------------------- */

.service-status {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: help;
}
.status-dot.green { background: #2e9e5b; box-shadow: 0 0 8px rgba(46, 158, 91, 0.5); }
.status-dot.red   { background: var(--accent); box-shadow: 0 0 8px rgba(213, 58, 67, 0.5); }

/* --- Cards ------------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.card-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 16px;
}

.card-sub {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-left: 8px;
}

/* --- Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.btn-primary {
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-danger {
  background: transparent;
  color: var(--accent-deep);
  border-color: transparent;
}
.btn-danger:hover { background: rgba(213, 58, 67, 0.08); }

.btn-sm { padding: 6px 13px; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* --- Inputs ------------------------------------------------------------------- */

.label {
  display: block;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.label .opt { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink-muted); }

.input {
  width: 100%;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(213, 58, 67, 0.4);
}
.input::placeholder { color: var(--ink-muted); opacity: 0.6; }

.hint { font-size: 0.78rem; color: var(--ink-muted); margin-top: 6px; }

/* --- Toolbar / search ------------------------------------------------------------ */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box { position: relative; min-width: 240px; }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  opacity: 0.6;
  pointer-events: none;
}
.search-box .input { padding-left: 36px; }

/* --- Link table -------------------------------------------------------------------- */

.table-card { overflow-x: auto; margin-bottom: 20px; }

.link-table {
  width: 100%;
  border-collapse: collapse;
}

.link-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: left;
  padding: 14px 10px 10px;
  border-bottom: 1px solid var(--line);
}

.link-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.link-table tbody tr:last-child td { border-bottom: none; }
.link-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.target-cell a { color: var(--ink-soft); text-decoration: none; }
.target-cell a:hover { color: var(--accent); }
.target-cell .ext { font-size: 0.75rem; }

.slug-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  cursor: copy;
  transition: background 0.15s var(--ease);
}
.slug-pill:hover { background: #fff; border-color: var(--sky); }
.slug-pill.copied { border-color: var(--accent); color: var(--accent-deep); }

/* Short-link cell: copy icon button + full clickable URL */
.short-link { display: inline-flex; align-items: center; gap: 8px; }

.slug-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.slug-link:hover { background: #fff; border-color: var(--sky); color: var(--accent); }
.slug-link .ico { width: 12px; height: 12px; opacity: 0.55; flex-shrink: 0; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.copy-btn:hover { background: #fff; border-color: var(--sky); color: var(--ink); }
.copy-btn.copied { border-color: #2e9e5b; color: #1f7a48; background: rgba(46, 158, 91, 0.08); }

/* Icon-only action buttons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn-icon:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn-icon.danger:hover { background: rgba(213, 58, 67, 0.08); color: var(--accent-deep); border-color: rgba(213, 58, 67, 0.25); }

.ico { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* Label cell: main line + muted target underneath */
.cell-main { font-weight: 700; }
.cell-sub {
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.page-title-sm {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.topnav .btn.active {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}
.topnav .btn-primary.active { background: linear-gradient(160deg, var(--accent), var(--accent-deep)); color: #fff; }

.ref-slug { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--line); }
.ref-slug:hover { color: var(--accent); }

.actions { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.actions form { margin: 0; display: inline-flex; }

/* --- Status pills ----------------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.st-active  { color: #1f7a48; } .st-active .dot  { background: #2e9e5b; }
.st-paused  { color: var(--ink-muted); } .st-paused .dot  { background: #8aa0b8; }
.st-expired { color: var(--accent-deep); } .st-expired .dot { background: var(--accent); }
.st-limit   { color: #9a6213; } .st-limit .dot   { background: #e08a2e; }

/* --- Empty state -------------------------------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 64px 24px;
}
.empty-art { font-size: 2.4rem; margin-bottom: 12px; }
.empty-state p { color: var(--ink-muted); margin: 0 0 20px; }

/* --- Page headings / form pages ------------------------------------------------------- */

.back-link {
  display: inline-block;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 14px;
}
.back-link:hover { color: var(--accent); }

.page-title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.page-title .mono { font-size: 0.8em; }
.page-sub { font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 0.6em; color: var(--ink-muted); }

.form-card { max-width: 640px; }

.field { margin-bottom: 18px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
}

.field-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.field-toggle .label { margin-bottom: 0; }

.slug-row { display: flex; align-items: center; gap: 10px; }
.slug-prefix { color: var(--ink-muted); white-space: nowrap; }
.slug-row .input { max-width: 200px; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}

.form-error, .field-error {
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 0.85rem;
}
.form-error { margin-top: 10px; }
.form-error:empty, .field-error:empty { display: none; }
.field-error { margin-top: 6px; }

/* --- Toggle switch ----------------------------------------------------------------------- */

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute;
  inset: 0;
  background: rgba(23, 54, 95, 0.18);
  border-radius: var(--radius-pill);
  transition: background 0.2s var(--ease);
}
.switch .track::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(25, 54, 89, 0.25);
  transition: transform 0.2s var(--ease);
}
.switch input:checked + .track { background: linear-gradient(160deg, var(--accent), var(--accent-deep)); }
.switch input:checked + .track::before { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(213, 58, 67, 0.4); }

/* --- Auth / error pages --------------------------------------------------------------------- */

.auth-card {
  width: min(380px, 92vw);
  text-align: center;
  padding: 38px 34px;
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  margin: 6px 0 4px;
}
.auth-sub { color: var(--ink-muted); font-size: 0.88rem; margin: 0 0 18px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-card .form-error { margin: 0 0 12px; }

.lock-icon { font-size: 2rem; margin-bottom: 4px; }

.err-code {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 3.2rem;
  line-height: 1;
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 14px 0 4px;
}
.err-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 8px;
}
.err-message { color: var(--ink-muted); margin: 0 0 18px; }

/* --- Stats page ------------------------------------------------------------------------------- */

.stats-target { color: var(--ink-soft); margin: -8px 0 22px; word-break: break-all; }
.stats-target a { color: var(--ink-soft); }
.stats-target a:hover { color: var(--accent); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card { padding: 18px 20px; box-shadow: var(--shadow-sm); }
.mm-card { display: flex; flex-direction: column; }
.mm-chart-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.mm-chart { width: 160px; height: 28px; border-radius: 4px; flex-shrink: 0; }
.mm-estimate { font-size: 0.72rem; font-weight: 700; color: var(--ink-muted); white-space: nowrap; }

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.stat-value .status { font-size: 0.95rem; }

.chart-card { margin-bottom: 20px; }
.chart-card canvas { display: block; width: 100%; }

.chart-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.chart-row .card { min-width: 0; }

.visitors-table td { font-size: 0.85rem; }

/* --- Responsive: table → cards on mobile ----------------------------------------------------- */

@media (max-width: 760px) {
  .chart-row { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box { min-width: 0; }

  .link-table thead { display: none; }
  .link-table, .link-table tbody, .link-table tr, .link-table td { display: block; width: 100%; }
  .link-table tr {
    border: 1px solid var(--line);
    border-radius: 14px;
    margin: 12px 0;
    padding: 8px 14px;
    background: var(--surface-2);
  }
  .link-table td {
    border-bottom: none;
    padding: 7px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .link-table td::before {
    content: attr(data-th);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  .link-table td[data-th='Actions']::before { display: none; }
  .link-table .num { text-align: left; }
  .visitors-table td::before { content: attr(data-th); }
}

/* ============================================================================
   Login hero — full-bleed glass landing (Private AI Gateway)
   ========================================================================== */

main.bare { position: relative; z-index: 1; }

.hero-login {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4.5vw, 56px);
  overflow: hidden;
}

/* Three.js hero animation layers */
.stage {
  position: absolute;
  inset: 0;
  min-height: 0;
  z-index: 1;
}

.veil {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(52vw, 760px);
  background: linear-gradient(90deg, rgba(232, 239, 248, 0.86) 0%, rgba(232, 239, 248, 0.64) 24%, rgba(232, 239, 248, 0.15) 48%, rgba(232, 239, 248, 0) 66%);
  pointer-events: none;
  z-index: 3;
}

.art-shell {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, .52), transparent 24%),
    linear-gradient(180deg, rgba(238, 244, 250, .36), rgba(238, 244, 250, .06));
}
.art-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 58%, rgba(25, 54, 89, .06) 100%),
    linear-gradient(180deg, rgba(242, 246, 250, .18), rgba(242, 246, 250, 0) 28%, rgba(242, 246, 250, .22) 100%),
    radial-gradient(circle at 75% 28%, rgba(209, 223, 238, .26), transparent 26%);
  pointer-events: none;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.scene-haze {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 1;
  will-change: opacity;
  background:
    radial-gradient(circle at 18% 16%, rgba(247, 251, 255, 0.50), rgba(247, 251, 255, 0.13) 36%, rgba(247, 251, 255, 0) 70%),
    radial-gradient(circle at 80% 10%, rgba(213, 223, 236, 0.24), rgba(213, 223, 236, 0.08) 33%, rgba(213, 223, 236, 0) 72%),
    linear-gradient(180deg, rgba(208, 220, 236, 0.22), rgba(208, 220, 236, 0));
}

@media (max-width: 1120px) {
  .veil {
    width: min(62vw, 760px);
    background: linear-gradient(90deg, rgba(233, 240, 248, 0.88) 0%, rgba(233, 240, 248, 0.72) 30%, rgba(233, 240, 248, 0.22) 56%, rgba(233, 240, 248, 0) 74%);
  }
}

/* Mobile: the animation fills the whole screen, text floats on top of it */
@media (max-width: 860px) {
  .stage {
    position: absolute;
    inset: 0;
    order: initial;
    width: auto;
    flex: none;
    min-height: 0;
    margin-top: 0;
  }
  .veil {
    display: block;
    width: 100%;
    height: 82%;
    inset: 0 auto auto 0;
    background: linear-gradient(180deg, rgba(232, 240, 248, 0.94) 0%, rgba(232, 240, 248, 0.88) 36%, rgba(232, 240, 248, 0.68) 64%, rgba(232, 240, 248, 0.32) 86%, rgba(232, 240, 248, 0) 100%);
  }
  .art-shell {
    border-radius: 0;
  }

  .bar-right [data-contact-open] { display: none; }
}

/* Fixed header — glass bar, no nav, lang-switch only */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding-top: 18px;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  will-change: opacity, transform;
  /* Fast fade-in when returning (scrolling up) */
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  animation: header-enter .7s cubic-bezier(.16,1,.3,1) .45s backwards;
}

.header.header-hidden {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
  /* Slow fade-out when scrolling down */
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.header .wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  padding-inline: clamp(18px, 3.4vw, 56px);
  pointer-events: auto;
}
@keyframes header-enter {
  from { opacity: 0; transform: translateY(-18px); }
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: 0 12px 32px rgba(30, 61, 97, .08), inset 0 1px 0 rgba(255, 255, 255, .75);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.brand-icon {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
}
.lang-switch a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  font-family: 'Sora', sans-serif;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.lang-switch a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}
.lang-switch a:not(.active):hover {
  background: rgba(255, 255, 255, .7);
  color: var(--ink);
}
.lang-switch a:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

.hero-inner {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 70px;
}

.hero-copy { max-width: 56rem; }

/* Staggered entrance */
.hero-copy > * {
  opacity: 0;
  transform: translateY(26px);
  animation: hero-enter 0.8s var(--ease) forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.26s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.40s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.54s; }
@keyframes hero-enter { to { opacity: 1; transform: none; } }

.eyebrow {
  font-family: 'Sora', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding: 10px 18px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.eyebrow::before {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffb1ab, var(--accent));
  box-shadow: 0 0 18px rgba(213, 58, 67, 0.4);
  animation: pulse-dot 2.4s var(--ease) infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(213, 58, 67, 0.4); }
  50% { box-shadow: 0 0 0 7px rgba(213, 58, 67, 0); }
}

.hero-copy h1 {
  margin: 0;
  max-width: 18ch;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--ink);
}
.hero-copy h1 .grad {
  color: var(--accent);
}

.hero-lead {
  margin: 26px 0 0;
  max-width: 44rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.78;
}

.hero-features {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.hero-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* --- Hidden login overlay (revealed via Ctrl+Shift+L) --------------------- */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 54, 95, 0.25);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.login-overlay.visible { opacity: 1; visibility: visible; }

.login-panel {
  width: min(400px, 92vw);
  text-align: center;
  padding: 40px 36px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.5s var(--ease);
}
.login-overlay.visible .login-panel { transform: none; }
.login-panel .logo-lg { margin-bottom: 8px; }
.login-panel .auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.login-panel .form-error { margin: 0 0 14px; }

@media (max-width: 620px) {
  .hero-copy h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy > * { animation: none !important; }
  .hero-copy > * { opacity: 1 !important; transform: none !important; }
  .login-overlay, .login-panel { transition: none !important; }
}

/* --- Contact section (public landing, below the hero) --------------------- */

.bar-right { display: flex; align-items: center; gap: 10px; }

.contact-section {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 110px) clamp(20px, 4vw, 32px) 0;
}

.contact-inner { text-align: center; }

.contact-title {
  margin: 0 0 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.contact-sub {
  margin: 0 auto 28px;
  max-width: 36rem;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 0.95rem;
}

.contact-card {
  text-align: left;
  padding: 30px 30px 26px;
  box-shadow: var(--shadow-lg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

textarea.input { resize: vertical; min-height: 130px; line-height: 1.6; }

.contact-actions { display: flex; justify-content: flex-end; margin-top: 6px; }

/* Honeypot: visually gone, still in the DOM for bots to find */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-success { text-align: center; padding: 44px 30px; }
.contact-success h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  margin: 0 0 6px;
}
.contact-success p { color: var(--ink-soft); margin: 0; }
.success-mark {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 800;
  color: #1f7a48;
  background: rgba(46, 158, 91, 0.12);
  border: 1px solid rgba(46, 158, 91, 0.3);
}

.page-foot {
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.8rem;
  padding: 30px 0 36px;
}

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

/* --- Contact popup (floating button + modal) ------------------------------- */

.contact-fab {
  position: fixed;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 30px);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(213, 58, 67, 0.28);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.contact-fab:hover { transform: translateY(-2px); box-shadow: 0 20px 42px rgba(213, 58, 67, 0.34); }
.contact-fab:active { transform: translateY(0); }

.contact-panel {
  position: relative;
  text-align: left;
  width: min(430px, 92vw);
}
.contact-panel .auth-title,
.contact-panel .auth-sub { text-align: center; }
.contact-panel .field { margin-bottom: 14px; }
.contact-panel .form-error { margin-bottom: 10px; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.modal-close:hover { background: rgba(23, 54, 95, 0.07); color: var(--ink); }

.contact-panel .contact-success { padding: 18px 0 6px; text-align: center; }

/* --- Mobile hero overrides ---------------------------------------------------
   Must stay at the END of the file: the base .bar, .hero-inner, and
   .hero-copy rules appear later in source than the main mobile block, so
   these equal-specificity overrides only win from down here. */
@media (max-width: 860px) {
  /* Hold the hero copy until the red cube has landed (hero.js fires
     "hero:cube-landed"; the page adds body.cube-landed). */
  body:not(.cube-landed) .hero-copy > * { animation-play-state: paused !important; }

  /* Header: no glass bar — just the logo and the language switch */
  .bar {
    padding: 0;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Text sits in the upper part, above the cube field */
  .hero-inner {
    align-items: flex-start;
    padding-top: 76px;
  }

  /* Clean solid text — readability comes from the veil, no effects */
  .hero-lead,
  .hero-features li {
    color: var(--ink);
  }

  .hero-copy h1 .grad {
    color: var(--accent);
  }

  /* More air between the lead text and the bullet list */
  .hero-features {
    margin-top: 84px;
  }

  /* Veil stays off during the intro so the animation and the red cube show
     at 100% — it fades in together with the text once the cube has landed.
     (!important needed: hero.js drives .veil opacity via inline style.) */
  .veil { transition: opacity 1.2s var(--ease); }
  body:not(.cube-landed) .veil { opacity: 0 !important; }
}

/* ============================================================================
   Projects & Groups — dashboard grouping, project cards, drag-and-drop
   ========================================================================== */

/* View toggle */
.view-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.view-toggle .btn.active {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

/* Page head (title + actions row) */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head-actions { display: flex; gap: 8px; flex-shrink: 0; }
.page-desc { color: var(--ink-soft); margin: -12px 0 0; }

/* Project grid on /admin/projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.project-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.project-card-link {
  display: flex;
  gap: 14px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  flex: 1;
}
.project-card-link:hover { background: rgba(255,255,255,0.4); }
.project-card-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
}
.project-card-icon .ico { width: 22px; height: 22px; }
.project-card-body { min-width: 0; }
.project-card-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 4px;
}
.project-card-desc {
  color: var(--ink-muted);
  font-size: 0.82rem;
  margin: 0 0 8px;
  line-height: 1.5;
}
.project-card-meta {
  display: flex;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 600;
}
.project-card-actions {
  display: flex;
  gap: 2px;
  padding: 6px 14px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}
.project-card-actions form { margin: 0; display: inline-flex; }

/* Project group sections on the dashboard */
.project-group { margin-bottom: 16px; padding: 0; }
.project-group-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.project-group-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.project-group-link:hover { color: var(--accent); }
.project-group-icon .ico { width: 18px; height: 18px; color: var(--ink-soft); }
.project-group-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.project-group-meta {
  margin-left: 8px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 600;
}
.project-group .link-table { border: none; }
.project-group .link-table th:first-child { padding-left: 18px; }
.project-group .link-table td:first-child { padding-left: 18px; }

/* Group sections in project detail page */
.group-section { margin-bottom: 16px; padding: 0; }
.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.group-title { display: flex; align-items: center; gap: 10px; }
.group-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.group-count { font-size: 0.78rem; color: var(--ink-muted); font-weight: 600; }

/* Drag-and-drop in project detail */
.drag-col { width: 32px; }
.drag-handle {
  cursor: grab;
  color: var(--ink-muted);
  text-align: center;
  width: 32px;
  padding: 0;
}
.drag-handle:active { cursor: grabbing; }
.drag-handle .ico { width: 14px; height: 14px; }
tr.dragging {
  opacity: 0.4;
  background: var(--surface-2);
}
.drop-zone { min-height: 40px; }
.drop-zone.drag-over {
  background: rgba(141, 197, 242, 0.12);
  outline: 2px dashed var(--sky);
  outline-offset: -2px;
  border-radius: 12px;
}
.group-table { margin: 0; }
.group-table th:first-child { padding-left: 16px; }
.group-table td:first-child { padding-left: 16px; }

.inline-form { margin: 0; display: inline-flex; }

/* Project filter on traffic page */
#project-filter { max-width: 280px; }

/* ============================================================================
   Hit detail drawer (right slide-out panel)
   ========================================================================== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(23, 54, 95, 0.2);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.drawer-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

.hit-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 92vw);
  height: 100vh;
  height: 100dvh;
  z-index: 70;
  background: var(--surface);
  border-left: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hit-drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.drawer-head h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
}
.drawer-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.drawer-close:hover { background: rgba(23, 54, 95, 0.07); color: var(--ink); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 24px;
}

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.drawer-field:last-child { border-bottom: none; }

.drawer-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.drawer-value {
  font-size: 0.92rem;
  color: var(--ink);
  word-break: break-all;
}

/* ============================================================================
   Column config modal
   ========================================================================== */

.col-config-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 54, 95, 0.25);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
.col-config-modal.open {
  opacity: 1;
  visibility: visible;
}

.col-config-panel {
  width: min(400px, 92vw);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.col-config-list {
  padding: 8px 0;
  max-height: 60vh;
  overflow-y: auto;
}

.col-config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  transition: background 0.12s var(--ease);
}
.col-config-item:hover { background: rgba(23, 54, 95, 0.04); }

.col-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.col-check input { width: 16px; height: 16px; accent-color: var(--accent); }

.col-move { display: flex; gap: 2px; }
.col-move .btn-icon { width: 28px; height: 28px; font-size: 0.7rem; }

.col-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

/* Hidden by default for optional columns — JS overrides with saved config */
.col-opt { display: none; }

/* Tab bar + panes (chart / world map toggle) */
.tab-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tab-btn {
  background: none; border: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 0.9rem;
  color: var(--ink-muted); padding: 3px 8px; border-radius: 6px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.tab-btn:hover { color: var(--ink); background: var(--surface-2); }
.tab-btn.active { color: var(--ink); background: var(--surface-2); }
.tab-sep { color: var(--line); font-size: 0.8rem; user-select: none; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.map-pane canvas { display: block; width: 100%; border-radius: 8px; cursor: crosshair; }

/* Select styling to match .input */
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23516c8c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

/* --- Modern admin animations (cheap: opacity/transform only) ---------------- */

@media (prefers-reduced-motion: no-preference) {
  .stat-card, .chart-card, .table-card, .project-group, .form-card {
    animation: card-enter 0.55s var(--ease) backwards;
  }
  .stat-grid .stat-card:nth-child(1) { animation-delay: 0.02s; }
  .stat-grid .stat-card:nth-child(2) { animation-delay: 0.07s; }
  .stat-grid .stat-card:nth-child(3) { animation-delay: 0.12s; }
  .stat-grid .stat-card:nth-child(4) { animation-delay: 0.17s; }
  .stat-grid .stat-card:nth-child(5) { animation-delay: 0.22s; }
  .chart-card { animation-delay: 0.16s; }
  .chart-row .chart-card:nth-child(1) { animation-delay: 0.22s; }
  .chart-row .chart-card:nth-child(2) { animation-delay: 0.28s; }
  .chart-row .chart-card:nth-child(3) { animation-delay: 0.34s; }
  .table-card, .project-group { animation-delay: 0.30s; }
}
@keyframes card-enter {
  from { opacity: 0; transform: translateY(14px); }
}

.stat-card {
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Tab panes (chart <-> map) cross-fade */
.tab-pane.active { animation: pane-fade 0.35s var(--ease); }
@keyframes pane-fade { from { opacity: 0; } }

/* Visitor map: soft ocean backdrop behind the cached land bitmap */
#world-map-canvas {
  display: block;
  width: 100%;
  border-radius: 12px;
  background:
    radial-gradient(120% 90% at 30% 10%, rgba(141, 197, 242, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(232, 240, 248, 0.55), rgba(244, 248, 252, 0.25));
}

@media (prefers-reduced-motion: reduce) {
  .stat-card, .chart-card, .table-card, .project-group, .form-card, .tab-pane.active {
    animation: none !important;
  }
}

/* --- Visitor map hover popup ------------------------------------------------ */

.map-pane { position: relative; }

.map-tip {
  display: none;
  position: absolute;
  z-index: 10;
  pointer-events: none;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.map-tip.visible { opacity: 1; transform: none; }

.map-tip-head {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink);
}
.map-tip-body {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-deep);
  margin-top: 1px;
}

/* Tab exclusivity: ".chart-card canvas" (0,1,1) outranks ".tab-pane" (0,1,0),
   which kept the chart canvas visible behind the map. Force inactive panes
   hidden regardless of other display rules. */
.tab-pane:not(.active) { display: none !important; }
