/* Axinor Security — admin panel */
:root {
  --bg: #0b0b0c;
  --bg-elev: #121214;
  --surface: #161618;
  --surface-2: #1d1d20;
  --surface-3: #26262a;
  --border: #2a2a2e;
  --border-strong: #3a3a40;
  --text: #f4f4f5;
  --text-2: #b4b4bb;
  --muted: #85858d;
  --accent: #eb0000;
  --accent-hover: #ff1f1f;
  --accent-soft: rgba(235, 0, 0, 0.12);
  --accent-text: #ff5c5c;
  --green: #34d399; --green-soft: rgba(52, 211, 153, 0.12);
  --amber: #fbbf24; --amber-soft: rgba(251, 191, 36, 0.12);
  --blue: #60a5fa; --blue-soft: rgba(96, 165, 250, 0.12);
  --violet: #a78bfa; --violet-soft: rgba(167, 139, 250, 0.14);
  --red: #f87171; --red-soft: rgba(248, 113, 113, 0.12);
  --grey-soft: rgba(161, 161, 170, 0.14);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 252px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f6f7;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #e9e9ec;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #3f3f46;
  --muted: #71717a;
  --accent: #d10000;
  --accent-hover: #b00000;
  --accent-soft: rgba(209, 0, 0, 0.08);
  --accent-text: #c00000;
  --green: #059669; --green-soft: rgba(5, 150, 105, 0.1);
  --amber: #b45309; --amber-soft: rgba(217, 119, 6, 0.12);
  --blue: #2563eb; --blue-soft: rgba(37, 99, 235, 0.1);
  --violet: #7c3aed; --violet-soft: rgba(124, 58, 237, 0.1);
  --red: #dc2626; --red-soft: rgba(220, 38, 38, 0.1);
  --grey-soft: rgba(113, 113, 122, 0.12);
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--accent-text); }
a.link:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.ic { flex: none; vertical-align: middle; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--bg-elev); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 40;
  transition: transform .2s ease;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand b { display: block; font-size: 14.5px; }
.brand span { display: block; font-size: 11.5px; color: var(--muted); }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px 16px; }
.nav-group { margin-top: 14px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 10px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; font-size: 13.5px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--text); }
.nav a.active .ic { color: var(--accent); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 600; background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 12px; display: flex; align-items: center; gap: 10px; }
.sidebar-foot .who { flex: 1; min-width: 0; }
.sidebar-foot .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who span { font-size: 11.5px; color: var(--muted); }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.topbar .menu-btn { display: none; }
.global-search { flex: 1; max-width: 460px; position: relative; }
.global-search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.global-search input { padding-left: 36px; height: 36px; background: var(--surface); }
.topbar .spacer { flex: 1; }
.content { padding: 28px; max-width: 1400px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 650; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.crumbs a:hover { color: var(--text); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 14.5px; font-weight: 600; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-body { padding: 18px; }
.card + .card { margin-top: 18px; }
.grid > .card { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 18px; }

.kpi { padding: 16px 18px; }
.kpi .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .label .ic { color: var(--accent); }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.delta-up { color: var(--green); }
.delta-down { color: var(--red); }

/* ---------- Definition lists ---------- */
.dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; word-break: break-word; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--surface-2);
}
.table th a { display: inline-flex; gap: 4px; align-items: center; }
.table th a:hover { color: var(--text); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.row-link { cursor: pointer; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .check { width: 36px; }
.table .row-actions { text-align: right; white-space: nowrap; }
.cell-main { font-weight: 550; }
.cell-sub { color: var(--muted); font-size: 12px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .ic { color: var(--border-strong); margin-bottom: 8px; }

.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #3a0d0d, #eb0000); color: #fff; font-size: 12px; font-weight: 700;
}
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-grey { background: var(--grey-soft); color: var(--muted); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); font-size: 12px; font-weight: 500; }
.stars { color: #f5b301; letter-spacing: 1px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: 550 13.5px var(--font); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Forms ---------- */
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text);
  font: 14px var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
select.select[multiple] { height: auto; padding: 6px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.file { font-size: 13px; color: var(--text-2); }
.file::file-selector-button { margin-right: 10px; height: 32px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); cursor: pointer; font: 500 13px var(--font); }
.checkbox { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: middle; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label { font-weight: 550; font-size: 13px; }
.field.is-check { flex-direction: row; align-items: center; gap: 10px; padding-top: 6px; }
.field .help { color: var(--muted); font-size: 12px; }
.field .errors, .form-errors { color: var(--red); font-size: 12.5px; }
.form-errors { background: var(--red-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px; }
.field ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.field ul label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.field ul input { accent-color: var(--accent); }
.field a { color: var(--accent-text); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--border); }

/* ---------- Toolbar & filters ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-left: 34px; height: 34px; }
.toolbar .select, .toolbar .input { height: 34px; width: auto; min-width: 130px; font-size: 13px; }
.toolbar input[type=date] { min-width: 0; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 10px; width: fit-content; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 550; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs a .n { font-size: 11px; color: var(--muted); }
.bulkbar { display: none; align-items: center; gap: 10px; padding: 10px 14px; background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.bulkbar.show { display: flex; }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; flex-wrap: wrap; gap: 10px; }
.pager .btns { display: flex; gap: 6px; }

/* ---------- Flash messages ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; border: 1px solid transparent; }
.flash-success { background: var(--green-soft); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.flash-error { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.flash-warning, .flash-info { background: var(--amber-soft); color: var(--amber); }

/* ---------- Charts ---------- */
.chart { width: 100%; height: 220px; display: block; }
.chart .bar { fill: var(--accent); opacity: .85; }
.chart .bar:hover { opacity: 1; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.chart text { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter.green > span { background: var(--green); }
.rank { display: flex; flex-direction: column; gap: 14px; }
.rank-row .top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.rank-row .top b { font-weight: 550; }

/* ---------- Lists, timeline, threads ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--border); }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline li.muted::before { border-color: var(--border-strong); }
.timeline b { display: block; font-weight: 550; }
.timeline span { color: var(--muted); font-size: 12.5px; }
.post { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.post:last-child { border-bottom: 0; }
.post .meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.post .meta b { color: var(--text); }
.post .body { white-space: pre-wrap; word-break: break-word; }
.post.is-hidden { opacity: .55; }
.post.reply { padding-left: 42px; background: var(--surface-2); }

/* Module builder */
.module { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.module + .module { margin-top: 14px; }
.module > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.module > summary::-webkit-details-marker { display: none; }
.module[open] > summary { border-bottom: 1px solid var(--border); }
.module .num { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
.module .title { flex: 1; font-weight: 600; }
.module .meta { color: var(--muted); font-size: 12.5px; }
.module-body { padding: 4px 0; }
.lesson { display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
.lesson:hover { background: var(--surface-2); }
.lesson .grow { flex: 1; min-width: 0; }
.subhead { padding: 10px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

.choice-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 100px 70px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.choice-row.head { font-size: 11.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; letter-spacing: .05em; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at 10% 110%, rgba(235,0,0,.35), transparent 60%), radial-gradient(800px 400px at 110% -10%, rgba(235,0,0,.18), transparent 60%), #070708;
  color: #f4f4f5; border-right: 1px solid #222;
}
.auth-art::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000, transparent 85%); pointer-events: none; }
.auth-art h2 { font-size: 34px; font-weight: 700; max-width: 440px; letter-spacing: -0.02em; position: relative; z-index: 1; }
.auth-art h2 em { color: #ff3b3b; font-style: normal; }
.auth-art p { color: #a1a1aa; max-width: 420px; position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-form .box { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 24px; margin-bottom: 6px; }
.auth-form .sub { color: var(--muted); margin: 0 0 24px; }
.auth-form .field { margin-bottom: 14px; }
.auth-form .btn { width: 100%; height: 42px; margin-top: 6px; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.flex { display: flex; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.note { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.note.warn { background: var(--amber-soft); color: var(--amber); }
.prose { white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--border-strong); }
.thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--surface-3); }
.backdrop { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 18px 16px; }
  .grid-2, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
  .hide-sm { display: none; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .kpi .value { font-size: 22px; }
}

/* Revenue chart extras */
.chart { height: 260px; }
.chart .orders-line { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .orders-label { fill: var(--blue); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.sw { display: inline-block; width: 12px; height: 10px; border-radius: 2px; }
.sw-bar { background: var(--accent); }
.sw-line { height: 2px; background: var(--blue); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 9px; gap: 2px; }
.seg a { padding: 4px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); background: var(--surface-2); }

/* Show / hide password button */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap .input { padding-right: 44px; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
}
.pw-eye:hover { color: var(--text); background: var(--surface-2); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Visitor map */
.geo-card { overflow: hidden; }
.geo-map { position: relative; height: 560px; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (max-width: 720px) { .geo-map { height: 420px; } }
.geo-fallback { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; color: var(--muted); }
.geo-layers { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 14px; }
.geo-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface-2); user-select: none; }
.geo-toggle input { accent-color: var(--accent); margin: 0; }
.geo-toggle:has(input:not(:checked)) { opacity: .55; }
.geo-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: middle; }
.geo-green { background: var(--green); } .geo-red { background: var(--red); } .geo-violet { background: var(--violet); }
.geo-blue { background: var(--blue); } .geo-amber { background: var(--amber); }
.geo-foot { padding: 10px 18px; }
.geo-flag { font-size: 16px; line-height: 1; }
@media (max-width: 720px) { .geo-layers { padding: 0 12px 12px; } .geo-toggle { font-size: 12px; padding: 5px 10px; } }
/* MapLibre controls and popups in the panel's colours */
.geo-map .maplibregl-popup-content { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 12px 14px; font: 13px/1.45 var(--font); }
.geo-map .maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .geo-map .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .geo-map .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--surface); }
.geo-map .maplibregl-popup-anchor-top .maplibregl-popup-tip, .geo-map .maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .geo-map .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.geo-map .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.geo-map .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }
.geo-map .maplibregl-popup-close-button { color: var(--muted); font-size: 18px; padding: 0 6px; }
.geo-map .maplibregl-popup-close-button:hover { background: transparent; color: var(--text); }
.geo-map .geo-tip .maplibregl-popup-content { padding: 4px 8px; font-size: 12px; }
.geo-map .geo-popup .maplibregl-popup-content a.link { color: var(--accent-text); }
.geo-map .geo-popup .maplibregl-popup-content a.link:hover { text-decoration: underline; }
.geo-map .maplibregl-ctrl-group { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.geo-map .maplibregl-ctrl-group button + button { border-top-color: var(--border); }
.geo-map .maplibregl-ctrl-group button:not(:disabled):hover { background-color: var(--surface-2); }
:root:not([data-theme="light"]) .geo-map .maplibregl-ctrl-icon { filter: invert(1); }
.geo-map .maplibregl-ctrl-attrib, .geo-map .maplibregl-ctrl-attrib.maplibregl-compact { background: var(--surface); color: var(--muted); }
.geo-map .maplibregl-ctrl-attrib a { color: var(--text-2); }
:root:not([data-theme="light"]) .geo-map .maplibregl-ctrl-attrib-button { filter: invert(1); }
.geo-pop-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; padding-right: 14px; }
.geo-pop-place { font-size: 14px; margin-bottom: 4px; }
.geo-pop-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-top: 8px; }
.geo-pop-ips { font-size: 12px; }

/* ---------- Live sale alerts ---------- */
.live-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 32px)); }
.live-toast { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: inherit; text-decoration: none; border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: live-in .35s ease-out; }
.live-toast:hover { border-color: var(--green); }
.live-toast-old { opacity: .75; }
.live-toast-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--green-soft); color: var(--green); }
.live-toast-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.live-toast-body b { font-size: 14px; }
.live-toast-amt { color: var(--green); font-weight: 600; }
.live-toast-x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.live-bell-on { color: var(--green); }
@keyframes live-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
