:root {
    font: 400 11px/1.45 Arial, sans-serif;
    color-scheme: light;
    color: var(--ink);
    background: var(--canvas);
    --ink: #17263a;
    --canvas: #f2f5f9;
    --surface: #ffffff;
    --surface-soft: #f8faff;
    --surface-header: #f1f5fb;
    --muted: #53647d;
    --ink-muted: #203059;
    --border: #d6deea;
    --subtle-border: #e4eaf5;
    --field-border: #a9b7c9;
    --accent: #214fa5;
    --link: #365281;
    --primary: #214fa5;
    --primary-hover: #173b80;
    --on-primary: #ffffff;
    --accent-soft: #edf3ff;
    --accent-hover: #dfeaff;
    --accent-border: #c4d3ef;
    --accent-active-border: #97acd8;
    --focus: #6b90d4;
    --focus-glow: #3159cc33;
    --danger: #9a253c;
    --danger-soft: #fff0f2;
    --danger-border: #e3bbc4;
    --success: #166449;
    --warning: #855405;
    --favorite-muted: #8c96a7;
    --star: #ffc83b;
    --star-edge: #805500;
    --star-hover: #fff8e3;
    --dashboard-top: #e6edff;
    --dashboard-middle: #f5f7fc;
    --drop-top: #e8efff;
    --drop-base: #f7f9ff;
    --drop-hover: #e9efff;
    --drop-border: #8ea6e4;
    --chart-blue: #3159cc;
    --chart-green: #167356;
    --chart-green-area: #eaf6f0;
    --progress-track: #e3eafa;
    --progress-start: #315cdc;
    --progress-end: #6080ff;
    --panel-shadow: #193d8760;
    --panel-shadow-soft: #203a6510;
    --icon-shadow: #3659a51c;
    --popup-shadow: #17263a30;
    --overlay: #17263a40;
    --disabled-bg: #e8eefb;
    --disabled-text: #48608e;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e8edf5;
    --canvas: #111316;
    --surface: #1a1d22;
    --surface-soft: #20242a;
    --surface-header: #242a34;
    --muted: #aeb9ca;
    --ink-muted: #d4ddeb;
    --border: #3a424f;
    --subtle-border: #2f3642;
    --field-border: #566173;
    --accent: #a9c6ff;
    --link: #afc4e5;
    --primary: #345db4;
    --primary-hover: #2b4a92;
    --accent-soft: #263651;
    --accent-hover: #324766;
    --accent-border: #526e9d;
    --accent-active-border: #7194cb;
    --focus: #8fb3ff;
    --focus-glow: #85aaff46;
    --danger: #ffadb7;
    --danger-soft: #3a252d;
    --danger-border: #875264;
    --success: #8cdeb9;
    --warning: #f0c879;
    --favorite-muted: #a4b1c6;
    --star: #ffcf58;
    --star-edge: #dda841;
    --star-hover: #3d3424;
    --dashboard-top: #1b2433;
    --dashboard-middle: #15181d;
    --drop-top: #263650;
    --drop-base: #1d242f;
    --drop-hover: #27364d;
    --drop-border: #617ba9;
    --chart-blue: #91b4ff;
    --chart-green: #79d6ad;
    --chart-green-area: #263b35;
    --progress-track: #303a4b;
    --progress-start: #7098ff;
    --progress-end: #a4bdff;
    --panel-shadow: #03050980;
    --panel-shadow-soft: #03050955;
    --icon-shadow: #080a0e70;
    --popup-shadow: #07090dbb;
    --overlay: #07090dbb;
    --disabled-bg: #272e3b;
    --disabled-text: #9caac0;
}

* { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.site-footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; max-width: 960px; margin: auto; padding: 10px 20px; }
h1, h2, p { margin: 0; font-size: inherit; }
h1, h2, th { font-weight: inherit; }
.bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.bar-content {
    max-width: 960px;
    min-height: 56px;
    margin: auto;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.brand {
    display: block;
    flex: 0 0 auto;
    width: clamp(128px, 20vw, 174px);
    aspect-ratio: 3 / 1;
    background: url("logo-server123.png") center / contain no-repeat;
}
:root[data-theme="dark"] .brand { background-image: url("logo-server123-dark.png"); }
.bar-controls { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.theme-switch {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    place-items: center;
    width: 49px;
    height: 25px;
    min-height: 0;
    padding: 0 2px;
    border: 1px solid var(--field-border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
}
.theme-switch:hover { background: var(--accent-soft); }
.theme-switch::before { content: ''; position: absolute; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--primary); transition: transform 150ms ease; }
.theme-switch[aria-checked="true"]::before { transform: translateX(22px); }
.theme-switch svg { position: relative; width: 14px; height: 14px; }
.theme-switch[aria-checked="false"] svg:first-child,
.theme-switch[aria-checked="true"] svg:last-child { color: var(--on-primary); }
.theme-switch:disabled { cursor: default; }
@media (prefers-reduced-motion: reduce) {
    .theme-switch::before { transition: none; }
}
.account { display: flex; align-items: center; gap: 10px; }
.account { min-width: 0; }
.account span { overflow-wrap: anywhere; }
.sign-in { width: 100%; max-width: 460px; margin: clamp(36px, 9vh, 92px) auto; padding: 0 24px; }
body:has(.sign-in) { background: var(--surface); }
body:has(.sign-in) > .bar, body:has(.sign-in) > .site-footer { border-color: transparent; }
.sign-in h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.12; letter-spacing: -0.03em; text-align: center; }
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 8px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
}
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.workspace { width: 100%; max-width: 780px; margin: clamp(24px, 7vh, 72px) auto; padding: 0 16px; }
body:has(.workspace) {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 0%, var(--dashboard-top) 0%, var(--dashboard-middle) 56%, var(--canvas) 100%);
}
.panel { padding: 24px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.credentials { display: grid; gap: 18px; }
.sign-in .credentials label { gap: 7px; }
.sign-in .credentials input, .sign-in .credentials button { border-radius: 0; }
.sign-in .credentials input::placeholder { color: var(--muted); }
.sign-in .credentials button { margin-top: 2px; }
.login-security-note { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); text-align: center; }
label { display: grid; gap: 5px; }
input, button { font: inherit; min-height: 40px; border-radius: 6px; padding: 8px 12px; }
input { width: 100%; border: 1px solid var(--field-border); background: var(--surface); color: inherit; }
button { background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary); cursor: pointer; }
button:hover { background: var(--primary-hover); }
button.secondary { background: var(--surface); color: var(--accent); border-color: var(--border); }
button.secondary:hover { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input:not([type="file"]):focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 7px 2px var(--focus-glow);
}
.error { margin-top: 12px; padding: 8px 12px; color: var(--danger); background: var(--danger-soft); border-radius: 6px; }
.files {
    padding: clamp(16px, 4vw, 32px);
    border-color: var(--subtle-border);
    border-radius: 0;
    box-shadow: 0 24px 60px -32px var(--panel-shadow), 0 3px 10px var(--panel-shadow-soft);
}
.dashboard-welcome { margin-bottom: 12px; }
.dashboard-welcome h1 { color: var(--accent); overflow-wrap: anywhere; }
.dashboard-welcome p { margin-top: 4px; color: var(--muted); }
.drop-zone {
    position: relative;
    display: grid;
    justify-items: center;
    margin: 0 0 16px;
    padding: 25px 12px 21px;
    gap: 8px;
    color: var(--ink-muted);
    text-align: center;
    border: 1px dashed var(--drop-border);
    border-radius: 0;
    background: radial-gradient(ellipse at 50% 20%, var(--drop-top), var(--drop-base) 74%);
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--focus); background: var(--drop-hover); }
.drop-zone:focus-within { border-color: var(--focus); box-shadow: 0 0 7px 2px var(--focus-glow); }
@media (forced-colors: active) {
    input:not([type="file"]):focus, .drop-zone:focus-within { outline: 2px solid Highlight; outline-offset: 2px; }
}
.drop-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 4px;
    border: 1px solid var(--subtle-border);
    border-radius: 0;
    background: var(--surface);
    box-shadow: 0 6px 16px var(--icon-shadow);
}
.drop-icon span { position: relative; width: 24px; height: 9px; margin-top: 13px; border: 2px solid var(--chart-blue); border-top: 0; border-radius: 0 0 4px 4px; }
.drop-icon span::before, .drop-icon span::after { position: absolute; left: 50%; content: ''; }
.drop-icon span::before { top: -11px; width: 2px; height: 13px; background: var(--chart-blue); transform: translateX(-50%); }
.drop-icon span::after { top: -11px; width: 8px; height: 8px; border-top: 2px solid var(--chart-blue); border-left: 2px solid var(--chart-blue); transform: translateX(-50%) rotate(45deg); }
.choose-files {
    padding: 6px 14px;
    min-height: 30px;
    border: 1px solid var(--accent-border);
    border-radius: 0;
    color: var(--accent);
    background: var(--surface);
}
.choose-files:hover { background: var(--accent-soft); }
.upload-pickers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.upload-details { flex: 1 1 220px; min-width: 0; color: var(--link); }
.upload-details summary { width: fit-content; padding: 7px 0; cursor: pointer; }
.upload-list { margin: 2px 0 0; padding: 2px 8px; max-height: 120px; overflow: auto; list-style: none; border: 1px solid var(--subtle-border); }
.upload-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 3px 0; }
.upload-list li + li { border-top: 1px solid var(--subtle-border); }
.upload-list .file-name { overflow-wrap: anywhere; }
.upload-list .file-size { color: var(--muted); }
.upload-transfer { padding: 8px 10px; border: 1px solid var(--subtle-border); background: var(--surface-soft); }
.upload-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 6px 12px;
}
.upload-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.upload-private { display: inline-flex; align-items: center; gap: 5px; }
.upload-private input { width: auto; min-height: 0; margin: 0; accent-color: var(--accent); }
.transfer-heading { display: grid; grid-template-columns: auto minmax(24px, 1fr) 4ch; align-items: center; gap: 10px; }
.transfer-heading span { color: var(--accent); text-align: right; font-variant-numeric: tabular-nums; }
.upload-metrics { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 3px 0 0; }
.upload-metrics div { display: flex; gap: 5px; }
.upload-metrics dt { color: var(--muted); }
.upload-metrics dd { margin: 0; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
#upload-progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 999px; overflow: hidden; background: var(--progress-track); accent-color: var(--chart-blue); }
#upload-progress::-webkit-progress-bar { background: var(--progress-track); }
#upload-progress::-webkit-progress-value { background: linear-gradient(90deg, var(--progress-start), var(--progress-end)); border-radius: 999px; }
#upload-progress::-moz-progress-bar { background: linear-gradient(90deg, var(--progress-start), var(--progress-end)); border-radius: 999px; }
#upload-status { margin-top: 3px; color: var(--link); overflow-wrap: anywhere; }
#upload-status:empty { display: none; }
#upload-status[data-state="error"] { color: var(--danger); }
#upload-status[data-state="success"] { color: var(--success); }
#upload-submit { min-height: 34px; padding: 5px 12px; background: var(--primary); border-color: var(--primary); border-radius: 0; }
#upload-submit:hover:not(:disabled) { background: var(--primary-hover); }
#upload-submit:disabled { border-color: var(--subtle-border); background: var(--disabled-bg); color: var(--disabled-text); cursor: default; }
@media (max-width: 360px) {
    #upload-submit { width: 100%; }
}

.main-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-right: auto; }
.dashboard-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.summary-box { padding: 12px; border: 1px solid var(--border); background: var(--surface); }
.summary-box h2 { padding-bottom: 6px; border-bottom: 1px solid var(--subtle-border); }
.summary-box dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; margin: 8px 0 0; }
.summary-box dt, .summary-box p { color: var(--muted); }
.summary-box dd { max-width: 20ch; margin: 0; text-align: right; overflow-wrap: anywhere; }
.summary-box p { margin-top: 8px; }
.dashboard-guide { margin-top: 10px; padding: 12px; border: 1px solid var(--border); background: var(--surface-soft); }
.dashboard-guide h3 { margin: 10px 0 4px; font: inherit; }
.dashboard-guide p { margin-top: 5px; }
.dashboard-guide p, .dashboard-guide li { color: var(--muted); }
.dashboard-guide ol { margin: 0; padding-left: 18px; }
.dashboard-guide li + li { margin-top: 3px; }
.dashboard-server-activity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 10px; margin-top: 10px; }
.summary-box .dashboard-live-metrics { padding: 5px 7px; border: 1px solid var(--subtle-border); background: var(--surface-soft); }
.dashboard-live-metrics dd { max-width: none; font-variant-numeric: tabular-nums; }
.dashboard-live-metrics dd[data-level] { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.dashboard-live-metrics dd[data-level]::before { content: ''; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--metric-dot); }
.dashboard-live-metrics dd[data-level="normal"] { --metric-dot: #289867; }
.dashboard-live-metrics dd[data-level="high"] { --metric-dot: #d7a212; }
.dashboard-live-metrics dd[data-level="critical"] { --metric-dot: #e04b61; }
.dashboard-activity-list { max-height: 130px; overflow: auto; list-style: none; margin: 5px 0 0; padding: 0; color: var(--muted); }
.dashboard-activity-list li { padding: 4px 0; overflow-wrap: anywhere; }
.dashboard-activity-list li + li { border-top: 1px solid var(--subtle-border); }
.dashboard-activity-list span { color: var(--ink-muted); }
@media (max-width: 680px) {
    .dashboard-summary, .dashboard-server-activity { grid-template-columns: 1fr; }
}
.main-nav a { padding: 6px 9px; color: var(--link); text-decoration: none; }
.main-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.catalog-workspace { max-width: 866px; }
.catalog { padding: 16px; background: var(--surface); border: 1px solid var(--border); }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.catalog-heading h1 { padding-bottom: 6px; }
#files-search { display: grid; gap: 8px; margin-bottom: 10px; }
.catalog-search-field { width: min(100%, 255px); }
.catalog-owners { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin: 0; padding: 5px 8px; min-width: 0; border: 1px solid var(--border); }
.catalog-owners legend { padding: 0 4px; color: var(--muted); }
.catalog-owners label { display: inline-flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.catalog-owners input { width: auto; min-height: 0; margin: 0; accent-color: var(--accent); }
.owner-filter-help { margin-top: -4px; font-size: 8px; color: var(--muted); }
#file-query { min-height: 32px; padding: 5px 8px; margin-top: 4px; border-radius: 0; }
.catalog-table { max-width: 800px; overflow-x: auto; }
.catalog table { width: 100%; min-width: 570px; border-collapse: collapse; font: inherit; }
.catalog th, .catalog td { padding: 7px 9px; text-align: left; border: 1px solid var(--border); }
.catalog th { background: var(--surface-header); }
.catalog td:first-child { width: 42%; overflow-wrap: anywhere; }
.file-encryption { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.file-encryption-plain { color: var(--warning); }
.catalog td:nth-child(2), .catalog td:nth-child(4) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.catalog td.file-code { text-align: center; }
.copy-file-code { min-height: 25px; padding: 2px 5px; border: 1px solid var(--accent-border); border-radius: 0; background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums; }
.copy-file-code:hover { background: var(--accent-hover); }
#file-copy-status { margin-bottom: 6px; color: var(--link); }
#file-copy-status:empty { display: none; }
.catalog td.catalog-empty { padding: 15px 9px; color: var(--muted); }
.catalog tbody tr:hover { background: var(--surface-soft); }
.file-actions { display: flex; align-items: center; gap: 5px; }
.file-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; min-height: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 0; }
.file-icon svg { width: 16px; height: 16px; }
.file-privacy { color: var(--muted); }
.file-privacy:hover { background: var(--accent-soft); }
.file-privacy[aria-pressed="true"] { border-color: var(--accent-active-border); background: var(--accent-soft); color: var(--accent); }
.file-privacy[aria-pressed="true"] .lock-open,
.file-privacy[aria-pressed="false"] .lock-closed { display: none; }
.download-file { color: var(--accent); }
.download-file:hover { background: var(--accent-soft); }
.favorite-file { color: var(--favorite-muted); }
.favorite-file:hover { background: var(--surface-soft); }
.favorite-file[aria-pressed="true"] { color: var(--star); --star-outline: var(--star-edge); }
.favorite-file[aria-pressed="true"]:hover { background: var(--star-hover); }
.delete-file { color: var(--danger); border-color: var(--danger-border); }
.delete-file:hover { background: var(--danger-soft); }
.catalog-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--muted); }
.catalog-pagination div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.catalog-pagination :is(a, .pagination-current) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 3px 6px;
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent);
    text-decoration: none;
}
.catalog-pagination a:hover { border-color: var(--accent-active-border); background: var(--accent-hover); }
.catalog-pagination .pagination-current { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.pagination-gap { padding: 0 2px; }
.catalog-notice { color: var(--success); margin-bottom: 8px; }
#files-search-error { color: var(--danger); margin-bottom: 8px; }
#files-search-error:empty { display: none; }
.user-create { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.user-create label { flex: 0 1 180px; max-width: 100%; gap: 3px; }
.user-create input, .user-create button { min-height: 30px; padding: 4px 8px; }
.user-create input, .user-create button, .user-action { border-radius: 0; }
.user-admin table { min-width: 420px; }
.user-admin th, .user-admin td { padding: 4px 8px; }
.user-admin .file-actions { gap: 5px; }
.user-admin .user-action { min-height: 24px; padding: 1px 7px; line-height: 1.2; white-space: nowrap; }
.user-admin .user-delete { border-color: var(--danger-border); background: var(--surface); color: var(--danger); }
.user-admin .user-delete:hover { background: var(--danger-soft); }
.user-state[data-state="active"] { color: var(--success); }
.user-state[data-state="suspended"] { color: var(--warning); }
.user-state[data-state="deleted"] { color: var(--danger); }
.password-popup { background: var(--surface); width: min(320px, calc(100% - 32px)); padding: 14px; color: inherit; border: 1px solid var(--border); box-shadow: 0 8px 30px var(--popup-shadow); }
.password-popup::backdrop { background: var(--overlay); }
.password-popup h2 { margin-bottom: 10px; overflow-wrap: anywhere; }
.password-popup input { min-height: 30px; padding: 4px 8px; border-radius: 0; }
.password-popup label + label { margin-top: 8px; }
.password-popup-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.account-notice { margin-top: 8px; color: var(--success); }
.account-notice.error { color: var(--danger); border-radius: 0; }
.stats-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.stats-heading p { margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.stats-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 6px 8px; }
.stats-filters label { gap: 3px; }
.stats-filters select, .stats-filters button { min-height: 28px; padding: 3px 6px; border-radius: 0; font: inherit; }
.stats-filters select { max-width: 220px; border: 1px solid var(--field-border); background: var(--surface); color: inherit; }
.stats-summary, .stats-charts { display: grid; gap: 8px; margin-top: 12px; }
.stats-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-summary section, .stats-chart { min-width: 0; padding: 8px 10px; border: 1px solid var(--border); }
.stats-summary h2, .stats-chart h2 { padding-bottom: 5px; border-bottom: 1px solid var(--subtle-border); color: var(--accent); }
.stats-summary dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 6px; margin: 6px 0 0; }
.stats-summary dt, .stats-empty { color: var(--muted); }
.stats-summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.stats-empty { margin-top: 6px; }
.stats-chart { --chart-line: var(--chart-blue); --chart-area: var(--accent-soft); }
.stats-chart-bytes { --chart-line: var(--chart-green); --chart-area: var(--chart-green-area); }
.stats-line-chart { display: block; width: 100%; margin-top: 5px; overflow: visible; }
.stats-line-chart text { fill: var(--muted); font: inherit; }
.stats-gridline { stroke: var(--subtle-border); }
.stats-line-area { fill: var(--chart-area); }
.stats-line-series { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stats-line-dot { fill: var(--chart-line); stroke: var(--surface); stroke-width: 1; }
.stats-line-dot:hover { r: 4px; }
.stats-daily { margin-top: 10px; }
.stats-daily summary { width: fit-content; cursor: pointer; color: var(--accent); }
.stats-daily table { min-width: 240px; margin-top: 6px; }
.security-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 8px; }
.security-heading p, .security-help { margin-top: 4px; color: var(--muted); }
.security-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.security-summary div { flex: 1 1 150px; padding: 6px 8px; border: 1px solid var(--border); background: var(--surface-soft); }
.security-summary dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; color: var(--accent); }
.security-log td:first-child { width: auto; white-space: nowrap; }
.security-log :is(td:nth-child(2), td:nth-child(4)) { white-space: normal; overflow-wrap: anywhere; }
.security-warning { color: var(--warning); }
.security-ip { overflow-wrap: anywhere; }
.security-log .catalog-table .security-actions-cell { text-align: center; vertical-align: middle; }
.security-actions { display: flex; justify-content: center; align-items: center; gap: 4px; }
.security-actions .security-ip-action,
.security-blocked-label { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; }
.security-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.security-ip-action { min-height: 24px; padding: 2px 6px; border-radius: 0; white-space: nowrap; }
.security-ip-action.security-block { border-color: var(--danger-border); color: var(--danger); background: var(--surface); }
.security-ip-action.security-block:hover { background: var(--danger-soft); }
.security-blocked-label { color: var(--danger); }
.security-block-list { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.security-block-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.security-block-filters label { display: grid; gap: 4px; }
.security-block-filters input, .security-block-filters select {
  box-sizing: border-box;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 3px 6px;
  border: 1px solid var(--field-border);
  border-radius: 0;
  background: var(--surface);
  color: inherit;
  font: inherit;
}
.security-block-count { margin-inline-start: auto; align-self: end; padding-bottom: 6px; color: var(--muted); }
.security-block-type { display: inline-block; padding: 2px 5px; border: 1px solid var(--border); }
.security-block-type[data-type="permanent"] { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.security-block-list tr[hidden] { display: none; }
.security-table-scroll { overflow: auto; }
.security-table-scroll thead th { position: sticky; top: 0; z-index: 1; }
.security-pdf-toolbar { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
a.security-pdf { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 4px; color: var(--accent); background: var(--surface); text-decoration: none; }
a.security-pdf:hover { background: var(--accent-soft); }
.security-pdf svg { width: 19px; height: 19px; color: var(--danger); }
.security-block-list small { display: block; color: var(--muted); }
@media (max-width: 720px) {
    .bar-content { flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; }
}
@media (max-width: 620px) {
    .stats-summary, .stats-charts { grid-template-columns: 1fr; }
}
