:root {
    color-scheme: light;
    --panel-ink: #193149;
    --panel-muted: #60758a;
    --panel-line: #d6e1ec;
    --panel-blue: #126eaa;
    --panel-blue-dark: #0e5686;
}

[hidden] { display: none !important; }
.page-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin:0 0 22px; }
.page-heading h1 { margin:6px 0; font-size:30px; line-height:1.2; }
.page-heading p { margin:6px 0 0; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 24px; }
.form-span { grid-column:1/-1; }
.form-footer { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:10px; margin-top:24px; padding-top:18px; border-top:1px solid var(--panel-line); }
.card form > label, .card > label { display:block; margin-bottom:16px; }
.card label small { display:block; color:var(--panel-muted); font-size:12px; font-weight:400; margin-top:5px; }
.card select, .card textarea { width:100%; }
.card input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) { width:100%; margin-bottom:0; }
fieldset { min-width:0; border:1px solid var(--panel-line); border-radius:8px; padding:16px; margin:0 0 16px; }
legend { font-weight:600; padding:0 7px; }
.weekday-picker { display:flex; flex-wrap:wrap; gap:8px; }
.weekday-picker label { border:1px solid #c8d7e5; background:#f7fafc; padding:9px 12px; border-radius:6px; cursor:pointer; }
.weekday-picker label:has(input:checked) { background:#e2f2fe; border-color:#1677b9; color:#075e9a; }
.checkbox-label { display:flex !important; align-items:center; gap:8px; font-weight:500; }
.table-actions { display:flex; flex-wrap:wrap; gap:6px; }
.table-actions .button-link { min-height:30px; padding:5px 10px; font-size:12px; }
.date-cell { white-space:nowrap; font-variant-numeric:tabular-nums; }
.type-badge { display:inline-block; padding:3px 9px; background:#e8f3fc; color:#175984; border-radius:20px; font-size:12px; font-weight:600; }
.empty-state { padding:24px 10px; text-align:center; color:var(--panel-muted); }
.card details { margin-top:18px; padding-top:14px; border-top:1px solid var(--panel-line); }
.card summary { cursor:pointer; font-weight:600; margin-bottom:12px; }
@media (max-width:700px) { .form-grid { grid-template-columns:1fr; } .page-heading h1 { font-size:26px; } .form-footer { justify-content:stretch; } .form-footer > * { flex:1; } }

body { background: #f1f5f9; color: var(--panel-ink); font: 14px/1.5 "Segoe UI", Arial, sans-serif; }
header { border-bottom-color: #2b8dcc; }
.top { max-width: 1160px; gap: 24px; }
.brand { line-height: 1; }
.account { line-height: 1.55; }
.nav-inner { max-width: 1160px; gap: 0; }
.nav-inner a { white-space: nowrap; transition: background .15s ease; }
.nav-inner a[aria-current="page"] { background: #166d9f; box-shadow: inset 0 -3px #8ed3fb; }
.nav-inner a:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #f8bd49; outline-offset: 2px; }
main { max-width: 1160px; margin-top: 24px; }
main > h1 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 32px); line-height: 1.2; letter-spacing: -.025em; }
main > p.muted { margin: 0 0 20px; }
main h2 { margin: 0 0 16px; font-size: 19px; line-height: 1.3; }
main p { line-height: 1.55; }
main a { color: #075e9a; }
main a:hover { color: #064777; }
.muted { color: var(--panel-muted); }
.notice, .success, .error, .alert { line-height: 1.45; border-radius: 7px; }
.alert { padding: 12px 15px; margin: 0 0 16px; border: 1px solid transparent; }
.alert-success { background: #e9f7ee; border-color: #b8dfc4; color: #1f6335; }
.alert-danger { background: #fff0ef; border-color: #efc5c3; color: #923a32; }
.alert-warning { background: #fff6df; border-color: #e9d38e; color: #75591d; }
.card { border-color: var(--panel-line); border-radius: 10px; padding: 22px; box-shadow: 0 2px 10px #1c3b5810; }
.grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.grid > .card { margin-bottom: 0; }
.metric { border-radius: 8px; border-color: var(--panel-line); background: #fff; }
.quick { gap: 14px; }
.quick a, .quick div { border-color: var(--panel-line); border-radius: 8px; }
button, .button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; border: 1px solid transparent; border-radius: 6px; background: var(--panel-blue); color: #fff; font: 600 13px/1.2 "Segoe UI", Arial, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
button:hover, .button-link:hover { background: var(--panel-blue-dark); color: #fff; }
button:disabled { opacity: .55; cursor: not-allowed; }
.button-secondary { background: #fff; color: var(--panel-blue-dark); border-color: #a9c3d7; }
.button-secondary:hover { background: #eaf4fb; color: var(--panel-blue-dark); }
.button-danger { background: #fff; color: #a43d3d; border-color: #e1b9b9; }
.button-danger:hover { background: #fff0f0; color: #873030; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { max-width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #b8c8d8; border-radius: 6px; background: #fff; color: var(--panel-ink); font: inherit; }
input[type="checkbox"], input[type="radio"] { width: auto; height: auto; margin: 0 7px 0 0; vertical-align: middle; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
label { color: #294359; font-weight: 600; }
label input:not([type="checkbox"]):not([type="radio"]), label select, label textarea { display: block; margin-top: 6px; font-weight: 400; }
table { border: 1px solid var(--panel-line); border-radius: 7px; overflow: hidden; }
th, td { padding: 11px 13px; border-bottom-color: #e8eef4; }
th { background: #eaf2f8; color: #24445e; font-weight: 700; }
tbody tr:hover { background: #f8fbfe; }
td form { margin: 4px 5px 4px 0; }
td button { min-height: 32px; padding: 6px 10px; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: 7px; }
.table-wrap table { min-width: 580px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.page-actions p { margin: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-head h2, .section-head p { margin: 0; }
.form-row, .action-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.form-row > label { flex: 1 1 260px; }
.form-row > button, .form-row > .button-link { flex: 0 0 auto; }
.action-row form { margin: 0; }
.detail-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 20px; margin: 0; }
.detail-list > div { padding: 11px 0; border-bottom: 1px solid #e6edf3; }
.detail-list dt { color: var(--panel-muted); font-size: 12px; margin-bottom: 4px; }
.detail-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 22px; }
.status-item { padding: 13px 15px; border: 1px solid var(--panel-line); background: #f8fbfe; border-radius: 8px; }
.status-item span { display: block; color: var(--panel-muted); font-size: 12px; margin-bottom: 4px; }
.status-item strong { font-size: 17px; }
.status-online { color: #167345; }
.status-offline { color: #b34d43; }
.control-panel { border-top: 1px solid #e4edf4; padding-top: 19px; }
.control-panel h3 { margin: 0 0 14px; font-size: 15px; }
.control-panel .form-row { margin-bottom: 12px; }
.control-panel .form-row select { width: 100%; margin-bottom: 0; }
.control-panel .action-row { margin-bottom: 12px; }
.control-panel .action-row + p { margin: 12px 0 0; }
.panel-radio .nav-inner { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.panel-radio .nav-inner a { padding: 13px 14px; }
.panel-radio .nav-inner form { padding: 4px 8px; }
.panel-radio .card > :last-child { margin-bottom: 0; }
.panel-radio .card > label { display: block; max-width: 640px; margin-bottom: 15px; }
.panel-radio .card > form > p { margin: 0 0 15px; }
.panel-radio .card > form > p > label { display: block; max-width: 640px; }
.panel-admin .card > label { display: block; max-width: 720px; margin-bottom: 15px; }
.panel-admin .card form > label { display: block; margin-bottom: 12px; }
.panel-admin .card form input:not([type="hidden"]), .panel-admin .card form select, .panel-admin .card form textarea { margin-bottom: 4px; }
.panel-admin td:last-child { min-width: 150px; }
.filter-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 18px; background: transparent; }
.filter-links a { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 11px; border: 1px solid var(--panel-line); border-radius: 6px; background: #fff; text-decoration: none; font-weight: 600; }
.filter-links a:hover { background: #edf6fc; }
.filter-links a[aria-current="page"] { background: #dceefa; border-color: #78b6de; color: #144c72; }
.folder-location { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; margin: 0 0 10px; background: #e8f3fb; border: 1px solid #b9d5e8; border-left: 5px solid var(--panel-blue); border-radius: 10px; }
.folder-location h2 { margin: 3px 0 4px; font-size: 22px; }
.folder-location p { margin: 0; color: #415e75; }
.folder-location code { font-family: Consolas, monospace; font-size: 13px; color: #1b4e74; overflow-wrap: anywhere; }
.eyebrow { color: #2f688d; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.folder-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; padding: 0 4px; background: transparent; color: var(--panel-muted); }
.folder-breadcrumb strong, .folder-breadcrumb [aria-current="page"] { color: var(--panel-ink); }
.file-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; margin-bottom: 18px; }
.file-tool { display: flex; flex-direction: column; gap: 11px; min-width: 0; margin-bottom: 0; }
.file-tool h2 { margin: 0; font-size: 17px; }
.file-tool label { display: block; flex: 1 1 auto; }
.file-tool input:not([type="hidden"]) { width: 100%; margin: 6px 0 0; }
.file-tool > button { align-self: flex-start; }
.file-tool .action-row { margin-top: auto; }
.file-list .section-head { align-items: start; }
.file-list .section-head h2 { margin-bottom: 3px; }
.file-list .section-head p { margin: 0; }
.disk-usage { min-width: 190px; text-align: right; color: var(--panel-muted); }
.disk-usage strong { color: var(--panel-ink); }
.file-list .table-wrap table { min-width: 840px; }
.file-list .file-name { min-width: 180px; overflow-wrap: anywhere; }
.file-name strong { font-weight: 600; }
.file-name small { display: block; margin-top: 3px; color: var(--panel-muted); line-height: 1.4; }
.file-actions { min-width: 190px; }
.file-actions .action-row { gap: 5px; }
.file-actions .action-row form { margin: 0; }
.item-manage { margin-top: 8px; }
.item-manage summary { width: max-content; color: var(--panel-blue); cursor: pointer; font-weight: 600; }
.item-manage-body { display: grid; gap: 10px; min-width: 210px; padding: 12px; margin-top: 8px; border: 1px solid var(--panel-line); border-radius: 8px; background: #f8fbfe; }
.item-manage-body form { display: grid; gap: 7px; margin: 0; }
.item-manage-body label { min-width: 0; }
.item-manage-body input { width: 100%; margin: 4px 0 0 !important; }
.item-manage-body button { justify-self: start; }
.stats-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.stats-filter label { flex: 1 1 220px; }
.stats-filter input { margin-bottom: 0; }
.dashboard-metrics { margin: 0 0 18px; }
.dashboard-quick { margin: 0 0 20px; }
.dashboard-quick a { min-height: 92px; }
.quick-access-form { margin: 0; min-width: 0; }
.quick-access-form .quick-access { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 5px; width: 100%; height: 100%; min-height: 92px; padding: 14px; background: #fff; border: 1px solid var(--panel-line); color: var(--panel-ink); text-align: left; white-space: normal; font-size: 14px; line-height: 1.5; font-weight: 400; }
.quick-access strong { color: var(--panel-blue); font-size: 15px; margin: 0; }
.quick-access-form .quick-access:hover:not(:disabled) { border-color: #2385ca; background: #f5fbff; }
.quick-access-form .quick-access:disabled { opacity: .65; background: #f4f6f8; }
main { min-width: 0; }
.grid > *, .form-grid > *, .card { min-width: 0; }
.card pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.panel-admin .card > form > p > label { display: block; max-width: 720px; }
.panel-admin .card > form > p { margin: 0 0 16px; }
.panel-admin .card > form > p > label > input, .panel-admin .card > form > p > label > select { margin-top: 6px; }
.usage-details { margin: 0 0 18px; }
.playlist-settings { display: grid; gap: 12px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #e5edf4; }
.playlist-settings > label:first-child { max-width: 560px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.checkbox-label input { flex: 0 0 auto; }
.track-picker { display: grid; gap: 8px; max-height: 560px; overflow-y: auto; padding: 2px 5px 2px 2px; }
.track-option { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--panel-line); border-radius: 8px; background: #fff; }
.track-option:has(input[type="checkbox"]:checked) { border-color: #88bde0; background: #f0f8fd; }
.track-option > .checkbox-label { flex: 1 1 250px; overflow-wrap: anywhere; }
.track-option > label:last-child { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.track-option input[type="number"] { width: 80px; margin: 0; }
.form-footer { padding-top: 18px; margin-top: 18px; border-top: 1px solid #e5edf4; }

@media (max-width: 720px) {
    .top { padding: 18px 16px; align-items: flex-start; }
    .brand { font-size: 31px; }
    .brand small { font-size: 13px; letter-spacing: 2px; }
    main { margin-top: 18px; }
    .card { padding: 16px; }
    .status-grid { grid-template-columns: 1fr; }
    .form-row > label, .form-row > button, .form-row > .button-link { flex-basis: 100%; }
    .form-row > button, .form-row > .button-link { width: 100%; }
    .action-row > form, .action-row > form button { width: 100%; }
    .folder-location { padding: 15px; }
    .folder-location .button-link { width: 100%; }
    .disk-usage { text-align: left; }
}
