/* Pixel Planet administration — local assets, no remote fonts or framework. */
:root {
    color-scheme: light;
    --bg: #fafaf9;
    --panel: #ffffff;
    --sidebar: #f3f3f1;
    --surface: #f4f4f2;
    --surface-hover: #ebebe8;
    --ink: #242423;
    --muted: #686863;
    --subtle: #72726d;
    --line: #e4e4df;
    --line-strong: #cecec7;
    --accent: #292927;
    --accent-ink: #ffffff;
    --success: #236142;
    --success-bg: #edf7f0;
    --warning: #805b1c;
    --warning-bg: #fcf5e7;
    --danger: #a13535;
    --danger-bg: #fcf0ef;
    --focus: #4c6d8a;
    --chart: #686863;
    --shadow: 0 16px 60px rgb(0 0 0 / 10%);
    --radius: 12px;
    --sidebar-width: 244px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #20201f;
    --panel: #262625;
    --sidebar: #191918;
    --surface: #30302e;
    --surface-hover: #3a3a37;
    --ink: #edede9;
    --muted: #b5b5ad;
    --subtle: #a5a59e;
    --line: #3b3b36;
    --line-strong: #56564e;
    --accent: #edede8;
    --accent-ink: #252523;
    --success: #91d2a8;
    --success-bg: #253c2d;
    --warning: #e0c086;
    --warning-bg: #423820;
    --danger: #efaaaa;
    --danger-bg: #472c2c;
    --focus: #9fbad0;
    --chart: #b5b5ad;
    --shadow: 0 20px 70px rgb(0 0 0 / 32%);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a, button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .45; pointer-events: none; }
button, input, select, textarea { color: var(--ink); }
button { background: none; }
img, svg { vertical-align: middle; }
img { max-width: 100%; }
.icon { flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(25px, 3vw, 32px); font-weight: 620; line-height: 1.3; letter-spacing: -.035em; }
h2 { font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: 15px; font-weight: 600; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 50%; transform: translate(-50%, -180%); padding: 10px 18px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); z-index: 100; }
.skip-link:focus { transform: translate(-50%, 0); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono, code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
code { font-size: .91em; background: var(--surface); border-radius: 4px; padding: 2px 5px; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; margin: 10px 0 0; padding: 16px; background: var(--surface); border-radius: 8px; max-width: 900px; max-height: 360px; overflow: auto; }
.text-link { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.text-link:hover { text-decoration-color: currentColor; }
.break-word { overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-small { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.push-right { margin-left: auto; }
.app-shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); background: var(--sidebar); border-right: 1px solid var(--line); padding: 23px 14px 14px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 25px; min-width: 0; }
.brand-logo { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; border-radius: 9px; }
.brand-name { font-weight: 650; font-size: 16px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.brand-subtitle { display: block; color: var(--muted); font-size: 10px; font-weight: 450; letter-spacing: .14em; margin-top: 1px; }
.sidebar-nav { overflow-y: auto; overscroll-behavior: contain; flex: 1; scrollbar-width: thin; }
.nav-heading { padding: 20px 12px 7px; font-size: 11px; color: var(--muted); letter-spacing: .07em; }
.nav-heading:first-child { padding-top: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 42px; margin: 3px 0; padding: 9px 12px; color: var(--muted); border-radius: 8px; font-size: 13px; transition: background .15s, color .15s; }
.nav-item:hover { color: var(--ink); background: var(--surface-hover); }
.nav-item[aria-current="page"] { color: var(--ink); background: var(--surface-hover); font-weight: 600; }
.nav-item[aria-current="page"]::after { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; margin-left: auto; }
.sidebar-footer { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 20px; }
.account-link { display: flex; gap: 10px; align-items: center; padding: 8px 7px; border-radius: 8px; }
.account-link:hover { background: var(--surface-hover); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel); font-size: 12px; font-weight: 600; flex-shrink: 0; }
.account-name { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.account-role { display: block; font-size: 11px; color: var(--muted); }
.sidebar-tools { margin-top: 8px; display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.sidebar-tools form { display: flex; }
.app-main { margin-left: var(--sidebar-width); min-height: 100dvh; }
.topbar { height: 66px; padding: 0 38px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.breadcrumb { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.breadcrumb span:last-child { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-note { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 6px; }
.page-content { max-width: 1560px; margin: 0 auto; padding: 36px 38px 48px; }
.page-heading { display: flex; gap: 24px; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.page-eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .13em; font-size: 10px; margin-bottom: 9px; }
.page-description { color: var(--muted); font-size: 13px; line-height: 1.8; margin-top: 9px; max-width: 700px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; flex-shrink: 0; padding-top: 8px; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 35px; color: var(--subtle); font-size: 11px; }
.mobile-only { display: none !important; }
.sidebar-overlay { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--panel); border-radius: 8px; padding: 9px 14px; min-height: 39px; line-height: 1.4; font-size: 12px; font-weight: 550; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.button:hover { background: var(--surface); border-color: var(--muted); }
.button-primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.button-primary:hover { background: var(--accent); border-color: var(--accent); opacity: .85; }
.button-danger { color: var(--danger); border-color: var(--line-strong); background: var(--danger-bg); }
.button-danger:hover { border-color: var(--danger); background: var(--danger-bg); }
.button-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.button-ghost:hover { background: var(--surface-hover); border-color: transparent; color: var(--ink); }
.button-small { min-height: 31px; font-size: 11px; padding: 6px 10px; border-radius: 6px; }
.button-block { width: 100%; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 7px; color: var(--muted); flex-shrink: 0; }
.icon-button:hover { background: var(--surface-hover); color: var(--ink); }
.is-submitting { opacity: .55; pointer-events: none; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card-header { padding: 21px 24px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.card-header p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.card-body { padding: 24px; }
.card-footer { border-top: 1px solid var(--line); padding: 16px 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.stat-card { padding: 20px 21px 16px; }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.stat-label .icon { opacity: .8; }
.stat-value { font-size: 35px; letter-spacing: -.055em; line-height: 1.25; font-weight: 600; margin-top: 15px; overflow-wrap: anywhere; }
.stat-caption { font-size: 11px; color: var(--muted); margin-top: 7px; }
.sparkline { margin-top: 15px; position: relative; }
.sparkline svg { display: block; width: 100%; height: 58px; overflow: visible; color: var(--chart); touch-action: pan-y; }
.sparkline path { stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sparkline .spark-crosshair { stroke: var(--line-strong); stroke-width: 1; }
.sparkline .spark-dot { fill: var(--chart); stroke: var(--panel); stroke-width: 2; }
.spark-readout { margin-top: 4px; font-size: 11px; color: var(--muted); min-height: 18px; }
.spark-data summary { margin-top: 5px; color: var(--muted); cursor: pointer; font-size: 10px; }
.spark-data table { margin-top: 8px; font-size: 10px; width: 100%; border-collapse: collapse; }
.spark-data td, .spark-data th { padding: 4px; text-align: left; border-bottom: 1px solid var(--line); }
.spark-data { max-height: 240px; overflow: auto; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(270px,1fr); gap: 22px; }
.activity-list { padding: 8px 22px; }
.activity-item { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 31px; height: 31px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; flex-shrink: 0; color: var(--muted); }
.activity-title { font-size: 12px; overflow-wrap: anywhere; }
.activity-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.table-scroll { overflow-x: auto; scrollbar-width: thin; }
.data-table { border-collapse: collapse; width: 100%; text-align: left; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.data-table th { padding: 13px 18px; font-size: 10px; letter-spacing: .025em; color: var(--muted); font-weight: 550; background: var(--surface); border-bottom: 1px solid var(--line); }
.data-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface) 50%, transparent); }
.data-table td:first-child, .data-table th:first-child { padding-left: 24px; }
.data-table td:last-child, .data-table th:last-child { padding-right: 24px; }
.data-table .cell-title { color: var(--ink); font-size: 12px; font-weight: 550; display: block; }
.data-table .cell-subtitle { color: var(--muted); font-size: 10px; display: block; margin-top: 4px; }
.data-table .cell-wrap { white-space: normal; min-width: 180px; max-width: 340px; overflow-wrap: anywhere; }
.data-table .cell-actions { text-align: right; }
.data-table a.cell-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.data-table .checkbox-cell { width: 38px; padding-right: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 5px; font-size: 10px; line-height: 1.6; font-weight: 500; white-space: nowrap; }
.badge-neutral { background: var(--surface); color: var(--muted); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.filters { padding: 17px 20px; display: flex; align-items: end; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.filters .field { min-width: 130px; flex: 1 1 130px; }
.filters .field-search { flex: 2 1 220px; }
.filters .field label { font-size: 10px; margin-bottom: 5px; }
.filters input, .filters select { font-size: 12px; min-height: 37px; padding-top: 7px; padding-bottom: 7px; }
.filters .button { min-height: 37px; }
.search-input { position: relative; }
.search-input .icon { position: absolute; top: 50%; left: 11px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input input { padding-left: 35px; }
.filter-context { padding: 11px 22px; font-size: 11px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.bulk-toolbar { padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.selection-count { color: var(--muted); font-size: 11px; }
.pagination { border-top: 1px solid var(--line); padding: 16px 22px; display: flex; gap: 14px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.pagination strong { color: var(--ink); font-weight: 500; }
.pagination-controls { display: flex; align-items: center; gap: 8px; }
.page-number { padding: 0 5px; font-variant-numeric: tabular-nums; }
.empty-state { text-align: center; padding: 58px 24px 62px; display: flex; flex-direction: column; align-items: center; }
.empty-icon { width: 60px; height: 60px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 18px; color: var(--muted); }
.empty-state h3 { font-size: 15px; }
.empty-state p { margin-top: 8px; max-width: 360px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.empty-actions { margin-top: 21px; display: flex; justify-content: center; gap: 8px; }
.notice { border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; margin-bottom: 22px; font-size: 12px; line-height: 1.8; background: var(--surface); }
.notice > .icon { margin-top: 2px; }
.notice > .icon-button { margin: -5px -6px -5px auto; }
.notice-success { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 25%, var(--line)); color: var(--success); }
.notice-danger { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 25%, var(--line)); color: var(--danger); }
.notice-warning { background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 25%, var(--line)); color: var(--warning); }
.notice:last-child { margin-bottom: 0; }
.validation-summary h2 { font-size: 13px; }
.validation-summary ul { padding-left: 17px; margin: 7px 0 0; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.form-section { padding: 25px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { font-size: 15px; }
.section-heading p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 19px 21px; }
.field-grid-three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label, .field-label { display: block; font-size: 12px; font-weight: 550; margin-bottom: 7px; }
.field label > span[aria-hidden] { color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { width: 100%; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 7px; padding: 10px 11px; min-height: 41px; font-size: 13px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 2px solid color-mix(in srgb, var(--focus) 25%, transparent); outline-offset: 1px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; vertical-align: middle; cursor: pointer; flex-shrink: 0; }
input[type="file"] { font-size: 12px; padding: 8px; }
input::file-selector-button { border: 0; border-radius: 4px; padding: 7px 10px; margin-right: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
textarea { resize: vertical; min-height: 104px; }
.field-hint { color: var(--muted); font-size: 11px; margin-top: 7px; line-height: 1.8; }
.field-error { color: var(--danger); font-size: 11px; margin-top: 6px; }
.checkbox-label { display: flex !important; align-items: center; gap: 9px; font-size: 12px; font-weight: 400 !important; cursor: pointer; margin: 0 !important; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.switch-row p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.form-actions { padding: 19px 25px; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; }
.help-card { background: var(--surface); padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); }
.help-card > .icon { color: var(--muted); margin-bottom: 14px; }
.help-card h3 { font-size: 13px; }
.help-card p, .help-card li { font-size: 11px; line-height: 1.9; color: var(--muted); }
.help-card p { margin-top: 9px; }
.help-card ul, .help-card ol { padding-left: 16px; margin: 12px 0 0; }
.help-card li + li { margin-top: 7px; }
.detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 23px; margin: 0; }
.detail-grid dt { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.detail-grid dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.detail-grid .detail-wide { grid-column: 1 / -1; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.9; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.danger-zone .card-header h2 { color: var(--danger); }
.modal { border: 1px solid var(--line-strong); border-radius: 15px; padding: 0; max-width: 480px; width: calc(100% - 32px); max-height: calc(100dvh - 48px); color: var(--ink); background: var(--panel); box-shadow: var(--shadow); overflow-y: auto; overscroll-behavior: contain; }
.modal-wide { max-width: 650px; }
.modal::backdrop { background: rgb(0 0 0 / 43%); backdrop-filter: blur(3px); }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 24px 18px; border-bottom: 1px solid var(--line); }
.modal-heading h2 { font-size: 18px; }
.modal-heading p { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.8; }
.modal-heading .icon-button { margin: -5px -7px 0 0; }
.modal-form { padding: 22px 24px 0; }
.modal-form > .field { margin-bottom: 19px; }
.modal-form > .field-grid { margin-bottom: 20px; }
.modal-form .notice { margin-bottom: 20px; }
.modal-footer { padding: 18px 0 22px; display: flex; gap: 9px; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 22px; }
.context-line { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 20px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.confirm-body { padding: 23px 24px 0; }
.confirm-body > p { font-size: 13px; line-height: 1.9; white-space: pre-wrap; }
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 90; max-width: min(380px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 13px 17px; background: var(--accent); color: var(--accent-ink); border-radius: 9px; box-shadow: var(--shadow); font-size: 12px; }
.health-list { display: flex; flex-direction: column; }
.health-row { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.health-row:last-child { border-bottom: 0; }
.health-row h3 { font-size: 13px; }
.health-row p { color: var(--muted); font-size: 12px; margin-top: 5px; overflow-wrap: anywhere; }
.audit-details summary { cursor: pointer; color: var(--muted); font-size: 11px; width: fit-content; }
.audit-details[open] summary { margin-bottom: 6px; }
.role-note { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 11px; color: var(--muted); line-height: 1.9; }
.login-shell { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.login-story { padding: 50px clamp(32px, 7vw, 110px); display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line); }
.login-story .brand { padding-left: 0; }
.login-story-content { margin: auto 0; padding: 50px 0; max-width: 490px; }
.login-story-content h1 { font-size: clamp(32px, 4vw, 50px); line-height: 1.36; letter-spacing: -.055em; font-weight: 550; }
.login-story-content > p { color: var(--muted); font-size: 14px; line-height: 2; margin-top: 23px; max-width: 380px; }
.login-feature-list { margin-top: 38px; display: flex; flex-direction: column; gap: 17px; }
.login-feature { display: flex; gap: 13px; align-items: center; font-size: 12px; color: var(--muted); }
.login-feature .icon { color: var(--ink); }
.login-story-footer { color: var(--muted); font-size: 11px; }
.login-form-side { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 75px 35px; }
.guest-theme { position: absolute; top: 25px; right: 27px; }
.login-panel { max-width: 370px; width: 100%; }
.login-panel h2 { font-size: 26px; letter-spacing: -.03em; }
.login-panel > p { color: var(--muted); font-size: 12px; margin-top: 9px; margin-bottom: 28px; }
.login-form { display: flex; flex-direction: column; gap: 20px; }
.login-form .button { min-height: 44px; font-size: 13px; margin-top: 3px; }
.login-security { margin-top: 23px; color: var(--muted); font-size: 10px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.guest-container { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 50px 24px; max-width: 860px; margin: 0 auto; }
.guest-container > .brand { justify-content: center; padding-bottom: 30px; }
.guest-footer { text-align: center; font-size: 11px; color: var(--muted); margin-top: 25px; }
@media (min-width: 1600px) { .page-content { padding-top: 42px; } .stat-card { padding: 25px; } }
@media (max-width: 1200px) {
    :root { --sidebar-width: 220px; }
    .page-content { padding: 28px; }
    .topbar { padding: 0 28px; }
    .stat-grid { gap: 12px; }
    .stat-card { padding: 17px; }
    .stat-value { font-size: 31px; }
    .form-layout { grid-template-columns: minmax(0,1fr) 240px; gap: 18px; }
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 265px; }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-overlay.is-open { display: block; position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / 40%); border: 0; backdrop-filter: blur(2px); }
    .app-main { margin-left: 0; }
    .mobile-only { display: inline-flex !important; }
    .topbar { justify-content: flex-start; }
    .topbar-note { margin-left: auto; }
    .form-layout { grid-template-columns: minmax(0,1fr) 260px; }
}
@media (max-width: 760px) {
    .page-content { padding: 24px 18px 35px; }
    .topbar { height: 58px; padding: 0 16px; gap: 10px; }
    .topbar-note { display: none; }
    .page-heading { flex-direction: column; gap: 12px; margin-bottom: 23px; }
    .page-actions { padding-top: 0; }
    .page-description { font-size: 12px; }
    .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .stat-value { font-size: 30px; }
    .form-layout { grid-template-columns: 1fr; }
    .form-layout > aside { order: 2; }
    .field-grid-three { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .form-section { padding: 20px; }
    .card-header { padding: 18px 20px; }
    .card-body { padding: 20px; }
    .filters { padding: 16px; gap: 10px; }
    .pagination { flex-wrap: wrap; padding: 14px 16px; }
    .bulk-toolbar { padding: 12px 16px; flex-wrap: wrap; }
    .card-footer { padding: 14px 18px; }
    .login-shell { grid-template-columns: 1fr; }
    .login-story { padding: 25px; border-right: 0; border-bottom: 1px solid var(--line); }
    .login-story .brand { padding-bottom: 0; }
    .login-story-content, .login-story-footer { display: none; }
    .login-form-side { padding: 75px 28px 50px; justify-content: start; }
    .guest-theme { top: 15px; right: 18px; }
    .modal { max-height: calc(100dvh - 26px); }
    .health-row { padding: 18px; }
}
@media (max-width: 450px) {
    .field-grid, .field-grid-three { grid-template-columns: 1fr; }
    .detail-grid { gap: 18px; }
    .stat-card { padding: 15px; }
    .stat-label { font-size: 11px; }
    .stat-label .icon { width: 16px; height: 16px; }
    .stat-value { font-size: 29px; }
    .stat-caption { font-size: 10px; }
    .page-actions { width: 100%; }
    .page-actions .button { flex: 1; }
    .filters .field-search { flex-basis: 100%; }
    .form-actions { padding: 18px 20px; }
    .modal-heading { padding: 20px; }
    .modal-form { padding: 20px 20px 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .badge, .stat-card, .button, .card { border: 1px solid CanvasText; } .sparkline path { stroke: CanvasText; } .sparkline .spark-dot { fill: CanvasText; } .nav-item[aria-current="page"] { outline: 1px solid Highlight; } }
@media print { .sidebar, .topbar, .page-actions, .filters, .bulk-toolbar, .cell-actions, .toast-region, .icon-button, dialog { display: none !important; } .app-main { margin: 0; } .page-content { padding: 0; } .card { break-inside: avoid; } .data-table { white-space: normal; } .spark-data { max-height: none; } body { background: white; color: black; } }
