@font-face {
  font-family: "IBM Plex Sans";
  src: url("/admin/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/admin/fonts/ibm-plex-mono-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ground: #f3f6f6;
  --surface: #fff;
  --raised: #f7f9f9;
  --active: #e6ebeb;
  --border: #e6eaea;
  --rule: #eef0f0;
  --control: #cbd2d2;
  --text: #191e20;
  --muted: #596367;
  --faint: #646e72;
  --primary: #f5c400;
  --primary-ink: #27220c;
  --primary-hover: #e7b900;
  --accent: #715700;
  --brand-yellow: #f5c400;
  --positive: #1c6c48;
  --negative: #b43237;
  --warning: #865412;
  --positive-bg: #eaf5ef;
  --negative-bg: #fceff0;
  --warning-bg: #fbf3e6;
  --radius-card: 8px;
  --radius-control: 6px;
  --radius-sheet: 16px;
  --gap: 24px;
  --sidebar-width: 228px;
  --font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 14px; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: inherit; cursor: pointer; line-height: 20px; font-weight: 500; white-space: nowrap; }
button:disabled { background: var(--raised); border-color: var(--border); color: var(--muted); cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea { display: block; width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); color: var(--text); outline: none; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input:focus-visible, textarea:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
input[readonly] { background: var(--raised); }
input[type="checkbox"] { display: inline-block; flex: none; width: 17px; height: 17px; min-height: 0; accent-color: var(--accent); }
label { display: block; margin-bottom: 20px; font-size: 14px; font-weight: 500; }
label > input, label > textarea { margin-top: 8px; font-weight: 400; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; }
h1 { font-size: 24px; line-height: 1.4; letter-spacing: -.02em; }
h2 { font-size: 18px; line-height: 1.5; }
h3 { font-size: 16px; }
p { line-height: 1.7; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-weight: 400; }
.num, time { font-variant-numeric: tabular-nums; }
.icon { flex: none; width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.secondary { border-color: var(--control); background: var(--surface); }
.secondary:hover:not(:disabled) { background: var(--raised); border-color: #a4afb2; }
.quiet { color: var(--muted); padding-inline: 9px; }
.quiet:hover:not(:disabled) { color: var(--text); background: var(--active); }
.danger { color: var(--negative); }
.primary.danger { background: var(--negative); border-color: var(--negative); color: #fff; }
.primary.danger:hover { background: #93262b; border-color: #93262b; }
.icon-button { width: 36px; height: 36px; min-height: 36px; padding: 8px; }
.error { color: var(--negative); font-size: 14px; }
.error:empty { display: none; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 20; padding: 10px 16px; background: var(--primary); color: var(--primary-ink); border-radius: var(--radius-control); }
.skip-link:focus { top: 10px; }
#boot { display: grid; place-content: center; min-height: 100dvh; padding: 32px; text-align: center; color: var(--muted); }
.boot-mark { margin-bottom: 24px; color: var(--accent); font-size: 24px; font-weight: 600; }
#boot-help a { color: var(--accent); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 21px; line-height: 1.15; font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; color: var(--brand-yellow); flex: none; }
.brand-sub { display: block; margin-top: 6px; font-size: 12px; line-height: 1.3; font-weight: 400; color: var(--muted); }
.version { color: var(--muted); font-size: 12px; }
/* Desktop frame: 228px sidebar + (viewport - 228px) main. White sheet is inset
   8px at right/bottom; its 32px gutters leave equal edges for all content.
   Statistics: 4 × (available width / 4), with dividers, no independent tiles. */
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; align-self: start; height: 100dvh; padding: 24px 16px 20px; }
.sidebar .brand { padding: 0 10px; }
.mobile-menu { display: none; }
.workspace-scope { display: flex; flex-direction: column; gap: 4px; margin: 34px 10px 30px; }
.workspace-scope strong { font-size: 14px; font-weight: 500; }
.workspace-scope > span { color: var(--muted); font-size: 12px; }
.workspace-scope .scope-label { margin-bottom: 3px; }
.nav-label { margin: 0 14px 10px; font-size: 12px; color: var(--muted); }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { width: 100%; justify-content: flex-start; padding: 10px 14px; gap: 12px; color: var(--muted); font-weight: 400; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover { background: #ebefef; color: var(--text); }
.nav-item.active { background: var(--active); color: var(--text); font-weight: 500; }
.sidebar-bottom { margin-top: auto; padding: 20px 14px 0; }
.server-state { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.server-state i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--positive); }
.server-state.disconnected i { background: var(--negative); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px; }
.breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.breadcrumb .icon { width: 13px; height: 13px; }
.breadcrumb strong { color: var(--text); font-weight: 500; }
.account { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.account .quiet { min-height: 32px; font-size: 12px; padding: 5px 8px; }
.avatar { width: 26px; height: 26px; background: #e1e7e7; display: grid; place-items: center; border-radius: 50%; color: #485457; font-size: 12px; font-weight: 500; }
.account-divider { width: 1px; height: 16px; margin-inline: 5px; background: #d4dcdc; }
.content-sheet { display: flex; flex-direction: column; flex: 1; margin: 0 8px 8px 0; border: 1px solid var(--border); border-radius: var(--radius-sheet); background: var(--surface); min-height: calc(100dvh - 72px); }
#workspace { flex: 1; min-width: 0; padding: 32px 32px 24px; outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin-bottom: 8px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.heading-actions button { min-height: 38px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-card); margin-bottom: 28px; padding-block: 20px; }
.stat { min-width: 0; padding: 0 24px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 28px; line-height: 1.2; font-weight: 400; margin-bottom: 8px; }
.stat small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.filters { display: flex; gap: 24px; border-bottom: 1px solid var(--border); overflow: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { position: relative; flex: none; min-height: 44px; padding: 8px 0 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); background: none; font-weight: 400; }
.filter.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 500; }
.filter:hover { color: var(--text); }
.filter:focus-visible { outline-offset: -3px; }
.panel-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-block: 20px 12px; }
.search { display: flex; gap: 8px; width: min(100%, 410px); }
.search-field { display: flex; position: relative; flex: 1; min-width: 0; }
.search-field .icon { position: absolute; left: 12px; top: 11px; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.search input { padding: 8px 12px 8px 36px; min-height: 38px; font-size: 13px; }
.search button { min-height: 38px; }
.result-count { color: var(--muted); white-space: nowrap; font-size: 13px; }
.result-count strong { font-weight: 500; color: var(--text); margin-inline: 3px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: middle; padding: 18px 16px; overflow-wrap: anywhere; }
th { height: 44px; padding-block: 12px; font-size: 13px; color: var(--muted); font-weight: 400; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
td { font-size: 14px; border-bottom: 1px solid var(--rule); }
tbody tr:hover td { border-bottom-color: #cdd7d9; }
th.num, td.num, .date-column, .action-column { text-align: right; }
.license-table th:nth-child(1) { width: 35%; }
.license-table th:nth-child(2) { width: 13%; }
.license-table th:nth-child(3) { width: 18%; }
.license-table th:nth-child(4) { width: 12%; }
.license-table th:nth-child(5) { width: 12%; }
.license-table th:nth-child(6) { width: 10%; }
.license-name { font-weight: 500; line-height: 1.5; }
.license-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.license-id .mono { font-size: 13px; }
.table-date { color: var(--text); font-size: 13px; }
.date-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.status { display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; padding: 3px 8px; border-radius: 4px; font-size: 13px; line-height: 18px; color: #495356; background: #edf0f0; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.active { color: var(--positive); background: var(--positive-bg); }
.status.pending { color: var(--warning); background: var(--warning-bg); }
.status.disabled { color: var(--negative); background: var(--negative-bg); }
.device-count { white-space: nowrap; }
.running { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; white-space: nowrap; }
.running::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.row-action { font-size: 13px; gap: 6px; padding: 6px 0 6px 10px; min-height: 34px; color: var(--text); font-weight: 500; }
.row-action:hover { color: var(--accent); }
.row-action .icon { width: 15px; height: 15px; }
.row-action.danger { color: var(--negative); }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.pagination { display: flex; align-items: center; gap: 8px; }
.pagination > span { margin-right: 8px; }
.pagination button { border: 1px solid var(--border); }
.pagination button:hover:not(:disabled) { background: var(--raised); border-color: var(--control); }
.pagination button:disabled { background: var(--surface); color: #727c80; }
.policy-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--muted); }
.policy-note > .icon { margin-top: 3px; width: 16px; height: 16px; }
.policy-note p { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 13px; }
.policy-note strong { color: var(--text); font-weight: 500; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; padding: 12px 32px 20px; font-size: 12px; color: var(--muted); }
.mobile-label { display: none; }
.empty { padding: 40px 20px !important; text-align: center; color: var(--muted); }
.empty-symbol { margin: 0 auto 14px; color: var(--accent); }
.empty-symbol .icon { width: 28px; height: 28px; }
.empty strong { display: block; font-size: 16px; color: var(--text); font-weight: 500; }
.empty p { margin: 8px 0 18px; font-size: 14px; }
.audit-panel { margin-top: 32px; }
.audit-summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.audit-summary h2 { font-size: 16px; margin: 0; }
.audit-summary > span { font-size: 13px; }
.audit-table th:nth-child(1) { width: 22%; text-align: left; }
.audit-table th:nth-child(2) { width: 22%; }
.audit-table th:nth-child(3) { width: 39%; }
.audit-table th:nth-child(4) { width: 17%; }
.audit-table td.date-column { text-align: left; color: var(--muted); }
.audit-label { color: var(--muted); }
.guide { border-top: 1px solid var(--border); }
.help-section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding-block: 24px; border-bottom: 1px solid var(--border); }
.help-content { min-width: 0; }
.help-content p:last-child { margin-bottom: 0; }
.guide-kicker { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.guide h2 { font-size: 18px; margin-bottom: 18px; }
.guide p { color: var(--muted); line-height: 1.8; }
.guide p:last-child { margin-bottom: 0; }
.guide-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; list-style: none; margin: 0 0 20px; padding: 0; }
.guide-steps li { position: relative; padding: 0 0 14px 32px; }
.guide-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; color: var(--accent); font-size: 14px; font-weight: 500; }
.guide-steps strong { font-weight: 500; }
.guide-steps p { margin: 4px 0 0; font-size: 13px; }
.scope-list { margin: 20px 0 0; }
.scope-list div { display: flex; justify-content: space-between; gap: 16px; padding-block: 14px; border-top: 1px solid var(--rule); }
.scope-list dt { color: var(--muted); }
.scope-list dd { margin: 0; text-align: right; }
.code-block { display: block; padding: 12px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-control); font: 12px/1.7 var(--mono); overflow-wrap: anywhere; margin-bottom: 16px; }
/* Login shares the frame, typography and real authorization rules with the app. */
.login { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); min-height: 100dvh; background: var(--surface); }
.login-cover { display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px 28px; background: var(--ground); }
.login-cover .brand { font-size: 24px; }
.cover-copy { padding-block: 56px; max-width: 420px; margin: auto; width: 100%; }
.cover-label { color: var(--accent); font-size: 14px; }
.cover-copy h2 { font-size: 32px; line-height: 1.5; margin: 16px 0; letter-spacing: -.02em; }
.cover-copy > p { color: var(--muted); font-size: 15px; line-height: 1.9; margin-bottom: 32px; }
.access-sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; }
.access-sheet-head { display: flex; justify-content: space-between; align-items: center; font-weight: 500; margin-bottom: 24px; }
.scope-tag { font-size: 13px; font-weight: 400; color: var(--muted); }
.access-step { position: relative; display: flex; gap: 14px; padding-bottom: 22px; }
.access-step + .access-step { padding-bottom: 0; }
.step-dot { position: relative; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); flex: none; }
.access-step:first-of-type::after { content: ""; position: absolute; left: 3px; width: 1px; top: 19px; bottom: 0; background: var(--border); }
.access-step strong { display: block; font-weight: 500; font-size: 14px; }
.access-step div > span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.access-rule { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); margin-top: 24px; padding-top: 20px; }
.access-rule > div { display: flex; flex-direction: column; gap: 6px; }
.access-rule strong { color: var(--text); font-size: 24px; font-weight: 400; line-height: 1.25; font-variant-numeric: tabular-nums; }
.access-rule strong span { color: var(--muted); font-size: 12px; }
.access-rule div > span { font-size: 13px; color: var(--muted); }
.cover-footer { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; color: var(--muted); }
.login-body { position: relative; display: flex; align-items: center; justify-content: center; padding: 72px 48px; }
.login-form { width: 100%; max-width: 360px; }
.form-context { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.login-form h1 { font-size: 28px; margin-bottom: 12px; }
.login-intro { margin-bottom: 32px; color: var(--muted); }
.login-form input { min-height: 46px; }
.login-submit { display: flex; width: 100%; justify-content: space-between; padding: 12px 16px; margin-top: 24px; min-height: 46px; }
.login-help { margin-top: 24px; color: var(--muted); font-size: 13px; }
.login-help summary { cursor: pointer; width: fit-content; }
.login-help p { margin: 12px 0 0; font-size: 12px; line-height: 1.8; }
.login-footnote { position: absolute; bottom: 24px; left: 24px; right: 24px; text-align: center; color: var(--muted); font-size: 12px; margin: 0; }
/* Dialogs float above the work; resting surfaces have no shadow. */
dialog { border: 1px solid var(--border); border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); color: var(--text); background: var(--surface); box-shadow: 0 20px 80px #17282c26; }
dialog::backdrop { background: #17282c4d; }
dialog.drawer { width: min(560px, 100vw); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 0; border: 0; border-left: 1px solid var(--border); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 18px 24px; z-index: 1; }
.modal-head h2 { font-size: 18px; margin: 0; }
.close { color: var(--muted); }
.close:hover { background: var(--raised); color: var(--text); }
.modal-body { padding: 24px; }
.modal-body > p { color: var(--muted); }
.modal-intro { font-size: 14px; margin-bottom: 24px; }
.modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--raised); }
.modal-footer button { min-height: 40px; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -8px; margin-bottom: 24px; }
.presets button { border: 1px solid var(--border); min-height: 32px; padding: 5px 12px; font-size: 12px; font-weight: 400; }
.presets button:hover { background: var(--raised); border-color: var(--control); }
.inline-check { display: flex; align-items: center; gap: 10px; margin-bottom: 0; font-weight: 400; font-size: 13px; color: var(--text); min-height: 32px; }
.inline-check input { margin: 0; }
.form-note { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 16px 0 0; }
.permission-summary { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--raised); padding: 16px; }
.permission-summary > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.permission-summary strong { font-size: 14px; font-weight: 500; }
.permission-summary p { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.advanced-options { margin-top: 20px; color: var(--muted); font-size: 13px; }
.advanced-options summary { cursor: pointer; }
.advanced-options .inline-check { margin-top: 12px; }
.secret-code { font: 14px/1.8 var(--mono); background: var(--raised); resize: vertical; margin: 20px 0 12px; overflow-wrap: anywhere; min-height: 84px; }
.success-label { display: flex; align-items: center; gap: 8px; color: var(--positive); margin-bottom: 16px; font-weight: 500; }
.modal-body > .detail-id { margin: 16px 0 20px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-top > div { min-width: 0; }
.detail-top h3 { margin: 0 0 8px; font-size: 18px; overflow-wrap: anywhere; }
.detail-id { font: 12px/1.7 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; margin: 28px 0; }
.detail-grid dt { font-size: 12px; color: var(--muted); }
.detail-grid dd { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-actions button { font-size: 13px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 15px; margin: 28px 0 16px; padding-top: 24px; border-top: 1px solid var(--border); }
.section-title span { font-size: 12px; font-weight: 400; color: var(--muted); }
.device { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.device > .icon { margin-top: 3px; color: var(--muted); }
.device-info { flex: 1; min-width: 0; }
.device strong { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.device p { font-size: 12px; margin: 5px 0 0; color: var(--muted); }
.device .row-action { flex-shrink: 0; }
.lease-note { margin-top: 16px; padding: 14px 16px; background: var(--raised); color: var(--muted); font-size: 13px; line-height: 1.8; border-radius: var(--radius-card); }
.audit-mini { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.audit-mini time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.confirm-text { line-height: 1.9; margin: 0; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: var(--radius-card); background: var(--primary-ink); color: #fff; z-index: 30; font-size: 14px; box-shadow: 0 8px 24px #17282c1a; }
.toast.failure { background: #93262b; }
.load-error { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; margin-bottom: 24px; }
.load-error h2 { font-size: 16px; margin-bottom: 8px; }
.load-error p { color: var(--muted); margin: 0; }
.loading-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; margin-bottom: 28px; }
.loading-summary .skeleton:last-child { height: 28px; width: 30%; margin-top: 14px; }
.loading-row { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.skeleton { height: 14px; width: 70%; border-radius: 3px; background: #edf0f0; margin: 6px 0; }
.skeleton.short { width: 40%; }
.modal-feedback { margin: 16px 24px 0; padding: 12px 16px; background: var(--positive-bg); color: var(--positive); border-radius: var(--radius-control); font-size: 13px; }
.modal-feedback.failure { color: var(--negative); background: var(--negative-bg); }
@media (min-width: 1600px) {
  #workspace { padding: 40px; }
  .page-footer { padding-inline: 40px; }
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px 24px 8px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
  .sidebar .brand { padding: 0; }
  .sidebar nav { display: flex; gap: 8px; }
  .nav-item { width: auto; gap: 8px; padding-inline: 14px; }
  .workspace-scope, .nav-label, .sidebar-bottom { display: none; }
  .topbar { min-height: 52px; padding: 8px 24px; }
  .content-sheet { margin-left: 8px; min-height: calc(100dvh - 140px); }
  #workspace { padding: 28px 24px; }
  .page-footer { padding-inline: 24px; }
  .stat { padding-inline: 18px; }
  .stat small { display: none; }
  .stat-value { margin-bottom: 0; }
  .license-table th:nth-child(1) { width: 30%; }
  .license-table th:nth-child(2) { width: 13%; }
  .license-table th:nth-child(3) { width: 20%; }
  .license-table th:nth-child(4) { width: 13%; }
  .license-table th:nth-child(5) { width: 12%; }
  .license-table th:nth-child(6) { width: 12%; }
  th, td { padding-inline: 10px; }
  .login-cover { padding-inline: 32px; }
  .cover-copy h2 { font-size: 28px; }
  .access-sheet { padding: 20px; }
  .help-section { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
  .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .login { display: block; }
  .login-cover { padding: 24px; background: var(--surface); }
  .login-cover .brand { font-size: 21px; }
  .cover-copy, .cover-footer { display: none; }
  .login-body { min-height: calc(100dvh - 96px); padding: 24px 24px 88px; align-items: flex-start; }
  .login-form { max-width: 400px; margin-top: 36px; }
  .login-form h1 { font-size: 26px; }
  .form-context { margin-bottom: 12px; }
  .login-footnote { bottom: 28px; }
  .sidebar { flex-wrap: wrap; gap: 12px; padding: 16px 20px; }
  .sidebar .brand-mark { width: 32px; height: 32px; }
  .sidebar .brand { font-size: 19px; }
  .sidebar .brand-sub { font-size: 12px; }
  .mobile-menu { display: inline-flex; border: 1px solid var(--control); }
  .sidebar nav { display: none; width: 100%; gap: 8px; padding-top: 4px; }
  .shell.menu-open .sidebar nav { display: flex; }
  .nav-item { min-height: 44px; flex: 1; justify-content: center; font-size: 14px; padding: 10px 8px; }
  .nav-item .icon { width: 16px; height: 16px; }
  .topbar { display: none; padding: 0 20px 12px; min-height: 48px; }
  .shell.menu-open .topbar { display: flex; }
  .breadcrumb { display: none; }
  .account { width: 100%; gap: 6px; }
  .account-divider { margin-left: auto; }
  .account .quiet { min-height: 36px; font-size: 12px; padding-inline: 10px; }
  .content-sheet { margin: 0; border: 0; border-radius: 0; min-height: calc(100dvh - 76px); }
  #workspace { padding: 20px; }
  .page-heading { margin-bottom: 20px; gap: 12px; align-items: center; }
  .page-heading h1 { font-size: 22px; margin-bottom: 6px; }
  .page-heading p { display: none; }
  .heading-actions { gap: 6px; }
  .heading-actions button { min-height: 44px; padding-inline: 12px; }
  .heading-actions .refresh { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; margin-bottom: 16px; }
  .stat { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--border); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .stat-label { margin-bottom: 0; font-size: 12px; }
  .stat-value { font-size: 24px; }
  .filters { gap: 24px; }
  .filter { min-height: 44px; padding-bottom: 12px; font-size: 13px; }
  .panel-tools { margin-block: 12px 0; }
  .search { width: 100%; }
  .search input { min-height: 44px; font-size: 16px; padding-left: 36px; }
  .search-field .icon { top: 14px; }
  .search button { min-height: 44px; }
  .result-count { display: none; }
  .table-footer { flex-wrap: wrap; margin-top: 16px; gap: 12px; font-size: 12px; }
  .pagination { margin-left: auto; gap: 8px; }
  .pagination > span { margin-right: 0; }
  .icon-button { width: 44px; height: 44px; min-height: 44px; }
  .policy-note { margin-top: 24px; }
  .policy-note p { display: block; }
  .policy-note p > span { display: block; margin-top: 4px; }
  .page-footer { padding: 16px 20px; flex-direction: column; gap: 6px; border-top: 1px solid var(--rule); }
  .help-section { grid-template-columns: 1fr; gap: 16px; }
  .help-heading h2 { margin-bottom: 0; }
  .help-heading > button { margin-top: 16px; min-height: 44px; }
  .modal-head { padding: 16px 20px; }
  .modal-body { padding: 24px 20px; }
  .modal-footer { padding: 16px 20px; }
  .modal-footer button, .detail-actions button, .presets button { min-height: 44px; }
  .modal-body input:not([type=checkbox]) { min-height: 44px; font-size: 16px; }
  .modal-body .inline-check { min-height: 44px; }
  .modal-feedback { margin-inline: 20px; }
  .detail-grid { gap: 20px 16px; }
  .detail-top h3 { font-size: 17px; }
  .detail-id { font-size: 12px; }
  .audit-mini { flex-wrap: wrap; gap: 4px; }
  .toast { bottom: max(20px, env(safe-area-inset-bottom)); }
  .loading-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .license-table thead, .audit-table thead { display: none; }
  .license-table tbody, .audit-table tbody { display: block; }
  .license-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding-block: 20px; border-bottom: 1px solid var(--border); }
  .license-table td { border: 0; padding: 0; }
  .cell-identity { grid-column: 1; grid-row: 1; }
  .cell-status { grid-column: 2; grid-row: 1; text-align: right; }
  .cell-expiry { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 12px; align-items: baseline; text-align: left; }
  .cell-expiry > div { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  .date-sub { margin-top: 0; }
  .cell-devices { grid-column: 1; grid-row: 3; text-align: left !important; font-size: 13px; }
  .cell-running { grid-column: 1; grid-row: 4; font-size: 13px; }
  .cell-actions { grid-column: 2; grid-row: 3 / span 2; align-self: center; }
  .cell-actions .row-action { min-height: 44px; padding: 10px 0 10px 12px; }
  .license-id { gap: 6px; }
  .license-name { font-size: 14px; }
  .mobile-label { display: inline; color: var(--muted); margin-right: 12px; font-size: 12px; font-weight: 400; }
  .cell-expiry .mobile-label { margin-right: 0; }
  .license-table .empty-row { display: block; }
  .empty-row td { display: block; }
  .audit-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding-block: 18px; border-bottom: 1px solid var(--border); }
  .audit-table td { padding: 0; border: 0; }
  .audit-table td:first-child { grid-row: 3; grid-column: 1 / -1; font-size: 12px; }
  .audit-action { grid-row: 1; grid-column: 1; font-weight: 500; }
  .audit-label { grid-row: 2; grid-column: 1 / -1; font-size: 13px; }
  .audit-table td:last-child { grid-row: 1; grid-column: 2; }
  .audit-table .row-action { padding: 0; min-height: 24px; }
  .audit-summary { font-size: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a, input, textarea, summary { transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .login { display: block; }
  .login-cover { padding: 24px 32px; background: var(--surface); }
  .cover-copy, .cover-footer { display: none; }
  .login-body { min-height: calc(100dvh - 96px); padding: 48px 32px 88px; }
  .login-form { max-width: 400px; }
}

.entitlement-fields{border:0;padding:0;margin:24px 0}.entitlement-fields legend{font-size:14px;font-weight:600;margin-bottom:10px}.entitlement-fields .inline-check{align-items:flex-start;padding:10px 0}.entitlement-fields small{display:block;color:var(--muted);font-size:12px;margin-top:4px}.entitlement-fields p{font-size:13px}.entitlement-fields input{margin-top:3px}
