:root {
    --sidebar: #111827;
    --sidebar-soft: #1b2434;
    --sidebar-line: rgba(255, 255, 255, .08);
    --canvas: #f4f6fb;
    --card: #ffffff;
    --line: #e5e9f2;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --ok: #16a34a;
    --warn: #d97706;
    --danger: #dc2626;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px rgba(16, 24, 40, .04);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: var(--canvas);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

[hidden] {
    display: none !important;
}

h1, h2, h3, p {
    margin: 0;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

code {
    font-family: Consolas, "Courier New", monospace;
    background: rgba(37, 99, 235, .08);
    color: #1e40af;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 12px;
}

.muted {
    color: var(--muted);
    font-size: 12.5px;
}

.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }

/* ---------------------------------------------------------------- 启动与登录 */
.boot-view {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--muted);
    background: var(--canvas);
    z-index: 50;
}

.boot-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #dbe3f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background:
        radial-gradient(900px 420px at 8% -10%, rgba(37, 99, 235, .16), transparent 60%),
        radial-gradient(700px 360px at 100% 100%, rgba(22, 163, 74, .10), transparent 55%),
        #f4f6fb;
}

.login-panel {
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(16, 24, 40, .12);
    padding: 34px 34px 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 22px 20px 18px;
    color: #fff;
}

.brand-login {
    padding: 0 0 24px;
    color: var(--text);
}

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
}

.brand strong {
    display: block;
    font-size: 15px;
    letter-spacing: .5px;
}

.brand span {
    display: block;
    font-size: 11.5px;
    opacity: .6;
    margin-top: 1px;
}

.login-panel h1 {
    font-size: 24px;
    letter-spacing: .5px;
}

.login-sub {
    color: var(--muted);
    margin: 6px 0 24px;
    font-size: 13px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}

.field > span {
    font-size: 12.5px;
    color: #4b5563;
    font-weight: 600;
}

.input, .select, .textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d8dfeb;
    border-radius: 9px;
    background: #fff;
    padding: 9px 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.input:focus, .select:focus, .textarea:focus {
    border-color: #93b4f8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.textarea {
    resize: vertical;
    min-height: 112px;
}

.form-error {
    color: var(--danger);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 12.5px;
    margin: 2px 0 14px;
}

.login-foot {
    margin-top: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 11.5px;
}

/* ---------------------------------------------------------------- 布局 */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 244px;
    flex: 0 0 244px;
    height: 100vh;
    background: var(--sidebar);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .16);
    border-radius: 6px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: #cfd7e5;
    border-radius: 6px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #9ca3af;
    text-align: left;
    font-size: 13.5px;
    transition: background .15s, color .15s;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: currentColor;
    opacity: .9;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .06);
    color: #e5e7eb;
}

.nav-item.is-active {
    background: linear-gradient(90deg, rgba(37, 99, 235, .28), rgba(37, 99, 235, .10));
    color: #fff;
}

.nav-item.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 3px;
    background: #60a5fa;
}

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}

.sidebar-foot {
    flex: 0 0 auto;
    padding: 12px;
    border-top: 1px solid var(--sidebar-line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.runtime-card {
    background: var(--sidebar-soft);
    border: 1px solid var(--sidebar-line);
    border-radius: 10px;
    padding: 10px 11px;
    font-size: 11.5px;
    color: #9ca3af;
}

.runtime-title {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #d1d5db;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 12px;
}

.runtime-line {
    line-height: 1.8;
}

.runtime-line code {
    background: rgba(255, 255, 255, .08);
    color: #bfdbfe;
    padding: 0 4px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.dot-ok {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
}

.user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 3px;
}

.user-name {
    font-size: 12.5px;
    color: #d1d5db;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-btn {
    border: 0;
    background: transparent;
    color: #93c5fd;
    font-size: 12px;
    padding: 2px 0;
}

.link-btn:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

.version {
    color: #6b7280;
    font-size: 10.5px;
    padding-left: 3px;
}

.main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 28px 32px 46px;
    max-width: 1560px;
}

.page {
    display: none;
    animation: fade-in .18s ease;
}

.page.is-active {
    display: block;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: none; }
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.page-head h1 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .3px;
}

.page-head p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

.head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------------------------------------------------------------- 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .22);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-ghost {
    border-color: #d8dfeb;
    color: #374151;
}

.btn-ghost:hover:not(:disabled) {
    border-color: #b9c6dd;
    background: #f8fafc;
}

.btn-danger-ghost {
    border-color: #f3c1c1;
    color: #b91c1c;
    background: #fff7f7;
}

.btn-danger-ghost:hover:not(:disabled) {
    background: #fee2e2;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.btn-sm {
    min-height: 32px;
    padding: 4px 11px;
    font-size: 12.5px;
}

.btn-block {
    width: 100%;
    min-height: 42px;
}

/* ---------------------------------------------------------------- 卡片与 KPI */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.kpi {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    min-width: 0;
}

.kpi span {
    color: var(--muted);
    font-size: 12.5px;
}

.kpi strong {
    display: block;
    font-size: 28px;
    line-height: 1.25;
    margin: 5px 0 2px;
    font-variant-numeric: tabular-nums;
}

.kpi small {
    color: #9ca3af;
    font-size: 11px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 16px;
    min-width: 0;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.card-head h2 {
    font-size: 15px;
    font-weight: 700;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.chip-danger {
    color: #b91c1c;
    background: #fee2e2;
}

.chip-warn {
    color: #92400e;
    background: #fef3c7;
}

.chip-ok {
    color: #15803d;
    background: #dcfce7;
}

.chip-muted {
    color: #4b5563;
    background: #f3f4f6;
}

/* ---------------------------------------------------------------- 图表 */
.chart-grid {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(360px, 1.15fr);
    gap: 16px;
}

.donut-wrap {
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 4px 2px 6px;
}

.donut {
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    border-radius: 50%;
    background: #eef2f8;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut::after {
    content: "";
    position: absolute;
    inset: 26px;
    border-radius: 50%;
    background: #fff;
}

.donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
}

.donut-center strong {
    display: block;
    font-size: 24px;
    line-height: 1.15;
}

.donut-center span {
    color: var(--muted);
    font-size: 11px;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 12.5px;
}

.legend-row b {
    margin-left: auto;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.swatch {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    flex: 0 0 9px;
}

.swatch-blue { background: #2563eb; }
.swatch-red { background: #ef4444; }
.swatch-green { background: #16a34a; }
.swatch-amber { background: #f59e0b; }
.swatch-gray { background: #9ca3af; }

.legend-inline {
    display: flex;
    gap: 14px;
    color: var(--muted);
    font-size: 11.5px;
}

.legend-inline span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bar-chart {
    height: 176px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 4px 0;
    border-bottom: 1px solid var(--line);
}

.bar-group {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
}

.bar-pair {
    width: 100%;
    height: 138px;
    flex: 0 0 138px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}

.bar {
    width: 11px;
    min-height: 2px;
    border-radius: 4px 4px 0 0;
    background: #2563eb;
    transition: height .25s;
}

.bar-red {
    background: #ef4444;
}

.bar-label {
    color: #9ca3af;
    font-size: 10.5px;
    white-space: nowrap;
}

.bar-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12.5px;
    width: 100%;
}

/* ---------------------------------------------------------------- 工具栏与表格 */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.toolbar .input {
    max-width: 330px;
}

.toolbar .select {
    width: auto;
    min-width: 138px;
}

.inline-field {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12.5px;
    white-space: nowrap;
}

.input-days {
    width: 84px;
    min-height: 34px;
    padding: 5px 8px;
}

.toolbar .muted {
    margin-left: auto;
}

.action-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    padding: 9px 10px;
    background: #f8fafc;
    border: 1px dashed #dfe5ef;
    border-radius: 9px;
    margin-bottom: 12px;
}

.action-bar .muted {
    margin-left: auto;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.8px;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    white-space: nowrap;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover:not(.empty-row) {
    background: #f8fbff;
}

tbody tr.is-selected {
    background: #eef4ff;
}

tbody tr.clickable-row {
    cursor: pointer;
}

tbody tr.is-unlicensed td {
    color: #b91c1c;
}

.mono {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    color: #334155;
}

.cell-nowrap {
    white-space: nowrap;
}

.cell-wrap {
    white-space: normal;
    min-width: 180px;
    max-width: 320px;
    word-break: break-word;
}

.empty-row td {
    text-align: center;
    color: var(--muted);
    padding: 28px 12px;
    white-space: normal;
}

.table-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 11.5px;
    padding: 10px 2px 0;
}

.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}

.badge-ok { color: #15803d; background: #dcfce7; }
.badge-warn { color: #92400e; background: #fef3c7; }
.badge-danger { color: #b91c1c; background: #fee2e2; }
.badge-muted { color: #4b5563; background: #f3f4f6; }
.badge-info { color: #1d4ed8; background: #dbeafe; }

.online-yes { color: var(--ok); font-weight: 600; }
.online-no { color: #9ca3af; }

/* ---------------------------------------------------------------- 消息 */
.message-list {
    display: flex;
    flex-direction: column;
}

.message-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 2px;
    border-bottom: 1px solid #eef2f7;
    font-size: 12.8px;
}

.message-item:last-child {
    border-bottom: 0;
}

.message-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    margin-top: 7px;
    flex: 0 0 7px;
}

.message-item.is-unread .message-dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.message-main {
    flex: 1 1 auto;
    min-width: 0;
}

.message-text {
    color: #374151;
    word-break: break-all;
}

.message-meta {
    color: #9ca3af;
    font-size: 11px;
    margin-top: 2px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.message-time {
    flex: 0 0 auto;
    color: #9ca3af;
    font-size: 11px;
    padding-top: 2px;
}

.empty-block {
    padding: 30px 12px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
}

/* ---------------------------------------------------------------- 更新页 */
.update-grid {
    display: grid;
    grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr);
    gap: 16px;
    align-items: start;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.form-stack .btn {
    align-self: flex-start;
    margin-top: 4px;
    min-width: 130px;
}

/* ---------------------------------------------------------------- 弹层 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
    z-index: 60;
    animation: fade-in .15s ease;
}

.modal {
    width: 100%;
    max-width: 760px;
    max-height: 86vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-sm {
    max-width: 430px;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 {
    font-size: 17px;
}

.modal-head p {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.modal-close {
    border: 0;
    background: #f1f5f9;
    color: #64748b;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1;
    flex: 0 0 30px;
}

.modal-close:hover {
    background: #e2e8f0;
}

.modal-body {
    padding: 18px 20px;
    overflow-y: auto;
}

.modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 13px 20px 17px;
    border-top: 1px solid var(--line);
    background: #fbfcfe;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 20px;
    margin-bottom: 18px;
}

.detail-item {
    display: flex;
    gap: 8px;
    font-size: 12.8px;
    border-bottom: 1px dashed #eef2f7;
    padding-bottom: 7px;
    min-width: 0;
}

.detail-item span {
    color: var(--muted);
    flex: 0 0 82px;
}

.detail-item b {
    font-weight: 600;
    word-break: break-all;
}

.detail-section {
    margin-top: 18px;
}

.detail-section h3 {
    font-size: 13px;
    margin-bottom: 8px;
}

.detail-mini-table {
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}

.detail-mini-table table {
    font-size: 12px;
}

.detail-mini-table thead th {
    position: static;
    padding: 7px 10px;
}

.detail-mini-table tbody td {
    padding: 7px 10px;
}

.detail-messages {
    max-height: 190px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 2px 10px;
}

.confirm-text {
    color: #4b5563;
    font-size: 13.5px;
    line-height: 1.75;
}

.confirm-hint {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

/* ---------------------------------------------------------------- 提示 */
.toast-root {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    z-index: 80;
    pointer-events: none;
}

.toast {
    min-width: 220px;
    max-width: 360px;
    background: #111827;
    color: #f9fafb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .28);
    animation: toast-in .18s ease;
}

.toast-error {
    background: #991b1b;
}

.toast-ok {
    background: #166534;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
    .kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .chart-grid, .update-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        width: 218px;
        flex-basis: 218px;
    }
    .main {
        padding: 24px 22px 40px;
    }
}

@media (max-width: 860px) {
    .app-shell {
        flex-direction: column;
    }
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        flex-basis: auto;
    }
    .brand {
        padding: 16px 18px 10px;
    }
    .nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px 12px 10px;
    }
    .nav-item {
        width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .nav-item.is-active::before {
        display: none;
    }
    .sidebar-foot {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        padding: 10px 14px;
    }
    .runtime-card {
        display: none;
    }
    .user-row {
        margin-left: auto;
    }
    .version {
        display: none;
    }
    .main {
        padding: 18px 14px 36px;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kpi strong {
        font-size: 24px;
    }
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .head-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .toolbar .input {
        max-width: none;
        flex: 1 1 220px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .donut-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .login-panel {
        padding: 26px 22px 22px;
    }
    .modal-overlay {
        padding: 12px;
    }
    .modal {
        max-height: 92vh;
    }
}
