:root {
  --bg: #f3f0e8;
  --ink: #191b1f;
  --muted: #767676;
  --panel: #fffaf0;
  --panel-2: #ffffff;
  --line: #ded6c7;
  --brand: #111111;
  --accent: #b66b2a;
  --blue: #2563eb;
  --danger: #b91c1c;
  --success: #166534;
  --type-xs: clamp(12px, .78vw, 13px);
  --type-sm: clamp(14px, .9vw, 15px);
  --type-base: clamp(15.5px, .98vw, 16.5px);
  --type-lg: clamp(21px, 1.8vw, 28px);
  font-family: Avenir Next, Helvetica Neue, PingFang SC, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background:
  radial-gradient(circle at 22% -8%, rgba(182,107,42,.16), transparent 32%),
  linear-gradient(120deg, #f3f0e8, #ece4d7);
  font-size: var(--type-base);
  line-height: 1.58;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
#app { display: grid; grid-template-columns: 284px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 22px 18px; background: #151515; color: #f8f2e9; border-right: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 12px; padding: 10px 10px 24px; }
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(157,255,58,.28), rgba(12,18,14,.92) 64%);
  box-shadow: 0 0 26px rgba(157,255,58,.22), inset 0 0 0 1px rgba(157,255,58,.22);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.menu-group { border-top: 1px solid rgba(255,255,255,.08); padding: 10px 0; }
.menu-group button { width: 100%; display: flex; justify-content: space-between; border: 0; color: #fff; background: transparent; padding: 12px 10px; font-weight: 800; }
.menu-group div { display: grid; gap: 3px; }
.menu-item { color: #b8b2aa; padding: 9px 12px 9px 24px; border-radius: 12px; font-size: 14px; }
.menu-item:hover, .menu-item.active { color: #111; background: #d9a05b; }
.workspace { min-width: 0; overflow-x: hidden; padding: 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.topbar p { margin: 0 0 4px; color: var(--muted); font-size: var(--type-sm); }
.topbar h1 { margin: 0; font-size: clamp(30px, 3.1vw, 46px); line-height: 1.08; letter-spacing: -0.044em; }
.operator { display: grid; justify-items: end; padding: 12px 16px; border-radius: 18px; background: rgba(255,255,255,.55); border: 1px solid var(--line); }
.operator b { color: var(--accent); font-size: var(--type-xs); }
.operator .action { margin-top: 8px; }
.toast { margin-bottom: 18px; padding: 14px 16px; border-radius: 16px; background: #fff7db; border: 1px solid #edd28b; color: #6d4b00; }
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.stat, .panel { background: rgba(255,250,240,.86); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 60px rgba(70, 49, 20, .08); }
.stat { min-height: 150px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.stat span, .stat small { color: var(--muted); }
.stat strong { font-size: clamp(23px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -0.034em; word-break: keep-all; overflow-wrap: normal; }
.stat strong, .stat small { min-width: 0; }
.stat small { overflow-wrap: anywhere; }
.stat.lime { border-color: rgba(22,101,52,.2); }
.stat.blue { border-color: rgba(37,99,235,.2); }
.stat.rose { border-color: rgba(185,28,28,.2); }
.panel { padding: 18px; margin-bottom: 18px; }
.delivery-console {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr);
  gap: 14px;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at 4% 0%, rgba(182,107,42,.18), transparent 32%),
    linear-gradient(135deg, rgba(255,250,240,.98), rgba(255,245,229,.88));
}
.delivery-score {
  position: relative;
  min-height: 280px;
  padding: 26px;
  color: #fff9ef;
  background:
    radial-gradient(circle at 76% 24%, rgba(217,160,91,.42), transparent 34%),
    linear-gradient(145deg, #171717, #29211a);
}
.delivery-score::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 42px solid rgba(217,160,91,.16);
}
.delivery-score span {
  color: #d9a05b;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 900;
}
.delivery-score strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 22px 0 14px;
  font-size: clamp(64px, 8.2vw, 104px);
  line-height: .92;
  letter-spacing: -.058em;
}
.delivery-score em {
  font-size: .28em;
  font-style: normal;
  color: #d9a05b;
}
.delivery-score p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 460px;
  color: #d6c8b8;
  line-height: 1.7;
}
.delivery-track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}
.delivery-track-grid article {
  padding: 18px;
  border: 1px solid #eadbc2;
  border-radius: 20px;
  background: rgba(255,255,255,.62);
}
.delivery-track-grid b {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.delivery-track-grid strong {
  display: block;
  margin: 12px 0 8px;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.12;
  letter-spacing: -.034em;
}
.delivery-track-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.prediction-admin-hero,
.prediction-approval-hero {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(420px, 1.28fr);
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0, rgba(182,107,42,.16), transparent 36%),
    linear-gradient(135deg, rgba(255,250,240,.98), rgba(255,245,229,.82));
}
.prediction-admin-hero h2,
.prediction-approval-hero h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -.046em;
}
.prediction-admin-hero p,
.prediction-approval-hero p {
  color: var(--muted);
  line-height: 1.68;
}
.prediction-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.prediction-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.prediction-source-grid article {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(37,99,235,.10), transparent 42%),
    rgba(255,255,255,.66);
}
.prediction-source-grid span {
  color: var(--muted);
  font-size: 12px;
}
.prediction-source-grid strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(17px, 1.5vw, 23px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.prediction-settlement-detail {
  border-color: rgba(37,99,235,.24);
  background:
    radial-gradient(circle at 100% 0, rgba(37,99,235,.12), transparent 34%),
    rgba(255,250,240,.92);
}
.prediction-approval-hero {
  border-color: rgba(185,28,28,.18);
  background:
    radial-gradient(circle at 95% 0, rgba(185,28,28,.13), transparent 34%),
    radial-gradient(circle at 4% 0, rgba(182,107,42,.16), transparent 36%),
    linear-gradient(135deg, rgba(255,250,240,.98), rgba(255,244,235,.88));
}
.prediction-approval-hero .prediction-source-grid article {
  background:
    radial-gradient(circle at 100% 0, rgba(185,28,28,.10), transparent 42%),
    rgba(255,255,255,.72);
}
.panel-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: clamp(22px, 2.05vw, 29px); line-height: 1.16; letter-spacing: -0.03em; }
.filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: var(--type-sm); }
input, select, textarea { min-width: 180px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); padding: 11px 12px; outline: none; }
textarea { min-height: 90px; resize: vertical; }
.action, .mini { border: 0; border-radius: 13px; background: var(--brand); color: #fff; padding: 11px 14px; font-weight: 800; }
.action.secondary, .mini.secondary { background: #eee8dd; color: var(--ink); border: 1px solid var(--line); }
.action.danger, .mini.danger { background: var(--danger); color: #fff; }
.mini { padding: 7px 9px; margin: 2px; font-size: 12px; }
.filter-chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: #fff7e6; border: 1px solid #ead6af; }
.filter-chip .mini { border-radius: 999px; margin: 0; }
.progress-card { display: grid; gap: 12px; }
.progress-head, .progress-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.progress-head strong { color: var(--ink); }
.progress-track { height: 14px; border-radius: 999px; overflow: hidden; background: #ede3d3; border: 1px solid #dfd1bd; }
.progress-track i { display: block; height: 100%; min-width: 3%; border-radius: inherit; transition: width .35s ease; box-shadow: 0 0 20px rgba(37,99,235,.18); }
.progress-meta span { padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.68); border: 1px solid var(--line); font-size: 12px; }
.danger-text { color: var(--danger); font-weight: 800; }
.admin-report-visuals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 16px;
}
.admin-visual-card {
  min-height: 290px;
  margin-bottom: 0;
  background:
    radial-gradient(circle at 92% 8%, rgba(182,107,42,.12), transparent 34%),
    rgba(255,250,240,.92);
}
.ops-focus-card {
  background:
    radial-gradient(circle at 96% 0, rgba(37,99,235,.10), transparent 32%),
    linear-gradient(145deg, rgba(255,250,240,.96), rgba(255,255,255,.84));
}
.ops-focus-card .panel-head {
  align-items: flex-start;
}
.ops-focus-card .admin-pipeline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ops-focus-card .admin-pipeline article {
  min-height: 132px;
  padding: 16px;
}
.ops-focus-card .admin-pipeline strong {
  font-size: clamp(21px, 1.7vw, 28px);
  overflow-wrap: normal;
  word-break: keep-all;
}
.ops-focus-card .admin-pipeline small {
  line-height: 1.5;
}
.ops-drill-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(122,86,48,.18);
}
.ops-drill-links .mini {
  margin: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--text);
  border: 1px solid rgba(122,86,48,.16);
}
.ops-drill-links .mini:hover {
  border-color: rgba(182,107,42,.38);
  background: #fff7e8;
}
.admin-user-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.admin-user-profile-grid article {
  min-height: 138px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(182,107,42,.12), transparent 32%),
    rgba(255,255,255,.72);
}
.admin-user-profile-grid span,
.admin-user-profile-grid small {
  display: block;
  color: var(--muted);
}
.admin-user-profile-grid strong {
  display: block;
  margin: 12px 0 8px;
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.admin-detail-anchorbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid rgba(122,86,48,.18);
  border-radius: 18px;
  background: rgba(255,251,243,.92);
  box-shadow: 0 18px 46px rgba(74,48,20,.10);
  backdrop-filter: blur(18px);
  overflow-x: auto;
}
.admin-detail-anchorbar a {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(122,86,48,.14);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,.74);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.admin-detail-anchorbar a:hover {
  border-color: rgba(182,107,42,.38);
  color: #8a4c18;
  background: #fff7e8;
}
.admin-detail-section {
  scroll-margin-top: 86px;
}
.admin-donut {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.admin-donut-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fffaf0 0 48%, transparent 49%),
    conic-gradient(var(--segments));
  box-shadow: inset 0 0 0 1px rgba(25,27,31,.08), 0 18px 40px rgba(70,49,20,.12);
}
.admin-donut-ring strong,
.admin-donut-ring span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}
.admin-donut-ring strong {
  font-size: 22px;
  letter-spacing: -.05em;
}
.admin-donut-ring span {
  color: var(--muted);
  font-size: 12px;
}
.admin-donut-legend {
  display: grid;
  gap: 8px;
}
.admin-donut-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  color: var(--muted);
}
.admin-donut-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot);
}
.admin-donut-legend b { color: var(--ink); }
.admin-chart-bars {
  display: grid;
  gap: 10px;
}
.admin-chart-bars article {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(92px, .56fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 40px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
}
.admin-chart-bars article::after {
  content: "";
  position: absolute;
  left: 112px;
  bottom: 7px;
  width: var(--bar);
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--success), rgba(22,101,52,.12));
}
.admin-chart-bars article.down::after {
  background: linear-gradient(90deg, var(--danger), rgba(185,28,28,.12));
}
.admin-chart-bars article.accent::after {
  background: linear-gradient(90deg, var(--blue), rgba(37,99,235,.12));
}
.admin-chart-bars span {
  color: var(--muted);
  font-size: 12px;
}
.admin-chart-bars b {
  position: relative;
  z-index: 1;
  text-align: right;
  overflow-wrap: anywhere;
}
.admin-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.admin-report-visuals .admin-pipeline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-pipeline article {
  position: relative;
  overflow: hidden;
  min-height: 122px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.64);
}
.admin-pipeline article::before {
  content: attr(data-step);
  position: absolute;
  right: 10px;
  top: 8px;
  color: rgba(25,27,31,.08);
  font-size: 30px;
  font-weight: 900;
}
.admin-pipeline span,
.admin-pipeline small {
  display: block;
  color: var(--muted);
}
.admin-pipeline strong {
  display: block;
  margin: 18px 0 6px;
  font-size: clamp(22px, 2.15vw, 30px);
  line-height: 1.12;
  letter-spacing: -.04em;
  word-break: keep-all;
}
.table-wrap { width: 100%; overflow: auto; border-radius: 18px; border: 1px solid var(--line); background: #fff; }
.table-metadata-error {
  display: grid;
  gap: 6px;
  min-block-size: 88px;
  padding: 18px;
  border: 1px solid var(--danger);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
}
.table-metadata-error span { color: var(--muted); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 14px; border-bottom: 1px solid #eee6d8; text-align: left; white-space: nowrap; font-size: var(--type-sm); }
th { background: #f8f1e5; color: #6f5b43; font-size: var(--type-xs); text-transform: uppercase; letter-spacing: .045em; }
tr:last-child td { border-bottom: 0; }
.symbol-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 850;
}
.symbol-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.symbol-orb {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,.92), rgba(255,255,255,.18) 34%, transparent 35%),
    linear-gradient(145deg, #f8d9a8, #d9a05b);
  box-shadow: 0 8px 18px rgba(70,49,20,.16), inset 0 0 0 1px rgba(255,255,255,.65);
}
.symbol-orb::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: inherit;
  pointer-events: none;
}
.symbol-orb img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.symbol-orb b {
  position: relative;
  z-index: 1;
  color: #16120c;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: -.04em;
}
.symbol-orb.has-logo b {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.empty { text-align: center; color: var(--muted); padding: 46px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 22px; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.modal { width: min(780px, 100%); max-height: 88vh; overflow: auto; position: relative; border-radius: 28px; background: #fffaf0; border: 1px solid #eadbc2; box-shadow: 0 40px 120px rgba(0,0,0,.36); padding: 28px; }
.close { position: absolute; right: 18px; top: 18px; border: 0; background: transparent; color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 900; }
.modal h2 { margin: 0 0 10px; font-size: clamp(28px, 3vw, 36px); line-height: 1.1; letter-spacing: -0.04em; }
.modal p { color: var(--muted); }
.modal form { display: grid; gap: 12px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 10px; }
.permissions { max-height: 260px; overflow: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.permissions legend { color: var(--accent); font-weight: 900; }
.permissions label, .switch { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.permissions input, .switch input { min-width: auto; width: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: #fff; }
.tabs button.active { background: var(--brand); color: #fff; }
pre { white-space: pre-wrap; }

@media (max-width: 1100px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-report-visuals { grid-template-columns: 1fr; }
  .admin-donut,
  .admin-pipeline { grid-template-columns: 1fr; }
  .admin-donut-ring { margin: 0 auto; }
  .topbar, .panel-head { align-items: flex-start; flex-direction: column; }
  .operator { justify-items: start; }
  .delivery-console { grid-template-columns: 1fr; }
  .delivery-track-grid { grid-template-columns: 1fr; }
  .prediction-admin-hero,
  .prediction-approval-hero,
  .prediction-source-grid { grid-template-columns: 1fr; }
  .admin-user-profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .workspace { padding: 14px; }
  .stats-grid { grid-template-columns: 1fr; }
  .permissions { grid-template-columns: 1fr; }
  input, select, textarea { min-width: 0; width: 100%; }
  .admin-detail-anchorbar {
    top: 6px;
    margin-left: -2px;
    margin-right: -2px;
    padding: 8px;
    border-radius: 15px;
  }
  .admin-detail-anchorbar a {
    padding: 8px 11px;
    font-size: 12px;
  }
}

.endpoint-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #d8ccb8;
  border-radius: 16px;
  background: #fffdf7;
  color: #5f5448;
  font-size: 12px;
}
.endpoint-card b { color: #171717; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.endpoint-card, .endpoint-card b { min-width: 0; overflow-wrap: anywhere; }
.endpoint-card.high { border-color: rgba(185, 28, 28, .28); background: #fff4f2; }
.endpoint-card.high b { color: var(--danger); }
.risk-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.1fr);
  gap: 14px;
  align-items: center;
  border-color: rgba(185, 28, 28, .22);
  background: linear-gradient(135deg, rgba(255, 250, 240, .95), rgba(255, 241, 238, .95));
}
.risk-panel strong { color: var(--danger); }
.risk-panel p { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.split-grid p {
  margin: 0 0 10px;
  color: var(--muted);
}
.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 160px;
  color: var(--muted);
  font-weight: 800;
}
.loading span {
  width: 20px;
  height: 20px;
  border: 3px solid #e5d8c5;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.page-meta {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.pager-bar {
  justify-content: flex-start;
  margin-top: -4px;
}
.pager-bar .page-meta {
  margin: 0;
  padding-left: 4px;
}
.toast.danger {
  background: #fff4f2;
  border-color: rgba(185, 28, 28, .25);
  color: var(--danger);
}
.modal .endpoint-card { margin: 12px 0 16px; }
input[readonly] { background: #f4eee4; color: #756b5e; }
@keyframes spin { to { transform: rotate(360deg); } }

.admin-login-shell {
  grid-column: 1 / -1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login-card {
  position: relative;
  width: min(560px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: rgba(255,250,240,.92);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(70, 49, 20, .14);
}

.admin-login-locale {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(44px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.admin-login-locale button {
  min-width: 44px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.admin-login-locale button.active {
  background: var(--accent);
  color: #111;
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-login-brand .brand-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 22px;
}
.admin-login-brand .eyebrow {
  margin-bottom: 5px;
}

.admin-login-card h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.048em;
}

.admin-login-card p {
  color: var(--muted);
  line-height: 1.7;
}

.admin-login-form {
  display: grid;
  gap: 12px;
}

@media (max-width: 900px) {
  .risk-panel { grid-template-columns: 1fr; }
  .split-grid { grid-template-columns: 1fr; }
  .endpoint-card { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .admin-login-shell { padding: 12px; }
  .admin-login-card { padding: 76px 18px 20px; border-radius: 8px; }
  .admin-login-locale { top: 16px; right: 16px; }
  .admin-login-card h1 { font-size: 36px; }
}
