:root {
  color-scheme: light;
  --page: #f3f5fb;
  --surface: #ffffff;
  --surface-soft: #f7f8fd;
  --surface-blue: #f0f2ff;
  --ink: #1c2742;
  --ink-soft: #52617d;
  --muted: #7e89a2;
  --line: #e4e8f2;
  --line-strong: #d7deed;
  --sidebar: #17223b;
  --sidebar-soft: #202d4b;
  --accent: #5967e9;
  --accent-hover: #4756d7;
  --accent-soft: #e9ecff;
  --success: #12805c;
  --success-soft: #e6f7ef;
  --warning: #9c6300;
  --warning-soft: #fff4d8;
  --danger: #b83248;
  --danger-soft: #fff0f2;
  --shadow-card: 0 5px 20px rgba(30, 45, 82, .045);
  --radius-card: 16px;
  --radius-control: 9px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--page); font-size: 14px; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button, input, textarea, select { font: inherit; }
button, .button, input, textarea, select { border-radius: var(--radius-control); }
button, .button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; border: 1px solid transparent; background: var(--accent); color: #fff; font-weight: 650; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease; }
button:hover, .button:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 4px 12px rgba(76, 91, 216, .17); }
button:active, .button:active { transform: translateY(1px); }
.button-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.button-secondary:hover { background: var(--surface-soft); color: var(--ink); box-shadow: none; }
.button-quiet { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.button-quiet:hover { background: var(--surface-soft); border-color: var(--line-strong); color: var(--ink); box-shadow: none; }
.button-danger, button.danger { background: var(--danger); color: #fff; }
.button-danger:hover, button.danger:hover { background: #98233a; }
button:disabled { opacity: .55; cursor: not-allowed; }
input, textarea, select { width: 100%; min-height: 42px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); outline: none; }
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #99a2b5; }
input:hover, textarea:hover, select:hover { border-color: #b8c3dc; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(89, 103, 233, .12); }
input[type="checkbox"], input[type="radio"] { width: 17px; min-height: 17px; margin: 0; accent-color: var(--accent); }
label { display: grid; gap: 7px; color: #35425f; font-size: 13px; font-weight: 650; }
label small, .field-help { color: var(--muted); font-size: 12px; font-weight: 450; line-height: 1.5; }
small { line-height: 1.5; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { overflow-wrap: anywhere; color: #4653b8; background: #f0f2ff; border-radius: 5px; padding: 2px 5px; font-size: .92em; }
.skip-link { position: fixed; left: -9999px; top: 12px; z-index: 100; padding: 10px 14px; background: #fff; color: var(--ink); border: 2px solid var(--accent); }
.skip-link:focus { left: 12px; }

.app-frame { display: flex; min-height: 100vh; width: 100%; }
.sidebar { flex: 0 0 248px; width: 248px; min-height: 100vh; display: flex; flex-direction: column; padding: 23px 15px 18px; background: var(--sidebar); color: #dbe3f5; }
.brand { display: flex; align-items: center; gap: 11px; padding: 3px 9px 26px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 11px; background: linear-gradient(140deg, #7380ff, #5967e9 72%); color: #fff; font-size: 20px; font-weight: 800; box-shadow: 0 4px 12px rgba(8, 13, 33, .2); }
.brand-copy { display: grid; gap: 1px; line-height: 1.1; }
.brand-copy strong { font-size: 15px; letter-spacing: .13em; }
.brand-copy small { color: #9da9c7; font-size: 9px; letter-spacing: .16em; font-weight: 700; }
.sidebar-caption { margin: 12px 10px 8px; color: #8491b1; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .11em; }
.sidebar-nav { display: grid; gap: 4px; margin: 0 0 10px; }
.sidebar-nav a { position: relative; display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 9px 11px; border-radius: 9px; color: #c2cce2; font-size: 13px; font-weight: 550; transition: background-color .16s ease, color .16s ease; }
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav a.is-active { background: #293754; color: #fff; box-shadow: inset 3px 0 0 #7985ff; }
.nav-icon { display: inline-flex; flex: 0 0 21px; align-items: center; justify-content: center; width: 21px; color: #a9b7dc; font-size: 17px; font-weight: 500; }
.sidebar-nav a.is-active .nav-icon { color: #aeb5ff; }
.sidebar-footer { display: flex; align-items: flex-start; gap: 10px; margin: auto 2px 0; padding: 12px 10px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.045); border-radius: 11px; }
.sidebar-footer-mark { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: rgba(113, 224, 177, .16); color: #80e0b5; font-weight: 800; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { color: #e1e8f7; font-size: 11px; }
.sidebar-footer small { margin-top: 3px; color: #9eabc8; font-size: 10px; }
.sidebar-version { padding: 15px 10px 0; color: #8491b1; font-size: 10px; }
.workspace { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; padding: 12px 31px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-context { display: grid; gap: 1px; }
.topbar-kicker { color: #8893ab; font-size: 9px; font-weight: 750; letter-spacing: .14em; }
.topbar-context-label { color: #6a7690; font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.admin-chip { display: flex; align-items: center; gap: 9px; min-width: 0; }
.admin-avatar { display: inline-flex; flex: 0 0 31px; align-items: center; justify-content: center; width: 31px; height: 31px; border-radius: 50%; background: var(--accent-soft); color: #4d5bcd; font-size: 11px; font-weight: 750; }
.admin-name { max-width: 220px; overflow: hidden; color: #43516c; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.logout-form { display: inline-flex; margin: 0; }
.main-content { flex: 1 0 auto; width: 100%; max-width: 1560px; margin: 0 auto; padding: 29px 31px 34px; }
.app-footer { display: flex; align-items: center; gap: 7px; padding: 16px 31px 18px; border-top: 1px solid var(--line); color: #8a94aa; font-size: 11px; }
.footer-divider { color: #bac2d2; }
.footer-version { margin-left: auto; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 0 0 22px; }
.page-header-copy { min-width: 0; }
.breadcrumb { margin: 0 0 6px; color: #8792ab; font-size: 11px; font-weight: 600; }
.page-header h1, h1 { margin: 0; color: #1c2742; font-size: clamp(23px, 2vw, 29px); font-weight: 750; letter-spacing: -.035em; line-height: 1.2; }
.page-lead { max-width: 760px; margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; }
.page-header-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.eyebrow { margin: 0 0 7px; color: #7482a0; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
h2 { margin: 0; color: #25314e; font-size: 16px; font-weight: 730; letter-spacing: -.015em; }
h3 { margin: 0; font-size: 14px; font-weight: 700; }
p { margin-top: 0; }
.muted { color: var(--muted); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.panel { min-width: 0; padding: 22px; margin: 0 0 19px; background: var(--surface); border: 1px solid #e6eaf4; border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.panel p { color: var(--ink-soft); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-header p { margin: 5px 0 0; font-size: 12px; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.metric-card { position: relative; min-width: 0; overflow: hidden; padding: 16px 16px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card); }
.metric-card::before { position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: #cbd2ff; content: ""; }
.metric-card.metric-primary::before { background: var(--accent); }
.metric-card.metric-success::before { background: #50c99b; }
.metric-card.metric-warning::before { background: #f0b74a; }
.metric-card.metric-danger::before { background: #ef7e8e; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.metric-label { color: #77839d; font-size: 11px; font-weight: 650; }
.metric-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: #f0f2ff; color: var(--accent); font-size: 14px; font-weight: 800; }
.metric-value { display: block; color: #1c2742; font-size: clamp(23px, 2.3vw, 30px); font-weight: 780; letter-spacing: -.045em; line-height: 1.1; }
.metric-note { display: block; margin-top: 7px; color: #8a95ab; font-size: 10px; }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; font-size: 12px; }
th, td { padding: 12px 13px; text-align: left; vertical-align: middle; border-bottom: 1px solid #edf0f7; }
th { background: #f8f9fd; color: #8390a9; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .045em; white-space: nowrap; }
td { color: #4a5772; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcff; }
td:first-child { color: #2f3c5b; font-weight: 650; }
td a { font-weight: 700; }
.table-primary { display: block; color: #2b3857; font-weight: 700; }
.table-secondary { display: block; margin-top: 3px; color: #8b96aa; font-size: 10px; font-weight: 450; }
.table-mono { overflow-wrap: anywhere; color: #526080; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.table-actions { text-align: right; white-space: nowrap; }
.table-action { display: inline-flex; align-items: center; justify-content: center; min-height: 31px; padding: 6px 9px; border: 1px solid #dce1ff; border-radius: 7px; background: #f3f4ff; color: #4c59cd; font-size: 11px; font-weight: 700; }
.table-action:hover { background: var(--accent); color: #fff; }
.status-pill, .type-pill, .neutral-pill { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.status-pill::before { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-active { color: #0e8158; background: #e4f7ee; }
.status-expiring { color: #926000; background: #fff3d4; }
.status-expired { color: #ae3447; background: #ffe9ed; }
.status-revoked { color: #a83248; background: #ffedf0; }
.type-production { color: #4758c9; background: #edf0ff; }
.type-developer { color: #7a4dba; background: #f4edff; }
.neutral-pill { color: #66738f; background: #f0f2f7; }
.empty-state { padding: 32px 20px; text-align: center; color: #8792a9; }
.empty-state strong { display: block; margin-bottom: 5px; color: #40506f; font-size: 13px; }

.filters-panel { padding: 16px; margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.filter-grid { display: grid; max-width: none; grid-template-columns: minmax(190px, 1.4fr) minmax(150px, 1fr) minmax(135px, .8fr) minmax(135px, .8fr) auto; align-items: end; gap: 10px; }
.filter-grid label { gap: 5px; font-size: 11px; }
.filter-grid input, .filter-grid select { min-height: 38px; padding: 8px 10px; font-size: 12px; }
.filter-actions { display: flex; gap: 7px; align-items: center; }
.filter-actions button, .filter-actions .button { min-height: 38px; padding: 8px 13px; font-size: 12px; }
.result-count { color: #8792aa; font-size: 11px; }

.two-column-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr); align-items: start; gap: 18px; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(285px, .8fr); align-items: start; gap: 18px; }
.stack { display: grid; gap: 17px; }
.stack .panel { margin: 0; }
.form-page-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .8fr); align-items: start; gap: 18px; }
.form-layout { max-width: none; width: 100%; }
.form-section { padding: 0 0 20px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { padding-bottom: 0; margin-bottom: 18px; border-bottom: 0; }
.form-section-header { margin-bottom: 14px; }
.form-section-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 16px; }
.form-grid .field-full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-actions small { flex: 1 1 180px; color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-card { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; cursor: pointer; }
.choice-card:has(input:checked) { border-color: #929cff; background: #f5f6ff; box-shadow: inset 0 0 0 1px #b5bbff; }
.choice-card span { display: block; color: #2f3d5a; font-size: 12px; font-weight: 750; }
.choice-card small { display: block; margin-top: 3px; color: #8792aa; font-weight: 450; }
.form-note { padding: 12px 13px; border-radius: 10px; background: var(--surface-soft); color: #697791; font-size: 12px; }
.info-card { padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-card); }
.info-card h2, .info-card h3 { margin-bottom: 9px; }
.info-card p { margin: 0 0 10px; color: #6f7b95; font-size: 12px; }
.info-list { display: grid; gap: 0; margin: 0; }
.info-list div { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf0f7; }
.info-list div:last-child { border-bottom: 0; }
.info-list dt { color: #8792a9; font-size: 11px; }
.info-list dd { margin: 0; color: #34425f; font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.activation-summary { padding: 15px; margin: 0 0 16px; border: 1px solid #dfe3ff; border-radius: 12px; background: #f5f6ff; }
.activation-summary p { margin: 5px 0; color: #677391; font-size: 12px; }
.activation-summary strong { color: #39466d; }
.activation-summary code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.source-list { display: grid; gap: 0; margin: 14px 0 0; }
.source-list div { padding: 10px 0; border-bottom: 1px solid #e5e8fa; }
.source-list div:last-child { border-bottom: 0; }
.source-list dt { margin-bottom: 4px; color: #838eaa; font-size: 10px; }
.source-list dd { margin: 0; color: #3b496b; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }

.file-upload { display: grid; gap: 9px; padding: 17px; border: 1px dashed #c7ceea; border-radius: 12px; background: #f8f9ff; }
.file-label { display: block; color: #34425f; font-size: 12px; font-weight: 700; }
.file-input { display: block; width: 100%; min-height: 38px; padding: 6px; background: #fff; border: 1px solid #dfe3ef; font-size: 11px; cursor: pointer; }
.file-input::file-selector-button, .file-input::-webkit-file-upload-button { margin-right: 9px; padding: 7px 10px; border: 0; border-radius: 6px; background: #5967e9; color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.file-upload small { color: var(--muted); font-size: 11px; }
.notice { padding: 13px 15px; border: 1px solid; border-radius: 11px; font-size: 12px; }
.notice strong { display: block; margin-bottom: 3px; font-size: 12px; }
.notice p { margin: 0; font-size: 12px; }
.notice-info { border-color: #d9e3ff; background: #f1f5ff; color: #53648c; }
.notice-warning { border-color: #f2dfad; background: #fff8e8; color: #83601b; }
.notice-danger { border-color: #f0c4cb; background: #fff3f4; color: #91384a; }
.notice-success { border-color: #cceadd; background: #effaf5; color: #286b50; }

.license-hero { padding: 21px; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.license-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.license-title { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.license-emblem { display: inline-flex; flex: 0 0 42px; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 18px; font-weight: 800; }
.license-id { margin: 1px 0 6px; color: #263351; font-size: 19px; font-weight: 780; letter-spacing: -.025em; overflow-wrap: anywhere; }
.license-subtitle { margin: 0; color: #8490a8; font-size: 11px; }
.license-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.license-data-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 21px; padding-top: 18px; border-top: 1px solid #edf0f7; }
.license-data-label { display: block; margin-bottom: 4px; color: #8792a9; font-size: 10px; }
.license-data-value { display: block; color: #35425e; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.revision-list { display: grid; }
.revision-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf0f7; }
.revision-row:last-child { border-bottom: 0; }
.revision-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: #eff1ff; color: #626fe4; font-size: 12px; font-weight: 800; }
.revision-row strong { display: block; color: #35425f; font-size: 12px; }
.revision-row small { display: block; margin-top: 4px; color: #8994aa; font-size: 10px; }
.revision-date { display: grid; gap: 4px; align-content: start; max-width: 165px; color: #8994aa; font-size: 10px; white-space: normal; overflow-wrap: anywhere; }
.revision-date code { color: #64718b; font-size: 10px; overflow-wrap: anywhere; }
.danger-zone { padding: 18px; background: #fff; border: 1px solid #f0cfd4; border-radius: var(--radius-card); }
.danger-zone .panel-header { margin-bottom: 11px; }
.danger-zone h2 { color: #9e3045; }
.danger-zone p { color: #89636a; font-size: 12px; }
.danger-zone form { max-width: none; }
.inline-checkbox { display: flex; align-items: flex-start; gap: 9px; font-weight: 550; color: #52617d; }
.inline-checkbox span { display: grid; gap: 3px; }
.inline-checkbox small { color: var(--muted); font-weight: 450; }

.login-wrap { display: grid; place-items: start center; padding: clamp(15px, 7vh, 75px) 12px 60px; }
.login-card { width: min(100%, 450px); padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgba(28, 39, 66, .08); }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.login-card h1 { font-size: 25px; }
.login-card .page-lead { margin-bottom: 22px; }
.login-card form { max-width: none; }
.error-panel { max-width: 700px; margin: 10px auto; }
.error-code { display: inline-flex; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: #63708b; }

form { display: grid; gap: 14px; max-width: 760px; }
form .actions { margin-top: 3px; }
form .button, form button { width: max-content; max-width: 100%; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset legend { margin-bottom: 10px; color: #34425f; font-weight: 700; }
dl { display: grid; grid-template-columns: minmax(120px, .5fr) minmax(0, 1fr); gap: 0 16px; margin: 0; }
dt, dd { margin: 0; padding: 10px 0; border-bottom: 1px solid #edf0f7; }
dt { color: #8792a9; font-size: 12px; }
dd { color: #35425f; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }

@media (max-width: 1240px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .sidebar { flex-basis: 218px; width: 218px; padding-inline: 11px; }
  .topbar { padding-inline: 21px; }
  .main-content { padding: 23px 20px 28px; }
  .app-footer { padding-inline: 20px; }
  .two-column-layout, .split-layout, .form-page-grid { grid-template-columns: minmax(0, 1fr); }
  .license-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .app-frame { display: flex; flex-direction: column; }
  .sidebar { flex: 0 0 auto; width: 100%; min-height: 0; padding: 13px 13px 12px; }
  .brand { padding: 2px 5px 13px; }
  .sidebar-caption, .sidebar-footer, .sidebar-version { display: none; }
  .sidebar-nav { display: flex; gap: 5px; margin: 0; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .sidebar-nav a { flex: 0 0 auto; min-height: 38px; padding: 8px 10px; font-size: 11px; }
  .nav-icon { flex-basis: auto; width: auto; font-size: 14px; }
  .sidebar-nav a.is-active { box-shadow: inset 0 -2px 0 #7985ff; }
  .topbar { position: static; min-height: 58px; padding: 10px 15px; }
  .topbar-context-label { font-size: 11px; }
  .topbar-actions { gap: 8px; }
  .admin-avatar { width: 27px; height: 27px; flex-basis: 27px; }
  .admin-name { max-width: 95px; font-size: 11px; }
  .button-quiet { min-height: 34px; padding: 7px 9px; font-size: 11px; }
  .main-content { padding: 21px 13px 25px; }
  .app-footer { flex-wrap: wrap; padding: 13px; font-size: 10px; }
  .page-header { flex-direction: column; gap: 13px; margin-bottom: 17px; }
  .page-header-actions { width: 100%; justify-content: flex-start; }
  .page-header h1, h1 { font-size: 24px; }
  .panel { padding: 16px; margin-bottom: 14px; border-radius: 13px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 15px; }
  .metric-card { padding: 13px; }
  .metric-top { align-items: flex-start; margin-bottom: 12px; }
  .metric-label { font-size: 10px; }
  .metric-value { font-size: 25px; }
  .filter-grid, .form-grid, .choice-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-actions { grid-column: auto; }
  .form-grid .field-full { grid-column: auto; }
  .page-header-actions .button { width: 100%; }
  .license-hero { padding: 15px; }
  .license-hero-top { flex-direction: column; }
  .license-data-grid { gap: 13px; }
  .revision-row { grid-template-columns: 31px minmax(0,1fr); }
  .revision-date { grid-column: 2; }
  .login-wrap { padding-top: 18px; }
  .login-card { padding: 22px; }
  table { min-width: 700px; }
  .app-footer .footer-version { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
:focus-visible { outline: 3px solid #8893ff; outline-offset: 2px; }

/* Small utility classes are kept in the stylesheet to comply with the app CSP. */
.table-margin-top { margin-top: 16px; }
.margin-top-md { margin-top: 16px; }
.spacer-13 { height: 13px; }
.spacer-14 { height: 14px; }
.notice-paragraph-gap { margin-top: 7px; }
.login-footnote { margin: 20px 0 0; font-size: 11px; }
.error-code-panel { margin: 18px 0 20px; }
.filter-grid .field-full { grid-column: 1 / -1; }
.payload-preview { max-width: 440px; max-height: 280px; overflow: auto; margin: 9px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.backup-form { margin-top: 15px; }
details > summary { color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 650; }
