/* Boundary console (/admin). Same type and brand colours as the app; one bold moment: the dark state map. */

@font-face { font-family: "Inter"; src: url("/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/Outfit-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/Outfit-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --petrol: #0c2a2e;
  --petrol-2: #133a3f;
  --petrol-line: rgba(173, 233, 225, 0.12);
  --mist: #f2f6f5;
  --surface: #ffffff;
  --line: #e1e8e7;
  --line-2: #eef3f2;
  --ink: #142120;
  --text-2: #55635f;
  --muted: #7d8a87;
  --teal: #0b9ca9;
  --primary: #0a7f87;
  --mint: #2faf91;
  --green: #80d959;
  --teal-50: #e6f5f4;
  --amber: #b86e0b;
  --amber-50: #fdf2df;
  --rose: #c43a51;
  --rose-50: #fbe9ec;
  --brand: linear-gradient(100deg, var(--teal), var(--mint) 55%, var(--green));
  --r-lg: 28px;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(12, 42, 46, 0.05), 0 8px 24px -16px rgba(12, 42, 46, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--mist); }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { font-family: "Outfit", "Inter", sans-serif; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; }
h2 { font-size: 1.12rem; font-weight: 600; }
h3 { font-size: 0.95rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { display: none; }
:focus-visible { outline: 3px solid rgba(11, 156, 169, 0.45); outline-offset: 2px; border-radius: 8px; }
svg use { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Icons drawn with strokes */
.side__nav svg, .btn svg, .icon-btn svg, .search svg, .back svg, .facts dt svg, .address svg, .pill svg, .mobilemenu svg, .toast svg, .verified, .journey__dot svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 0.94rem/1 "Inter", sans-serif; padding: 12px 18px; border-radius: 999px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer; color: var(--ink); background: var(--surface); transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--brand); color: #082326; box-shadow: 0 10px 22px -14px rgba(11, 156, 169, 0.9); }
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); background: var(--surface); }
.btn--ghost:hover { border-color: var(--teal); }
.btn--danger { background: var(--rose); color: #fff; }
.btn--danger-ghost { border-color: #efc7cf; color: var(--rose); background: var(--surface); }
.btn--danger-ghost:hover { border-color: var(--rose); }
.btn--small { padding: 9px 14px; font-size: 0.87rem; }
.btn--block { width: 100%; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--mist); color: var(--ink); }
.link { font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- Shell ---------- */
.adm { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.side { display: none; }
.main { min-width: 0; }
.page { padding: 24px 18px 64px; max-width: 1280px; margin: 0 auto; }
.mobilebar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.mobilemenu summary { list-style: none; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; }
.mobilemenu summary::-webkit-details-marker { display: none; }
.mobilemenu summary svg { width: 22px; height: 22px; }
.mobilemenu nav { position: absolute; right: 14px; top: 60px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; min-width: 220px; display: grid; box-shadow: var(--shadow); }
.mobilemenu nav a, .mobilemenu nav button { padding: 11px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font: 500 0.95rem "Inter", sans-serif; background: none; border: 0; text-align: left; cursor: pointer; width: 100%; }
.mobilemenu nav a:hover, .mobilemenu nav button:hover { background: var(--mist); }

@media (min-width: 1000px) {
  .adm { grid-template-columns: 252px 1fr; }
  .mobilebar { display: none; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; padding: 22px 16px; background: var(--surface); border-right: 1px solid var(--line); }
  /* A long menu scrolls on its own; the brand stays at the top and the signed-in person at the bottom. */
  .side > * { flex: none; }
  .side__nav { flex: 1 1 auto; min-height: 0; align-content: start; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; margin: 0 -16px; padding: 0 16px 8px; }
  .page { padding: 34px 40px 72px; }
}
.side__brand { display: flex; align-items: flex-end; gap: 8px; padding: 4px 10px 26px; text-decoration: none; }
.side__brand img { height: 30px; width: auto; }
.side__brand span { font: 600 0.82rem "Outfit", sans-serif; color: var(--primary); background: var(--teal-50); padding: 3px 9px; border-radius: 999px; margin-bottom: 3px; }
.side__nav { display: grid; gap: 4px; }
.side__nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.side__nav a svg { width: 20px; height: 20px; }
.side__nav a:hover { background: var(--mist); color: var(--ink); }
.side__nav a.is-on { background: var(--teal-50); color: var(--petrol); font-weight: 600; }
.side__nav a.is-on::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.side__me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--line-2); }
.side__who { min-width: 0; flex: 1; }
.side__who b { display: block; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__who small { color: var(--muted); font-size: 0.78rem; }

/* ---------- Page head ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 26px; }
.page-head p { margin-top: 6px; max-width: 60ch; }
.page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 0.9rem; margin-bottom: 14px; }
.back svg { width: 18px; height: 18px; }
.back:hover { color: var(--ink); }

/* ---------- Avatars, pills, chips ---------- */
.avatar { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; font: 700 0.86rem "Outfit", sans-serif; color: var(--petrol); background: linear-gradient(140deg, #d7f1ee, #e6f7d9); border: 1px solid #cfe8e3; }
.avatar--sm { width: 34px; height: 34px; border-radius: 11px; font-size: 0.78rem; }
.avatar--md { width: 48px; height: 48px; border-radius: 15px; font-size: 1rem; }
.avatar--lg { width: 64px; height: 64px; border-radius: 20px; font-size: 1.3rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: var(--mist); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.pill svg { width: 15px; height: 15px; }
.pill--live { background: #e5f6ea; color: #23703b; border-color: #c6e8cf; }
.pill--setup { background: var(--amber-50); color: var(--amber); border-color: #f3dcb3; }
.pill--off { background: var(--rose-50); color: var(--rose); border-color: #f2ccd3; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--mist); font-size: 0.87rem; font-weight: 500; }
.chips b { font: 600 0.8rem "Outfit", sans-serif; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.chips li.is-top { background: var(--teal-50); color: var(--petrol); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel__lead { color: var(--text-2); font-size: 0.88rem; margin: -6px 0 16px; }
.panel__sub { margin: 20px 0 10px; color: var(--text-2); font-family: "Inter", sans-serif; font-size: 0.85rem; font-weight: 600; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid > * { min-width: 0; }
@media (min-width: 900px) {
  .grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--detail .panel--map { grid-column: 1 / -1; }
}
@media (min-width: 1240px) {
  .grid--charts { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
  .grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- The map hero ---------- */
.hero { position: relative; display: grid; gap: 8px; background: radial-gradient(120% 100% at 0% 0%, #164a4f 0%, var(--petrol) 55%); color: #e9f4f2; border-radius: var(--r-lg); padding: 26px; margin-bottom: 18px; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(173, 233, 225, 0.08) 1px, transparent 1.4px); background-size: 18px 18px; pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.25fr 1fr; gap: 28px; padding: 30px 34px; } }
.hero__mapHead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.hero__mapHead h2 { font-size: 1.25rem; color: #fff; }
.hero__mapHead p { color: rgba(233, 244, 242, 0.65); font-size: 0.88rem; }
.tiles { width: 100%; max-width: 520px; height: auto; margin: 6px auto 10px; overflow: visible; }
.tile polygon { fill: rgba(173, 233, 225, 0.05); stroke: rgba(173, 233, 225, 0.14); stroke-width: 1; transition: transform 0.15s ease; }
.tile__code { font: 600 10.5px "Inter", sans-serif; fill: rgba(233, 244, 242, 0.4); text-anchor: middle; dominant-baseline: middle; }
.tile__n { font: 700 13px "Outfit", sans-serif; fill: #072124; text-anchor: middle; dominant-baseline: middle; }
.tile--1 polygon { fill: #1f6e6d; stroke: #2a8481; }
.tile--2 polygon { fill: #2a9a8e; stroke: #3ab1a2; }
.tile--3 polygon { fill: #5cc07a; stroke: #73cf8c; }
.tile--4 polygon { fill: #93e06a; stroke: #b2ee91; }
.tile--1 .tile__code, .tile--2 .tile__code { fill: #dff5f0; }
.tile--1 .tile__n { fill: #fff; }
.tile--3 .tile__code, .tile--4 .tile__code { fill: #0b3a2a; }
.tile:hover polygon { stroke: #fff; stroke-width: 1.6; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; }
.legend--dark { color: rgba(233, 244, 242, 0.6); justify-content: center; }
.tile-swatch { width: 16px; height: 10px; border-radius: 3px; }
.tile-swatch.tile--1 { background: #1f6e6d; } .tile-swatch.tile--2 { background: #2a9a8e; } .tile-swatch.tile--3 { background: #5cc07a; } .tile-swatch.tile--4 { background: #93e06a; }

.hero__figures { display: grid; align-content: center; gap: 4px; }
.figure { padding: 16px 0; border-top: 1px solid var(--petrol-line); display: grid; }
.figure:first-child { border-top: 0; }
.figure__label { font-size: 0.88rem; color: rgba(233, 244, 242, 0.7); }
.figure__value { font: 700 clamp(2.4rem, 4.6vw, 3.4rem)/1.05 "Outfit", sans-serif; letter-spacing: -0.02em; color: #fff; margin: 2px 0 4px; }
.figure__value small { font-size: 0.45em; font-weight: 600; color: rgba(233, 244, 242, 0.6); letter-spacing: 0; }
.figure__note { font-size: 0.85rem; color: #a9ddd2; }
.figure--ring { grid-template-columns: 84px 1fr; align-items: center; gap: 16px; }
.figure--ring > div { display: grid; }
.ring { width: 84px; height: 84px; }
.ring__track { fill: none; stroke: rgba(173, 233, 225, 0.12); stroke-width: 8; }
.ring__fill { fill: none; stroke: var(--green); stroke-width: 8; stroke-linecap: round; }
.hero__warn { justify-self: start; margin-top: 4px; font-size: 0.85rem; font-weight: 600; color: #ffd0d8; text-decoration: none; background: rgba(196, 58, 81, 0.25); padding: 6px 12px; border-radius: 999px; }
.hero__warn:hover { background: rgba(196, 58, 81, 0.4); }

/* One orchestrated entrance: the map's tiles light up once, west to east. */
@media (prefers-reduced-motion: no-preference) {
  .tile { animation: tile-in 0.5s ease both; }
  .tile:nth-child(3n) { animation-delay: 0.08s; } .tile:nth-child(3n + 1) { animation-delay: 0.16s; } .tile:nth-child(5n) { animation-delay: 0.24s; }
  @keyframes tile-in { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- Charts ---------- */
.seg { position: relative; display: inline-flex; padding: 3px; background: var(--mist); border-radius: 999px; border: 1px solid var(--line); }
.seg input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.seg label { padding: 6px 14px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg input:checked + label { background: var(--surface); color: var(--petrol); box-shadow: 0 1px 4px rgba(12, 42, 46, 0.12); }
.seg input:focus-visible + label { outline: 3px solid rgba(11, 156, 169, 0.45); }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart--units { display: none; }
.panel:has(#g-units:checked) .chart--soc { display: none; }
.panel:has(#g-units:checked) .chart--units { display: block; }
.chart__grid { stroke: var(--line-2); stroke-width: 1; }
.chart__axis { font: 500 12px "Inter", sans-serif; fill: var(--muted); text-anchor: middle; }
.chart__axis--y { text-anchor: end; }
.chart__line { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.chart__dot { fill: var(--surface); stroke: var(--mint); stroke-width: 3.5; }
.chart__now { font: 700 15px "Outfit", sans-serif; fill: var(--petrol); text-anchor: end; }

.donut { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); align-items: center; gap: 18px; }
.donut svg { width: 100%; height: auto; }
.donut__track { fill: none; stroke: var(--line-2); stroke-width: 22; }
.donut__n { font: 700 34px "Outfit", sans-serif; fill: var(--ink); text-anchor: middle; }
.donut__l { font: 500 12px "Inter", sans-serif; fill: var(--muted); text-anchor: middle; }
.slice.s0, .key.s0 { fill: #0b9ca9; background: #0b9ca9; }
.slice.s1, .key.s1 { fill: #80d959; background: #80d959; }
.slice.s2, .key.s2 { fill: #2faf91; background: #2faf91; }
.slice.s3, .key.s3 { fill: #0c2a2e; background: #0c2a2e; }
.slice.s4, .key.s4 { fill: #b9c7c4; background: #b9c7c4; }
.keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.keys li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 36px; align-items: center; gap: 10px; font-size: 0.9rem; }
.keys b { font: 600 0.95rem "Outfit", sans-serif; }
.keys small { color: var(--muted); text-align: right; }
.key { width: 12px; height: 12px; border-radius: 4px; }
.keys--grid { grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 16px; }
.keys--grid li { grid-template-columns: 12px minmax(0, 1fr) auto; }

.steps, .ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li, .ranks li { display: grid; grid-template-columns: 118px 1fr 34px; align-items: center; gap: 12px; font-size: 0.88rem; }
.ranks li { grid-template-columns: minmax(90px, 140px) 1fr 30px; }
.steps b, .ranks b { font: 600 0.95rem "Outfit", sans-serif; text-align: right; }
.steps__label { color: var(--text-2); }
.steps li.is-live .steps__label { color: #23703b; font-weight: 600; }
.bar { width: 100%; height: 12px; }
.bar--thin { height: 8px; }
.bar__track { fill: var(--mist); }
.bar__fill { fill: var(--teal); }
.steps li.is-live .bar__fill { fill: #5cc07a; }
.ranks .bar__fill { fill: var(--mint); }
.stack { width: 100%; height: 14px; border-radius: 999px; overflow: hidden; background: var(--mist); }
.z0 { fill: #c7d3d0; background: #c7d3d0; } .z1 { fill: #2faf91; background: #2faf91; } .z2 { fill: #0b9ca9; background: #0b9ca9; } .z3 { fill: #0c2a2e; background: #0c2a2e; }

/* ---------- Tables ---------- */
.panel--table { padding: 8px 8px 4px; overflow-x: auto; }
.panel--table .panel__head { padding: 14px 14px 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.8rem; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8fbfa; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-off .soc b { color: var(--muted); }
.soc { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.soc b { display: block; font-weight: 600; }
.soc small, .sub { display: block; color: var(--muted); font-size: 0.8rem; }
.soc:hover b { color: var(--primary); }
.who { display: inline-flex; align-items: center; gap: 6px; }
.verified { width: 16px; height: 16px; color: #23703b; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 16px; height: 6px; border-radius: 999px; background: var(--line); }
.dots i.on { background: var(--mint); }
@media (max-width: 760px) {
  .table--directory thead { display: none; }
  .table--directory tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 14px; border-bottom: 1px solid var(--line-2); }
  .table--directory td { padding: 0; border: 0; }
  .table--directory td:first-child { grid-column: 1 / -1; }
  .table--directory td.num { text-align: left; }
  .table--directory td::before { content: attr(data-label); display: block; font-size: 0.72rem; color: var(--muted); }
  .table--directory td:first-child::before { display: none; }
}

/* ---------- Directory filters ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 0.9rem; white-space: nowrap; }
.tabs a span { font: 600 0.78rem "Outfit", sans-serif; background: var(--surface); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; }
.tabs a:hover { background: var(--surface); color: var(--ink); }
.tabs a.is-on { background: var(--petrol); color: #fff; }
.tabs a.is-on span { background: rgba(255, 255, 255, 0.14); border-color: transparent; color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.search { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 0 14px; }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; padding: 12px 0; min-width: 0; }
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(11, 156, 169, 0.12); }
.select select { appearance: none; font: 500 0.92rem "Inter", sans-serif; color: var(--ink); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8a87' stroke-width='2'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 38px 12px 14px; cursor: pointer; }
.select select:focus { border-color: var(--teal); outline: 0; }
.js .btn--js-hide { display: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 0.88rem; }
.pager > span:last-child { display: flex; gap: 8px; }

/* ---------- Empty and alerts ---------- */
.empty { background: var(--surface); border: 1.5px dashed #cdd9d6; border-radius: var(--r); padding: 44px 24px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.empty p { color: var(--text-2); max-width: 52ch; }
.empty--inline { border: 0; padding: 26px 16px 30px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 0.9rem; margin-bottom: 16px; }
.alert--error { background: var(--rose-50); color: #8f2336; border: 1px solid #f2ccd3; }
.alert--info { background: var(--teal-50); color: var(--petrol); border: 1px solid #c9e8e4; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); background: var(--petrol); color: #fff; padding: 13px 18px; border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(12, 42, 46, 0.6); font-size: 0.92rem; }
.toast svg { width: 20px; height: 20px; color: var(--green); flex: none; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: toast-in 0.35s ease both; } @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } } }
.toast.is-gone { opacity: 0; transition: opacity 0.4s ease; }

/* ---------- Society page ---------- */
.soc-head { display: grid; grid-template-columns: auto 1fr; gap: 16px 18px; align-items: start; margin-bottom: 22px; }
.soc-head__text p { margin-top: 4px; }
.soc-head__pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.soc-head__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 760px) { .soc-head { grid-template-columns: auto 1fr auto; } .soc-head__actions { grid-column: auto; } }
.confirm { position: relative; }
.confirm summary { list-style: none; }
.confirm summary::-webkit-details-marker { display: none; }
.confirm__pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: min(340px, 86vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: 0 24px 50px -20px rgba(12, 42, 46, 0.45); display: grid; gap: 12px; font-size: 0.9rem; color: var(--text-2); }
.confirm__pop b { color: var(--ink); }
.journey { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.journey__step { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.journey__step + .journey__step::before { content: ""; width: 34px; height: 2px; background: var(--line); margin: 0 10px; border-radius: 2px; }
.journey__step.done + .journey__step::before { background: var(--mint); }
.journey__dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: var(--surface); }
.journey__dot svg { width: 14px; height: 14px; stroke-width: 2.6; }
.journey__step.done { color: var(--ink); }
.journey__step.done .journey__dot { background: var(--mint); border-color: var(--mint); color: #fff; }
.journey__step.now { color: var(--amber); font-weight: 600; }
.journey__step.now .journey__dot { border-color: var(--amber); box-shadow: 0 0 0 4px var(--amber-50); }
.journey__note { flex-basis: 100%; font-size: 0.85rem; margin-top: 8px; }
.person { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.person b { display: block; font: 600 1.1rem "Outfit", sans-serif; }
.person small { font-size: 0.82rem; }
.facts { margin: 0; display: grid; }
.facts > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 0.92rem; }
.facts dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.facts dt svg { width: 16px; height: 16px; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.mono-ish { letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.address { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); margin-bottom: 14px; }
.address svg { width: 20px; height: 20px; flex: none; color: var(--primary); }
.map { position: relative; z-index: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #e8efee; }
.map--view { height: 300px; }
.map--pick { height: 340px; margin-top: 6px; cursor: crosshair; }
.map__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.84rem; margin-top: 10px; font-variant-numeric: tabular-nums; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); border: 3px solid #fff; box-shadow: 0 6px 14px rgba(12, 42, 46, 0.4); }
.leaflet-container { font-family: "Inter", sans-serif; }

/* ---------- Society form ---------- */
.sform { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1100px) { .sform { grid-template-columns: 1fr 320px; } .sform__side { position: sticky; top: 24px; } }
.sform__body { display: grid; gap: 18px; min-width: 0; }
.fset { border: 1px solid var(--line); margin: 0; display: grid; gap: 16px; }
.fset legend { float: left; width: 100%; font: 600 1.12rem "Outfit", sans-serif; margin-bottom: 2px; padding: 0; }
.fset legend + * { clear: both; }
.row { display: grid; gap: 16px; }
@media (min-width: 700px) { .row { grid-template-columns: 1fr 1fr; } .row--3 { grid-template-columns: 1fr 1fr 0.7fr; } }
.field { display: grid; gap: 6px; font-size: 0.88rem; min-width: 0; }
.field > span:first-child { font-weight: 600; color: var(--ink); }
.field em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.field__help { color: var(--text-2); font-size: 0.86rem; margin-top: -2px; }
.field input, .field select, .prefix { font: 400 0.95rem "Inter", sans-serif; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 13px; height: 46px; width: 100%; outline: 0; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.field select { appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8a87' stroke-width='2'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; padding-right: 36px; }
.field input:focus, .field select:focus, .prefix:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(11, 156, 169, 0.12); }
.field input.input-validation-error, .field select.input-validation-error { border-color: var(--rose); }
.field__err { color: var(--rose); font-size: 0.82rem; font-weight: 500; }
.field__err:empty { display: none; }
.prefix { display: flex; align-items: center; gap: 10px; padding: 0 0 0 13px; }
.prefix i { font-style: normal; color: var(--text-2); font-weight: 500; padding-right: 10px; border-right: 1px solid var(--line); }
.prefix input { border: 0; box-shadow: none !important; padding-left: 0; border-radius: 0 12px 12px 0; height: 42px; }
.kinds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .kinds { grid-template-columns: repeat(4, 1fr); } }
.kind { position: relative; }
.kind input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.kind__card { display: grid; gap: 4px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; height: 100%; transition: border-color 0.12s ease, background-color 0.12s ease; }
.kind__card svg { width: 28px; height: 28px; fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.kind__card b { font: 600 0.98rem "Outfit", sans-serif; }
.kind__card small { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.kind:hover .kind__card { border-color: #b8d9d5; }
.kind input:checked + .kind__card { border-color: var(--teal); background: var(--teal-50); box-shadow: inset 0 0 0 1px var(--teal); }
.kind input:focus-visible + .kind__card { outline: 3px solid rgba(11, 156, 169, 0.45); outline-offset: 2px; }
.coords { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 10px; }
.search--plain { flex: 1 1 280px; border-radius: 12px; }
.search--plain input { padding: 10px 0; }
.coords__now { font-size: 0.85rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.coords__now.is-set { color: #23703b; font-weight: 600; }

.preview { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.preview__label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.preview__card { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 22px 16px 16px; border-radius: 16px; background: radial-gradient(120% 90% at 50% 0%, #164a4f, var(--petrol)); color: #fff; }
.preview__card > b { font: 700 1.25rem "Outfit", sans-serif; margin-top: 6px; overflow-wrap: anywhere; }
.preview__card > small { color: #a9ddd2; }
.preview__card .pill { background: rgba(255, 255, 255, 0.1); border-color: transparent; color: #e9f4f2; margin-top: 4px; }
.preview__card .avatar { border: 0; }
.preview__sec { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--petrol-line); width: 100%; text-align: left; }
.preview__sec b { display: block; font-size: 0.9rem; }
.preview__sec small { color: #a9ddd2; font-size: 0.8rem; }
.next { margin: 0; padding: 0 0 0 20px; display: grid; gap: 6px; color: var(--text-2); font-size: 0.85rem; }

/* ---------- Sign in ---------- */
.login-body { background: var(--surface); }
.login { min-height: 100vh; display: grid; }
/* Desktop: a centred 1000px stage, the art as a rounded card beside the form. */
@media (min-width: 900px) {
  .login { max-width: 1000px; margin: 0 auto; padding: 40px 24px; grid-template-columns: 370px minmax(0, 1fr); align-content: center; column-gap: clamp(48px, 9vw, 96px); }
}
.login__art { display: none; position: relative; overflow: hidden; background: radial-gradient(110% 90% at 20% 10%, #18535a 0%, var(--petrol) 60%); color: #e9f4f2; }
@media (min-width: 900px) { .login__art { display: grid; place-items: center; min-height: 540px; border-radius: 28px; box-shadow: 0 30px 60px -30px rgba(12, 42, 46, 0.55); } }
.login__rings { position: absolute; width: 130%; max-width: none; left: -15%; top: 50%; transform: translateY(-50%); opacity: 0.9; }
@media (prefers-reduced-motion: no-preference) { .login__rings { animation: spin 120s linear infinite; } @keyframes spin { to { transform: translateY(-50%) rotate(360deg); } } }
.login__copy { position: relative; display: grid; justify-items: center; gap: 22px; max-width: 360px; text-align: center; }
.login__copy img { width: 64px; height: 64px; }
.login__copy p { font: 600 1.35rem/1.35 "Outfit", sans-serif; color: #fff; }
.login__panel { display: grid; place-items: center; padding: 40px 22px; background: var(--surface); }
@media (min-width: 900px) {
  .login__panel { place-items: center start; padding: 0; }
  .login .login__form { max-width: 342px; }
  /* Bigger ring in the card: the logo sits at its top, the line under its middle. */
  .login .login__rings { width: 155%; left: -27.5%; }
  /* The "b." sits exactly in the middle of the rings; the line is a frosted glass card at the bottom,
     with the rings turning behind it. */
  .login .login__copy { position: static; display: block; max-width: none; }
  .login .login__copy img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; }
  .login .login__copy p {
    position: absolute; left: 18px; right: 18px; bottom: 18px; margin: 0; padding: 18px 20px;
    font-size: 1.12rem; line-height: 1.4; text-align: center;
    border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 55%, rgba(128, 217, 89, 0.08) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 18px 40px -20px rgba(0, 0, 0, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  }
}
.login__form { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.login__logo { height: 34px; width: auto; margin-bottom: 18px; }
.login__form h1 { font-size: 1.9rem; }
.login__form > p.muted { margin-top: -8px; font-size: 0.92rem; }
.login__foot { font-size: 0.82rem; text-align: center; margin-top: 4px; }
.field__pw { position: relative; display: block; }
.field__pw input { padding-right: 70px; }
.field__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--mist); color: var(--text-2); font: 600 0.8rem "Inter", sans-serif; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.login .btn--primary { padding: 14px 18px; font-size: 1rem; margin-top: 4px; }

/* ---------- Sign in, step 2: the emailed code ---------- */
.login__to { color: var(--ink); font-weight: 600; white-space: nowrap; }
.login__done { display: grid; gap: 12px; padding: 14px; border-radius: 14px; background: var(--mist); border: 1px solid var(--line); }
.login__done .field input { background: transparent; color: var(--text-2); border-style: dashed; cursor: not-allowed; height: 40px; }
.field__pw--ok input { padding-right: 110px; }
.field__tick { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 600; color: #23703b; }
.field__tick svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.otp { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; }
.otp legend { padding: 0; margin-bottom: 8px; font-size: 0.88rem; font-weight: 600; }
.otp__boxes { display: flex; gap: 8px; }
.otp__boxes input { width: 0; flex: 1 1 0; min-width: 0; height: 58px; text-align: center; font: 700 1.6rem "Outfit", sans-serif; color: var(--petrol); background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; outline: 0; caret-color: var(--teal); transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease; }
.otp__boxes input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(11, 156, 169, 0.14); }
.otp__boxes input.is-filled { background: var(--teal-50); border-color: #b9e1dc; }
.otp__boxes .otp__gap { margin-left: 10px; }
.otp.is-wrong .otp__boxes input { border-color: var(--rose); }
@media (prefers-reduced-motion: no-preference) {
  .otp.is-wrong .otp__boxes { animation: shake 0.35s ease; }
  @keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
}
/* Choose where the sign-in code goes: email or mobile */
.channels { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; display: grid; gap: 10px; }
.channels legend { padding: 0; margin-bottom: 8px; font-size: 0.88rem; font-weight: 600; }
.channel { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease; }
.channel:hover { border-color: #b9e1dc; }
.channel input { position: absolute; opacity: 0; pointer-events: none; }
.channel__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--mist); }
.channel__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--text-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.channel__text { display: grid; gap: 2px; min-width: 0; }
.channel__text b { font-weight: 600; }
.channel__text small { color: var(--text-2); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel__dot { margin-left: auto; width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--line); }
.channel:has(input:checked) { border-color: var(--teal); background: var(--teal-50); }
.channel:has(input:checked) .channel__icon { background: var(--surface); }
.channel:has(input:checked) .channel__icon svg { stroke: var(--primary); }
.channel:has(input:checked) .channel__dot { border: 6px solid var(--teal); }
.channel:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(11, 156, 169, 0.14); }

.login__alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.88rem; }
.linkbtn { border: 0; background: none; padding: 4px 0; font: 600 0.88rem "Inter", sans-serif; color: var(--primary); cursor: pointer; text-decoration: none; }
.linkbtn:hover:not(:disabled) { text-decoration: underline; }
.linkbtn:disabled { color: var(--muted); cursor: default; font-weight: 500; }

/* ---------- Subscriptions ---------- */
.side__label { display: block; margin: 14px 12px 2px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.extend__arrow, .crumbs svg, .settings__nav svg, .qr__ph { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert--warn { background: var(--amber-50); color: #7a4706; border: 1px solid #f3dcb3; }
.pill--trial { background: #e8f1ff; color: #1d5fae; border-color: #cfe0fa; }

.subs-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.subs-fig { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: border-color 0.12s ease, transform 0.12s ease; }
a.subs-fig:hover { border-color: var(--teal); transform: translateY(-1px); }
.subs-fig span { font-size: 0.82rem; color: var(--text-2); font-weight: 500; }
.subs-fig b { font: 700 2rem/1.1 "Outfit", sans-serif; letter-spacing: -0.02em; }
.subs-fig small { font-size: 0.78rem; color: var(--muted); }
.subs-fig--money b { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 22px; }
.plan { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 12px 16px; border-radius: var(--r-sm); border: 1px dashed #cdd9d6; background: rgba(255, 255, 255, 0.6); }
.plan__name { font: 600 0.98rem "Outfit", sans-serif; }
.plan__units { grid-row: 2; font-size: 0.8rem; color: var(--muted); }
.plan__price { grid-row: 1 / 3; grid-column: 2; display: grid; justify-items: end; line-height: 1.2; }
.plan__price b { font: 700 1.15rem "Outfit", sans-serif; }
.plan__price s { font-size: 0.78rem; color: var(--muted); }
.plan__price small { font-size: 0.72rem; color: var(--muted); }

.days { display: grid; gap: 5px; min-width: 150px; max-width: 220px; font-size: 0.86rem; color: var(--text-2); }
.days b { font: 700 1.02rem "Outfit", sans-serif; color: var(--ink); }
.days.is-low .bar__fill, .days-panel.is-low .bar__fill { fill: #e0a23a; }
.days.is-out .bar__fill, .days-panel.is-out .bar__fill { fill: var(--rose); }
.days.is-out b { color: var(--rose); }
.table .act { text-align: right; white-space: nowrap; }
@media (max-width: 760px) { .table--directory td.act { grid-column: 1 / -1; text-align: left; } }

.days-panel { display: grid; gap: 14px; margin-bottom: 18px; }
.days-panel__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 30px; }
.days-panel__n { margin: 2px 0 0; color: var(--text-2); font-size: 1rem; }
.days-panel__n b { font: 700 clamp(2.2rem, 4vw, 3rem)/1 "Outfit", sans-serif; color: var(--ink); letter-spacing: -0.02em; margin-right: 4px; }
.days-panel .bar { height: 14px; }
.days-panel__note { margin: 0; font-size: 0.86rem; }
.facts--inline { display: flex; gap: 26px; }
.facts--inline > div { display: grid; grid-template-columns: none; gap: 2px; padding: 0; border: 0; }

.pay-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px 24px; margin-bottom: 22px; }
.pay-head p { margin: 0 0 4px; }
.pay-head h1 span { font: 500 1rem "Inter", sans-serif; color: var(--text-2); letter-spacing: 0; }
.pay-grid { display: grid; gap: 18px; align-items: start; }
.pay-grid > * { min-width: 0; }
@media (min-width: 1000px) { .pay-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.pay-side { display: grid; gap: 18px; }
.shot__frame { display: grid; place-items: center; background: repeating-conic-gradient(#f3f6f5 0 25%, #fbfcfc 0 50%) 0 0 / 22px 22px; border-radius: var(--r-sm); border: 1px solid var(--line); padding: 14px; min-height: 280px; }
.shot__frame img { max-height: 72vh; width: auto; border-radius: 10px; box-shadow: 0 18px 40px -22px rgba(12, 42, 46, 0.5); }
.decide { display: grid; gap: 12px; }
.decide .panel__head { margin-bottom: 0; }
.extend { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r-sm); background: var(--teal-50); }
.extend > div { display: grid; gap: 1px; }
.extend span { font-size: 0.78rem; }
.extend b { font: 700 1.1rem "Outfit", sans-serif; }
.extend small { font-size: 0.78rem; color: var(--primary); font-weight: 600; }
.extend__arrow { width: 22px; height: 22px; color: var(--primary); }
.reject summary { list-style: none; }
.reject summary::-webkit-details-marker { display: none; }
.reject[open] summary { display: none; }
.reject__form { display: grid; gap: 12px; }
.field textarea { font: 400 0.95rem/1.5 "Inter", sans-serif; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 13px; width: 100%; resize: vertical; outline: 0; }
.field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(11, 156, 169, 0.12); }
.note { margin: 6px 0 0; padding: 12px 14px; border-left: 3px solid var(--rose); background: var(--rose-50); border-radius: 0 10px 10px 0; color: #8f2336; }

.crumbs { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.crumbs svg { width: 14px; height: 14px; }
.crumbs b { color: var(--ink); font-weight: 600; }
.settings { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .settings { grid-template-columns: 220px minmax(0, 1fr); } }
.settings__nav { display: grid; gap: 4px; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.settings__group { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 2px; }
.settings__nav a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.settings__nav a svg { width: 18px; height: 18px; }
.settings__nav a.is-on { background: var(--teal-50); color: var(--petrol); font-weight: 600; }
.settings__body { display: grid; gap: 18px; min-width: 0; }
.stack-form { display: grid; gap: 16px; max-width: 520px; }
.qr { display: grid; gap: 18px; align-items: center; }
@media (min-width: 700px) { .qr { grid-template-columns: 200px 1fr; } }
.qr__frame { width: 200px; height: 200px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid var(--line); background: var(--mist); overflow: hidden; }
.qr__frame img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.qr__ph { width: 72px; height: 72px; color: #b9c8c4; }
.qr__lock { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.qr__text { display: grid; gap: 12px; color: var(--text-2); font-size: 0.92rem; }
.qr__text p { margin: 0; }
.qr__upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.file input { font: 400 0.88rem "Inter", sans-serif; color: var(--text-2); max-width: 260px; }
.file input::file-selector-button { font: 600 0.85rem "Inter", sans-serif; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; margin-right: 10px; cursor: pointer; }

/* ---------- Subscription timeline ---------- */
.tline { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.tline__item { --c: var(--primary); position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding-bottom: 18px; }
.tline__item:last-child { padding-bottom: 0; }
.tline__item::before { content: ""; position: absolute; left: 16px; top: 36px; bottom: 2px; width: 2px; border-radius: 2px; background: linear-gradient(to bottom, color-mix(in srgb, var(--c) 40%, transparent), var(--line)); }
.tline__item:last-child::before { display: none; }
.tline__item--trial { --c: var(--teal); }
.tline__item--sent { --c: var(--muted); }
.tline__item--approved { --c: #2f7d25; }
.tline__item--rejected { --c: var(--rose); }
.tline__item--ends { --c: #c27a1a; }
.tline__dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, white); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); color: var(--c); }
.tline__dot svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tline__item.is-future .tline__dot { background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--c) 70%, transparent); }
.tline__body { padding-top: 5px; min-width: 0; }
.tline__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; }
.tline__top b { font-weight: 600; }
.tline__top time { font-size: 0.84rem; color: var(--muted); white-space: nowrap; }
.tline__body p { margin: 2px 0 0; font-size: 0.86rem; color: var(--text-2); }
.tline__item--rejected .tline__body p { color: #8f2336; }
.tline__item.is-future .tline__top b { color: var(--text-2); }
.tline__ahead { color: #a2620f !important; font-weight: 600; }

/* Registrations */
.table--regs td { vertical-align: top; }
.table--regs .sub { display: block; }
.reg-note { font-style: italic; max-width: 26ch; }
.reg-act { position: relative; }
.reg-act summary { list-style: none; cursor: pointer; }
.reg-act summary::-webkit-details-marker { display: none; }
.reg-act[open] summary { background: var(--teal-50, #e7f6f7); }
.reg-act__form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 280px; display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line, #e3e8ea); box-shadow: 0 18px 40px -18px rgba(11, 60, 70, 0.4); }
.reg-act__form select, .reg-act__form input { width: 100%; font: inherit; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line, #e3e8ea); background: #fff; }

/* Confirm dialog (native <dialog>, opened by admin.js) */
.modal { border: 0; padding: 0; border-radius: var(--r); width: min(420px, 92vw); background: var(--surface); color: var(--text-2); box-shadow: 0 30px 70px -24px rgba(12, 42, 46, 0.55); }
.modal::backdrop { background: rgba(12, 30, 34, 0.48); backdrop-filter: blur(2px); }
.modal__body { display: grid; gap: 12px; padding: 22px; }
.modal__body h2 { margin: 0; font-size: 1.12rem; color: var(--ink); }
.modal__body p { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.modal__body i { color: var(--ink); }
.modal__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--rose-50); color: var(--rose); }
.modal__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.modal [hidden] { display: none !important; }
.table--subs .lock { display: inline-grid; gap: 2px; margin-right: 8px; vertical-align: middle; }

/* Agents */
.modal--form { width: min(560px, 94vw); }
.modal--form .modal__body { gap: 16px; }
.modal--form .row { align-items: start; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal__head p { margin-top: 4px; }
.modal__x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; }
.modal__x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal .form-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--rose-50); color: var(--rose); font-size: 0.86rem; font-weight: 500; }
.agent-code { display: inline-block; font: 700 0.92rem/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: 0.08em; padding: 6px 10px; border-radius: 8px; background: var(--mist); color: var(--ink); border: 1px solid var(--line); }
.table tr.is-new td { background: #eef9f1; }
.agent-code--sm { font-size: 0.78rem; padding: 3px 6px; }
.agent-now { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
.agent-pick { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.agent-pick__select { font: 400 0.92rem "Inter", sans-serif; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; height: 40px; padding: 0 12px; min-width: 0; flex: 1 1 240px; }

/* Societies table: the agent under the society's place; agent page links. */
.soc__name { color: inherit; text-decoration: none; }
.soc a.avatar { text-decoration: none; }
.soc__name:hover b, a.soc:hover .soc__link { text-decoration: underline; }
.soc__agent { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 0.78rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.soc__agent svg { width: 13px; height: 13px; flex: none; }
a.soc__agent:hover { text-decoration: underline; }
.soc__agent.is-none { display: block; font-weight: 400; color: var(--muted); font-style: italic; }
.agent-code--link { text-decoration: none; }
.agent-code--link:hover { border-color: currentColor; }
.agent-head__line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.agent-note { margin: 12px 0 0; font-size: 0.86rem; }
.agent-qr { display: inline-block; margin-top: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.agent-qr img { display: block; width: 180px; height: 180px; object-fit: contain; }
.agent-block { margin-bottom: 18px; }
.agent-block > .agent-note { padding: 0 14px 12px; }

/* Society page → Residents (lazy-loaded table, searched and paged on the server). */
.res { margin-top: 18px; position: relative; }
.res__head { flex-wrap: wrap; }
.res__tools { display: flex; align-items: center; gap: 10px; flex: 1 1 420px; justify-content: flex-end; flex-wrap: wrap; }
.res__search { max-width: 380px; }
.res__search input::-webkit-search-cancel-button { cursor: pointer; }
.res__size { display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--text-2); }
.res__size select { font: inherit; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.res__summary { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 14px 8px; font-size: 0.86rem; color: var(--text-2); }
.res__summary b { color: var(--ink); }
.res__name { display: inline-flex; align-items: center; gap: 10px; }
.res__name b { display: block; }
.res__post { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; color: var(--petrol, #0a5f66); background: #e3f4f1; }
.res__nowrap { white-space: nowrap; }
.res__email { display: block; margin-top: 1px; font-size: 0.8rem; font-weight: 400; word-break: break-all; }
.res__post { margin-right: 4px; }
.res__pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 14px 10px; font-size: 0.86rem; }
.res__pages { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.res__pg { min-width: 34px; height: 34px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.res__pg:hover:not(:disabled) { border-color: var(--teal); color: var(--primary); }
.res__pg.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.res__pg:disabled { opacity: 0.4; cursor: default; }
.res__gap { padding: 0 4px; color: var(--muted); }
.res__noscript { padding: 0 14px 14px; }

/* Its own spinner: the app's loader in small, while results load. */
.res__loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px 16px; color: var(--text-2); font-size: 0.9rem; }
.res__spin { width: 44px; height: 44px; flex: none; background: url("/img/loader.svg") center / contain no-repeat; } /* the app's loader */
.res__body { position: relative; min-height: 120px; }
/* While new results load over old ones: a light veil with the spinner. */
.res__veil { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding-top: 56px; background: rgba(255, 255, 255, 0.6); border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .res__spin { background-image: url("/img/loader-still.svg"); } }
@media (max-width: 760px) {
  .res__tools { justify-content: stretch; }
  .res__search { max-width: none; flex: 1 1 100%; }
  .res__pager { justify-content: center; }
}

/* Residents: the App users switch, and rows that open a resident's page. */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 500; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #d5dfdd; transition: background 0.15s; flex: none; }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(12, 42, 46, 0.3); transition: transform 0.15s; }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 4px rgba(11, 156, 169, 0.2); }
.switch input:checked ~ span:last-child { color: var(--ink); }
.res__row { cursor: pointer; }
.res__row:hover td { background: #f6faf9; }
.res__open { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.res__open:hover, .res__row:hover .res__open { color: var(--primary); text-decoration: underline; }

/* A resident's page: a drawer from the right (full screen on a phone). */
dialog.rd { position: fixed; inset: 0 0 0 auto; width: min(780px, 100vw); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--surface); box-shadow: -20px 0 60px -20px rgba(12, 42, 46, 0.35); }
dialog.rd[open] { animation: rd-in 0.2s ease-out; }
dialog.rd::backdrop { background: rgba(14, 33, 32, 0.32); }
@keyframes rd-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.rd__box { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.rd__head { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 22px 56px 14px 24px; }
.rd__who { min-width: 0; }
.rd__who h2 { margin: 0 0 6px; font-size: 1.3rem; }
.rd__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.rd__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rd__x { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: #f0f5f4; cursor: pointer; color: var(--ink); }
.rd__x:hover { background: #e3eeec; }
.rd__x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rd__tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.rd__tabs::-webkit-scrollbar { display: none; }
.rd__tab { flex: none; padding: 12px 10px 11px; border: 0; border-bottom: 2.5px solid transparent; background: none; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.rd__tab:hover { color: var(--ink); }
.rd__tab.is-on { color: var(--primary); border-bottom-color: var(--primary); }
.rd__tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 8px 8px 0 0; }
.rd__panel { padding: 18px 24px 28px; }
.rd__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rd__card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 6px; }
.rd__card h3, .rd__h { margin: 0 0 6px; font-size: 0.95rem; }
.rd__h { margin: 20px 0 10px; }
.rd__card .facts > div { grid-template-columns: 120px 1fr; }
.rd__card .facts > div:first-child { border-top: 0; }
.rd__hint { font-size: 0.82rem; margin: 6px 0 10px; }
.rd__hint .link, .rd__none .link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.rd__units { display: grid; gap: 10px; }
.rd__unit { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.rd__unit-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.rd__unit p { margin: 0; font-size: 0.86rem; }
.rd__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.rd__stat { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; }
.rd__stat span { font-size: 0.76rem; color: var(--muted); }
.rd__stat b { font-size: 1.1rem; }
.rd__stat small { font-size: 0.74rem; color: var(--muted); }
.rd__stat--warn { border-color: #f1d9a6; background: #fffaf0; }
.rd__list { list-style: none; margin: 0; padding: 0; display: grid; }
.rd__item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.rd__item:first-child { border-top: 0; }
.rd__item.is-gone { opacity: 0.6; }
.rd__item-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.rd__item-main > .muted { font-size: 0.84rem; overflow-wrap: anywhere; }
.rd__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.82rem; }
.rd__when { flex: none; text-align: right; font-size: 0.84rem; color: var(--text-2); display: grid; gap: 2px; }
.rd__when small { color: var(--muted); font-size: 0.74rem; }
.rd__type { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: 0.72rem; font-weight: 700; background: #eef3f2; color: var(--text-2); }
.rd__type--delivery { background: #fff1e0; color: #a35b00; }
.rd__type--guest { background: #e6f0ff; color: #2152a8; }
.rd__type--staff { background: #e9f6ec; color: #23743a; }
.rd__note { color: #a33a2a; }
.rd__none { margin: 0 0 6px; font-size: 0.88rem; }
.rd__table td { vertical-align: top; }
.rd__timeline { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 8px; }
.rd__timeline li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.86rem; }
.rd__box > .empty, .rd__box > .res__loading { margin: 0 24px; }
@media (max-width: 760px) {
  dialog.rd { width: 100vw; }
  dialog.rd[open] { animation-name: rd-up; }
  .rd__head { padding: 18px 56px 12px 16px; }
  .rd__head .avatar--lg { width: 48px; height: 48px; font-size: 1rem; border-radius: 15px; }
  .rd__tabs { padding: 0 8px; }
  .rd__panel { padding: 14px 16px 24px; }
  .rd__grid, .rd__stats { grid-template-columns: 1fr 1fr; }
  .rd__grid { grid-template-columns: 1fr; }
  .res__tools { gap: 10px 14px; }
}
@keyframes rd-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.rd[open] { animation: none; } }

/* Page links for lists paged on the server (societies, agents): the residents pager, as links. */
a.res__pg, span.res__pg { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
span.res__pg.is-off { opacity: 0.4; }
.pager--num { padding: 14px 2px 4px; }
.filters .res__size { flex: none; }

/* Dashboard → App users: tiles, a year / month picker, joins by month and by day (one hue each, hover tooltips). */
.au { position: relative; margin-bottom: 18px; }
.au__body { position: relative; min-height: 160px; }
.au__tiles { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.au__tile { display: grid; gap: 4px; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.au__tile > span:first-child { font-size: 0.8rem; color: var(--muted); }
.au__tile b { font: 700 1.6rem "Outfit", sans-serif; color: var(--ink); line-height: 1.1; }
.au__tile small { font-size: 0.8rem; color: var(--text-2); }
.au__tile--hero { background: linear-gradient(140deg, #eaf7f5, #f2fae9); border-color: #d3ece6; }
.au__tile--hero b { font-size: 2.1rem; }
.au__meter { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: rgba(11, 156, 169, 0.14); overflow: hidden; }
.au__meter-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0B9CA9, #2FAF91, #80D959); }
.au__filters { display: flex; gap: 10px; margin-bottom: 8px; }
.au__charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.au__chart { margin: 0; padding: 12px 14px 6px; border: 1px solid var(--line); border-radius: 16px; }
.au__chart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; font-size: 0.9rem; }
.au__chart figcaption .muted { font-size: 0.8rem; }
.au__chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.au__grid { stroke: var(--line-2); stroke-width: 1; }
.au__grid--base { stroke: #cfd9d7; }
.au__axis { font: 500 12px "Inter", sans-serif; fill: var(--muted); text-anchor: middle; }
.au__axis--y { text-anchor: end; }
.au__val { font: 600 11.5px "Inter", sans-serif; fill: var(--text-2); text-anchor: middle; }
.au__hit { fill: transparent; }
.au__bar { fill: #0B9CA9; transition: fill 0.12s; }
.au__slot[data-au-pick] { cursor: pointer; }
.au__slot[data-au-pick] .au__bar { fill: #5fbec5; }
.au__slot.is-on .au__bar { fill: #0A7F87; }
.au__slot.is-on .au__axis, .au__slot.is-on .au__val { fill: var(--ink); font-weight: 700; }
.au__slot:hover .au__bar, .au__slot:focus-visible .au__bar { fill: #086a71; }
.au__slot:focus-visible { outline: none; }
.au__slot:focus-visible .au__hit { fill: rgba(11, 156, 169, 0.08); }
.au__slot.is-future .au__axis { fill: #c3ccca; }
.au__tip { position: absolute; z-index: 5; transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; background: #142120; color: #fff; font-size: 0.8rem; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px -8px rgba(12, 42, 46, 0.5); }
.au__note { margin: 10px 2px 0; font-size: 0.8rem; }
@media (max-width: 980px) { .au__charts { grid-template-columns: 1fr; } .au__tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .au__tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .au__tile--hero { grid-column: 1 / -1; } .au__tile { padding: 12px; } .au__tile b { font-size: 1.35rem; } }
.au__w0 { width: 0%; }
.au__w5 { width: 5%; }
.au__w10 { width: 10%; }
.au__w15 { width: 15%; }
.au__w20 { width: 20%; }
.au__w25 { width: 25%; }
.au__w30 { width: 30%; }
.au__w35 { width: 35%; }
.au__w40 { width: 40%; }
.au__w45 { width: 45%; }
.au__w50 { width: 50%; }
.au__w55 { width: 55%; }
.au__w60 { width: 60%; }
.au__w65 { width: 65%; }
.au__w70 { width: 70%; }
.au__w75 { width: 75%; }
.au__w80 { width: 80%; }
.au__w85 { width: 85%; }
.au__w90 { width: 90%; }
.au__w95 { width: 95%; }
.au__w100 { width: 100%; }

/* ---- Collections ---------------------------------------------------------------------------------------- */
.col__filters .select select { min-width: 110px; }
.col__chart { position: relative; padding: 16px 18px 10px; margin-bottom: 16px; }
.col__chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; margin-bottom: 8px; }
.col__chart-head h2 { margin: 0 0 2px; font-size: 1rem; }
.col__chart-head .muted { font-size: 0.82rem; }
.col__chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.col__legend { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; font-size: 0.82rem; color: var(--text-2); }
.col__legend li { display: inline-flex; align-items: center; gap: 6px; }
.col__key { width: 12px; height: 12px; border-radius: 3px; }
.col__key--ok { background: #0B9CA9; }
.col__key--wait { background: #9ad3d8; }
.au__bar.col__wait { fill: #9ad3d8; }
.au__slot:hover .au__bar.col__ok { fill: #086a71; }
.au__slot:hover .au__bar.col__wait { fill: #6fbfc6; }
.col__note { margin: 6px 2px 0; font-size: 0.8rem; }
.col__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.col__tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.col__tab span { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--mist); color: var(--ink); font-size: 0.78rem; text-align: center; }
.col__tab:hover { border-color: #b9dcd9; color: var(--ink); }
.col__tab.is-on { background: #0B9CA9; border-color: #0B9CA9; color: #fff; }
.col__tab.is-on span { background: rgba(255, 255, 255, 0.22); color: #fff; }
.col__table td { vertical-align: top; }
.col__sub { display: block; margin-top: 3px; font-size: 0.8rem; }
.col__sub .agent-code { padding: 3px 6px; font-size: 0.78rem; }
.col__soc { font-weight: 600; }
.col__approve { position: relative; display: inline-block; margin-top: 8px; }
.col__approve > summary { list-style: none; cursor: pointer; }
.col__approve > summary::-webkit-details-marker { display: none; }
.col__pop { position: absolute; z-index: 6; top: calc(100% + 6px); right: 0; width: 270px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 14px 34px -14px rgba(12, 42, 46, 0.35); font-size: 0.86rem; }
.col__pop p { margin: 0 0 8px; }
.col__pop .muted { font-size: 0.8rem; }
.col__review { display: inline-block; margin: 8px 0 0 8px; font-size: 0.85rem; }
.col__payout { white-space: nowrap; }
.col__payout:disabled { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 900px) {
  .col__pop { right: auto; left: 0; }
}
.col__table .num .col__sub { white-space: nowrap; }
@media (min-width: 981px) { .col__tiles { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ---- Collections → payout dialog ------------------------------------------------------------------------ */
.modal--payout { width: min(600px, 95vw); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; }
.po .field input[type=file] { height: auto; padding: 10px 12px; }
.po__holder { min-height: 160px; position: relative; }
.po__holder .res__loading { padding: 60px 0; }
.po { gap: 14px; }
.po__agent { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--mist); }
.po__who { display: flex; gap: 10px; align-items: center; }
.po__who .agent-code { padding: 3px 6px; font-size: 0.76rem; margin-left: 4px; }
.po__line { display: block; margin-top: 2px; font-size: 0.82rem; }
.po__facts { display: grid; gap: 6px; margin: 0; grid-column: 1; }
.po__facts div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; font-size: 0.88rem; }
.po__facts dt { color: var(--muted); }
.po__facts dd { margin: 0; color: var(--ink); word-break: break-all; }
.po__facts--grid { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.po__facts--grid div { grid-template-columns: 1fr; gap: 2px; }
.po__qr { grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; width: 132px; height: 132px; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.po__qr img { max-width: 100%; max-height: 100%; object-fit: contain; }
.po__qr--none { color: var(--muted); font-size: 0.8rem; text-align: center; }
.po__warn { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--amber-50); color: #8a5a12; font-size: 0.86rem; line-height: 1.45; }
.po__warn--stop { background: var(--rose-50); color: var(--rose); }
.po__calc { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.po__calc div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; font-size: 0.9rem; border-top: 1px solid var(--line-2); }
.po__calc div:first-child { border-top: 0; }
.po__calc span { color: var(--text-2); }
.po__calc b { color: var(--ink); font-variant-numeric: tabular-nums; }
.po__calc-sub { background: var(--mist); }
.po__calc-total { background: #eaf7f5; }
.po__calc-total b { font-size: 1.05rem; }
.po__neg { color: var(--rose) !important; }
.po__card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.po__card h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.98rem; color: var(--ink); }
.po__card form { display: grid; gap: 12px; }
.po__note { margin: 0; font-size: 0.84rem; }
.po__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.po__late { color: var(--rose) !important; font-weight: 600; }
.po__cancel summary { cursor: pointer; font-size: 0.86rem; }
.po__cancel form { display: grid; gap: 8px; justify-items: start; margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--rose-50); }
.po__cancel p { margin: 0; font-size: 0.85rem; }
.col__po { min-width: 150px; }
.col__po .pill { white-space: nowrap; }
.col__po .col__payout { margin-top: 6px; }
.col__po-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.col__late { color: var(--rose); font-weight: 600; }
@media (max-width: 560px) {
  .po__agent { grid-template-columns: 1fr; }
  .po__qr { grid-column: 1; grid-row: auto; }
  .po__row, .po__facts--grid { grid-template-columns: 1fr; }
}

/* ---- Left menu: collapse to icons (desktop) ---------------------------------------------------------------------- */
.side__logo-short { display: none; }
.side__toggle svg { transition: transform 0.18s; }
@media (min-width: 1000px) {
  .adm { transition: grid-template-columns 0.18s; }
  .adm--slim { grid-template-columns: 76px 1fr; }
  .adm--slim .side { padding: 20px 16px; }
  .adm--slim .side__brand { justify-content: center; padding: 0 0 18px; }
  .adm--slim .side__brand .side__logo, .adm--slim .side__brand span { display: none; }
  .adm--slim .side__brand .side__logo-short { display: block; width: 36px; height: 36px; }
  .adm--slim .soc-card { justify-content: center; padding: 4px; background: none; border-color: transparent; }
  .adm--slim .soc-card__text, .adm--slim .soc-card__switch { display: none; }
  .adm--slim .side__nav a { justify-content: center; gap: 0; padding: 11px 0; font-size: 0; }
  .adm--slim .side__nav a > span, .adm--slim .side__nav a .side__tag { display: none; }
  .adm--slim .side__label { height: 1px; margin: 10px 6px; padding: 0; overflow: hidden; font-size: 0; background: var(--line); }
  .adm--slim .side__me { flex-direction: column; gap: 8px; padding: 12px 0 0; }
  .adm--slim .side__who { display: none; }
  .adm--slim .side__toggle { order: -1; }
  .adm--slim .side__toggle svg { transform: rotate(180deg); }
}
@media (max-width: 999.98px) { .side__toggle { display: none; } }
