:root {
  --brand: #8a1538;
  --brand-dark: #64102b;
  --brand-soft: #f8edf1;
  --ink: #172033;
  --muted: #667085;
  --subtle: #8a94a6;
  --line: #d8dee8;
  --line-soft: #e9edf3;
  --surface: #ffffff;
  --canvas: #f4f6f9;
  --nav: #141c2b;
  --link: #075985;
  --success: #16794b;
  --success-soft: #eaf7f0;
  --warning: #9a5b07;
  --warning-soft: #fff6df;
  --danger: #b42335;
  --danger-soft: #fff0f1;
  --purple: #6941c6;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.06);
  --shadow-md: 0 12px 30px rgb(16 24 40 / 0.09);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-width: 232px;
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-synthesis: none;
  line-height: 1.55;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 15px; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 0.88em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 3vw, 2.35rem); line-height: 1.2; letter-spacing: -0.035em; }
h2 { margin-bottom: 8px; font-size: 1.12rem; letter-spacing: -0.02em; }
h3 { margin-bottom: 6px; font-size: 1rem; }
:focus-visible { outline: 3px solid #0ea5e9; outline-offset: 3px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 10px 14px; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-md); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.eyebrow { display: block; margin-bottom: 6px; color: var(--brand); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.eyebrow--light { color: #eeb7c8; }
.muted { color: var(--muted); }
.preserve-lines { white-space: pre-wrap; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; display: flex; width: var(--sidebar-width); flex-direction: column; padding: 25px 16px 18px; background: var(--nav); color: #e9edf5; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 7px; color: white; }
.brand-mark { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 12px; background: var(--brand); color: white; font-size: 0.83rem; font-weight: 900; letter-spacing: -0.04em; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 0.95rem; letter-spacing: -0.01em; }
.brand small { margin-top: -1px; color: #9eabba; font-size: 0.67rem; letter-spacing: 0.08em; text-transform: uppercase; }
.primary-nav { display: grid; gap: 5px; margin-top: 38px; }
.primary-nav a { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; color: #bfc8d6; font-weight: 650; text-decoration: none; transition: background 150ms ease, color 150ms ease; }
.primary-nav a > span { display: grid; width: 22px; place-items: center; font-size: 1.1rem; }
.primary-nav a:hover { background: rgb(255 255 255 / 0.06); color: white; }
.primary-nav a[aria-current="page"] { background: var(--brand); color: white; box-shadow: 0 7px 18px rgb(0 0 0 / 0.18); }
.session-card { display: grid; gap: 7px; margin-top: auto; padding: 14px; border: 1px solid rgb(255 255 255 / 0.1); border-radius: 12px; background: rgb(255 255 255 / 0.045); }
.session-card .eyebrow { color: #92a0b2; font-size: 0.64rem; }
.session-card strong { font-size: 0.8rem; }
.session-card small { color: #aeb8c7; font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.66rem; }
.session-card form { margin-top: 5px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 99px; }
.status-dot--ok { background: #3ddc97; box-shadow: 0 0 0 3px rgb(61 220 151 / 0.12); }

.content-shell { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { display: none; min-height: 64px; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar .eyebrow { margin: 0; font-size: 0.58rem; }
.topbar strong { display: block; }
.topbar-guide { margin-left: auto; font-size: 0.85rem; font-weight: 700; }
.menu-toggle { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; }
.main-content { width: min(1320px, 100%); min-height: calc(100vh - 68px); margin: 0 auto; padding: 38px clamp(22px, 4vw, 52px) 64px; }
.footer { padding: 0 30px 25px; color: var(--subtle); font-size: 0.72rem; text-align: center; }

.mode-banner { display: flex; width: min(1320px, calc(100% - 44px)); align-items: center; gap: 12px; margin: 18px auto -18px; padding: 12px 17px; border: 1px solid #efd596; border-radius: 11px; background: var(--warning-soft); color: #744204; }
.mode-banner__icon { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 99px; background: #edb94f; color: #4f2d00; font-weight: 900; }
.mode-banner strong, .mode-banner span { display: block; }
.mode-banner strong { font-size: 0.84rem; }
.mode-banner div > span { font-size: 0.77rem; }

.page-heading { margin-bottom: 26px; }
.page-heading p, .detail-heading p { margin-bottom: 0; color: var(--muted); }
.page-heading--actions { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.detail-heading h1 { margin-top: 8px; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 19px; color: var(--muted); font-size: 0.78rem; }
.breadcrumbs a { color: var(--muted); }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; line-height: 1.2; text-align: center; text-decoration: none; transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease; }
.button:not(:disabled):not(.button--disabled):active { transform: translateY(1px); }
.button--primary { border-color: var(--brand); background: var(--brand); color: white; box-shadow: 0 4px 10px rgb(138 21 56 / 0.18); }
.button--primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.button--secondary { border-color: #b9c3d1; background: white; color: var(--ink); }
.button--secondary:hover { border-color: #8996a8; background: #f8fafc; }
.button--quiet { border-color: rgb(255 255 255 / 0.12); background: transparent; color: inherit; }
.content-shell .button--quiet { border-color: var(--line); color: var(--ink); }
.button--danger { border-color: var(--danger); background: var(--danger); color: white; }
.button--danger:hover { background: #8f1828; }
.button--disabled, .button:disabled { border-color: var(--line); background: #e8ebf0; color: #8d96a5; box-shadow: none; }
.button--large { min-height: 49px; padding: 12px 19px; }
.button--full { width: 100%; }
.text-link { font-weight: 750; text-decoration: none; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { position: relative; display: block; min-height: 138px; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; }
.stat-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: #8190a5; content: ""; }
.stat-card::after { position: absolute; right: -24px; bottom: -35px; width: 100px; height: 100px; border-radius: 50%; background: rgb(100 116 139 / 0.05); content: ""; }
.stat-card > span, .stat-card > small { display: block; color: var(--muted); }
.stat-card > span { font-size: 0.78rem; font-weight: 700; }
.stat-card > strong { display: block; margin: 6px 0 2px; font-size: 2.1rem; line-height: 1.15; letter-spacing: -0.04em; }
.stat-card > small { font-size: 0.69rem; }
.stat-card:hover { border-color: #b8c2cf; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card--active::before { background: var(--success); }
.stat-card--expiring::before { background: #d79518; }
.stat-card--attention::before { background: var(--danger); }

.panel, .filter-panel, .form-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel { padding: 22px; }
.panel--flush { padding: 0; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.panel-heading h2 { margin: 0; font-size: 1.15rem; }
.panel-heading .eyebrow { margin-bottom: 2px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
.quick-grid article { display: flex; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.quick-grid h2 { margin-bottom: 3px; font-size: 0.9rem; }
.quick-grid p { margin: 0; color: var(--muted); font-size: 0.76rem; }
.quick-icon, .action-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-weight: 900; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 14px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table td > small { display: block; max-width: 240px; overflow: hidden; color: var(--muted); font-size: 0.69rem; text-overflow: ellipsis; white-space: nowrap; }
.row-title { color: var(--ink); font-weight: 750; text-decoration: none; }
.row-title:hover { color: var(--brand); }
.table-action { width: 55px; text-align: right; }
.table-action a { font-size: 0.78rem; font-weight: 750; text-decoration: none; }
.masked-key { color: #4b5668; white-space: nowrap; }
.status-badge, .result-badge, .sensitive-label { display: inline-flex; align-items: center; border-radius: 99px; font-size: 0.68rem; font-weight: 800; white-space: nowrap; }
.status-badge { padding: 4px 9px; }
.status-badge--active { background: var(--success-soft); color: var(--success); }
.status-badge--expiring { background: var(--warning-soft); color: var(--warning); }
.status-badge--expired { background: #edf0f4; color: #566173; }
.status-badge--superseded { background: #f1edff; color: var(--purple); }
.status-badge--revoked { background: var(--danger-soft); color: var(--danger); }
.result-badge { margin-left: 7px; padding: 3px 7px; }
.result-badge--success { background: var(--success-soft); color: var(--success); }
.result-badge--failure { background: var(--danger-soft); color: var(--danger); }

.empty-state { padding: 48px 20px; color: var(--muted); text-align: center; }
.empty-state > span { display: block; margin-bottom: 8px; color: #9aa5b4; font-size: 2rem; }
.empty-state h3 { color: var(--ink); }
.empty-state p { margin: 0; }
.result-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 21px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.76rem; }
.result-heading strong { color: var(--ink); font-size: 1.1rem; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 15px 20px; border-top: 1px solid var(--line); font-size: 0.76rem; }
.pagination > span:last-child { text-align: right; }

.filter-panel { margin-bottom: 18px; padding: 19px 21px; }
.filter-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.filter-heading h2 { margin: 0; font-size: 0.95rem; }
.filter-heading a { font-size: 0.75rem; }
.filter-grid { display: grid; grid-template-columns: 1.4fr 1fr 0.8fr; gap: 12px; }
.filter-grid--audit { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
.date-filter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 13px; }
.advanced-filters { margin-top: 13px; border-top: 1px solid var(--line-soft); }
.advanced-filters summary { width: max-content; padding-top: 12px; color: var(--link); font-size: 0.75rem; font-weight: 750; cursor: pointer; }
.filter-actions { display: flex; justify-content: end; margin-top: 14px; }

.field { min-width: 0; }
.field label { display: block; margin-bottom: 6px; font-size: 0.76rem; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #bec7d4; border-radius: 8px; background: white; box-shadow: inset 0 1px 1px rgb(16 24 40 / 0.025); }
.field textarea { min-height: 88px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #96a2b3; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--link); outline: 3px solid rgb(14 165 233 / 0.18); }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 0.69rem; }
.required { color: var(--danger); font-size: 0.65rem; }
.stack-form { display: grid; gap: 16px; }
.form-card { max-width: 900px; padding: clamp(20px, 4vw, 34px); }
.form-section { min-width: 0; margin: 0; padding: 0 0 27px; border: 0; }
.form-section + .form-section { padding-top: 27px; border-top: 1px solid var(--line-soft); }
.form-section legend { display: flex; align-items: center; gap: 9px; width: 100%; margin-bottom: 18px; font-size: 0.98rem; font-weight: 800; }
.form-section legend span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 0.66rem; }
.field-row { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 15px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 17px; }
.choice-card { display: flex; min-height: 78px; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.choice-card input { width: 18px; height: 18px; accent-color: var(--brand); }
.choice-card strong, .choice-card small { display: block; }
.choice-card strong { font-size: 0.83rem; }
.choice-card small { color: var(--muted); font-size: 0.68rem; }
.expiry-fields { max-width: 430px; }
.input-suffix { display: flex; }
.input-suffix input { border-radius: 8px 0 0 8px; }
.input-suffix span { display: grid; min-width: 55px; place-items: center; border: 1px solid #bec7d4; border-left: 0; border-radius: 0 8px 8px 0; background: #f4f6f9; color: var(--muted); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 5px; }
.subject-card { display: grid; gap: 3px; margin-bottom: 24px; padding: 15px 17px; border-left: 4px solid var(--brand); border-radius: 0 9px 9px 0; background: var(--brand-soft); }
.subject-card span { color: var(--muted); font-size: 0.68rem; }
.subject-card code { color: var(--muted); }
.check-field { display: flex; gap: 9px; color: var(--muted); font-size: 0.73rem; cursor: pointer; }
.check-field input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--danger); }

.alert { display: flex; align-items: flex-start; gap: 9px 13px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid; border-radius: 10px; font-size: 0.78rem; }
.alert strong { white-space: nowrap; }
.alert ul { margin: 0; padding-left: 18px; }
.alert--success { border-color: #acd9c3; background: var(--success-soft); color: #0c5c38; }
.alert--danger { border-color: #efb5bd; background: var(--danger-soft); color: #8e1727; }
.alert--warning { border-color: #ebd294; background: var(--warning-soft); color: #744204; }
.alert--info { border-color: #bad7e8; background: #edf8fe; color: #075985; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.detail-list > div { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.detail-list > div:nth-child(odd) { padding-right: 18px; }
.detail-list dt { margin-bottom: 4px; color: var(--muted); font-size: 0.69rem; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.detail-list__full { grid-column: 1 / -1; }
.lineage { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 20px; padding: 14px; border-radius: 9px; background: #f7f8fb; }
.lineage h3 { width: 100%; margin: 0; font-size: 0.76rem; }
.lineage a { font-size: 0.75rem; font-weight: 700; }
.detail-actions { display: grid; gap: 14px; }
.action-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.action-card h2 { margin-top: 11px; }
.action-card > p { color: var(--muted); font-size: 0.75rem; }
.action-card--danger { border-color: #efc4ca; }
.action-card--danger .action-icon { background: var(--danger-soft); color: var(--danger); }

.result-shell { width: min(760px, 100%); margin: 20px auto; text-align: center; }
.result-icon { display: grid; width: 62px; height: 62px; margin: 0 auto 15px; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 1.6rem; font-weight: 900; }
.result-shell > p { max-width: 590px; margin-right: auto; margin-left: auto; color: var(--muted); }
.key-panel { margin: 27px 0 17px; padding: 20px; border: 1px solid #dab4c1; border-radius: 13px; background: #fffafb; box-shadow: var(--shadow-md); text-align: left; }
.key-panel__heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 0.72rem; font-weight: 800; }
.sensitive-label { padding: 3px 8px; background: var(--danger-soft); color: var(--danger); }
.license-key { display: block; max-height: 230px; overflow: auto; padding: 16px; border: 1px solid #e4cbd3; border-radius: 8px; background: white; color: #3d1020; font-size: 0.79rem; line-height: 1.75; overflow-wrap: anywhere; user-select: all; }
.license-key--hidden { filter: blur(7px); user-select: none; }
.key-actions { display: flex; gap: 9px; margin-top: 13px; }
.delivery-note { padding: 15px 18px; border-radius: 10px; background: white; text-align: left; }
.delivery-note ul { display: flex; flex-wrap: wrap; gap: 9px 30px; margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.76rem; }
.result-actions { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 20px; }
.security-caption { margin-top: 20px !important; font-size: 0.69rem; }

.audit-list { padding: 5px 21px; }
.audit-row { display: grid; grid-template-columns: 3px minmax(0, 1fr); gap: 15px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.audit-row:last-child { border-bottom: 0; }
.audit-row__marker { border-radius: 99px; background: #8b95a5; }
.audit-row__marker--success { background: var(--success); }
.audit-row__marker--failure { background: var(--danger); }
.audit-row__heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.audit-row__heading time { color: var(--muted); font-size: 0.7rem; white-space: nowrap; }
.audit-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 11px 0 0; }
.audit-meta > div { display: flex; gap: 6px; }
.audit-meta dt { color: var(--muted); font-size: 0.66rem; }
.audit-meta dd { margin: 0; font-size: 0.69rem; }
.metadata { margin-top: 10px; }
.metadata summary { width: max-content; color: var(--link); font-size: 0.7rem; font-weight: 700; cursor: pointer; }
.metadata pre { max-height: 220px; overflow: auto; margin: 9px 0 0; padding: 12px; border-radius: 8px; background: #f4f6f9; font-size: 0.68rem; white-space: pre-wrap; }

.guide-layout { display: grid; grid-template-columns: 190px minmax(0, 760px); gap: 35px; align-items: start; }
.guide-toc { position: sticky; top: 20px; display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.guide-toc strong { padding: 4px 7px 8px; font-size: 0.75rem; }
.guide-toc a { padding: 7px; border-radius: 7px; color: var(--muted); font-size: 0.75rem; text-decoration: none; }
.guide-toc a:hover { background: #f3f5f8; color: var(--ink); }
.guide-content { display: grid; gap: 17px; }
.guide-content section { scroll-margin-top: 20px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.guide-content h2 { font-size: 1.2rem; }
.guide-content p, .guide-content li { color: #4f5a6b; }
.guide-content li + li { margin-top: 6px; }
.guide-number { display: inline-block; margin-bottom: 9px; color: var(--brand); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.1em; }
.guide-note { margin-bottom: 0; padding: 11px 13px; border-left: 3px solid var(--link); background: #f1f8fc; font-size: 0.76rem; }
.inline-status { padding: 10px 13px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; }
.inline-status--ok { background: var(--success-soft); color: var(--success); }
.inline-status--warning { background: var(--warning-soft); color: var(--warning); }

.error-state { max-width: 610px; margin: 70px auto; text-align: center; }
.error-code { display: block; color: #c4cad3; font-size: 4.5rem; font-weight: 900; letter-spacing: -0.07em; line-height: 1; }
.error-state p { color: var(--muted); }
.error-state > div { display: flex; justify-content: center; gap: 9px; margin-top: 24px; }
.request-reference { font-size: 0.72rem; }

.toast { position: fixed; z-index: 200; right: 20px; bottom: 20px; max-width: 330px; padding: 11px 15px; border-radius: 9px; background: var(--nav); color: white; box-shadow: var(--shadow-md); font-size: 0.78rem; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity 150ms ease, transform 150ms ease; }
.toast--visible { opacity: 1; transform: translateY(0); }

.login-page { min-height: 100vh; background: #0e1625; }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, 0.92fr) minmax(450px, 1.08fr); }
.login-intro { position: relative; display: flex; overflow: hidden; flex-direction: column; justify-content: space-between; padding: clamp(32px, 6vw, 72px); background: linear-gradient(145deg, #161f30 0%, #101827 55%, #27101b 100%); color: white; }
.login-intro::before { position: absolute; right: -180px; bottom: -180px; width: 460px; height: 460px; border: 1px solid rgb(255 255 255 / 0.08); border-radius: 50%; box-shadow: 0 0 0 70px rgb(255 255 255 / 0.025), 0 0 0 140px rgb(255 255 255 / 0.018); content: ""; }
.brand--login { position: relative; padding: 0; }
.login-intro h1 { position: relative; margin-bottom: 20px; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.06; letter-spacing: -0.055em; }
.login-intro p { position: relative; max-width: 530px; color: #aeb8c8; font-size: 1rem; }
.security-points { position: relative; display: grid; gap: 9px; margin: 0; padding: 0; color: #c7cfdb; font-size: 0.77rem; list-style: none; }
.security-points span { margin-right: 7px; color: #48d79a; font-weight: 900; }
.login-panel { display: grid; place-items: center; padding: 30px; background: #f7f8fa; }
.login-form-wrap { width: min(430px, 100%); }
.login-form-wrap h2 { margin-bottom: 9px; font-size: 2rem; letter-spacing: -0.04em; }
.login-form-wrap > .muted { margin-bottom: 25px; }
.login-form-wrap code { padding: 2px 4px; border-radius: 4px; background: #edf0f4; }
.login-help { margin-top: 25px; padding: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.75rem; }
.login-help strong { display: block; margin-bottom: 4px; color: var(--ink); }
.login-help p { margin: 0; }

@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-grid--audit { grid-template-columns: repeat(2, 1fr); }
  .filter-grid--audit .field--wide { grid-column: span 2; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 295px; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-105%); transition: transform 180ms ease; box-shadow: var(--shadow-md); }
  .sidebar-open .sidebar { transform: translateX(0); }
  .content-shell { margin-left: 0; }
  .topbar { display: flex; }
  .main-content { padding-top: 27px; }
  .mode-banner { margin-top: 15px; margin-bottom: -8px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-actions { grid-template-columns: repeat(2, 1fr); }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc { position: static; grid-template-columns: repeat(3, 1fr); }
  .guide-toc strong { grid-column: 1 / -1; }
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: 360px; }
  .login-panel { min-height: 580px; }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .main-content { padding: 24px 14px 48px; }
  .mode-banner { width: calc(100% - 28px); }
  .page-heading--actions, .detail-heading { align-items: stretch; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .stats-grid, .quick-grid, .detail-actions, .choice-grid, .field-row, .filter-grid, .filter-grid--audit, .date-filter-grid { grid-template-columns: 1fr; }
  .filter-grid--audit .field--wide { grid-column: auto; }
  .panel { padding: 17px; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table tr { padding: 12px 15px; border-bottom: 1px solid var(--line); }
  .responsive-table tr:last-child { border-bottom: 0; }
  .responsive-table td { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 5px 0; border: 0; text-align: right; }
  .responsive-table td::before { color: var(--muted); font-size: 0.68rem; font-weight: 700; content: attr(data-label); }
  .responsive-table td:first-child { display: block; padding-bottom: 9px; text-align: left; }
  .responsive-table td:first-child::before, .responsive-table .table-action::before { display: none; }
  .responsive-table .table-action { display: block; width: 100%; padding-top: 9px; text-align: right; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list > div:nth-child(odd) { padding-right: 0; }
  .form-card { padding: 18px; }
  .alert { display: grid; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .result-actions { align-items: stretch; flex-direction: column; }
  .key-actions { flex-direction: column; }
  .delivery-note ul { display: grid; }
  .audit-row__heading { flex-direction: column; }
  .guide-toc { grid-template-columns: repeat(2, 1fr); }
  .guide-content section { padding: 19px; }
  .login-intro { min-height: 320px; padding: 28px; }
  .login-intro h1 { font-size: 2.3rem; }
  .security-points { display: none; }
  .login-panel { min-height: 560px; padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
