/* Aegis authorization console */
:root {
  color-scheme: dark;
  --bg: #070b12;
  --bg-deep: #05080e;
  --surface: #0d141f;
  --surface-raised: #111b28;
  --surface-soft: #101824;
  --surface-hover: #162131;
  --border: #202c3b;
  --border-soft: rgba(141, 162, 188, .12);
  --text: #edf2f8;
  --text-secondary: #a1afbf;
  --muted: #6e7d90;
  --gold: #c6a76a;
  --gold-bright: #dec28a;
  --gold-soft: rgba(198, 167, 106, .11);
  --blue: #6f9fd8;
  --green: #62b99a;
  --green-soft: rgba(75, 173, 137, .11);
  --red: #d77b82;
  --red-soft: rgba(209, 100, 110, .11);
  --amber: #d2a967;
  --amber-soft: rgba(210, 169, 103, .11);
  --sidebar-width: 252px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
  --font: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .58; }
a { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
::selection { color: #fff; background: rgba(198, 167, 106, .32); }
:focus-visible { outline: 2px solid rgba(198, 167, 106, .7); outline-offset: 3px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b3746; border-radius: 8px; }

/* Login */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1.12fr) minmax(440px, .88fr); background: var(--bg-deep); }
.auth-brand-pane { position: relative; isolation: isolate; min-height: 100vh; padding: 42px 56px 30px; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(circle at 76% 35%, rgba(43, 74, 110, .2), transparent 35%), linear-gradient(135deg, #0a111c, #070c14 70%); border-right: 1px solid var(--border-soft); }
.auth-brand-pane::before { content: ""; position: absolute; z-index: -2; inset: 0; opacity: .24; background-image: linear-gradient(rgba(131, 157, 185, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(131, 157, 185, .09) 1px, transparent 1px); background-size: 58px 58px; mask-image: linear-gradient(to bottom right, #000, transparent 75%); }
.auth-brand-pane::after { content: ""; position: absolute; z-index: -1; width: 440px; height: 440px; right: -120px; top: 21%; border: 1px solid rgba(198, 167, 106, .1); border-radius: 50%; box-shadow: 0 0 0 72px rgba(198, 167, 106, .025), 0 0 0 144px rgba(198, 167, 106, .018); }
.auth-brand-top, .mobile-auth-brand, .sidebar-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--gold-bright); border: 1px solid rgba(198, 167, 106, .32); border-radius: 11px; background: linear-gradient(145deg, rgba(198, 167, 106, .14), rgba(198, 167, 106, .04)); box-shadow: inset 0 1px rgba(255, 255, 255, .06); }
.brand-mark svg { width: 22px; height: 22px; }
.brand-mark-large { width: 43px; height: 43px; }
.brand-wordmark { font-size: 18px; font-weight: 700; letter-spacing: .18em; line-height: 1.15; }
.brand-wordmark > span { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 500; letter-spacing: .25em; }
.auth-hero { max-width: 600px; margin: auto 0; padding: 70px 0 50px; }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 10px; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; }
.auth-hero .eyebrow { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .15em; }
.auth-hero .eyebrow > span { width: 26px; height: 1px; background: var(--gold); }
.auth-hero h1 { margin: 0; font-size: clamp(40px, 4.1vw, 65px); font-weight: 560; line-height: 1.22; letter-spacing: -.045em; }
.auth-hero h1 > span { color: var(--gold-bright); }
.auth-hero-copy { max-width: 490px; margin: 27px 0 0; color: var(--text-secondary); font-size: 16px; line-height: 1.9; }
.auth-capabilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 55px; padding-top: 30px; border-top: 1px solid var(--border-soft); }
.auth-capabilities > div { display: flex; align-items: flex-start; gap: 11px; }
.auth-capabilities svg { width: 19px; color: var(--gold); margin-top: 2px; }
.auth-capabilities strong, .auth-capabilities small { display: block; }
.auth-capabilities strong { font-size: 12px; font-weight: 550; }
.auth-capabilities small { margin-top: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.auth-brand-footer { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.auth-brand-footer > span:last-child { margin-left: auto; letter-spacing: .08em; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(98, 185, 154, .08); }
.auth-form-pane { position: relative; min-height: 100vh; padding: 45px 9%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, rgba(29, 49, 72, .13), transparent 48%), #080d15; }
.mobile-auth-brand { display: none; }
.login-card { width: 100%; max-width: 410px; }
.login-heading { margin-bottom: 34px; }
.login-heading h2 { margin: 0; font-size: 30px; font-weight: 580; letter-spacing: -.03em; }
.login-heading > p:last-child { margin: 10px 0 0; color: var(--muted); }
.login-card .form-field { margin-bottom: 21px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 15px; width: 18px; color: var(--muted); pointer-events: none; }
.input-wrap > input { padding-left: 44px; padding-right: 44px; height: 50px; }
.password-toggle { position: absolute; right: 6px; }
.login-card .button-block { margin-top: 8px; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 26px; color: var(--muted); font-size: 11px; }
.login-security svg { width: 14px; height: 14px; }
.auth-form-footer { position: absolute; bottom: 25px; margin: 0; color: #536174; font-size: 10px; letter-spacing: .06em; }
.form-error { margin: -4px 0 16px; padding: 10px 12px; color: #efa0a6; font-size: 12px; background: var(--red-soft); border: 1px solid rgba(215, 123, 130, .2); border-radius: 8px; }

/* Controls */
.button { min-height: 38px; padding: 8px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 12px; font-weight: 550; white-space: nowrap; transition: background .18s, border-color .18s, color .18s, transform .18s; }
.button:not(:disabled):active { transform: translateY(1px); }
.button svg { width: 16px; height: 16px; }
.button-primary { color: #15130e; background: linear-gradient(135deg, #d2b77e, #b99a5f); border-color: #d1b67c; box-shadow: 0 5px 20px rgba(198, 167, 106, .1), inset 0 1px rgba(255, 255, 255, .25); }
.button-primary:hover:not(:disabled) { background: linear-gradient(135deg, #dfc58e, #c6a76a); }
.button-secondary { color: var(--text-secondary); background: #121b27; border-color: var(--border); }
.button-secondary:hover:not(:disabled) { color: var(--text); background: var(--surface-hover); border-color: #354456; }
.button-danger { color: #f3c2c6; background: var(--red-soft); border-color: rgba(215, 123, 130, .3); }
.button-danger:hover:not(:disabled) { background: rgba(209, 100, 110, .2); }
.button-block { width: 100%; }
.button-large { min-height: 46px; padding: 11px 20px; font-size: 13px; }
.icon-button { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: transparent; border: 0; border-radius: 8px; transition: color .18s, background .18s, border-color .18s; }
.icon-button:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, .05); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button.bordered { border: 1px solid var(--border); background: rgba(16, 24, 36, .6); }
.icon-button.danger:hover { color: var(--red); background: var(--red-soft); }
.text-button { padding: 4px; display: inline-flex; align-items: center; gap: 5px; color: var(--text-secondary); background: none; border: 0; font-size: 12px; }
.text-button:hover { color: var(--gold-bright); }
.text-button svg { width: 14px; height: 14px; }
.form-field { display: block; min-width: 0; }
.field-label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.field-label em { color: var(--gold); font-style: normal; }
.field-help { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.6; }
input, select, textarea { width: 100%; color: var(--text); background: #0b121c; border: 1px solid var(--border); border-radius: var(--radius-sm); outline: 0; transition: border-color .18s, box-shadow .18s, background .18s; }
input, select { height: 40px; padding: 0 12px; }
textarea { min-height: 84px; padding: 11px 12px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #4e5d70; }
input:focus, select:focus, textarea:focus { border-color: rgba(198, 167, 106, .55); box-shadow: 0 0 0 3px rgba(198, 167, 106, .07); background: #0e1621; }
input:invalid:not(:placeholder-shown):not(:focus) { border-color: rgba(215, 123, 130, .38); }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #738297 50%), linear-gradient(135deg, #738297 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
select option { color: var(--text); background: var(--surface-raised); }
.mono-input, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; letter-spacing: .015em; }
.form-grid { display: grid; gap: 18px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid + .form-field, .form-field + .form-field, .form-field + .form-grid { margin-top: 18px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.checkbox-option { min-height: 40px; padding: 9px 11px; display: flex; align-items: center; gap: 9px; color: var(--text-secondary); background: #0b121c; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.checkbox-option:has(input:checked) { color: var(--gold-bright); border-color: rgba(198, 167, 106, .35); background: var(--gold-soft); }
.checkbox-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--gold); }
.form-fieldset { min-width: 0; margin: 18px 0 0; padding: 0; border: 0; }

/* App shell */
.app-shell { min-height: 100vh; background: radial-gradient(circle at 80% -20%, rgba(45, 73, 105, .1), transparent 36%), var(--bg); }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; background: rgba(9, 14, 23, .96); border-right: 1px solid var(--border); backdrop-filter: blur(20px); }
.sidebar-brand { min-height: 79px; padding: 20px 22px; border-bottom: 1px solid var(--border-soft); }
.sidebar-brand .brand-wordmark { font-size: 16px; }
.sidebar-brand .brand-wordmark > span { font-size: 9px; letter-spacing: .12em; }
.sidebar-close { display: none; margin-left: auto; }
.workspace-label { margin: 22px 18px 10px; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); background: rgba(255, 255, 255, .018); border: 1px solid var(--border-soft); border-radius: 8px; font-size: 11px; }
.workspace-badge { padding: 1px 6px; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(198, 167, 106, .15); border-radius: 4px; font-size: 8px; letter-spacing: .1em; }
.sidebar-nav { flex: 1; min-height: 0; padding: 7px 13px 20px; overflow-y: auto; }
.nav-section-label { margin: 20px 11px 7px; color: #526174; font-size: 9px; font-weight: 600; letter-spacing: .12em; }
.nav-item { position: relative; width: 100%; height: 43px; margin: 3px 0; padding: 0 12px; display: flex; align-items: center; gap: 12px; color: #8797aa; background: transparent; border: 1px solid transparent; border-radius: 9px; text-align: left; font-size: 12px; transition: color .18s, background .18s, border-color .18s; }
.nav-item::before { content: ""; position: absolute; left: -14px; width: 2px; height: 18px; background: var(--gold); border-radius: 0 2px 2px 0; opacity: 0; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .025); }
.nav-item.active { color: var(--gold-bright); background: linear-gradient(90deg, rgba(198, 167, 106, .12), rgba(198, 167, 106, .035)); border-color: rgba(198, 167, 106, .09); }
.nav-item.active::before { opacity: 1; }
.nav-item-dot { width: 5px; height: 5px; margin-left: auto; background: var(--gold); border-radius: 50%; }
.sidebar-bottom { padding: 15px 17px 18px; border-top: 1px solid var(--border-soft); }
.security-note { margin-bottom: 16px; padding: 11px; display: flex; align-items: center; gap: 9px; background: rgba(98, 185, 154, .035); border: 1px solid rgba(98, 185, 154, .1); border-radius: 9px; }
.security-note > svg { width: 17px; color: var(--green); }
.security-note > div { flex: 1; }
.security-note strong, .security-note span { display: block; }
.security-note strong { color: #a1b9b0; font-size: 9px; font-weight: 550; }
.security-note div > span { margin-top: 3px; color: #597068; font-size: 8px; }
.account-block { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--gold-bright); background: linear-gradient(145deg, #2c291f, #191a1b); border: 1px solid rgba(198, 167, 106, .25); border-radius: 9px; font-size: 12px; font-weight: 650; text-transform: uppercase; }
.account-meta { min-width: 0; flex: 1; }
.account-meta strong, .account-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-meta strong { font-size: 11px; font-weight: 550; }
.account-meta span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.main-shell { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; z-index: 30; top: 0; height: 79px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: rgba(7, 11, 18, .82); border-bottom: 1px solid var(--border-soft); backdrop-filter: blur(18px); }
.topbar-title-wrap { display: flex; align-items: center; gap: 12px; }
.topbar-kicker { margin: 0 0 3px; color: #59687b; font-size: 8px; letter-spacing: .13em; }
.topbar-kicker span { color: #7d8b9d; }
.topbar h2 { margin: 0; font-size: 15px; font-weight: 550; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.system-state { display: flex; align-items: center; gap: 8px; color: #8fa79e; font-size: 10px; }
.current-date { padding-left: 18px; color: var(--muted); border-left: 1px solid var(--border); font-size: 10px; }
.menu-button { display: none; }
.content-shell { width: 100%; max-width: 1680px; margin: 0 auto; padding: 30px 32px 50px; }
.view { animation: view-in .25s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-heading { min-height: 74px; margin-bottom: 25px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-heading h1 { margin: 0; font-size: 25px; font-weight: 570; letter-spacing: -.025em; }
.page-heading > div > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.page-heading .eyebrow { margin-bottom: 6px; font-size: 8px; }
.heading-actions { display: flex; gap: 10px; }
.secure-chip { padding: 7px 11px; display: inline-flex; align-items: center; gap: 7px; color: #a4bdb2; background: var(--green-soft); border: 1px solid rgba(98, 185, 154, .15); border-radius: 20px; font-size: 10px; }
.secure-chip svg { width: 14px; height: 14px; }
.panel { background: linear-gradient(145deg, rgba(17, 26, 39, .86), rgba(11, 18, 28, .9)); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: inset 0 1px rgba(255, 255, 255, .018); }
.panel-heading { min-height: 69px; padding: 18px 21px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--border-soft); }
.panel-heading h3 { margin: 0; font-size: 13px; font-weight: 560; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.info-banner { margin-bottom: 20px; padding: 12px 15px; display: flex; align-items: flex-start; gap: 10px; color: #91a8c1; background: rgba(84, 128, 176, .065); border: 1px solid rgba(111, 159, 216, .13); border-radius: 10px; }
.info-banner.warning { color: #b5a183; background: rgba(198, 167, 106, .05); border-color: rgba(198, 167, 106, .13); }
.info-banner svg { width: 17px; height: 17px; margin-top: 1px; }
.info-banner p { margin: 0; font-size: 11px; line-height: 1.7; }

/* Dashboard */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.metric-card { position: relative; min-width: 0; padding: 20px; overflow: hidden; background: linear-gradient(145deg, rgba(18, 28, 42, .9), rgba(11, 18, 28, .9)); border: 1px solid var(--border); border-radius: 12px; }
.metric-card::after { content: ""; position: absolute; right: -30px; bottom: -60px; width: 130px; height: 130px; background: radial-gradient(circle, rgba(111, 159, 216, .07), transparent 67%); }
.metric-card.accent::after { background: radial-gradient(circle, rgba(98, 185, 154, .09), transparent 67%); }
.metric-card.warning::after { background: radial-gradient(circle, rgba(198, 167, 106, .1), transparent 67%); }
.metric-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); font-size: 11px; }
.metric-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: #7994b2; background: rgba(111, 159, 216, .07); border: 1px solid rgba(111, 159, 216, .1); border-radius: 8px; }
.metric-icon svg { width: 15px; height: 15px; }
.accent .metric-icon { color: var(--green); background: var(--green-soft); border-color: rgba(98, 185, 154, .12); }
.warning .metric-icon { color: var(--gold); background: var(--gold-soft); border-color: rgba(198, 167, 106, .12); }
.metric-card > strong { display: block; margin-top: 7px; font-size: 31px; font-weight: 570; line-height: 1.2; letter-spacing: -.03em; }
.metric-card > p { margin: 7px 0 0; color: var(--muted); font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-bottom: 18px; }
.live-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.verification-content { padding: 24px 28px; display: flex; align-items: center; justify-content: space-around; gap: 35px; }
.verification-ring { --rate: 0; position: relative; width: 138px; height: 138px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--rate) * 1%), #202b39 0); }
.verification-ring::before { content: ""; position: absolute; inset: 9px; background: #101824; border: 1px solid var(--border-soft); border-radius: 50%; }
.verification-ring > div { position: relative; text-align: center; }
.verification-ring strong, .verification-ring span { display: block; }
.verification-ring strong { font-size: 25px; font-weight: 550; }
.verification-ring span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.verification-stats { width: min(230px, 50%); }
.verification-stats > div { padding: 9px 0; display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 11px; }
.verification-stats strong { margin-left: auto; color: var(--text); font-size: 15px; font-weight: 550; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.legend-dot.success { background: var(--green); }
.legend-dot.danger { background: var(--red); }
.verification-stats .verification-total { margin-top: 7px; padding-top: 14px; border-top: 1px solid var(--border-soft); color: var(--muted); }
.quick-actions { padding: 9px 18px 13px; }
.quick-actions > button { width: 100%; padding: 12px 2px; display: flex; align-items: center; gap: 12px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--border-soft); }
.quick-actions > button:last-child { border-bottom: 0; }
.quick-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); border-radius: 8px; transition: background .18s; }
.quick-icon svg { width: 16px; height: 16px; }
.quick-actions button > span:nth-child(2) { flex: 1; }
.quick-actions strong, .quick-actions small { display: block; }
.quick-actions strong { color: var(--text-secondary); font-size: 11px; font-weight: 550; }
.quick-actions small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.quick-arrow { width: 14px; color: #4c5a6c; transition: transform .18s, color .18s; }
.quick-actions button:hover .quick-arrow { color: var(--gold); transform: translateX(3px); }
.quick-actions button:hover .quick-icon { background: rgba(198, 167, 106, .18); }

/* Tables and filters */
.table-panel { overflow: hidden; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { height: 42px; padding: 10px 16px; color: #6c7b8e; background: rgba(7, 12, 19, .32); border-bottom: 1px solid var(--border-soft); font-size: 9px; font-weight: 550; letter-spacing: .035em; white-space: nowrap; }
.data-table td { max-width: 260px; padding: 14px 16px; color: var(--text-secondary); border-bottom: 1px solid var(--border-soft); font-size: 11px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .014); }
.data-table .align-right { text-align: right; }
.products-table { min-width: 960px; }
.licenses-table { min-width: 1250px; }
.audits-table { min-width: 1100px; }
.blacklist-table { min-width: 850px; }
.users-table { min-width: 700px; }
.dashboard-audit-table { min-width: 680px; }
.cell-primary { display: block; color: var(--text); font-size: 11px; font-weight: 520; }
.cell-secondary { display: block; max-width: 240px; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.cell-code { color: #b7c5d5; font-size: 10px; }
.cell-truncate { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; white-space: nowrap; }
.table-actions .icon-button { width: 29px; height: 29px; }
.table-actions .icon-button svg { width: 14px; height: 14px; }
.table-action-text { min-height: 29px; padding: 4px 7px; color: #8ea0b5; background: transparent; border: 0; border-radius: 6px; font-size: 10px; }
.table-action-text:hover { color: var(--gold-bright); background: var(--gold-soft); }
.table-action-text.danger:hover { color: var(--red); background: var(--red-soft); }
.badge { width: fit-content; padding: 3px 8px; display: inline-flex; align-items: center; gap: 5px; color: #91a2b6; background: rgba(132, 151, 174, .07); border: 1px solid rgba(132, 151, 174, .13); border-radius: 20px; font-size: 9px; white-space: nowrap; }
.badge::before { content: ""; width: 4px; height: 4px; background: currentColor; border-radius: 50%; opacity: .8; }
.badge.success { color: #87c9b0; background: var(--green-soft); border-color: rgba(98, 185, 154, .15); }
.badge.danger { color: #e09298; background: var(--red-soft); border-color: rgba(215, 123, 130, .16); }
.badge.warning { color: #d2b77f; background: var(--amber-soft); border-color: rgba(210, 169, 103, .16); }
.badge.gold { color: var(--gold-bright); background: var(--gold-soft); border-color: rgba(198, 167, 106, .16); }
.badge.no-dot::before { display: none; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { max-width: 150px; padding: 2px 6px; overflow: hidden; color: #8fa2b8; background: rgba(111, 159, 216, .055); border: 1px solid rgba(111, 159, 216, .1); border-radius: 5px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.risk-label { margin-left: 5px; padding: 2px 5px; color: #e5a0a5; background: var(--red-soft); border-radius: 4px; font-size: 8px; white-space: nowrap; }
.table-state { height: 180px; text-align: center !important; }
.state-content { min-height: 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.state-content svg { width: 25px; height: 25px; margin-bottom: 10px; color: #4c5e72; }
.state-content strong { color: var(--text-secondary); font-size: 11px; font-weight: 500; }
.state-content p { margin: 5px 0 0; font-size: 10px; }
.spinner { width: 22px; height: 22px; margin-bottom: 12px; border: 2px solid #28374a; border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
.button .spinner { width: 15px; height: 15px; margin: 0; border-color: rgba(0, 0, 0, .2); border-top-color: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }
.filter-bar { margin-bottom: 16px; padding: 13px; display: flex; align-items: center; gap: 10px; }
.filter-bar > select { width: 150px; flex: 0 0 auto; }
.search-field { position: relative; flex: 1; min-width: 200px; }
.search-field svg { position: absolute; left: 12px; top: 11px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search-field input { padding-left: 38px; }

/* Issue */
.issue-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr); gap: 20px; align-items: start; }
.issue-form { padding: 4px 25px 0; }
.form-section { padding: 24px 0; border-bottom: 1px solid var(--border-soft); }
.form-section-title { margin-bottom: 21px; display: flex; align-items: flex-start; gap: 11px; }
.form-section-title > span { width: 25px; height: 25px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(198, 167, 106, .12); border-radius: 7px; font-size: 8px; }
.form-section-title h3 { margin: 0; font-size: 13px; font-weight: 560; }
.form-section-title p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.issue-submit-row { padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.issue-submit-row p { margin: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.issue-submit-row p svg { width: 14px; color: var(--gold); }
.issue-aside { display: grid; gap: 16px; }
.product-preview-empty { min-height: 220px; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.product-preview-empty svg { width: 30px; height: 30px; margin-bottom: 12px; color: #4b5c70; }
.product-preview-empty p { margin: 0; font-size: 10px; }
.preview-content { padding: 21px; }
.preview-product-name { margin: 0 0 4px; font-size: 15px; font-weight: 550; }
.preview-category { color: var(--gold); font-size: 9px; }
.preview-list { margin: 20px 0 0; }
.preview-list > div { padding: 10px 0; display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--border-soft); font-size: 10px; }
.preview-list dt { color: var(--muted); }
.preview-list dd { margin: 0; color: var(--text-secondary); text-align: right; }
.issue-notice { padding: 18px; display: flex; align-items: flex-start; gap: 12px; background: linear-gradient(145deg, rgba(198, 167, 106, .08), rgba(198, 167, 106, .025)); border: 1px solid rgba(198, 167, 106, .16); border-radius: var(--radius); }
.issue-notice > svg { width: 18px; color: var(--gold); }
.issue-notice h3 { margin: 0; color: #d2c1a2; font-size: 11px; font-weight: 550; }
.issue-notice p { margin: 7px 0 0; color: #8e816b; font-size: 10px; line-height: 1.8; }

/* Roles */
.role-explain { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.role-explain article { padding: 18px; display: flex; gap: 13px; background: rgba(15, 23, 35, .7); border: 1px solid var(--border); border-radius: 11px; }
.role-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue); background: rgba(111, 159, 216, .08); border-radius: 9px; }
.role-icon.gold { color: var(--gold); background: var(--gold-soft); }
.role-icon svg { width: 18px; }
.role-explain h3 { margin: 0; font-size: 12px; font-weight: 550; }
.role-explain p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.security-note-inline { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.security-note-inline svg { width: 13px; }

/* Modals */
.modal { width: min(590px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; overflow: visible; color: var(--text); background: transparent; border: 0; }
.modal::backdrop { background: rgba(2, 5, 9, .74); backdrop-filter: blur(5px); }
.modal[open] { animation: modal-in .2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-card { max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(145deg, #121c29, #0c131e); border: 1px solid #2a3747; border-radius: 15px; box-shadow: var(--shadow); }
.modal-header { padding: 21px 23px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 17px; font-weight: 570; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.modal-body { min-height: 0; padding: 23px; overflow-y: auto; }
.modal-footer { padding: 15px 23px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; background: rgba(6, 11, 18, .3); border-top: 1px solid var(--border); }
.modal-form .form-field:first-child { margin-top: 0; }
.modal-wide { width: min(720px, calc(100vw - 32px)); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border-soft); border-radius: 10px; overflow: hidden; }
.detail-item { min-width: 0; padding: 13px 15px; border-bottom: 1px solid var(--border-soft); }
.detail-item:nth-child(odd) { border-right: 1px solid var(--border-soft); }
.detail-item:nth-last-child(-n+2) { border-bottom: 0; }
.detail-item.full { grid-column: 1 / -1; border-right: 0 !important; border-bottom: 1px solid var(--border-soft); }
.detail-item.full:last-child { border-bottom: 0; }
.detail-item dt { margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.detail-item dd { margin: 0; overflow-wrap: anywhere; color: var(--text-secondary); font-size: 11px; line-height: 1.7; }
.auth-code-warning { margin-bottom: 17px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 9px; color: #d8ba83; background: var(--gold-soft); border: 1px solid rgba(198, 167, 106, .24); border-radius: 9px; }
.auth-code-warning svg { width: 17px; margin-top: 1px; }
.auth-code-warning strong { display: block; font-size: 11px; }
.auth-code-warning p { margin: 3px 0 0; color: #a28e6c; font-size: 10px; }
.auth-code-box { padding: 18px; background: #080e17; border: 1px solid #2d3a4a; border-radius: 10px; }
.auth-code-box > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 9px; }
.auth-code-box code { display: block; overflow-wrap: anywhere; color: #e5d5b6; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.8; user-select: all; }
.public-key-code { max-height: 320px; overflow: auto; white-space: pre-wrap; }
.confirm-modal { width: min(430px, calc(100vw - 32px)); }
.confirm-content { padding: 28px 25px 22px; text-align: center; }
.confirm-icon { width: 47px; height: 47px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--red); background: var(--red-soft); border: 1px solid rgba(215, 123, 130, .15); border-radius: 13px; }
.confirm-icon.warning { color: var(--gold); background: var(--gold-soft); border-color: rgba(198, 167, 106, .15); }
.confirm-content h2 { margin: 0; font-size: 17px; font-weight: 570; }
.confirm-content > p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.confirm-content .form-field { margin-top: 19px; text-align: left; }

/* Toasts */
.toast-region { position: fixed; z-index: 100; top: 20px; right: 20px; width: min(360px, calc(100vw - 32px)); display: grid; gap: 9px; pointer-events: none; }
.toast { padding: 13px 14px; display: flex; align-items: flex-start; gap: 10px; color: var(--text-secondary); background: rgba(17, 27, 40, .97); border: 1px solid #2a394a; border-radius: 11px; box-shadow: 0 15px 40px rgba(0, 0, 0, .35); backdrop-filter: blur(16px); pointer-events: auto; animation: toast-in .22s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.toast > svg { width: 17px; height: 17px; margin-top: 1px; color: var(--blue); }
.toast.success > svg { color: var(--green); }
.toast.error > svg { color: var(--red); }
.toast.warning > svg { color: var(--gold); }
.toast > div { flex: 1; min-width: 0; }
.toast strong { display: block; color: var(--text); font-size: 11px; font-weight: 550; }
.toast p { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 10px; line-height: 1.6; }
.toast .icon-button { width: 23px; height: 23px; margin: -3px -4px 0 0; }
.toast .icon-button svg { width: 13px; }
.toast.leaving { opacity: 0; transform: translateX(10px); transition: .2s; }
.sidebar-backdrop { position: fixed; z-index: 35; inset: 0; background: rgba(2, 5, 9, .65); backdrop-filter: blur(3px); }

/* Responsive */
@media (min-width: 1500px) {
  .content-shell { padding: 36px 40px 60px; }
  .metric-card { padding: 23px; }
  .data-table td { padding-top: 16px; padding-bottom: 16px; }
}
@media (max-width: 1180px) {
  .auth-shell { grid-template-columns: 1fr 1fr; }
  .auth-brand-pane { padding: 35px; }
  .auth-capabilities { grid-template-columns: 1fr; gap: 15px; margin-top: 35px; }
  .auth-capabilities small { white-space: normal; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .issue-layout { grid-template-columns: minmax(0, 1.45fr) minmax(240px, .7fr); }
  .current-date { display: none; }
}
@media (max-width: 960px) {
  :root { --sidebar-width: 242px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close, .menu-button { display: inline-flex; }
  .main-shell { margin-left: 0; }
  .topbar { padding: 0 23px; }
  .content-shell { padding: 25px 23px 45px; }
  .auth-shell { grid-template-columns: minmax(0, .9fr) minmax(400px, 1.1fr); }
  .auth-brand-pane { padding: 30px; }
  .auth-hero h1 { font-size: 40px; }
  .auth-hero-copy { font-size: 14px; }
  .auth-capabilities { display: none; }
  .issue-layout { grid-template-columns: 1fr; }
  .issue-aside { grid-template-columns: 1fr 1fr; }
  .product-preview-empty { min-height: 150px; }
}
@media (max-width: 720px) {
  .auth-shell { display: block; background: #080d15; }
  .auth-brand-pane { display: none; }
  .auth-form-pane { min-height: 100svh; padding: 110px 25px 70px; justify-content: flex-start; }
  .mobile-auth-brand { position: absolute; top: 28px; left: 25px; display: flex; }
  .login-heading h2 { font-size: 27px; }
  .topbar { height: 69px; padding: 0 16px; }
  .topbar-actions { gap: 10px; }
  .system-state { display: none; }
  .content-shell { padding: 23px 15px 40px; }
  .page-heading { margin-bottom: 20px; flex-wrap: wrap; }
  .page-heading h1 { font-size: 23px; }
  .page-heading > .button, .heading-actions { margin-top: 2px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .metric-grid { gap: 11px; }
  .metric-card { padding: 16px; }
  .metric-card > strong { font-size: 27px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 14px; }
  .verification-content { padding: 22px; }
  .filter-bar { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; min-width: 0; }
  .filter-bar > select { flex: 1; width: auto; min-width: 120px; }
  .role-explain { grid-template-columns: 1fr; }
  .issue-aside { grid-template-columns: 1fr; }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .issue-submit-row { align-items: stretch; flex-direction: column; }
  .issue-submit-row .button { width: 100%; }
  .responsive-table { min-width: 0; }
  .responsive-table thead { display: none; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table tbody { padding: 10px; }
  .responsive-table tbody tr { margin-bottom: 10px; padding: 7px 13px; background: rgba(7, 12, 19, .32); border: 1px solid var(--border-soft); border-radius: 10px; }
  .responsive-table tbody tr:last-child { margin-bottom: 0; }
  .responsive-table td { max-width: none; min-height: 38px; padding: 9px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--border-soft); text-align: right !important; }
  .responsive-table td::before { content: attr(data-label); flex: 0 0 80px; color: var(--muted); font-size: 9px; text-align: left; }
  .responsive-table td > * { max-width: calc(100% - 98px); }
  .responsive-table td .cell-primary, .responsive-table td .cell-secondary, .responsive-table td .cell-truncate { max-width: 100%; }
  .responsive-table td .cell-secondary { white-space: normal; overflow-wrap: anywhere; }
  .responsive-table td .tag-list { justify-content: flex-end; }
  .responsive-table td .table-actions { flex-wrap: wrap; white-space: normal; }
  .responsive-table td.table-state { display: block; min-height: 150px; padding: 0; border: 0; }
  .responsive-table td.table-state::before { display: none; }
  .responsive-table td.table-state > * { max-width: none; }
  .table-panel > .panel-heading { border-bottom: 1px solid var(--border-soft); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item, .detail-item:nth-child(odd) { border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .detail-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
  .detail-item:last-child { border-bottom: 0; }
}
@media (max-width: 460px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card-top { align-items: flex-start; }
  .metric-icon { width: 26px; height: 26px; }
  .metric-card > p { line-height: 1.5; }
  .verification-content { gap: 20px; padding: 20px 15px; }
  .verification-ring { width: 112px; height: 112px; }
  .verification-ring strong { font-size: 21px; }
  .verification-stats { width: 48%; }
  .issue-form { padding: 3px 17px 0; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .modal-header, .modal-body { padding: 18px; }
  .modal-footer { padding: 13px 18px; }
  .filter-bar > select { flex-basis: calc(50% - 5px); min-width: 0; }
  .filter-bar .button { flex: 1; }
  .page-heading .secure-chip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
