:root {
    --primary: #062239;
    --primary-soft: #0d3555;
    --accent: #4F93B7;
    --white: #FFFFFF;
    --light-bg: #f5f8fb;
    --border: #dfeaf3;
    --text: #1b2834;
    --text-soft: #5b6e7b;
    --danger: #c14d4d;
    --success: #2a9d7b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; background: var(--light-bg); color: var(--text); }
body { min-height: 100vh; }

a { text-decoration: none; }
button, input { font: inherit; }

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
}

.auth-shell {
    width: min(100%, 440px);
    padding: 24px;
}

.auth-card {
    background: rgba(255,255,255,0.92);
    border-radius: 18px;
    padding: 32px 28px;
    box-shadow: 0 20px 50px rgba(6,34,57,0.2);
}

.auth-brand {
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 24px;
    font-size: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-weight: 600;
    color: var(--primary);
}

.field input {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
}

.primary-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.primary-btn:hover { background: var(--primary-soft); }

.form-message { min-height: 20px; font-size: 0.9rem; }
.form-message.error { color: var(--danger); }

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--primary);
    color: var(--white);
    padding: 18px 16px;
}

.brand {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--white);
}

.nav-item {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    color: var(--white);
    opacity: 0.92;
}

.nav-item.active,
.nav-item:hover {
    background: rgba(255,255,255,0.08);
}

.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 36px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.breadcrumbs { color: var(--text-soft); font-size: 0.9rem; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.user-pill {
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 12px;
}
.link-button {
    color: var(--primary);
    font-weight: 600;
}

.content-panel {
    padding: 28px 36px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
    color: var(--primary);
}

.dropzone {
    background: var(--white);
    border: 2px dashed var(--accent);
    border-radius: 18px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    margin-bottom: 18px;
    cursor: pointer;
}

.dropzone span { color: var(--accent); font-weight: 700; }
.hidden-input { display: none; }

.upload-progress {
    background: var(--white);
    border-radius: 999px;
    overflow: hidden;
    height: 12px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.progress-bar {
    width: 68%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.folder-card,
.admin-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    min-height: 110px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.admin-card.wide { grid-column: 1 / -1; }

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}
.status-dot.green { background: var(--success); }
.status-ok p { margin: 0 0 8px; }

.metric-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 8px;
    color: var(--text-soft);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.data-table th, .data-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.inline-form input,
.inline-form select,
.inline-form button,
.data-table input,
.data-table select {
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    background: #fff;
}

.permissions-form {
    align-items: flex-start;
}

.permissions-form label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    color: var(--text-soft);
}

.small-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.form-message {
    min-height: 20px;
    margin-top: 10px;
    color: var(--primary);
    font-size: 0.9rem;
}

.form-message.error {
    color: var(--danger);
}

.form-message.success {
    color: var(--success);
}

@media (max-width: 768px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; }
    .topbar, .page-header { flex-direction: column; align-items: flex-start; }
}

:root {
    --primary: #06223a;
    --primary-soft: #0d3555;
    --accent: #4f93b7;
    --white: #ffffff;
    --light-bg: #f4f6f3;
    --border: #e2e7e1;
    --text: #1e2925;
    --text-soft: #718078;
    --danger: #b54a42;
    --success: #327a56;
    --surface-muted: #f8faf7;
    --sidebar-width: 248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body { background: var(--light-bg); color: var(--text); font-family: "Segoe UI", "Aptos", sans-serif; font-size: 14px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.workspace-body { background: #f5f7f4; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 25px 16px 15px; background: #06223a; color: #f7faf7; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; margin: 0 0 46px 5px; color: #fff; font-size: 20px; font-weight: 700; letter-spacing: 0; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--accent); color: #06223a; }
.brand-mark svg { width: 21px; height: 21px; }
.brand-mark svg path:first-child { fill: currentColor; stroke: none; }
.brand-mark svg path:last-child { fill: none; stroke: #4f93b7; stroke-width: 1.5; }
.brand-light { color: #b7c9d3; font-weight: 400; }
.sidebar-caption { margin: 0 10px 11px; color: #9bb4aa; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 12px; border-radius: 7px; color: #c8d6cf; font-size: 13px; font-weight: 500; opacity: 1; transition: background 140ms ease, color 140ms ease; }
.nav-item svg { width: 18px; height: 18px; color: #adc0b7; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: #0d3555; color: #fff; }
.nav-item.active svg { color: var(--accent); }
.sidebar-bottom { display: grid; gap: 14px; margin-top: auto; }
.agent-chip { display: flex; align-items: flex-start; gap: 10px; padding: 13px 10px; border: 1px solid rgba(220,239,229,0.13); border-radius: 7px; background: rgba(255,255,255,0.035); }
.agent-chip strong, .agent-chip small { display: block; }
.agent-chip strong { color: #e9f0eb; font-size: 11px; font-weight: 600; }
.agent-chip small { max-width: 165px; margin-top: 4px; overflow: hidden; color: #9db2a8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.agent-indicator { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: #c58c53; box-shadow: 0 0 0 3px rgba(197,140,83,0.15); }
.agent-indicator.online { background: #91c66b; box-shadow: 0 0 0 3px rgba(145,198,107,0.14); }
.account-row { display: flex; align-items: center; gap: 10px; padding: 12px 3px 2px; border-top: 1px solid rgba(220,239,229,0.14); }
.account-avatar { display: grid; flex: 0 0 31px; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: #e5eaed; color: #06223a; font-size: 12px; font-weight: 700; }
.account-name { min-width: 0; flex: 1; overflow: hidden; color: #f5f8f5; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.account-name small { display: block; margin-top: 3px; color: #a8bcb2; font-size: 10px; font-weight: 400; }
.icon-button { display: inline-grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #64746c; cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; }
.sidebar .icon-button { color: #b4c6bd; }
.icon-button:hover { background: #eef2ed; color: var(--primary); }
.sidebar .icon-button:hover { background: rgba(255,255,255,0.08); color: #fff; }

.main-panel { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 4; min-height: 57px; padding: 0 38px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.94); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: #839088; font-size: 12px; }
.breadcrumbs a { color: #5d6d64; }
.breadcrumbs a:hover, .text-link:hover, .table-link:hover { color: var(--primary); text-decoration: underline; }
.crumb-divider { color: #bbc4bd; }
.topbar-status { display: flex; align-items: center; gap: 8px; color: #78867e; font-size: 11px; }
.topbar-status .agent-indicator { width: 7px; height: 7px; margin: 0; }
.content-panel { width: min(100%, 1450px); margin: 0 auto; padding: 36px 40px 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 8px; color: #758379; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.page-heading h1 { margin: 0; color: #1c2b25; font-size: 28px; font-weight: 650; line-height: 1.2; }
.page-subtitle { margin: 8px 0 0; color: #78857d; font-size: 13px; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.primary-btn, .secondary-btn { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background 140ms ease, border-color 140ms ease, transform 140ms ease; }
.primary-btn { background: #06223a; color: #fff; }
.primary-btn:hover { background: #0d3555; }
.primary-btn:active, .secondary-btn:active { transform: translateY(1px); }
.primary-btn svg, .secondary-btn svg { width: 16px; height: 16px; }
.secondary-btn { border-color: #dbe2da; background: #fff; color: #35463d; }
.secondary-btn:hover { border-color: #b9c7bb; background: #fbfcfa; }

.summary-strip { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 31px; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.summary-item { display: flex; flex: 1 1 190px; align-items: center; gap: 12px; min-height: 76px; padding: 13px 17px; }
.summary-item + .summary-item { border-left: 1px solid var(--border); }
.summary-icon { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 6px; }
.summary-icon svg { width: 19px; height: 19px; }
.folder-summary { background: #f8f1e8; color: #9b7649; }
.file-summary { background: #edf3f6; color: #4f7185; }
.size-summary { background: #fbf2e7; color: #a47342; }
.summary-item strong, .summary-item small { display: block; }
.summary-item strong { color: #26362e; font-size: 15px; font-weight: 650; }
.summary-item small { margin-top: 3px; color: #829087; font-size: 10px; }
.file-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 12px; }
.section-title { display: flex; align-items: baseline; gap: 10px; }
.section-title h2, .section-heading h2 { margin: 0; color: #283830; font-size: 16px; font-weight: 650; }
.section-title > span, .section-count { color: #8a958e; font-size: 11px; }
.search-field { display: flex; width: min(100%, 258px); align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #dfe5de; border-radius: 6px; background: #fff; color: #7b8980; }
.search-field svg { width: 16px; height: 16px; }
.search-field input { width: 100%; height: 34px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.search-field:focus-within { border-color: #7393a2; box-shadow: 0 0 0 2px rgba(6,34,58,0.1); }
.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.data-table { min-width: 700px; margin: 0; border-collapse: collapse; }
.data-table th, .data-table td { height: 48px; padding: 8px 15px; border-bottom: 1px solid #edf0ec; text-align: left; vertical-align: middle; }
.data-table th { height: 39px; background: #fafbf9; color: #7f8b83; font-size: 10px; font-weight: 650; }
.data-table td { color: #65736a; font-size: 11px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:not(.empty-row):hover { background: #fbfcfa; }
.explorer-table { min-width: 770px; }
.explorer-table th:first-child { width: 39%; }
.explorer-table th:nth-child(2) { width: 21%; }
.explorer-table th:nth-child(3) { width: 22%; }
.explorer-table th:nth-child(4) { width: 12%; }
.item-link { display: inline-flex; min-width: 0; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
a.item-link:hover strong { color: #0d3555; }
.item-link > span:last-child { min-width: 0; }
.item-link strong, .item-link small { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-link strong { color: #34443b; font-size: 12px; font-weight: 600; }
.item-link small { margin-top: 3px; color: #8b978f; font-size: 10px; }
.item-icon { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 6px; }
.item-icon svg { width: 18px; height: 18px; }
.folder-icon { background: #f8f1e8; color: #9b7649; }
.document-icon { background: #eef3f6; color: #597487; }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 36px 12px 40px; color: #839087; text-align: center; }
.empty-state-icon { display: grid; width: 42px; height: 42px; margin-bottom: 3px; place-items: center; border-radius: 50%; background: #f1f4ef; color: #758c7c; }
.empty-state-icon svg { width: 22px; height: 22px; }
.empty-state strong { color: #4d5e53; font-size: 13px; }
.empty-state span:last-child { font-size: 11px; }
.no-search-results td { padding: 20px; color: #839087; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.app-dialog { width: min(100% - 30px, 480px); padding: 0; border: 1px solid #dfe5de; border-radius: 9px; background: #fff; color: var(--text); box-shadow: 0 22px 70px rgba(26,44,34,0.23); }
.app-dialog::backdrop { background: rgba(22,37,30,0.46); backdrop-filter: blur(2px); }
.dialog-form { padding: 25px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 21px; }
.dialog-heading h2 { margin: 0; color: #25372d; font-size: 20px; font-weight: 650; }
.dialog-heading .eyebrow { margin-bottom: 5px; }
.dialog-heading .icon-button { margin: -6px -7px 0 0; }
.field-label { display: grid; gap: 7px; color: #53635a; font-size: 11px; font-weight: 600; }
.text-input, .field-label select { width: 100%; min-height: 39px; padding: 0 11px; border: 1px solid #dfe5de; border-radius: 5px; outline: none; background: #fff; color: #33443a; }
.text-input:focus, .field-label select:focus { border-color: #7393a2; box-shadow: 0 0 0 2px rgba(6,34,58,0.1); }
.upload-picker { display: grid; justify-items: center; gap: 8px; padding: 26px 16px; border: 1px dashed #b9c8bc; border-radius: 7px; background: #fafcf9; color: #738278; text-align: center; cursor: pointer; }
.upload-picker > svg { width: 24px; height: 24px; margin-bottom: 3px; color: #4f7185; }
.upload-picker strong { color: #3b5144; font-size: 12px; }
.upload-picker span { font-size: 10px; }
.upload-picker input { width: 100%; max-width: 230px; color: #718078; font-size: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.form-message { min-height: 16px; margin: 8px 0 0; color: #7b897f; font-size: 11px; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
.upload-progress { height: 5px; margin-top: 14px; overflow: hidden; border-radius: 4px; background: #e8eee7; }
.upload-progress[hidden] { display: none; }
.upload-progress span { display: block; width: 0; height: 100%; background: #4f93b7; transition: width 120ms ease; }

.admin-content { padding-top: 31px; }
.admin-content .page-heading { margin-bottom: 23px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 34px; }
.metric-card { display: grid; min-height: 112px; align-content: start; gap: 7px; padding: 16px 17px; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.metric-card .metric-label { color: #65756a; font-size: 11px; }
.metric-card strong { color: #20372c; font-size: 25px; font-weight: 650; line-height: 1; }
.metric-card > span:last-child { color: #91a096; font-size: 10px; }
.admin-section { scroll-margin-top: 76px; margin: 0 0 33px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 13px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { font-size: 17px; }
.management-block { margin-bottom: 13px; padding: 17px; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.management-block h3 { margin: 0 0 12px; color: #3d4c43; font-size: 12px; font-weight: 650; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input, .inline-form select, .data-table input, .data-table select { min-width: 110px; min-height: 35px; padding: 0 9px; border: 1px solid #dfe5de; border-radius: 5px; outline: none; background: #fff; color: #48574e; font-size: 11px; }
.inline-form input:focus, .inline-form select:focus, .data-table input:focus, .data-table select:focus { border-color: #7393a2; }
.create-user-block .inline-form input[name="name"] { flex: 1 1 145px; }
.create-user-block .inline-form input[name="email"] { flex: 1 1 185px; }
.create-user-block .inline-form input[name="password"] { flex: 1 1 190px; }
.data-table.management-table { width: 100%; min-width: 930px; }
.management-table input[data-field="name"] { width: 145px; }
.management-table input[data-field="email"] { width: 200px; }
.management-table select { min-width: 105px; }
.management-table td:last-child { white-space: nowrap; }
.small-btn { min-height: 31px; padding: 0 10px; font-size: 10px; }
.row-message { margin-left: 7px; color: var(--success); font-size: 10px; }
.table-empty { padding: 22px !important; color: #8b978f !important; text-align: center !important; }
.permissions-form { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr); gap: 13px; align-items: end; }
.permissions-form .field-label select { min-height: 37px; }
.permission-options { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 8px 16px; padding: 3px 0; }
.permission-options label { display: inline-flex; align-items: center; gap: 6px; color: #627168; font-size: 11px; }
.permission-options input { accent-color: #06223a; }
.permissions-form > button { justify-self: start; }
.empty-inline { padding: 20px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: #76847b; font-size: 12px; }
.text-link, .table-link { color: #0d3555; font-size: 11px; font-weight: 600; }
.device-panel { display: flex; align-items: center; gap: 14px; padding: 17px; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.device-status-mark { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 7px; background: #f5efe6; color: #ad814e; }
.device-status-mark.online { background: #edf5e8; color: #598849; }
.device-status-mark svg { width: 22px; height: 22px; }
.device-details { display: grid; flex: 1; gap: 4px; }
.device-details strong { color: #36483d; font-size: 12px; }
.device-details span, .device-details small { color: #718078; font-size: 10px; }
.status-tag { padding: 5px 8px; border-radius: 4px; font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }
.status-live { background: #eff6e9; color: #548343; }
.status-idle { background: #f5f0e8; color: #9a764b; }

.auth-body { background: #06223a; }
.auth-card { border: 1px solid rgba(255,255,255,0.55); border-radius: 9px; box-shadow: 0 18px 54px rgba(12,33,25,0.22); }
.auth-brand { color: #06223a; font-size: 23px; letter-spacing: 0.03em; }
.auth-form { gap: 15px; }
.field label { color: #4e6256; font-size: 12px; }
.field input { min-height: 42px; border-radius: 5px; }

@media (max-width: 980px) {
    :root { --sidebar-width: 218px; }
    .content-panel { padding-right: 26px; padding-left: 26px; }
    .topbar { padding-right: 26px; padding-left: 26px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .app-shell { display: block; }
    .sidebar { position: sticky; inset: 0 0 auto; width: 100%; height: auto; padding: 10px 13px; }
    .brand { margin: 0 0 9px 2px; font-size: 17px; }
    .brand-mark { width: 27px; height: 27px; }
    .sidebar-caption, .sidebar-bottom { display: none; }
    .side-nav { display: flex; gap: 4px; overflow-x: auto; }
    .nav-item { flex: 0 0 auto; min-height: 37px; padding: 0 10px; font-size: 11px; }
    .nav-item svg { width: 16px; height: 16px; }
    .main-panel { min-height: calc(100vh - 94px); margin-left: 0; }
    .topbar { position: static; min-height: 46px; padding: 0 17px; }
    .topbar-status { font-size: 0; }
    .topbar-status .agent-indicator { margin: 0; }
    .content-panel { padding: 25px 17px 40px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 17px; }
    .page-heading h1 { font-size: 25px; }
    .heading-actions { width: 100%; }
    .heading-actions button { flex: 1; }
    .summary-strip { display: grid; grid-template-columns: 1fr 1fr; }
    .summary-item { min-height: 67px; padding: 10px; }
    .summary-item + .summary-item { border-left: 0; }
    .summary-item:nth-child(even) { border-left: 1px solid var(--border); }
    .summary-item:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .file-toolbar { align-items: stretch; flex-direction: column; }
    .search-field { width: 100%; }
    .section-title { justify-content: space-between; }
    .metric-grid { gap: 8px; }
    .metric-card { min-height: 100px; padding: 13px; }
    .metric-card strong { font-size: 22px; }
    .admin-content { padding-top: 23px; }
    .permissions-form { grid-template-columns: 1fr; }
    .permission-options { grid-column: auto; }
    .device-panel { align-items: flex-start; flex-wrap: wrap; }
    .status-tag { margin-left: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
