:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #0e1a2c;
  --muted: #5a6880;
  --line: #e0e6ee;
  --rail: #ffffff;
  --rail-2: #edf2f7;
  --rail-ink: #5a6880;
  --rail-hi: #0e1a2c;
  --rail-line: #e2e8f0;
  --rail-hover: rgba(14, 26, 44, 0.05);
  --rail-tile: rgba(14, 26, 44, 0.05);
  --rail-active: linear-gradient(90deg, rgba(14, 26, 44, 0.08), rgba(14, 26, 44, 0.03));
  --rail-ring: rgba(14, 26, 44, 0.1);
  --red: #e3303b;
  --red-ink: #ffffff;
  --red-soft: #fde8e9;
  --sky: #1690cf;
  --sky-soft: #e1f2fb;
  --good: #16895b;
  --good-soft: #dff4ea;
  --warn: #b86e00;
  --warn-soft: #fcf0dc;
  --gold: #b8862b;
  --gold-soft: #fbf1dc;
  --shadow: 0 1px 2px rgba(14, 26, 44, 0.05), 0 4px 16px rgba(14, 26, 44, 0.05);
  --login-grid: rgba(14, 26, 44, 0.04);
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --railw: 264px;
}
html[data-theme="dark"] {
  --bg: #0b111c;
  --surface: #131c2c;
  --surface-2: #1a2539;
  --ink: #e8eef7;
  --muted: #93a1b7;
  --line: #223047;
  --rail: #070b13;
  --rail-2: #0c1424;
  --rail-ink: #93a1b7;
  --rail-hi: #ffffff;
  --rail-line: rgba(255, 255, 255, 0.08);
  --rail-hover: rgba(255, 255, 255, 0.06);
  --rail-tile: rgba(255, 255, 255, 0.06);
  --rail-active: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  --rail-ring: rgba(255, 255, 255, 0.07);
  --red: #ff5862;
  --red-ink: #1a0507;
  --red-soft: #3a1a20;
  --sky: #4cb6ec;
  --sky-soft: #13304a;
  --good: #3fcb8e;
  --good-soft: #12352a;
  --warn: #f2b04a;
  --warn-soft: #3a2c12;
  --gold: #e5ba62;
  --gold-soft: #3a2e14;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  --login-grid: rgba(255, 255, 255, 0.032);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0b111c;
    --surface: #131c2c;
    --surface-2: #1a2539;
    --ink: #e8eef7;
    --muted: #93a1b7;
    --line: #223047;
    --rail: #070b13;
    --rail-2: #0c1424;
    --rail-ink: #93a1b7;
    --rail-hi: #ffffff;
    --rail-line: rgba(255, 255, 255, 0.08);
    --rail-hover: rgba(255, 255, 255, 0.06);
    --rail-tile: rgba(255, 255, 255, 0.06);
    --rail-active: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    --rail-ring: rgba(255, 255, 255, 0.07);
    --red: #ff5862;
    --red-ink: #1a0507;
    --red-soft: #3a1a20;
    --sky: #4cb6ec;
    --sky-soft: #13304a;
    --good: #3fcb8e;
    --good-soft: #12352a;
    --warn: #f2b04a;
    --warn-soft: #3a2c12;
    --gold: #e5ba62;
    --gold-soft: #3a2e14;
    --login-grid: rgba(255, 255, 255, 0.032);
    color-scheme: dark;
  }
}
html,
body {
  height: 100%;
}
html {
  scrollbar-width: thin;
  scrollbar-color: #33445e transparent;
}
body {
  overflow-x: clip;
}
::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #33445e;
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #47607f;
  border: 2px solid transparent;
  background-clip: content-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
  border-radius: 6px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}
h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0;
  letter-spacing: -0.01em;
}
.h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}
.h2 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.num {
  font-variant-numeric: tabular-nums;
}
.wm {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.wm .dots {
  color: var(--red);
}
/* shell */
.shell {
  display: block;
  min-height: 100vh;
}
html[data-rail="mini"] {
  --railw: 72px;
}
.rail {
  background: linear-gradient(180deg, var(--rail), var(--rail-2));
  color: var(--rail-ink);
  padding: 16px 2px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--railw);
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--rail-line);
  z-index: 30;
  transition: width 0.25s ease;
}
.rail-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid var(--rail-line);
}
.brand {
  color: var(--rail-hi);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}
.brand .wm {
  font-size: 22px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex: none;
  box-shadow: 0 1px 3px rgba(14, 26, 44, 0.18);
}
.brandmini {
  display: none;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-brand .wm {
  font-size: 26px;
}
.iconbtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--rail-line);
  color: var(--rail-ink);
  flex: none;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.2s;
}
.iconbtn:hover {
  background: var(--rail-hover);
  color: var(--rail-hi);
}
.collapsebtn {
  margin-left: auto;
}
.topbar .iconbtn {
  background: var(--surface-2);
  color: var(--ink);
}
.railflag {
  display: flex;
  height: 4px;
  width: 46px;
  border-radius: 2px;
  overflow: hidden;
  margin: 0 8px;
}
.railflag i {
  flex: 1;
}
.railflag i:nth-child(1) {
  background: #ed2939;
}
.railflag i:nth-child(2) {
  background: #fff;
}
.railflag i:nth-child(3) {
  background: #00a1de;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.navgroup {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.navg {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rail-ink);
  opacity: 0.5;
  padding: 8px 12px 2px;
}
.navg .caret {
  transition: transform 0.2s;
  opacity: 0.5;
  width: 12px;
  height: 12px;
}
.navgroup.closed .navg .caret {
  transform: rotate(-90deg);
}
.navgroup.closed .navitems {
  display: none;
}
.navitems {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--rail-ink);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav a:hover {
  background: var(--rail-hover);
  color: var(--rail-hi);
}
.nav a.on {
  background: var(--rail-active);
  color: var(--rail-hi);
  box-shadow: inset 0 0 0 1px var(--rail-ring);
}
.nav a.on .nico {
  background: var(--rail-tile);
  color: var(--rail-hi);
}
.nico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--rail-tile);
  color: var(--rail-ink);
  transition:
    background 0.15s,
    color 0.15s;
}
.nav a:hover .nico {
  background: var(--rail-tile);
  color: var(--rail-hi);
}
.nav .cnt {
  margin-left: auto;
  font-size: 11px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.rail .foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 6px 2px;
  border-top: 1px solid var(--rail-line);
}
.me {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  background: var(--rail-tile);
  border: 1px solid var(--rail-line);
  border-radius: 12px;
  padding: 8px 10px;
}
.me .av {
  background: var(--rail-tile);
  color: var(--rail-hi);
}
.metx {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.metx b {
  color: var(--rail-hi);
  font-size: 13px;
}
.metx span {
  font-size: 11.5px;
  color: var(--rail-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.footrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.linklike {
  color: var(--rail-ink);
  font-weight: 600;
  text-decoration: none;
}
.linklike:hover {
  color: var(--rail-hi);
}
/* mini mode */
html[data-rail="mini"] .brandtx,
html[data-rail="mini"] .navg,
html[data-rail="mini"] .nav .nlab,
html[data-rail="mini"] .nav .cnt,
html[data-rail="mini"] .railflag,
html[data-rail="mini"] .metx,
html[data-rail="mini"] .footrow .linklike {
  display: none;
}
html[data-rail="mini"] .rail {
  padding: 16px 2px;
  overflow-x: hidden;
}
html[data-rail="mini"] .nav {
  padding: 0 8px;
}
html[data-rail="mini"] .rail-top {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 0 12px;
}
html[data-rail="mini"] .brand {
  flex: none;
  justify-content: center;
}
html[data-rail="mini"] .brand > .brand-mark {
  display: none;
}
html[data-rail="mini"] .brandmini {
  display: block;
}
html[data-rail="mini"] .collapsebtn {
  margin-left: 0;
}
html[data-rail="mini"] .collapsebtn svg {
  transform: rotate(180deg);
}
html[data-rail="mini"] .nav a {
  justify-content: center;
  padding: 10px 0;
}
html[data-rail="mini"] .nav a .nico {
  margin: 0;
}
html[data-rail="mini"] .me {
  justify-content: center;
}
html[data-rail="mini"] .footrow {
  justify-content: center;
}
html[data-rail="mini"] .foot {
  align-items: center;
}
/* content + topbar */
.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--railw);
  transition: margin-left 0.25s ease;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 32px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs {
  font-size: 13.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topact {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.burger {
  display: none;
}
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 26, 0.45);
  z-index: 40;
}
.main {
  min-width: 0;
  padding: 28px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  margin: 0;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.pagehead p {
  margin: 6px 0 0;
  max-width: 62ch;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  border: 0;
}
.btn-dark {
  background: var(--ink);
  color: var(--bg);
  border: 0;
}
.btn-soft {
  background: var(--surface-2);
  color: var(--ink);
}
.btn-line {
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.btn-sm {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 8px;
}
.panel {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  min-width: 0;
}
.panel-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  row-gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-b {
  padding: 16px 18px;
}
.grid {
  display: grid;
  gap: 16px;
}
.g4 {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.g-main {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}
.stat {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.stat::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--sky);
}
.stat.s-red::after {
  background: var(--red);
}
.stat.s-good::after {
  background: var(--good);
}
.stat.s-gold::after {
  background: var(--gold);
}
.stat .v {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.stat .d {
  font-size: 12.5px;
  color: var(--muted);
}
.stat .lab {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.stat .delta {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--good-soft);
  color: var(--good);
  align-self: flex-start;
}
.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
  margin-top: 6px;
}
.spark i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--sky), transparent);
  opacity: 0.85;
  min-height: 3px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.good {
  background: var(--good-soft);
  color: var(--good);
}
.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill.red {
  background: var(--red-soft);
  color: var(--red);
}
.pill.sky {
  background: var(--sky-soft);
  color: var(--sky);
}
.pill.grey {
  background: var(--surface-2);
  color: var(--muted);
}
.pill.gold {
  background: var(--gold-soft);
  color: var(--gold);
}
.pill.line {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tablewrap {
  overflow-x: auto;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: #33445e transparent;
}
.tablewrap::-webkit-scrollbar {
  height: 6px;
}
.tablewrap::-webkit-scrollbar-track {
  background: transparent;
}
.tablewrap::-webkit-scrollbar-thumb {
  background: #33445e;
  border-radius: 4px;
}
.list .row.stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.list .row.stack .tx {
  width: 100%;
}
.chartflex {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.chartflex .donut {
  flex: none;
}
.donut-total {
  font-family: var(--display);
  font-weight: 800;
  font-size: 23px;
  fill: var(--ink);
}
.donut-sub {
  font-size: 11px;
  fill: var(--muted);
}
.legend {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
}
.legend .lrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.legend .lrow:last-child {
  border-bottom: 0;
}
.ldot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.lrow b {
  margin-left: auto;
  font-weight: 700;
}
.area {
  width: 100%;
}
.area svg {
  width: 100%;
  height: auto;
  display: block;
}
.kpi-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr.click:hover td {
  background: var(--surface-2);
}
.person {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 180px;
}
.av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  flex: none;
  background: var(--surface-2);
  color: var(--ink);
}
.code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 6px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.segs {
  display: flex;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}
.segs a {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.segs a.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.segs button {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}
.segs button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  min-height: 38px;
  background: var(--surface);
  margin-left: auto;
  min-width: 0;
  flex: 0 1 260px;
}
.search input {
  border: 0;
  background: transparent;
  min-width: 0;
  flex: 1;
  min-height: 34px;
}
.search input:focus {
  outline: none;
}
.list .row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  border-radius: 0;
}
.list .row:last-child {
  border-bottom: 0;
}
.list .row .tx {
  flex: 1;
  min-width: 0;
}
.list .row .tx b {
  display: block;
  font-weight: 600;
}
.list .row .tx span {
  font-size: 13px;
  color: var(--muted);
}
a.row:hover {
  background: var(--surface-2);
}
.hb {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hbr {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  font-size: 13.5px;
}
.hbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hbt {
  height: 14px;
}
.hbt i {
  display: block;
  height: 100%;
  background: var(--sky);
  border-radius: 0 4px 4px 0;
  min-width: 2px;
}
.hbr b {
  min-width: 58px;
  text-align: right;
}
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fld.full {
  grid-column: 1/-1;
}
.fld label {
  font-size: 13px;
  font-weight: 600;
}
.fld .hint {
  font-size: 12px;
  color: var(--muted);
}
.permgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 8px;
}
.perm {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  cursor: pointer;
}
.perm input {
  margin-top: 3px;
  accent-color: var(--red);
  width: 15px;
  height: 15px;
  flex: none;
}
.perm b {
  font-weight: 700;
}
.perm .muted {
  font-size: 12.5px;
}
.fld input,
.fld select,
.fld textarea {
  min-height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}
.fld input:focus,
.fld select:focus,
.fld textarea:focus {
  border-color: var(--sky);
}
.fld select,
select.rolesel {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238B96AB' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.fld select {
  padding-right: 36px;
}
select.rolesel {
  padding-right: 30px;
}
.fld select option,
select.rolesel option {
  background: var(--surface);
  color: var(--ink);
}
.fld textarea {
  padding: 10px 12px;
  min-height: 90px;
  resize: vertical;
}
.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--sky-soft);
  font-size: 13.5px;
}
.callout.gold {
  background: var(--gold-soft);
}
.inwrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.inwrap input {
  border: 0 !important;
  min-height: 40px;
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  background: transparent;
}
.inwrap span {
  padding: 0 12px;
  color: var(--muted);
  font-weight: 700;
}
.rolesel {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 30px 0 8px;
}
.adminlogin {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background-color: var(--rail);
  background-image:
    linear-gradient(var(--login-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--login-grid) 1px, transparent 1px);
  background-size: 44px 44px;
}
.adminlogin .card {
  width: min(400px, 100%);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Centered 2FA setup block: QR, manual key and code stacked in the middle. */
.tfa-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.tfa-setup .fld {
  align-items: center;
  width: 100%;
}
.tfa-keyrow {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
}
.tfa-keyrow input {
  max-width: 250px;
  text-align: center;
}
.kvs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 14px;
}
.kvs span {
  color: var(--muted);
}
.kvs b {
  font-weight: 600;
  text-align: right;
}
.tic2 {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-2);
  color: var(--muted);
}
.tic2.hot {
  background: var(--red-soft);
  color: var(--red);
}
.qrow {
  align-items: flex-start !important;
}
.qrow .actions {
  flex: none;
}
.bubble {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  padding: 12px 14px;
  font-size: 14px;
}
.danger {
  color: var(--red);
}
.sw {
  width: 42px;
  height: 24px;
  border-radius: 24px;
  background: var(--line);
  position: relative;
  flex: none;
}
.sw.on {
  background: var(--good);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  max-width: min(480px, 94vw);
  width: 100%;
}
dialog::backdrop {
  background: rgba(8, 14, 26, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* Wide modal for the blog post editor. */
dialog.dlg-wide {
  max-width: min(860px, 94vw);
}
/* Textless status dot (green = published/live, grey = draft/hidden). */
.sdot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--line);
  border: 0;
  padding: 0;
  cursor: pointer;
  flex: none;
}
.sdot.on {
  background: var(--good);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 22%, transparent);
}
/* Table pagination footers. */
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}
.pager:empty {
  display: none;
}
.pager .pg-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
/* Rich-text editor inside post dialogs (theme-aware). */
.ql-toolbar.ql-snow {
  border-color: var(--line);
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--surface-2);
}
.ql-container.ql-snow {
  border-color: var(--line);
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
}
.ql-snow .ql-stroke {
  stroke: var(--ink);
}
.ql-snow .ql-fill {
  fill: var(--ink);
}
.ql-snow .ql-picker {
  color: var(--ink);
}
.ql-snow .ql-picker-options {
  background: var(--surface);
}
.ql-editor {
  min-height: 220px;
}
.ql-editor img {
  max-width: 100%;
  border-radius: 8px;
}
.dh {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.db {
  padding: 18px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.toasts {
  position: fixed;
  right: 22px;
  top: 76px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
}
.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #0e1a2c;
  color: #edf2f9;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 12px 14px;
  box-shadow: 0 16px 48px rgba(8, 14, 26, 0.35);
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
  animation: tin 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.toast.out {
  animation: tout 0.22s ease both;
}
@keyframes tin {
  from {
    opacity: 0;
    transform: translateX(32px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes tout {
  to {
    opacity: 0;
    transform: translateX(32px);
  }
}
.tico {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
}
.t-success .tico {
  background: #16895b;
}
.t-error .tico {
  background: #e3303b;
}
.t-warning .tico {
  background: #b86e00;
}
.t-info .tico {
  background: #1690cf;
}
.tmsg {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
  color: #edf2f9;
}
.tclose {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 17px;
  line-height: 1;
  color: #8b96ab;
}
.tclose:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.tbar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  opacity: 0.9;
  animation: tbar var(--ttl, 4s) linear both;
}
.t-success .tbar {
  background: #3fcb8e;
}
.t-error .tbar {
  background: #ff5862;
}
.t-warning .tbar {
  background: #f2b04a;
}
.t-info .tbar {
  background: #4cb6ec;
}
.toasts.pause .tbar,
.toast.pause .tbar {
  animation-play-state: paused;
}
@media (max-width: 640px) {
  .toasts {
    left: 16px;
    right: 16px;
    top: 66px;
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
  .tbar {
    display: none;
  }
}
.empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
}
.sum .kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
@media (max-width: 1100px) {
  .g-main {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .shell {
    display: block;
  }
  .rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 88vw);
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }
  .content {
    margin-left: 0;
  }
  body.navopen .rail {
    transform: none;
  }
  body.navopen .scrim {
    display: block;
  }
  .scrim {
    display: none;
  }
  .burger {
    display: inline-grid;
  }
  .topbar {
    padding: 10px 16px;
  }
  .main {
    padding: 20px 16px 40px;
  }
  .g3,
  .g2,
  .form {
    grid-template-columns: minmax(0, 1fr);
  }
  .search {
    margin-left: 0;
    flex: 1 1 100%;
  }
  .hbr {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .hbr .hbt {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .crumbs span.muted {
    display: none;
  }
}

/* Country management uses the shared admin surfaces, controls and theme tokens. */
.catalogue {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.catalogue [hidden] {
  display: none !important;
}
.catalogue-rail {
  position: sticky;
  top: 84px;
  overflow: hidden;
}
.catalogue-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.catalogue .h2 {
  margin: 0;
}
.catalogue .panel-h {
  padding: 20px 22px;
}
.catalogue .panel-b {
  padding: 22px;
}
.catalogue .panel-h .btn {
  flex-shrink: 0;
}
.catalogue-subtitle {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 5px 0 0;
}
.catalogue-countries {
  padding: 0 10px 12px;
  max-height: 58vh;
  overflow: auto;
}
.catalogue-country {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  text-align: left;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 4px;
}
.catalogue-country:hover {
  background: var(--surface-2);
}
.catalogue-country.selected {
  background: var(--red-soft);
  border-color: var(--red);
}
.catalogue-country-copy {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.catalogue-country-copy b {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.catalogue-country-copy > span {
  font-size: 12px;
  color: var(--muted);
}
.catalogue-flag {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}
.catalogue-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalogue-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.catalogue-dot.published {
  background: var(--good);
}
.catalogue-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}
.catalogue-rail-footer {
  padding: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  text-align: center;
}
.catalogue-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.catalogue-flag-large {
  width: 48px;
  height: 48px;
  font-size: 16px;
}
.catalogue-form {
  display: grid;
  gap: 22px;
}
.catalogue-form .form {
  gap: 20px;
}
.catalogue-field-label {
  font-size: 13px;
  font-weight: 600;
}
.catalogue-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  cursor: pointer;
  font-size: 13px;
}
.catalogue .catalogue-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
  margin: 0;
  accent-color: var(--red);
  flex-shrink: 0;
}
.catalogue-details {
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  background: var(--surface);
}
.catalogue details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 15px 18px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  border-radius: inherit;
  transition: background-color 160ms ease;
}
.catalogue details > summary::-webkit-details-marker {
  display: none;
}
.catalogue details > summary::marker {
  content: "";
}
.catalogue details > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.7px solid var(--muted);
  border-bottom: 1.7px solid var(--muted);
  transform: rotate(45deg);
  margin-left: auto;
  margin-right: 3px;
  flex-shrink: 0;
  transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
}
.catalogue details[open] > summary::after {
  transform: rotate(225deg);
}
.catalogue details > summary:hover {
  background: var(--surface-2);
}
.catalogue details > summary:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
}
.catalogue details[open] > summary {
  border-bottom: 1px solid var(--line);
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.catalogue-details > .form {
  padding: 18px;
}
.catalogue-country-settings {
  margin: 18px 22px 22px;
}
.catalogue-country-settings > .panel-b {
  padding: 20px;
}
@media (prefers-reduced-motion: reduce) {
  .catalogue details > summary,
  .catalogue details > summary::after {
    transition: none;
  }
}
.catalogue-form-footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.catalogue-form-footer p {
  margin: 0;
}
.catalogue-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.catalogue-toolbar {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.catalogue-toolbar .fld:first-child {
  flex: 1;
  min-width: 160px;
}
.catalogue-toolbar .fld input {
  width: 100%;
}
.catalogue-add {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.catalogue-table th,
.catalogue-table td {
  padding: 15px 22px;
}
.catalogue-table .fld input {
  min-width: 140px;
  width: 100%;
}
.catalogue-end {
  text-align: right;
  justify-content: flex-end;
}
.catalogue-guide {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.catalogue-guide:last-child {
  border-bottom: 0;
}
.catalogue-cover {
  display: grid;
  place-items: center;
  width: 112px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 32px;
  text-decoration: none;
}
.catalogue-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalogue-guide-copy {
  flex: 1;
  min-width: 0;
}
.catalogue-guide-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.catalogue-guide-title {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.catalogue-guide-title:hover {
  color: var(--red);
}
.catalogue-guide-copy .catalogue-subtitle {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalogue-guide-copy .pill {
  margin-top: 10px;
}
.catalogue-guide-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}
.catalogue-empty {
  text-align: center;
  padding: 42px 24px;
}
.catalogue-empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 16px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 26px;
}
.catalogue-empty h3 {
  font-family: var(--display);
  margin: 0 0 8px;
}
.catalogue-empty p {
  font-size: 14px;
  margin: 0 0 22px;
}
.catalogue-image-fields {
  padding: 8px 16px 18px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.catalogue-flag-preview {
  width: 72px;
  height: 54px;
}
.catalogue input[readonly] {
  background: var(--surface-2);
  color: var(--muted);
}
@media (max-width: 1200px) {
  .catalogue {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
  }
  .catalogue-guide {
    flex-wrap: wrap;
  }
  .catalogue-guide-actions {
    margin-left: 130px;
  }
}
@media (max-width: 1000px) {
  .catalogue {
    grid-template-columns: minmax(0, 1fr);
  }
  .catalogue-rail {
    position: static;
  }
  .catalogue-countries {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    max-height: 250px;
  }
}
@media (max-width: 600px) {
  .catalogue .panel-h,
  .catalogue .panel-b,
  .catalogue-toolbar,
  .catalogue-guide {
    padding: 16px;
  }
  .catalogue-guide {
    gap: 12px;
  }
  .catalogue-cover {
    width: 76px;
    height: 76px;
  }
  .catalogue-guide-actions {
    width: 100%;
    margin: 0;
    justify-content: flex-start;
  }
  .catalogue-table th,
  .catalogue-table td {
    padding: 12px 16px;
  }
  .catalogue-form-footer {
    align-items: stretch;
  }
  .catalogue-form-footer > .btn {
    width: 100%;
  }
  .catalogue-image-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.catalogue .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.catalogue.guide-editor {
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}
.guide-editor-options {
  margin-top: 22px;
}
.guide-translation > summary {
  padding: 20px 22px;
  font-weight: 700;
  cursor: pointer;
}
.guide-translation > .panel-b > .form {
  margin-top: 20px;
}
.catalogue-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 0;
}
.catalogue input[type="file"] {
  padding: 9px 12px;
  font-size: 13px;
}
.catalogue input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 6px;
  padding: 5px 9px;
  margin-right: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.catalogue.circle-admin {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.circle-tabs {
  display: flex;
}
.circle-tabs button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 18px;
}
.circle-tabs .num {
  font-size: 12px;
  color: var(--muted);
}
.circle-item {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.circle-item:last-child {
  border-bottom: 0;
}
.circle-item-copy {
  flex: 1;
  min-width: 0;
}
.circle-item h3 {
  font-family: var(--display);
  font-size: 17px;
  margin: 0;
  overflow-wrap: anywhere;
}
.circle-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.circle-date,
.circle-group-icon {
  width: 60px;
  min-height: 64px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.circle-date span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.circle-date b {
  font-family: var(--display);
  font-size: 24px;
}
.circle-group-icon {
  color: var(--sky);
  background: var(--sky-soft);
  font-family: var(--display);
  font-size: 24px;
}
.circle-description {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 600px) {
  .circle-item {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .circle-item .catalogue-guide-actions {
    width: 100%;
  }
  .circle-date,
  .circle-group-icon {
    width: 48px;
    min-height: 56px;
  }
  .catalogue-country-settings {
    margin: 14px 16px 16px;
  }
}

.circle-item .catalogue-guide-actions {
  margin-left: 0;
}

.catalogue details[data-disclosure-state="closing"] > summary::after {
  transform: rotate(45deg);
}
.catalogue.provider-admin {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.provider-availability {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.provider-availability h3 {
  font-family: var(--display);
  font-size: 16px;
  margin: 0;
}
.provider-days {
  border: 0;
  padding: 0;
  margin: 20px 0;
  min-width: 0;
}
.provider-days legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.provider-day-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.provider-day {
  position: relative;
  cursor: pointer;
}
.provider-day input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.provider-day span {
  display: grid;
  place-items: center;
  min-width: 48px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.provider-day input:checked + span {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--ink);
}
.provider-day input:focus-visible + span {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
}
.provider-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
body.nc-modal-open {
  overflow: hidden;
}
dialog.nc-create-dialog {
  width: min(480px, calc(100vw - 32px));
  max-width: 480px;
  max-height: calc(100dvh - 40px);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
  overflow: auto;
}
.nc-create-dialog[open] {
  animation: nc-dialog-enter 180ms ease-out;
}
.nc-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 22px;
  border-bottom: 1px solid var(--line);
}
.nc-dialog-head h2 {
  font-family: var(--display);
  font-size: 23px;
  margin: 0;
  letter-spacing: -0.025em;
}
.nc-dialog-head p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 7px 0 0;
  max-width: 32ch;
}
.nc-dialog-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
  color: var(--muted);
  flex-shrink: 0;
}
.nc-dialog-close:hover {
  color: var(--ink);
}
.nc-create-fields {
  padding: 24px 28px;
  display: grid;
  gap: 20px;
}
.nc-create-fields input {
  width: 100%;
}
.nc-password-control {
  display: flex;
  align-items: center;
  min-width: 0;
  position: relative;
}
.nc-password-control input {
  padding-right: 64px;
}
.nc-password-control button {
  position: absolute;
  right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-height: 32px;
}
.nc-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.nc-form-error {
  padding: 12px 14px;
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--red);
  background: var(--red-soft);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}
.nc-create-fields input[aria-invalid="true"] {
  border-color: var(--red);
}
@keyframes nc-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nc-create-dialog[open] {
    animation: none;
  }
}
@media (max-width: 600px) {
  .nc-dialog-head,
  .nc-create-fields {
    padding: 20px;
  }
  .nc-dialog-footer {
    padding: 16px 20px;
  }
}
.revenue-chart {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}
.revenue-chart svg {
  display: block;
  width: 100%;
  min-width: 600px;
  height: auto;
  font-family: var(--body);
}
.revenue-axis {
  fill: var(--muted);
  font-size: 12px;
}
.revenue-line {
  fill: none;
  stroke: var(--sky);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.revenue-point {
  fill: var(--sky);
  stroke: var(--surface);
  stroke-width: 2;
}
.revenue-point.negative {
  fill: var(--red);
}
.revenue-latest-value {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.revenue-week:focus {
  outline: none;
}
.revenue-week:focus > rect:first-of-type {
  stroke: var(--sky);
  stroke-width: 1;
  rx: 5;
}
.revenue-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}
.revenue-tooltip rect {
  fill: var(--ink);
}
.revenue-tooltip text {
  fill: var(--bg);
  font-size: 12px;
  font-weight: 700;
}
.revenue-week:hover .revenue-tooltip,
.revenue-week:focus .revenue-tooltip {
  opacity: 1;
}
.revenue-total {
  text-align: right;
  display: grid;
  gap: 2px;
}
.revenue-total span {
  font-size: 12px;
  color: var(--muted);
}
.revenue-total b {
  font-family: var(--display);
  font-size: 24px;
}
.revenue-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .revenue-tooltip {
    transition: none;
  }
}

.revenue-tooltip text.revenue-tooltip-date {
  font-size: 10px;
  font-weight: 400;
}
.revenue-chart svg:has(.revenue-week:hover) .revenue-week:focus:not(:hover) .revenue-tooltip {
  opacity: 0;
}

/* Providers: grouped by service, compact rows. */
.provider-group {
  border-bottom: 1px solid var(--line);
}
.provider-group:last-child {
  border-bottom: 0;
}
.catalogue .provider-group > summary {
  border-radius: 0;
  font-size: 14px;
}
.provider-group > summary .num {
  font-size: 12px;
  font-weight: 500;
}
.provider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 30px;
  border-top: 1px solid var(--line);
}
.provider-group > div > .provider-row:first-child {
  border-top: 0;
}
.provider-row-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.provider-row-copy b {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.provider-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .provider-row {
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  .provider-row-actions {
    width: 100%;
  }
}
