:root {
  --bg: #ebe4d8;
  --bg-deep: #e3d9c8;
  --surface: rgba(255, 252, 247, 0.82);
  --surface-solid: #fffcf7;
  --ink: #141a2e;
  --muted: #5c6578;
  --line: rgba(20, 26, 46, 0.1);
  --line-strong: rgba(20, 26, 46, 0.16);
  --accent: #2456d6;
  --accent-ink: #163a9a;
  --accent-soft: #e7eefc;
  --gold: #b8893d;
  --danger: #8d2f2f;
  --danger-soft: #fdeeee;
  --warning: #8a5a12;
  --warning-soft: #fbf3e2;
  --info-soft: #eef3f8;
  --shadow: 0 1px 1px rgba(19, 33, 28, 0.04), 0 18px 50px rgba(19, 33, 28, 0.07);
  --shadow-soft: 0 10px 30px rgba(19, 33, 28, 0.05);
  --radius: 18px;
  --sidebar: 268px;
  --content: 1120px;
  --font: "Google Sans Flex", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: "Google Sans Flex";
  src: url("/fonts/google-sans-flex-latin-ext.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Google Sans Flex";
  src: url("/fonts/google-sans-flex-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at -10% -10%, rgba(36, 86, 214, 0.16), transparent 60%),
    radial-gradient(760px 480px at 110% -8%, rgba(184, 137, 61, 0.18), transparent 55%),
    var(--bg);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 450;
}
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(18px);
}
body::before {
  width: 48vw;
  height: 48vw;
  left: -12vw;
  top: 18vh;
  background: radial-gradient(circle, rgba(140, 170, 245, 0.5), transparent 68%);
  animation: drift 26s var(--ease) infinite alternate;
}
body::after {
  width: 42vw;
  height: 42vw;
  right: -14vw;
  bottom: -8vh;
  background: radial-gradient(circle, rgba(232, 196, 132, 0.42), transparent 70%);
  animation: drift 32s var(--ease) infinite alternate-reverse;
}
a { color: var(--accent-ink); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  border-radius: 999px;
  z-index: 40;
}
.skip:focus { top: 12px; }

.app-shell,
.auth-shell,
.minimal { position: relative; z-index: 1; }

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(300px, 44%) 1fr;
}
.auth-brand {
  position: relative;
  overflow: hidden;
  margin: 16px 0 16px 16px;
  padding: 36px;
  color: #f6f3ec;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.16), transparent 28%),
    radial-gradient(circle at 80% 88%, rgba(184, 137, 61, 0.3), transparent 34%),
    linear-gradient(165deg, #1e3a8a 0%, #0c1840 68%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  box-shadow: 0 24px 60px rgba(12, 24, 64, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.auth-brand::before,
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.auth-brand::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -80px;
  top: -60px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.03), 0 0 0 96px rgba(255, 255, 255, 0.03);
}
.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 640;
  letter-spacing: -0.04em;
  font-size: 18px;
}
.mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  flex: 0 0 auto;
  background: none;
  box-shadow: 0 8px 18px rgba(20, 32, 72, 0.16);
}
.sidebar .mark,
.auth-brand .mark {
  box-shadow: 0 0 0 1.5px rgba(247, 244, 238, 0.78), 0 10px 22px rgba(0, 0, 0, 0.24);
}
.auth-logo {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: block;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 18px 36px rgba(0, 0, 0, 0.28);
}
.auth-brand h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 0.96;
  letter-spacing: -0.048em;
  font-weight: 520;
  margin: 0 0 16px;
}
.auth-brand p { position: relative; z-index: 1; max-width: 34ch; color: #d5def0; margin: 0; }
.brand-note { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #b7c4de !important; }
.auth-main {
  display: grid;
  place-items: center;
  padding: 32px 24px;
}
.auth-card {
  width: min(440px, 100%);
  padding: 32px 28px 26px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.auth-card h2 {
  font-size: clamp(30px, 4vw, 36px);
  letter-spacing: -0.045em;
  margin: 0 0 8px;
  font-weight: 540;
}
.auth-card > p:last-child { margin: 18px 0 0; }
.auth-card form > button:not(.button-secondary):not(.button-quiet) { width: 100%; }

.app-shell {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}
.sidebar {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
  height: 100%;
  min-height: 0;
  padding: 22px 14px 16px;
  color: #e8eefc;
  background:
    radial-gradient(280px 220px at 0% -8%, rgba(186, 206, 255, 0.28), transparent 62%),
    radial-gradient(240px 200px at 120% 108%, rgba(120, 150, 230, 0.22), transparent 64%),
    linear-gradient(188deg, #1e3a8a 0%, #152a6b 46%, #0a1230 100%);
  border-right: 1px solid rgba(200, 214, 255, 0.18);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.sidebar::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.03), 0 0 0 68px rgba(255, 255, 255, 0.025);
  pointer-events: none;
  z-index: 0;
}
.sidebar > * { position: relative; z-index: 1; }
.brand-row { display: flex; align-items: center; gap: 8px; }
.sidebar .brand-lockup { padding: 0 8px; color: #f7f4ee; flex: 1; min-width: 0; }
.nav-toggle, .nav-backdrop, .nav-close { display: none; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a, .side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  color: #d5def0;
  text-decoration: none;
  transition: background 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.side-nav a svg, .side-link svg { flex: 0 0 auto; opacity: 0.85; }
.side-nav a:hover, .side-link:hover { background: rgba(255, 255, 255, 0.08); color: white; }
.side-nav a[aria-current="page"] {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  color: white;
  box-shadow: inset 3px 0 0 #9eb6ff, inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.side-nav a[aria-current="page"] svg { opacity: 1; }
.side-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.logout-form { margin: 0; }
.sidebar .button-quiet {
  width: 100%;
  justify-content: flex-start;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  color: #d5def0;
  background: transparent;
}
.sidebar .button-quiet:hover { background: rgba(255, 255, 255, 0.07); color: white; }

.content {
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 32px 28px 72px;
}
.content > * {
  width: min(var(--content), 100%);
  margin-inline: auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.topbar-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-titles { min-width: 0; }
.topbar h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.048em;
  font-weight: 540;
}
.kicker {
  margin: 0 0 2px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-width: 0;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #1e3a8a, #2456d6);
  color: #f7f4ee;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}
.who-text { min-width: 0; text-align: left; line-height: 1.25; }
.who-text strong, .who-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text strong { color: var(--ink); font-weight: 600; max-width: 220px; }
.who-text span { color: var(--muted); font-size: 13px; max-width: 220px; }

.card, .panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.panel { padding: 22px; }
.panel:has(> .app-grid) {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}
.panel > h2, .auth-card h2 + .hint { font-weight: 560; }
h2 {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: -0.03em;
  font-weight: 560;
}
.stack { display: grid; gap: 16px; align-content: start; }
.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat { padding: 18px 18px 16px; position: relative; overflow: hidden; }
.stat::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -24px;
  top: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36, 86, 214, 0.16), transparent 70%);
}
.stat span { display: block; color: var(--muted); font-size: 13px; font-weight: 560; }
.stat strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.045em;
  font-weight: 540;
  text-transform: capitalize;
}
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.health-card h2 { margin: 0; font-size: 18px; }
.health-card h2 a { color: inherit; text-decoration: none; }
.health-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 12px 0;
}
.health-metrics span { display: block; color: var(--muted); font-size: 12px; }
.health-metrics strong { font-size: 20px; letter-spacing: -0.03em; font-weight: 560; }
.issue-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.issue-list li { font-size: 14px; padding-left: 10px; border-left: 3px solid var(--warning); }
.issue-list li.critical { border-left-color: var(--danger); }
.pill.healthy { background: var(--accent-soft); color: var(--accent-ink); }
.pill.attention { background: var(--warning-soft); color: var(--warning); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr); gap: 16px; align-items: start; }
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  min-width: 0;
}
.toolbar h2 { margin: 0; }
.toolbar > a:not(.button) {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.search { display: flex; gap: 8px; align-items: center; flex: 1 1 auto; flex-wrap: wrap; min-width: min(100%, 240px); max-width: 760px; }
.search select { width: auto; min-width: 160px; }
.search input { min-width: 0; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px 16px;
  margin-bottom: 16px;
}
.policy-grid .field { margin: 0; }
.policy-grid input {
  width: 100%;
  max-width: 9rem;
  min-height: 40px;
  padding: 8px 10px;
}
.field label { font-size: 14px; font-weight: 600; }
.hint, .field-error { margin: 0; font-size: 13px; }
.hint { color: var(--muted); }
.field-error { color: var(--danger); }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 12px 13px;
  min-height: 46px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
textarea { min-height: 110px; resize: vertical; padding-top: 12px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(36, 86, 214, 0.16);
}
input:disabled, select:disabled, textarea:disabled {
  background: #f4f0e8;
  color: var(--muted);
}
select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
input[type="checkbox"], input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.password-row { display: flex; gap: 8px; align-items: center; }
.password-row input { flex: 1; }

.button, button, .button-secondary, .button-danger, .button-quiet {
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #3b6fe8, var(--accent-ink));
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 18px rgba(22, 58, 154, 0.22);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}
.button:hover, button:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(22, 58, 154, 0.26); }
.button-secondary, .password-row .button-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.button-secondary:hover { background: white; }
.button-danger { background: linear-gradient(180deg, #a84a4a, var(--danger)); }
.button-quiet {
  background: transparent;
  color: var(--muted);
  padding-inline: 10px;
  box-shadow: none;
}
.button-quiet:hover { background: rgba(19, 33, 28, 0.05); color: var(--ink); transform: none; box-shadow: none; }
.nav-toggle.button-secondary, .nav-close.button-quiet {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
}
button[disabled], .button[aria-busy="true"] { opacity: 0.65; cursor: progress; transform: none; }
.nav-toggle, .nav-close, .nav-backdrop { display: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.group-label { margin: 18px 0 8px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.panel form + form { margin-top: 12px; }
.panel > .button, .panel > a.button { margin-top: 4px; }

.banner {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.banner p { margin: 0; }
.banner.success { background: var(--accent-soft); color: var(--accent-ink); border-color: rgba(36, 86, 214, 0.14); }
.banner.error { background: var(--danger-soft); color: var(--danger); border-color: rgba(141, 47, 47, 0.1); }
.banner.info { background: var(--info-soft); }
.secret-box { margin-top: 10px; display: grid; gap: 8px; }
.secret-box code, .mono {
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
}
.codes { columns: 2; margin: 8px 0 0; padding-left: 18px; }
.codes li { break-inside: avoid; margin: 4px 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 15px; line-height: 1.4; }
td .hint, td .mono, td.mono { font-size: 15px; line-height: 1.4; word-break: normal; overflow-wrap: normal; }
th {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 620;
}
tbody tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(36, 86, 214, 0.045); }
td a { font-weight: 600; text-decoration: none; }
td form { margin: 0; }
.table-wrap { overflow-x: auto; margin-inline: -6px; padding-inline: 6px; }
@media (min-width: 721px) {
  .table-wrap table { width: max-content; min-width: 100%; }
  .table-wrap th, .table-wrap td { white-space: nowrap; }
  .table-wrap td:nth-child(1) { min-width: 11rem; }
  .table-wrap td:nth-child(2), .table-wrap th:nth-child(2) { min-width: 14rem; }
  .table-wrap td:nth-child(3), .table-wrap th:nth-child(3) { min-width: 12rem; }
  .table-wrap td:nth-child(4), .table-wrap th:nth-child(4) { min-width: 18rem; }
}
.table-scroll {
  max-height: min(64vh, 640px);
  overflow: auto;
  overscroll-behavior: contain;
}
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-solid);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.01em;
  background: #efece4;
  text-transform: capitalize;
}
.pill.active { background: var(--accent-soft); color: var(--accent-ink); }
.pill.suspended, .pill.warning { background: var(--warning-soft); color: var(--warning); }
.pill.deactivated, .pill.inactive, .pill.pending, .pill.critical { background: var(--danger-soft); color: var(--danger); }

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}
.empty::before {
  content: "";
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 252, 247, 0.95) 0 18px, transparent 19px),
    radial-gradient(circle at 50% 50%, rgba(36, 86, 214, 0.18), rgba(184, 137, 61, 0.1) 70%);
  box-shadow: inset 0 0 0 1px rgba(36, 86, 214, 0.16);
  animation: pulse 4.5s ease-in-out infinite;
}
.empty h2 { color: var(--ink); margin: 0 0 6px; font-size: 22px; }
.empty p { margin: 0 auto; max-width: 42ch; }
.empty .button { margin-top: 16px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.app-card {
  padding: 20px;
  display: grid;
  gap: 8px;
  align-content: start;
  text-decoration: none;
  color: inherit;
  min-height: 148px;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.app-card:hover { transform: translateY(-3px); border-color: rgba(36, 86, 214, 0.28); }
.app-card h2 { margin: 0; }
.app-card p { margin: 0; color: var(--muted); }
.app-card span, .app-card > a { font-weight: 650; color: var(--accent-ink); }

.panel ul:not(.codes) {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.panel ul:not(.codes) li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.panel ul:not(.codes) li:last-child { border-bottom: 0; }
.check-list { display: grid; gap: 6px; max-height: 320px; overflow: auto; padding-right: 4px; margin-bottom: 14px; }
.check-list label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 480;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
}
.check-list label:hover { background: rgba(36, 86, 214, 0.06); }

.qr-frame {
  width: min(220px, 100%);
  margin: 14px 0;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.qr-frame svg { display: block; width: 100%; height: auto; }
.gap-top { margin-top: 16px; }
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.pager a, .pager-disabled {
  text-decoration: none;
  font-weight: 620;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.pager-disabled { color: var(--muted); opacity: 0.45; }
.minimal {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.minimal-card { width: min(520px, 100%); padding: 32px 28px; }
.minimal-card h1 { margin: 18px 0 8px; letter-spacing: -0.04em; font-size: 34px; font-weight: 540; }
.minimal-card .brand-lockup { color: var(--ink); }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, -3%, 0) scale(1.08); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.82; }
}

@media (max-width: 1100px) {
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand {
    margin: 12px 12px 0;
    min-height: auto;
    padding: 24px 22px 26px;
    border-radius: 24px;
    gap: 22px;
  }
  .auth-brand h1 { font-size: 34px; }
  .brand-note { display: none; }
  .auth-main { padding: 18px 12px 28px; align-items: start; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 30;
    height: 100dvh;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform 220ms var(--ease);
    box-shadow: 24px 0 60px rgba(10, 18, 48, 0.32);
    padding-top: max(18px, env(safe-area-inset-top));
  }
  .nav-open .sidebar { transform: none; }
  .nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 32, 0.48);
    backdrop-filter: blur(4px);
    z-index: 25;
    border: 0;
    padding: 0;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .nav-toggle { display: inline-flex; }
  .nav-close { display: inline-flex; color: #f7f4ee; }
  .nav-open { overflow: hidden; }
  .content {
    padding: 16px 16px calc(40px + env(safe-area-inset-bottom));
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: -16px -16px 18px;
    padding: 12px 16px;
    background: rgba(235, 228, 216, 0.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(19, 33, 28, 0.06);
  }
}
@media (max-width: 720px) {
  .who-text span { display: none; }
  .who { padding-right: 8px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search { max-width: none; width: 100%; flex: none; }
  .search select, .search input, .search .button, .search button { width: 100%; }
  .toolbar > .button, .toolbar > a.button { width: 100%; }
  .table-wrap { overflow: visible; margin: 0; padding: 0; }
  .table-scroll { overflow: auto; max-height: 70vh; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  tr {
    padding: 6px 0 10px;
    border-bottom: 1px solid var(--line);
  }
  tbody tr:last-child { border-bottom: 0; }
  td {
    position: relative;
    padding: 8px 0 8px 42%;
    border: 0;
    text-align: right;
    background: transparent !important;
  }
  td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 8px;
    width: 38%;
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 650;
  }
  td:not([data-label])::before,
  td[data-label=""]::before { content: none; }
  td:not([data-label]),
  td[data-label=""] { padding-left: 0; }
  td .hint { text-align: right; }
  .codes { columns: 1; }
  .grid-stats { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .auth-card, .minimal-card, .panel { padding: 18px 16px; }
  .auth-card h2 { font-size: 28px; }
  .topbar h1 { font-size: 28px; }
  .who-text strong { max-width: 108px; }
  form > button:not(.button-secondary):not(.button-quiet):not([data-toggle-password]) {
    width: 100%;
  }
  .password-row { flex-direction: column; align-items: stretch; }
  .pager { flex-wrap: wrap; }
  .health-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.confirm-dialog::backdrop {
  background: rgba(8, 14, 32, 0.5);
  backdrop-filter: blur(8px);
}
.confirm-card {
  margin: 0;
  padding: 24px 24px 20px;
  background: var(--surface-solid);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(19, 33, 28, 0.22);
}
.confirm-card h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.04em; }
.confirm-card p { margin: 0 0 20px; color: var(--muted); }
.confirm-card .actions { justify-content: flex-end; }
@media (max-width: 520px) {
  .confirm-card { padding: 20px 16px 16px; }
  .confirm-card .actions { flex-direction: column; }
  .confirm-card .actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
