:root {
  color-scheme: dark;
  --bg: #040605;
  --bg-glow: radial-gradient(70vw 50vw at 12% -10%, rgba(var(--season-rgb, 255, 176, 46), .08), transparent 60%),
             radial-gradient(50vw 40vw at 100% 30%, rgba(255, 75, 62, .04), transparent 62%);
  --panel: #0a0d0c;
  --panel-2: #0d110f;
  --panel-3: #131814;
  --hover: rgba(var(--season-rgb, 255, 176, 46), .06);
  --line: rgba(var(--season-rgb, 255, 176, 46), .13);
  --line-2: rgba(var(--season-rgb, 255, 176, 46), .26);
  --text: #ede8da;
  --text-2: rgba(237, 232, 218, .76);
  --muted: #8d9188;
  --faint: rgba(237, 232, 218, .38);

  --accent: var(--season-accent, #ffb02e);
  --accent-hot: var(--season-hot, #ffc861);
  --accent-ink: #050505;
  --accent-soft: rgba(var(--season-rgb, 255, 176, 46), .1);
  --accent-line: rgba(var(--season-rgb, 255, 176, 46), .45);
  --info: #5fd3ff;
  --info-soft: rgba(95, 211, 255, .1);
  --warn: var(--season-hot, #ffc861);
  --warn-soft: rgba(var(--season-hot-rgb, 255, 200, 97), .1);
  --danger: #ff4b3e;
  --danger-soft: rgba(255, 75, 62, .1);
  --ok: #45ff9f;
  --ok-soft: rgba(69, 255, 159, .1);

  --font: 'IBM Plex Sans', system-ui, 'Segoe UI', sans-serif;
  --font-display: 'Chakra Petch', 'IBM Plex Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --r-sm: 2px;
  --r: 2px;
  --r-lg: 3px;
  --shadow: none;
  --bracket: 12px;
  --sidebar: 256px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.console {
  background: var(--bg-glow), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 400 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.hidden, [hidden] { display: none !important; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px; border-right: 1px solid var(--line); background: rgba(10, 11, 13, .7);
  backdrop-filter: blur(12px); overflow-y: auto; z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; text-decoration: none; }
.sidebar-brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line-2); }
.sidebar-brand strong { display: block; font: 600 15px/1.1 var(--font-display); letter-spacing: -.01em; }
.sidebar-brand small { display: block; color: var(--muted); font-size: 11.5px; }

.nav-group { display: grid; gap: 2px; margin-bottom: 12px; }
.nav-label { padding: 8px 10px 4px; color: var(--faint); font: 600 10.5px var(--font); letter-spacing: .09em; text-transform: uppercase; }
.nav-link {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 0 10px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2);
  font: 500 13.5px var(--font); text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav-link svg { flex: none; width: 17px; height: 17px; opacity: .8; }
.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav-link.active svg { color: var(--accent); opacity: 1; }
.nav-link .nav-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 700 11px var(--font); text-align: center; }
.nav-link.locked { color: var(--faint); cursor: not-allowed; }
.nav-link.locked:hover { background: transparent; color: var(--faint); }
.nav-link.locked .nav-lock { margin-left: auto; width: 13px; height: 13px; }

.sidebar-footer { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.user-chip-text { min-width: 0; }
.user-chip-text strong { display: block; overflow: hidden; font-weight: 600; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-text small { display: block; overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden;
  border-radius: 50%; background: var(--panel-3); color: var(--text-2); font: 600 12.5px var(--font);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 16px; height: 16px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.role { border-radius: 10px; color: var(--info); background: var(--info-soft); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: 60px;
  padding: 0 32px; border-bottom: 1px solid var(--line); background: rgba(10, 11, 13, .78); backdrop-filter: blur(12px);
}
.topbar .crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.topbar .crumbs b { color: var(--text); font-weight: 600; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .menu-button { display: none; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

.content { width: min(100%, 1200px); margin: 0 auto; padding: 32px 32px 64px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-header h1 { margin: 0; font: 600 28px/1.15 var(--font-display); letter-spacing: -.02em; }
.page-header p { margin: 6px 0 0; color: var(--muted); max-width: 620px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.view { animation: view-in .25s var(--ease); }
.live-refresh .view { animation: none; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--panel-2); color: var(--text);
  font: 600 13px var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), opacity .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--panel-3); border-color: rgba(255, 255, 255, .18); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #d6fa8f; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { border-color: rgba(255, 125, 112, .3); background: var(--danger-soft); color: var(--danger); }
.btn.danger:hover { background: rgba(255, 125, 112, .2); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn.icon { width: 34px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }
.btn.discord { background: #5865f2; border-color: transparent; color: #fff; }
.btn.discord:hover { background: #6b77f5; }
.btn .spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.card { border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; font: 600 15px var(--font); }
.card-header p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.card-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.sidebar-right { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack { display: grid; gap: 16px; }
.grid > *, .stack > * { min-width: 0; }

.stat {
  position: relative; display: grid; gap: 6px; padding: 18px 18px 16px; border-radius: var(--r-lg);
  background: var(--panel); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); text-decoration: none;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
a.stat:hover, button.stat:hover { box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); transform: translateY(-1px); }
button.stat { border: 0; text-align: left; cursor: pointer; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--panel-3); color: var(--text-2); }
.stat-icon svg { width: 16px; height: 16px; }
.stat-icon.accent { background: var(--accent-soft); color: var(--accent); }
.stat-icon.info { background: var(--info-soft); color: var(--info); }
.stat-icon.warn { background: var(--warn-soft); color: var(--warn); }
.stat-icon.danger { background: var(--danger-soft); color: var(--danger); }
.stat-value { font: 600 28px/1.1 var(--font-display); letter-spacing: -.02em; }
.stat-sub { color: var(--muted); font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px;
  background: var(--panel-3); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 11.5px var(--font); white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge.accent { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.badge.info { background: var(--info-soft); color: var(--info); box-shadow: none; }
.badge.warn { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.badge.danger { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted);
  font: 600 11.5px var(--font); letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.table tbody tr.clickable { cursor: pointer; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .cell-actions .btn + .btn { margin-left: 6px; }
.identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.identity-text { min-width: 0; }
.identity-text strong { display: block; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.identity-text small { display: block; color: var(--muted); font-size: 12px; }

.field { display: grid; gap: 7px; }
.field > span, .field-label { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.field small, .field-hint { color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; min-height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text); font-size: 13.5px; outline: 0;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.textarea { min-height: 120px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237e848b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; top: 50%; left: 11px; width: 16px; height: 16px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.input-icon .input { padding-left: 36px; }
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.segmented button {
  min-height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted);
  font: 600 12.5px var(--font); cursor: pointer; transition: background-color .15s, color .15s;
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3), inset 0 0 0 1px var(--line-2); }
.segmented button .count { margin-left: 6px; color: var(--muted); font-weight: 500; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input-icon { width: min(320px, 100%); }

.switch { position: relative; display: inline-flex; flex: none; width: 40px; height: 23px; border: 0; padding: 0; border-radius: 99px; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background-color .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--text-2); transition: transform .2s var(--ease), background-color .2s; }
.switch[aria-checked="true"] { background: var(--accent); box-shadow: none; }
.switch[aria-checked="true"]::after { transform: translateX(17px); background: var(--accent-ink); }

.choice-list { display: grid; gap: 8px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice {
  display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--panel-2); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.choice:hover { border-color: rgba(255, 255, 255, .2); }
.choice input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.choice b { display: block; font-size: 13px; font-weight: 600; }
.choice small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.choice:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.choice.disabled { opacity: .5; cursor: not-allowed; }

.option-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.option-tile {
  display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel-2);
  color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s, transform .1s;
}
.option-tile:hover { border-color: rgba(255, 255, 255, .22); }
.option-tile.selected { border-color: var(--accent); background: var(--accent-soft); }
.option-tile svg { width: 20px; height: 20px; color: var(--accent); }
.option-tile b { font-size: 14px; }
.option-tile small { color: var(--muted); font-size: 12px; }

.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item-main { flex: 1; min-width: 0; }
.list-item-main strong { display: block; font-weight: 600; }
.list-item-main small, .list-item-meta { color: var(--muted); font-size: 12.5px; }

.timeline { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--panel-3); color: var(--text-2); }
.timeline-icon svg { width: 16px; height: 16px; }
.timeline-icon.create { background: var(--ok-soft); color: var(--ok); }
.timeline-icon.delete { background: var(--danger-soft); color: var(--danger); }
.timeline-icon.update { background: var(--info-soft); color: var(--info); }
.timeline-body strong { font-weight: 600; overflow-wrap: anywhere; }
.timeline-body p { margin: 3px 0 0; color: var(--text-2); font-size: 12.5px; overflow-wrap: anywhere; }
.timeline-time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; color: var(--muted); text-align: center; }
.empty svg { width: 28px; height: 28px; color: var(--faint); }
.empty strong { color: var(--text-2); font-weight: 600; }

.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.callout { display: flex; gap: 12px; padding: 13px 15px; border-radius: var(--r); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-size: 13px; }
.callout svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.callout.warn { background: var(--warn-soft); box-shadow: inset 0 0 0 1px rgba(242, 198, 107, .25); }
.callout.warn svg { color: var(--warn); }
.callout.info svg { color: var(--info); }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: var(--r); background: var(--line); }
.kv > div { padding: 12px 14px; background: var(--panel-2); min-width: 0; }
.kv > div.span-2 { grid-column: 1 / -1; }
.kv dt, .kv b { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.kv dd, .kv p { margin: 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }

.chip-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.section-title { margin: 0 0 10px; color: var(--muted); font: 600 11.5px var(--font); letter-spacing: .06em; text-transform: uppercase; }

.modal {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; overflow: hidden;
  border: 0; border-radius: var(--r-lg); background: var(--panel); color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line-2);
}
.modal.wide { width: min(820px, calc(100vw - 32px)); }
.modal[open] { display: flex; flex-direction: column; animation: modal-in .2s var(--ease); }
.modal::backdrop { background: rgba(4, 5, 6, .7); backdrop-filter: blur(3px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font: 600 18px/1.3 var(--font-display); letter-spacing: -.01em; }
.modal-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--panel-2); }
.modal-footer .spacer { flex: 1; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; width: min(360px, calc(100vw - 40px)); }
.toasts[popover] { inset: auto 20px 20px auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; color: inherit; }
.toasts[popover]:not(:popover-open) { display: none; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--panel-3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line-2); font-size: 13px; animation: toast-in .25s var(--ease);
}
.toast svg { flex: none; width: 17px; height: 17px; margin-top: 1px; }
.toast.success svg { color: var(--ok); }
.toast.error svg { color: var(--danger); }
.toast.info svg { color: var(--info); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.signin { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; }
.signin-card { width: min(420px, 100%); padding: 34px 30px 28px; border-radius: 20px; background: var(--panel); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); text-align: center; }
.signin-card img { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line-2), 0 10px 30px rgba(200, 244, 114, .12); }
.signin-card h1 { margin: 0; font: 600 24px var(--font-display); letter-spacing: -.02em; }
.signin-card p { margin: 8px 0 24px; color: var(--muted); }
.signin-card .btn { width: 100%; }
.signin-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; color: var(--faint); font-size: 12px; }
.signin-foot svg { width: 13px; height: 13px; }
.signin-card .signin-error { margin: 14px 0 0; color: var(--danger); font-size: 13px; }
.signin-back { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 13px; text-decoration: none; }
.signin-back:hover { color: var(--text); }

.welcome { display: flex; align-items: center; gap: 16px; }
.perm-category + .perm-category { margin-top: 16px; }
.perm-category-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.group-card .card-body { display: grid; gap: 12px; }
.group-card .card-header strong { font-size: 15px; }

.shift-clock { font: 600 40px/1 var(--font-mono); letter-spacing: -.03em; }
.shift-status { display: flex; align-items: center; gap: 10px; }
.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.pulse.active { background: var(--ok); }
.pulse.active::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; animation: ping 1.8s infinite; }
.pulse.break { background: var(--warn); }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-stat { padding: 10px 12px; border-radius: var(--r-sm); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.mini-stat span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.mini-stat strong { display: block; margin-top: 2px; font: 600 14px var(--font-mono); }

.search-box { position: relative; }
.suggestions { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; display: none; padding: 6px; border-radius: var(--r); background: var(--panel-3); box-shadow: 0 18px 40px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line-2); }
.suggestions.show { display: grid; gap: 2px; }
.suggestion { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; }
.suggestion:hover, .suggestion.active { background: var(--hover); }
.suggestion strong { font-weight: 600; }

.stepper { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.stepper i { flex: 1; height: 4px; border-radius: 99px; background: var(--panel-3); }
.stepper i.done { background: var(--accent); }
.step-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.step-title h3 { margin: 0; font: 600 16px var(--font); }
.step-title span { color: var(--muted); font-size: 12px; }
.upload-zone { display: grid; place-items: center; gap: 6px; padding: 24px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--panel-2); color: var(--muted); text-align: center; cursor: pointer; }
.upload-zone:hover { border-color: var(--accent-line); color: var(--text-2); }
.upload-zone svg { width: 22px; height: 22px; }
.progress { height: 6px; overflow: hidden; border-radius: 99px; background: var(--panel-3); }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.file-list { display: grid; gap: 6px; }
.file-list div { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--panel-2); font-size: 12.5px; }

.markdown-preview { min-height: 120px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.markdown-preview blockquote { margin: 0; padding-left: 10px; border-left: 3px solid var(--line-2); }
.markdown-preview code { padding: 1px 5px; border-radius: 4px; background: var(--panel-3); font-family: var(--font-mono); font-size: 12px; }
.format-bar { display: flex; flex-wrap: wrap; gap: 4px; }
.format-bar button { min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--text-2); font-size: 12px; cursor: pointer; }
.format-bar button:hover { color: var(--text); border-color: var(--line-2); }

.intake { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.intake + .intake { border-top: 1px solid var(--line); }
.intake-text { flex: 1; min-width: 0; }
.intake-text strong { display: block; font-weight: 600; }
.intake-text small { color: var(--muted); font-size: 12.5px; }

.scrim { display: none; }
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.sidebar-right { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); transform: translateX(-102%); transition: transform .25s var(--ease); background: var(--panel); }
  body.nav-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .6); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); }
  .topbar .menu-button { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 22px 16px 56px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-header h1 { font-size: 23px; }
  .form-row, .choice-grid, .kv { grid-template-columns: minmax(0, 1fr); }
  .stat-value { font-size: 23px; }
  .topbar .status-dot { display: none; }
  .table.stack-mobile thead { display: none; }
  .table.stack-mobile, .table.stack-mobile tbody, .table.stack-mobile tr, .table.stack-mobile td { display: block; width: 100%; }
  .table.stack-mobile tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.stack-mobile td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .table.stack-mobile td::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; text-align: left; }
  .table.stack-mobile td.cell-main { display: block; text-align: left; padding-bottom: 8px; }
  .table.stack-mobile td.cell-main::before { display: none; }
  .table.stack-mobile td.cell-actions { justify-content: flex-end; padding-top: 10px; }
  .table.stack-mobile td.cell-actions::before { display: none; }
  .timeline-item { grid-template-columns: 34px minmax(0, 1fr); }
  .timeline-time { grid-column: 2; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer .btn { flex: 1; }
  .modal-footer .spacer { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

html { scrollbar-color: rgba(var(--season-rgb, 255, 176, 46), .35) transparent; }
::selection { background: var(--accent); color: #000; }
body.console { position: relative; caret-color: var(--accent); }
body.console::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(var(--season-rgb, 255, 176, 46), .3) 0 1.5px, transparent 2px),
    linear-gradient(rgba(var(--season-rgb, 255, 176, 46), .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--season-rgb, 255, 176, 46), .05) 1px, transparent 1px),
    linear-gradient(rgba(var(--season-rgb, 255, 176, 46), .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--season-rgb, 255, 176, 46), .018) 1px, transparent 1px);
  background-size: 384px 384px, 384px 384px, 384px 384px, 96px 96px, 96px 96px;
  background-position: -192px -192px, 0 0, 0 0, 0 0, 0 0;
  -webkit-mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 25%, rgba(0, 0, 0, .35) 60%, transparent 95%);
  mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 25%, rgba(0, 0, 0, .35) 60%, transparent 95%);
}
.shell, .signin { position: relative; z-index: 1; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 4px rgba(var(--season-rgb, 255, 176, 46), .15); }

.page-header h1, .modal-header h2, .signin-card h1, .stat-value, .welcome h1 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em;
}
.page-header h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1; }
.page-header h1 em, .signin-card h1 em, .welcome h1 em { color: var(--accent); font-style: normal; text-shadow: 0 0 22px rgba(var(--season-rgb, 255, 176, 46), .35); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 5px 10px;
  border-left: 2px solid var(--accent); background: rgba(var(--season-rgb, 255, 176, 46), .06); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2); font: 500 10.5px var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow > span:first-child { color: var(--accent); }
.eyebrow > span:first-child::before { content: '#'; opacity: .6; }
.nav-label, .section-title, .table th, .kv dt, .kv b, .stat-top, .mini-stat span, .field > span, .field-label,
.card-header p, .step-title span, .timeline-time, .stat-sub, .badge, .segmented button, .btn, .nav-link,
.topbar .crumbs, .status-dot, .user-chip-text small, .signin-foot {
  font-family: var(--font-mono); letter-spacing: .06em;
}
.nav-label, .section-title, .table th, .kv dt, .stat-top, .mini-stat span, .field > span, .field-label, .badge, .segmented button, .btn, .topbar .crumbs { text-transform: uppercase; }
.field > span, .field-label { font-size: 11px; letter-spacing: .1em; }
.stat-top > span:first-child::before, .section-title::before { content: '> '; color: var(--accent); }
.card-header h2, .card-header h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.card-header p { font-size: 11px; }

.sidebar { background: rgba(4, 6, 5, .88); border-right-color: var(--line); }
.sidebar-brand strong { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sidebar-brand strong span { color: var(--accent); }
.sidebar-brand small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-brand img { border-radius: 0; box-shadow: 0 0 0 1px var(--line-2), 0 0 18px rgba(var(--season-rgb, 255, 176, 46), .2); }
.nav-link { font-size: 12px; text-transform: uppercase; }
.nav-link.active { background: rgba(var(--season-rgb, 255, 176, 46), .08); color: var(--accent); box-shadow: inset 2px 0 0 var(--accent), inset 0 0 0 1px var(--line); }
.nav-link.active svg { color: var(--accent); }
.nav-link .nav-count { border-radius: 0; font-family: var(--font-mono); }
.topbar { background: rgba(4, 6, 5, .85); border-bottom-color: var(--line); }
.topbar .crumbs { font-size: 11px; }
.topbar .crumbs b { color: var(--accent); }
.status-dot { font-size: 11px; color: var(--ok); text-transform: uppercase; }
.status-dot::before { border-radius: 0; animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.user-chip { border-radius: 0; background: var(--panel-2); }
.avatar { border-radius: 0; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--accent); font-family: var(--font-mono); }

.card, .stat, .modal, .signin-card { position: relative; border-radius: var(--r-lg); background: rgba(7, 10, 9, .92); box-shadow: inset 0 0 0 1px var(--line); }
.modal { background: #070a09; }
.card::before, .stat::before, .modal::before, .signin-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; --b: var(--accent);
  background:
    linear-gradient(var(--b), var(--b)) top left / var(--bracket) 1px,
    linear-gradient(var(--b), var(--b)) top left / 1px var(--bracket),
    linear-gradient(var(--b), var(--b)) top right / var(--bracket) 1px,
    linear-gradient(var(--b), var(--b)) top right / 1px var(--bracket),
    linear-gradient(var(--b), var(--b)) bottom left / var(--bracket) 1px,
    linear-gradient(var(--b), var(--b)) bottom left / 1px var(--bracket),
    linear-gradient(var(--b), var(--b)) bottom right / var(--bracket) 1px,
    linear-gradient(var(--b), var(--b)) bottom right / 1px var(--bracket);
  background-repeat: no-repeat; opacity: .75; transition: opacity .2s;
}
a.stat:hover, button.stat:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2); }
a.stat:hover::before, button.stat:hover::before { --bracket: 22px; opacity: 1; }
.card-header, .card-footer, .modal-header, .modal-footer, .table th, .table td, .list-item, .timeline-item, .intake + .intake { border-color: var(--line); }
.modal-footer { background: rgba(var(--season-rgb, 255, 176, 46), .03); }
.stat-value { color: var(--accent); font-size: 32px; text-shadow: 0 0 18px rgba(var(--season-rgb, 255, 176, 46), .25); }
.stat-icon, .timeline-icon { border-radius: 0; }

.btn {
  border: 0; border-radius: 0; background: transparent; color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46), .4); font-size: 11.5px; font-weight: 500; letter-spacing: .08em;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.btn:hover { background: rgba(var(--season-rgb, 255, 176, 46), .1); box-shadow: inset 0 0 0 1px var(--accent); }
.btn.primary { background: var(--accent); color: #050505; box-shadow: none; font-weight: 600; }
.btn.primary:hover { background: var(--accent-hot); }
.btn.ghost { box-shadow: none; color: var(--text-2); clip-path: none; }
.btn.ghost:hover { color: var(--accent); background: rgba(var(--season-rgb, 255, 176, 46), .06); }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 75, 62, .45); }
.btn.danger:hover { background: rgba(255, 75, 62, .12); box-shadow: inset 0 0 0 1px var(--danger); }
.btn.icon { clip-path: none; }
.btn.discord { background: #5865f2; color: #fff; box-shadow: none; }
.btn.discord:hover { background: #6b77f5; }

.badge { border-radius: 0; height: 21px; font-size: 10px; font-weight: 500; letter-spacing: .1em; background: rgba(237, 232, 218, .04); box-shadow: inset 0 0 0 1px rgba(237, 232, 218, .14); }
.badge.accent { box-shadow: inset 0 0 0 1px var(--accent-line); }
.badge.info { box-shadow: inset 0 0 0 1px rgba(95, 211, 255, .35); }
.badge.warn { box-shadow: inset 0 0 0 1px rgba(var(--season-hot-rgb, 255, 200, 97), .35); }
.badge.danger { box-shadow: inset 0 0 0 1px rgba(255, 75, 62, .4); }
.badge.ok { box-shadow: inset 0 0 0 1px rgba(69, 255, 159, .35); }
.badge.dot::before { border-radius: 0; }
.input, .select, .textarea { border-radius: 0; border-color: rgba(var(--season-rgb, 255, 176, 46), .2); background: rgba(0, 0, 0, .45); font-family: var(--font); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--season-rgb, 255, 176, 46), .12); }
.segmented { border-radius: 0; background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px var(--line); }
.segmented button { border-radius: 0; font-size: 10.5px; }
.segmented button.active { background: var(--accent); color: #050505; box-shadow: none; }
.segmented button.active .count { color: rgba(0, 0, 0, .6); }
.switch, .switch::after { border-radius: 0; }
.choice, .option-tile, .mini-stat, .callout, .kv, .file-list div, .upload-zone, .markdown-preview, .suggestions, .suggestion, .format-bar button, .toast, .progress, .stepper i, .skeleton { border-radius: 0; }
.choice:has(input:checked), .option-tile.selected { border-color: var(--accent); background: rgba(var(--season-rgb, 255, 176, 46), .08); box-shadow: 0 0 18px -6px rgba(var(--season-rgb, 255, 176, 46), .45); }
.kv { background: var(--line); }
.kv > div { background: #080b0a; }
.table tbody tr:hover { background: rgba(var(--season-rgb, 255, 176, 46), .04); }
.callout { background: rgba(var(--season-rgb, 255, 176, 46), .05); box-shadow: inset 2px 0 0 var(--accent), inset 0 0 0 1px var(--line); }
.callout svg, .callout.info svg { color: var(--accent); }
.shift-clock { color: var(--accent); font-weight: 700; text-shadow: 0 0 22px rgba(var(--season-rgb, 255, 176, 46), .35); }
.pulse, .pulse.active::after { border-radius: 0; }
.toast { background: #0b0f0d; box-shadow: 0 16px 40px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line-2); }
.modal::backdrop { background: rgba(2, 3, 3, .78); }
.signin-card img { border-radius: 0; box-shadow: 0 0 0 1px var(--line-2), 0 0 30px rgba(var(--season-rgb, 255, 176, 46), .2); }
.empty svg { color: rgba(var(--season-rgb, 255, 176, 46), .4); }
.welcome h1 { font-size: clamp(26px, 3.4vw, 38px); }

.offence-list { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.offence-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .35); color: var(--text); text-align: left; cursor: pointer;
}
.offence-row:hover { border-color: var(--accent-line); background: rgba(var(--season-rgb, 255, 176, 46), .05); }
.offence-row b { font-weight: 600; }
.offence-row small { grid-column: 1; color: var(--muted); font-size: 12px; }
.offence-row .badge { grid-column: 2; grid-row: 1 / span 2; }
.guideline-ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.guideline-ladder i { color: var(--faint); font-style: normal; }
.guideline-step {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .35); color: var(--text-2); font: 500 12px var(--font-mono); cursor: pointer;
}
.guideline-step span { display: grid; place-items: center; width: 18px; height: 18px; background: var(--panel-3); color: var(--muted); font-size: 10px; }
.guideline-step:hover { border-color: var(--accent); color: var(--text); }
.guideline-step.done { opacity: .55; }
.guideline-step.next { border-color: var(--accent); background: rgba(var(--season-rgb, 255, 176, 46), .12); color: var(--accent); box-shadow: 0 0 18px -6px rgba(var(--season-rgb, 255, 176, 46), .5); }
.guideline-step.next span { background: var(--accent); color: #050505; }
.guideline-step.manual { border-style: dashed; }

.match-list { display: grid; gap: 8px; }
.match-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .35); }
.match-card.selected { border-color: var(--accent); background: rgba(var(--season-rgb, 255, 176, 46), .07); }
.match-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.match-text strong { font-weight: 600; }
.match-text small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.evidence-tile { display: grid; gap: 6px; padding: 6px; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); color: var(--text-2); text-decoration: none; font-size: 11.5px; }
.evidence-tile img, .evidence-tile video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #000; }
.evidence-tile.video video { object-fit: contain; }
.evidence-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
a.evidence-tile:hover { border-color: var(--accent); }
.evidence-tile.broken img { display: none; }
.evidence-tile.broken::before { content: 'Preview unavailable · open'; display: grid; place-items: center; aspect-ratio: 16 / 10; color: var(--muted); font-family: var(--font-mono); }
@media (max-width: 640px) { .match-card { flex-wrap: wrap; } .match-card .btn { width: 100%; } }

.sync-bars { display: flex; align-items: flex-end; gap: 3px; height: 72px; }
.sync-bars i { flex: 1; min-width: 2px; background: rgba(var(--season-rgb, 255, 176, 46), .12); transition: height .4s ease; }
.sync-bars i.on { background: var(--accent); box-shadow: 0 0 8px rgba(var(--season-rgb, 255, 176, 46), .35); }

.note-text { margin: 6px 0 0; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.note-item.watched { box-shadow: inset 2px 0 0 var(--warn); }
.note-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-2) !important; }
.note-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }

.reason-history { display: grid; gap: 8px; max-height: 180px; overflow-y: auto; padding: 10px 12px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r); }
.change-history { display: grid; gap: 0; max-height: 320px; overflow-y: auto; border-left: 2px solid var(--line); margin-left: 6px; }
.change-entry { position: relative; display: grid; gap: 6px; padding: 4px 0 14px 18px; }
.change-entry::before { content: ""; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); box-shadow: inset 0 0 0 2px var(--text-3, var(--line)); }
.change-entry[data-kind="revert"]::before, .change-entry[data-kind="pardon"]::before { box-shadow: inset 0 0 0 2px var(--warn, #e0a33a); }
.change-entry[data-kind="created"]::before { box-shadow: inset 0 0 0 2px var(--ok, #4caf7a); }
.change-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.change-head .btn { margin-left: auto; }
.change-diff { display: grid; gap: 4px; font-size: 13px; }
.change-diff.inline { grid-template-columns: auto auto auto; justify-content: start; align-items: center; gap: 8px; }
.change-diff span { color: var(--text-3, var(--text-2)); font-size: 12px; }
.change-diff del, .change-diff ins { text-decoration: none; padding: 4px 8px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.change-diff del { background: color-mix(in srgb, #e5484d 12%, transparent); color: var(--text-2); }
.change-diff ins { background: color-mix(in srgb, #30a46c 14%, transparent); color: var(--text); }
.reason-history p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

.form-row { gap: 10px; }
.form-row .intake-text small b { color: var(--warn); font-weight: 600; }
.form-editor .section-title { margin-bottom: 10px; }
.q-list { display: grid; gap: 12px; }
.q-card { display: grid; gap: 12px; padding: 14px 16px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--accent); border-radius: var(--r); }
.q-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.q-head .select { max-width: 260px; }
.q-number { display: grid; place-items: center; min-width: 28px; height: 28px; background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono, monospace); font-size: 12px; font-weight: 700; }
.q-add { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.q-add .select { max-width: 280px; }
.choice.compact { padding: 6px 0; background: none; box-shadow: none; }
.role-picker { display: grid; gap: 12px; }
.role-server .section-title { margin: 4px 0 6px; }
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px; max-height: 220px; overflow-y: auto; padding: 6px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r); }
.role-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 13px; cursor: pointer; min-width: 0; }
.role-row:hover { background: rgba(var(--season-rgb, 255, 176, 46), .06); }
.role-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-row small { margin-left: auto; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.role-row.locked span { color: var(--muted); }
.role-row[hidden] { display: none; }
.role-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.answer-list { display: grid; gap: 10px; }
.answer { padding: 12px 14px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r); }
.answer-question { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.answer-value { margin: 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }

.inline-field { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.inline-field > span { color: var(--muted); font-size: 12px; }
.inline-field .input { width: auto; }
.tx-hits { display: grid; gap: 4px; margin-top: 8px; min-width: min(340px, 70vw); max-width: 640px; }
.tx-hits p { margin: 0; padding: 6px 10px; background: rgba(255,255,255,.03); border-left: 2px solid var(--accent); color: var(--muted); font-size: 12.5px; line-height: 1.5; white-space: normal; }
.tx-hits b { color: var(--text, #e8e9e3); font-weight: 600; margin-right: 4px; }
.tx-hits mark { background: rgba(var(--season-rgb, 255, 176, 46),.25); color: inherit; padding: 0 2px; border-radius: 2px; }

.quick-search { margin-right: 12px; }
.quick-search .input { width: 220px; height: 34px; }
.search-list { display: grid; }
.search-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.05); color: inherit; text-decoration: none; }
.search-row:first-child { border-top: 0; }
a.search-row[href]:hover { background: rgba(var(--season-rgb, 255, 176, 46),.05); }
.search-row .identity-text { min-width: 0; }
.search-row .identity-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 620px; }
.search-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--muted); }
.search-accounts { display: grid; gap: 10px; }
.search-account { display: flex; align-items: center; gap: 14px; padding: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.search-account.primary { box-shadow: inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46),.45); background: rgba(var(--season-rgb, 255, 176, 46),.04); }
.search-account .identity-text { flex: 1; min-width: 0; }
.search-account .identity-text small { display: block; }
@media (max-width: 760px) { .quick-search { display: none; } .search-row { flex-direction: column; align-items: flex-start; } .search-account { flex-wrap: wrap; } }
.card-header h2 > svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -2px; color: var(--accent); }
#globalSearch { width: min(560px, 100%); }
.card-header .input-icon:has(#globalSearch) { flex: 1; }

.rank-pill { --rank: #8d9188; display: inline-block; padding: 2px 9px; border-radius: 4px; background: color-mix(in srgb, var(--rank) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rank) 45%, transparent); color: var(--rank); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.staff-tile { display: flex; align-items: center; gap: 12px; padding: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); color: inherit; text-decoration: none; transition: background .15s, box-shadow .15s; }
.staff-tile .identity-text { flex: 1; min-width: 0; }
.staff-tile .identity-text small { display: block; }
.staff-tile .identity-text .staff-departments { color: var(--accent); line-height: 1.35; }
.staff-tile .identity-text .staff-departments svg { vertical-align: -2px; }
.staff-tile > svg { width: 16px; height: 16px; color: var(--muted); }
a.staff-tile:hover { background: rgba(var(--season-rgb, 255, 176, 46),.05); box-shadow: inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46),.4); }
.staff-tile.locked { opacity: .55; cursor: not-allowed; }
.staff-locked svg { width: 15px; height: 15px; color: var(--muted); }
.staff-hero .card-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.staff-hero .identity-text { flex: 1; min-width: 220px; }
.staff-hero h1 { margin: 0 0 4px; font-size: 26px; }
.staff-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.staff-note { padding: 10px 12px; border-left: 2px solid var(--accent); background: rgba(255,255,255,.03); }
.staff-note p { margin: 0 0 4px; }
.staff-hero .avatar.lg { width: 72px; height: 72px; font-size: 22px; }

.preset-bar { display: grid; gap: 10px; margin-bottom: 16px; padding: 12px; background: rgba(var(--season-rgb, 255, 176, 46),.04); box-shadow: inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46),.18); }
.preset-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.preset-group > span { min-width: 104px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.preset-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.preset-chip small { color: var(--accent); font-size: 11px; }
button.preset-chip:hover, .preset-chip.saved:hover { box-shadow: inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46),.5); }
.preset-chip.saved { padding: 0; cursor: default; }
.preset-chip.saved > button { padding: 6px 10px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.preset-chip .preset-remove { padding: 6px 8px 6px 0; color: var(--muted); }
.preset-chip .preset-remove svg { width: 12px; height: 12px; }
.preset-chip .preset-remove:hover { color: var(--danger, #ff7d70); }
.preset-save { margin-top: 16px; }
.preset-save .toolbar { display: flex; gap: 8px; }
.preset-save .input { flex: 1; }
.callout.ok { box-shadow: inset 2px 0 0 var(--ok, #8fbb3c), inset 0 0 0 1px var(--line); }
.callout.ok svg { color: var(--ok, #8fbb3c); }
.callout .btn.sm { margin-left: 8px; vertical-align: middle; }

.access-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.access-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r, 6px); }
.access-chip .identity-text { flex: 1; min-width: 0; }
.access-chip .identity-text small { display: block; }
.blacklist-add { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(200px, 2fr) auto; gap: 8px; margin: 14px 0; }
@media (max-width: 760px) { .blacklist-add { grid-template-columns: 1fr; } }
.choice.locked { opacity: .7; cursor: not-allowed; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.app-card { display: flex; flex-direction: column; padding: 0; transition: box-shadow .15s, transform .15s; }
.app-card:hover { box-shadow: inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46),.45); }
.app-card.is-open { box-shadow: inset 3px 0 0 var(--ok, #8fbb3c), inset 0 0 0 1px var(--line); }
.app-card.is-open:hover { box-shadow: inset 3px 0 0 var(--ok, #8fbb3c), inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46),.45); }
.app-card-main { display: block; flex: 1; padding: 18px 18px 12px; color: inherit; text-decoration: none; }
.app-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.app-card-head h3 { margin: 0; font-size: 17px; }
.app-card-main p { display: -webkit-box; margin: 8px 0 14px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.app-card-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12px; }
.app-card-stats b { color: var(--text, #e8e9e3); }
.app-card-actions { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.app-detail-head .card-body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.app-detail-title { min-width: 0; max-width: 640px; }
.app-detail-title h1 { margin: 6px 0 6px; font-size: clamp(26px, 4vw, 38px); }
.app-detail-title p.muted { margin: 0; }
.app-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.open-switch { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r, 6px); font-weight: 600; font-size: 13px; }
.app-detail-tabs { margin-top: 16px; }

.q-card.q-section { background: rgba(var(--season-rgb, 255, 176, 46),.05); box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--line); }
.q-card.q-section .q-number svg { width: 14px; height: 14px; }
.q-section-label { color: var(--accent); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

.schedule-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.schedule-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(var(--season-rgb, 255, 176, 46),.08); box-shadow: inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46),.3); color: var(--text, #e8e9e3); font-size: 12px; }
.schedule-chips svg { width: 13px; height: 13px; color: var(--accent); }

.maintenance-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }


.lockdown-body { overflow: hidden; background: #050304; }
.lockdown { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 70px 16px; overflow-y: auto; background: radial-gradient(ellipse at center, rgba(120,10,16,.35), rgba(5,3,4,.96) 70%); animation: ld-flash .9s ease-out both, ld-shake .5s 1.05s cubic-bezier(.36,.07,.19,.97) both; }
.lockdown-grid { position: fixed; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,60,60,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,60,60,.06) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%); animation: ld-grid 14s linear infinite; }
.lockdown-scan { position: fixed; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px); }
.lockdown-scan::after { content: ""; position: absolute; left: 0; right: 0; height: 160px; background: linear-gradient(180deg, transparent, rgba(255,70,70,.10), transparent); animation: ld-sweep 3.2s linear infinite; }
.lockdown-card { position: relative; z-index: 3; width: min(560px, 100%); padding: 34px 30px 28px; background: linear-gradient(180deg, rgba(28,8,10,.94), rgba(10,6,7,.96)); box-shadow: inset 0 0 0 1px rgba(255,90,90,.45), 0 0 0 1px rgba(0,0,0,.6), 0 30px 90px rgba(255,30,30,.18); text-align: center; animation: ld-card-in .7s .55s cubic-bezier(.16,1.3,.3,1) both; }
.lockdown-card::before, .lockdown-card::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid #ff4d4d; }
.lockdown-card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.lockdown-card::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.lockdown-lock { position: relative; display: grid; place-items: center; width: 78px; height: 78px; margin: -70px auto 16px; border-radius: 50%; background: radial-gradient(circle, #3a0b0f, #12060a); box-shadow: inset 0 0 0 2px #ff4d4d, 0 0 40px rgba(255,60,60,.55); color: #ff6b6b; animation: ld-lock-drop .75s .8s cubic-bezier(.3,1.6,.5,1) both; }
.lockdown-lock svg { width: 36px; height: 36px; animation: ld-lock-jolt 2.6s 1.6s ease-in-out infinite; }
.lockdown-lock i { position: absolute; inset: -6px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,77,77,.6); animation: ld-ring 2s 1.4s ease-out infinite; }
.lockdown-lock i + i { animation-delay: 2.4s; }
.lockdown-code { margin: 0 0 10px; color: rgba(255,140,140,.75); font: 600 11px var(--font-mono, monospace); letter-spacing: .18em; animation: ld-fade-up .5s 1.15s both; }
.lockdown-code span { color: #ff4d4d; }
.lockdown-title { position: relative; margin: 0 0 12px; color: #fff; font-size: clamp(32px, 7vw, 54px); letter-spacing: .02em; text-shadow: 0 0 22px rgba(255,60,60,.55); animation: ld-title-in .55s 1.25s cubic-bezier(.2,1.5,.4,1) both; }
.lockdown-title::before, .lockdown-title::after { content: attr(data-text); position: absolute; inset: 0; overflow: hidden; opacity: 0; }
.lockdown-title::before { color: #ff2e4d; clip-path: inset(0 0 55% 0); animation: ld-glitch-a 2.8s 1.9s steps(2) infinite; mix-blend-mode: screen; }
.lockdown-title::after { color: #39d7ff; clip-path: inset(55% 0 0 0); animation: ld-glitch-b 2.3s 1.9s steps(2) infinite; mix-blend-mode: screen; }
.lockdown-text { margin: 0 auto 22px; max-width: 440px; color: #e9c9c9; line-height: 1.6; animation: ld-fade-up .5s 1.5s both; }
.lockdown-text b { color: #ff8a8a; }
.lockdown-order { position: relative; overflow: hidden; margin: 0 0 18px; padding: 4px 0 6px; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px rgba(255,90,90,.25); text-align: left; animation: ld-fade-up .5s 1.75s both; }
.order-head { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px dashed rgba(255,90,90,.35); color: #ff7a7a; font: 700 11px var(--font-mono, monospace); letter-spacing: .16em; text-transform: uppercase; }
.order-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.05); animation: ld-row-in .45s both; }
.order-row:nth-child(2) { animation-delay: 2.05s; }
.order-row:nth-child(3) { animation-delay: 2.3s; }
.order-row:nth-child(4) { animation-delay: 2.55s; }
.order-row:nth-child(5) { animation-delay: 2.8s; border-bottom: 0; }
.order-row small { color: rgba(255,170,170,.6); font: 600 10.5px var(--font-mono, monospace); letter-spacing: .14em; text-transform: uppercase; }
.order-row strong { color: #fff; }
.order-row p { margin: 0; color: #f1dada; line-height: 1.5; white-space: pre-line; }
.order-reason { align-items: start; }
.order-issuer { grid-template-columns: 48px 1fr; }
.order-issuer img, .order-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #ff4d4d, 0 0 18px rgba(255,60,60,.45); }
.order-avatar { display: grid; place-items: center; background: #2a0a0e; color: #ff8a8a; font-weight: 800; }
.order-issuer div { display: grid; gap: 2px; }
.order-issuer em { color: rgba(255,170,170,.7); font-size: 12.5px; font-style: normal; }
.lockdown-help { margin: 0 0 16px; color: rgba(255,200,200,.6); font-size: 13px; animation: ld-fade-up .5s 3.3s both; }
.lockdown-actions { display: flex; justify-content: center; gap: 10px; animation: ld-fade-up .5s 3.45s both; }
@keyframes ld-flash { 0% { background-color: rgba(255,40,40,.65); } 100% { background-color: transparent; } }
@keyframes ld-shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-7px, 3px); } 40%, 60% { transform: translate(7px, -3px); } }
@keyframes ld-grid { to { background-position: 42px 42px, 42px 42px; } }
@keyframes ld-sweep { from { top: -160px; } to { top: 100%; } }
@keyframes ld-card-in { from { opacity: 0; transform: translateY(40px) scale(.9) rotateX(18deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ld-lock-drop { 0% { opacity: 0; transform: translateY(-140px) rotate(-30deg) scale(.6); } 70% { opacity: 1; transform: translateY(8px) rotate(6deg) scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes ld-lock-jolt { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-14deg); } 94% { transform: rotate(12deg); } 97% { transform: rotate(-6deg); } }
@keyframes ld-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
@keyframes ld-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ld-row-in { from { opacity: 0; transform: translateX(-24px); background: rgba(255,60,60,.25); } to { opacity: 1; transform: none; background: transparent; } }
@keyframes ld-title-in { 0% { opacity: 0; transform: scale(2.4); letter-spacing: .5em; filter: blur(10px); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes ld-glitch-a { 0%, 86%, 100% { transform: translateX(0); opacity: 0; } 88% { transform: translateX(-6px); opacity: .9; clip-path: inset(10% 0 60% 0); } 92% { transform: translateX(5px); opacity: .9; clip-path: inset(40% 0 30% 0); } 96% { transform: translateX(-3px); opacity: .9; clip-path: inset(70% 0 5% 0); } }
@keyframes ld-glitch-b { 0%, 84%, 100% { transform: translateX(0); opacity: 0; } 87% { transform: translateX(6px); opacity: .9; clip-path: inset(55% 0 20% 0); } 91% { transform: translateX(-5px); opacity: .9; clip-path: inset(20% 0 55% 0); } 95% { transform: translateX(3px); opacity: .9; clip-path: inset(0 0 80% 0); } }
@media (max-width: 560px) { .order-row { grid-template-columns: 1fr; gap: 4px; } .order-issuer { grid-template-columns: 48px 1fr; } }
@media (prefers-reduced-motion: reduce) { .lockdown *, .lockdown, .lockdown *::before, .lockdown *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; } }
.view.no-enter { animation: none; }

button.nav-link { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.callout.danger { background: var(--danger-soft); box-shadow: inset 0 0 0 1px rgba(255, 75, 62, .3); }
.callout.danger svg { color: var(--danger); }
.ban-suggest { margin-bottom: 12px; }
.option-tile { position: relative; }
.option-tile.suggested { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.tile-flag { position: absolute; top: -9px; right: 10px; padding: 1px 7px; background: var(--danger); color: #fff; font: 700 10px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }

.trainee-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--warn-soft); box-shadow: inset 0 0 0 1px rgba(var(--season-hot-rgb, 255, 200, 97), .25); }
.trainee-toggle > div > b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.trainee-toggle > div > b svg { width: 16px; height: 16px; color: var(--warn); }
.trainee-toggle small b { color: var(--text); }
.trainee-toggle small { display: block; margin-top: 4px; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }

.loa-list { display: grid; }
.loa-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.loa-row:last-child { border-bottom: 0; }
.loa-main { display: grid; gap: 6px; min-width: 0; }
.loa-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.loa-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text); font: 500 13px var(--font-mono); }
.loa-dates svg { width: 15px; height: 15px; color: var(--accent); }
.loa-dates b { padding: 1px 7px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.loa-reason { margin: 0; color: var(--text-2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.loa-note { display: flex; gap: 8px; margin: 2px 0 0; padding: 8px 10px; background: var(--panel-3); color: var(--text-2); font-size: 13px; }
.loa-note svg { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--muted); }
.loa-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 640px) { .loa-row { grid-template-columns: auto minmax(0, 1fr); } .loa-actions { grid-column: 1 / -1; justify-content: flex-start; } }

.review-card.pending { box-shadow: inset 2px 0 0 var(--warn); }
.review-evidence { display: flex; flex-wrap: wrap; gap: 8px; white-space: normal; }
.review-evidence a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 12.5px; text-decoration: none; }
.review-evidence a:hover { box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--accent); }
.review-evidence svg { width: 13px; height: 13px; }
.review-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }

.audit-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.audit-filter-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; }
@media (max-width: 900px) { .audit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .audit-filters { grid-template-columns: 1fr; } }

.tour { position: fixed; inset: 0; z-index: 2147482000; }
.tour-spot { position: fixed; border-radius: 4px; box-shadow: 0 0 0 9999px rgba(3, 4, 4, .74), 0 0 0 2px var(--accent), 0 0 28px 4px rgba(var(--season-rgb, 255, 176, 46), .35); pointer-events: none; transition: top .35s var(--ease), left .35s var(--ease), width .35s var(--ease), height .35s var(--ease), box-shadow .35s; }
.tour-spot.none { box-shadow: 0 0 0 9999px rgba(3, 4, 4, .8); }
.tour-spot:not(.none)::after { content: ''; position: absolute; inset: -6px; border: 1px solid var(--accent-line); border-radius: 6px; animation: tour-pulse 1.8s ease-out infinite; }
@keyframes tour-pulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.12); } }
.tour-card { position: fixed; width: min(400px, calc(100vw - 32px)); padding: 20px 22px 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 60px rgba(0, 0, 0, .6); color: var(--text); outline: none; transition: top .35s var(--ease), left .35s var(--ease); }
.tour-card::before, .tour-card::after { content: ''; position: absolute; width: 14px; height: 14px; border: 2px solid var(--accent); }
.tour-card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.tour-card::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.tour-card.enter { animation: tour-in .32s var(--ease); }
@keyframes tour-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.tour-card.docked { top: auto !important; bottom: 12px; left: 12px !important; right: 12px; width: auto; max-height: 55vh; overflow-y: auto; }
.tour-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tour-count { color: var(--accent); font: 600 11px var(--font-mono); letter-spacing: .14em; }
.tour-skip { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.tour-skip:hover { color: var(--text); }
.tour-card h2 { margin: 0 0 8px; font: 600 20px/1.25 var(--font-display); letter-spacing: -.01em; }
.tour-body { color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.tour-body p { margin: 0 0 8px; }
.tour-body ul { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.tour-body li { position: relative; padding-left: 16px; }
.tour-body li::before { content: ''; position: absolute; top: .62em; left: 2px; width: 6px; height: 6px; background: var(--accent); }
.tour-body b { color: var(--text); }
.tour-progress { height: 2px; margin: 16px 0 14px; background: var(--line); }
.tour-progress i { display: block; height: 100%; background: var(--accent); transition: width .35s var(--ease); }
.tour-actions { display: flex; justify-content: space-between; gap: 10px; }
.review-card .kv { background: none; gap: 2px; }

.staff-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.staff-profile-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
@media (max-width: 1100px) { .staff-profile-grid { grid-template-columns: 1fr; } }
.warning-meter .stat-value small { margin-left: 2px; color: var(--muted); font-size: 16px; }
.meter { display: flex; gap: 4px; margin: 2px 0 4px; }
.meter i { flex: 1; height: 5px; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line); }
.meter i.on { background: var(--warn); box-shadow: none; }
.meter i.on:last-child { background: var(--danger); }

.staff-timeline { position: relative; display: grid; gap: 16px; margin: 0; padding: 0 0 0 4px; list-style: none; }
.staff-timeline::before { content: ''; position: absolute; top: 8px; bottom: 8px; left: 17px; width: 1px; background: var(--line-2); }
.st-item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.st-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); }
.st-dot svg { width: 14px; height: 14px; }
.st-item.ok .st-dot { color: var(--ok); box-shadow: inset 0 0 0 1px rgba(69, 255, 159, .4); }
.st-item.warn .st-dot { color: var(--warn); box-shadow: inset 0 0 0 1px rgba(var(--season-hot-rgb, 255, 200, 97), .4); }
.st-item.danger .st-dot { color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 75, 62, .45); }
.st-item.info .st-dot { color: var(--info); }
.st-body { display: grid; gap: 3px; min-width: 0; padding-top: 3px; }
.st-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-body small { color: var(--text-2); font-size: 12.5px; }
.st-body small.muted { color: var(--muted); font-size: 12px; }
.st-body p { margin: 2px 0; color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }

.trainee-card { margin-top: 0; }
.trainee-card.ready { box-shadow: inset 2px 0 0 var(--ok); }
.trainee-bar { height: 6px; margin-bottom: 14px; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line); }
.trainee-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--ok)); }
.trainee-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.trainee-stats div { display: grid; gap: 2px; padding: 10px 12px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.trainee-stats b { font: 600 20px var(--font-display); }
.trainee-stats span { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.trainee-feedback { display: grid; gap: 6px; margin-top: 12px; }
.trainee-feedback p { display: flex; gap: 8px; margin: 0; padding: 8px 10px; background: var(--panel-2); color: var(--text-2); font-size: 13px; }
.trainee-feedback p svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.trainee-feedback p.approved svg { color: var(--ok); }
.trainee-feedback p.rejected svg { color: var(--danger); }
.trainee-feedback small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
@media (max-width: 640px) { .trainee-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.template-bar { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.template-bar .field { flex: 1; }
.template-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.template-save .input { flex: 1; min-width: 180px; height: 34px; }
.template-scope { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; }
.template-scope input { accent-color: var(--accent); }

.bell { position: relative; }
.bell-button { position: relative; }
.bell-button.has-new svg { color: var(--accent); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 17px; padding: 1px 4px; background: var(--danger); color: #fff; font: 700 10px/15px var(--font-mono); text-align: center; }
.bell-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: min(380px, calc(100vw - 24px)); max-height: min(520px, 70vh); overflow-y: auto; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px rgba(0, 0, 0, .55); }
.bell-panel:not([hidden]) { animation: tour-in .18s var(--ease); }
.bell-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.bell-section { margin: 0; padding: 10px 14px 4px; color: var(--muted); font: 600 10.5px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.bell-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 14px; color: var(--text); text-decoration: none; }
a.bell-row:hover { background: var(--hover); }
.bell-row.unread { background: rgba(var(--season-rgb, 255, 176, 46), .04); }
.bell-icon { display: grid; place-items: center; width: 30px; height: 30px; background: var(--panel-3); }
.bell-icon svg { width: 15px; height: 15px; }
.bell-icon.ok { color: var(--ok); } .bell-icon.danger { color: var(--danger); } .bell-icon.warn { color: var(--warn); } .bell-icon.info { color: var(--info); } .bell-icon.accent { color: var(--accent); }
.bell-text { display: grid; gap: 2px; min-width: 0; }
.bell-text b { font-size: 13px; font-weight: 600; }
.bell-text small { color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.bell-text em { color: var(--muted); font-size: 11px; font-style: normal; }
.bell-pill { padding: 1px 7px; background: var(--accent); color: var(--accent-ink); font: 700 11px var(--font-mono); }
.bell-dot { width: 8px; height: 8px; margin-top: 6px; background: var(--accent); }
.bell-empty { margin: 0; padding: 8px 14px 16px; color: var(--muted); font-size: 12.5px; }

.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); }
.settings-row:first-child { border-top: 0; }
.settings-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.settings-row select { flex: none; width: 240px; }
@media (max-width: 640px) { .settings-row { flex-direction: column; align-items: stretch; } .settings-row select { width: 100%; } }
.density-compact .card-body { padding-top: 10px; padding-bottom: 10px; }
.density-compact .page-header { margin-bottom: 14px; }
.density-compact table td, .density-compact table th { padding-top: 6px; padding-bottom: 6px; }

.iv-panel { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.iv-head { display: flex; align-items: center; gap: 10px; }
.iv-when { display: flex; align-items: center; gap: 8px; margin: 0; }
.iv-when svg { width: 16px; height: 16px; }
.iv-slots { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.iv-line { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.iv-line .muted { display: inline-block; min-width: 72px; }
.iv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-history summary { cursor: pointer; font-size: 12px; color: var(--text-2); }
.iv-history ul { margin: 8px 0 0; padding-left: 16px; display: grid; gap: 4px; font-size: 12.5px; }
.iv-slot-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }

.iv-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.iv-rules { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.iv-rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cal-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-nav, .cal-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cal-nav strong { margin-left: 6px; }
.cal-mine { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3, var(--text-2)); padding: 0 4px; }
.cal-day { display: grid; align-content: start; gap: 4px; min-height: 120px; padding: 6px; border-radius: var(--r); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.cal-grid.month .cal-day { min-height: 92px; }
.cal-day.today { box-shadow: inset 0 0 0 1px var(--accent, var(--season-accent, #ffb02e)); }
.cal-day.outside { opacity: .45; }
.cal-date { font-size: 12px; color: var(--text-2); }
.cal-entry { display: grid; gap: 1px; padding: 4px 6px; border-radius: 6px; font-size: 12px; line-height: 1.3; color: var(--text); text-decoration: none; overflow: hidden; }
.cal-entry small { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-entry.confirmed { background: color-mix(in srgb, #30a46c 18%, transparent); }
.cal-entry.tentative { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, #e0a33a 60%, transparent); }
.cal-entry.mine { box-shadow: inset 3px 0 0 var(--accent, var(--season-accent, #ffb02e)); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cal-legend .cal-entry { display: inline-block; }
.cal-agenda { display: grid; gap: 6px; }
.cal-agenda-row { display: grid; grid-template-columns: 170px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r); background: var(--panel-2); color: var(--text); text-decoration: none; }
@media (max-width: 760px) {
  .cal-grid.week { grid-template-columns: 1fr; }
  .cal-grid.week .cal-head { display: none; }
  .cal-grid.month .cal-entry small { display: none; }
  .cal-agenda-row { grid-template-columns: 1fr; }
}

.live-stale { margin-bottom: 14px; align-items: center; }

.ivtest-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ivtest-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ivtest-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 10px; font-size: 13px; }
.ivtest-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 420px; overflow-y: auto; font-size: 12.5px; }
.ivtest-log li { display: grid; grid-template-columns: 64px 40px 1fr; gap: 8px; padding: 6px 10px; border-radius: 6px; background: var(--panel-2); }
.ivtest-log li.fail { background: color-mix(in srgb, #e5484d 14%, transparent); }
.ivtest-log li.ok .ivtest-mark { color: #30a46c; }
.ivtest-log li.fail .ivtest-mark { color: #e5484d; }
.ivtest-log li.info .ivtest-mark { color: var(--text-2); }
.ivtest-time { color: var(--text-2); font-variant-numeric: tabular-nums; }
.ivtest-mark { font-weight: 700; }
.ivtest-log pre { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11.5px; color: var(--text-2); }
.ivtest-controls .field input { width: 210px; max-width: 100%; }
.appdel-search { display: flex; gap: 8px; }
.appdel-search .input { flex: 1; }

.ud-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: var(--r); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); cursor: text; }
.ud-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; }
.ud-chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; }
.ud-chip button svg { width: 12px; height: 12px; }
.ud-input { flex: 1; min-width: 180px; border: 0; background: transparent; color: var(--text); outline: 0; font: inherit; padding: 4px; }
.ud-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ud-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 10px; }
.ud-categories { display: grid; gap: 6px; }
.ud-category { border-radius: var(--r); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.ud-category-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ud-category-head > span:first-child { flex: 1; font-weight: 600; }
.ud-category-head svg { width: 14px; height: 14px; transition: transform .15s; }
.ud-category.open .ud-category-head svg { transform: rotate(90deg); }
.ud-items { display: grid; gap: 6px; padding: 0 12px 12px; max-height: 360px; overflow-y: auto; }
.ud-item { display: grid; gap: 2px; padding: 8px 10px; border-radius: 6px; background: var(--panel); font-size: 13px; }
.ud-item span { color: var(--text-2); overflow-wrap: anywhere; }
.ud-remove { display: grid; gap: 8px; }
.ud-remove .choice.locked { opacity: .55; }

.otp-deck { position: relative; display: grid; place-items: center; padding: 22px 0 10px; width: 100%; }
.otp-cards { position: relative; display: flex; gap: 10px; perspective: 800px; }
.otp-input { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); opacity: 0; border: 0; background: transparent; color: transparent; caret-color: transparent; font-size: 16px; cursor: text; }
.otp-card { position: relative; width: 48px; height: 62px; transform-style: preserve-3d; transform-origin: 50% 150%; transition: transform .44s cubic-bezier(.2, .85, .25, 1), opacity .3s ease; pointer-events: none; }
.otp-card-face, .otp-card-back { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 10px; backface-visibility: hidden; }
.otp-card-face { background: linear-gradient(160deg, #1d2433, #111622); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 14px rgba(0, 0, 0, .35); color: var(--text); font: 600 27px/1 var(--font-display, 'Chakra Petch'), monospace; transition: box-shadow .25s ease; }
.otp-card-back { transform: rotateY(180deg); background: repeating-linear-gradient(45deg, rgba(var(--season-rgb, 255, 176, 46), .2) 0 6px, rgba(var(--season-rgb, 255, 176, 46), .06) 6px 12px), #131a26; box-shadow: inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46), .45), 0 6px 14px rgba(0, 0, 0, .4); }
.otp-card.filled { transform: translateY(-4px); }
.otp-card.filled .otp-card-face { box-shadow: inset 0 0 0 1px rgba(var(--season-rgb, 255, 176, 46), .38), 0 12px 20px rgba(0, 0, 0, .45); }
.otp-card.active .otp-card-face { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft), 0 6px 14px rgba(0, 0, 0, .35); }
.otp-card.active span::after { content: ''; display: block; width: 2px; height: 26px; background: var(--accent); animation: otp-caret 1s steps(1) infinite; }
@keyframes otp-caret { 50% { opacity: 0; } }

.otp-deck[data-state="fan"] .otp-card { transform: translate(calc(var(--mid) * -7px), calc(var(--lift) * 5px)) rotate(calc(var(--mid) * 9deg)); }
.otp-deck[data-state="stack"] .otp-card,
.otp-deck[data-state="checking"] .otp-card,
.otp-deck[data-state="success"] .otp-card { transform: translateX(calc(var(--mid) * -58px)) rotate(calc(var(--mid) * 2.5deg)) rotateY(180deg); }
.otp-deck[data-state="checking"] .otp-card,
.otp-deck[data-state="success"] .otp-card,
.otp-deck[data-state="failed"] .otp-card { transform: translateX(calc(var(--mid) * -58px)) rotateY(180deg) scale(.4); opacity: 0; transition-duration: .36s; }

.otp-chip { position: absolute; left: 50%; top: calc(50% + 6px); width: 60px; height: 60px; margin: -30px 0 0 -30px; display: grid; place-items: center; border-radius: 14px; border: 2px solid var(--chip, var(--accent)); background: radial-gradient(circle, rgba(0, 0, 0, .1), rgba(0, 0, 0, .55)), #0d1411; box-shadow: 0 0 22px var(--chip-glow, var(--accent-soft)), inset 0 0 14px var(--chip-glow, var(--accent-soft)); opacity: 0; transform: scale(.3); transition: opacity .3s ease, transform .4s cubic-bezier(.2, 1.4, .4, 1), border-color .3s, box-shadow .3s; pointer-events: none; --chip: var(--accent); --chip-glow: rgba(var(--season-rgb, 255, 176, 46), .45); }
.otp-chip i { width: 26px; height: 30px; border-radius: 6px; border: 2px solid var(--chip); box-shadow: 0 0 10px var(--chip-glow); }
.otp-chip::before { content: ''; position: absolute; inset: -18px; border-radius: 50%; background: repeating-conic-gradient(var(--chip) 0 5deg, transparent 5deg 30deg); -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%, #000 66%, transparent 67%); mask: radial-gradient(circle, transparent 54%, #000 55%, #000 66%, transparent 67%); opacity: .55; animation: otp-rays 2.4s linear infinite; }
@keyframes otp-rays { to { transform: rotate(360deg); } }
.otp-deck[data-state="checking"] .otp-chip { opacity: 1; transform: scale(1); animation: otp-pulse 1.2s ease-in-out infinite; }
.otp-deck[data-state="success"] .otp-chip { opacity: 1; transform: scale(1.08); --chip: var(--ok); --chip-glow: rgba(69, 255, 159, .5); }
.otp-deck[data-state="failed"] .otp-chip { opacity: 1; transform: scale(.94); --chip: var(--danger); --chip-glow: rgba(255, 75, 62, .5); }
@keyframes otp-pulse { 50% { box-shadow: 0 0 34px var(--chip-glow), inset 0 0 18px var(--chip-glow); } }
.otp-deck[data-state="error"] .otp-cards { animation: otp-shake .45s ease; }
.otp-deck[data-state="error"] .otp-card-face { box-shadow: inset 0 0 0 1.5px var(--danger), 0 0 0 4px var(--danger-soft); }
@keyframes otp-shake { 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

.otp-recovery { width: 100%; margin-top: 14px; }
.otp-recovery .input { width: 100%; text-align: center; font-size: 18px; letter-spacing: 3px; }
.otp-switch { margin-top: 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.otp-switch:hover, .otp-switch:focus-visible { color: var(--accent); outline: none; }

@media (max-width: 420px) {
  .otp-cards { gap: 7px; }
  .otp-card { width: 40px; height: 54px; }
  .otp-card-face { font-size: 23px; }
  .otp-deck[data-state="stack"] .otp-card { transform: translateX(calc(var(--mid) * -47px)) rotate(calc(var(--mid) * 2.5deg)) rotateY(180deg); }
  .otp-deck[data-state="checking"] .otp-card, .otp-deck[data-state="success"] .otp-card, .otp-deck[data-state="failed"] .otp-card { transform: translateX(calc(var(--mid) * -47px)) rotateY(180deg) scale(.4); }
}

@media (prefers-reduced-motion: reduce) {
  .otp-card, .otp-chip { transition: none; }
  .otp-chip::before, .otp-deck[data-state="checking"] .otp-chip, .otp-deck[data-state="error"] .otp-cards, .otp-card.active span::after { animation: none; }
}
