/* ==========================================================================
   Servpanel 2.3 — UI kit
   Тёмная тема, крупные карточки, боковая навигация и пошаговые мастера.
   ========================================================================== */

:root {
    --bg-main: #070b12;
    --bg-panel: #111827;
    --bg-panel-2: #162136;
    --bg-elevated: #1a2740;
    --border: #22304a;
    --border-soft: rgba(255, 255, 255, .07);
    --text-main: #e8eefc;
    --text-muted: #8fa0bd;
    --text-dim: #66758f;
    --rx-color: #2dd4a7;
    --tx-color: #5b8cff;
    --sys-color: #f5b84b;
    --danger: #ff6b6b;
    --accent: #5b8cff;
    --accent-2: #28d7b0;
    --accent-3: #8b5cf6;
    --accent-grad: linear-gradient(135deg, #5b8cff 0%, #8b5cf6 100%);
    --radius: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow: 0 24px 60px rgba(0, 0, 0, .35);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, .18);
    --sidebar-w: 274px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    background:
        radial-gradient(1000px 600px at 12% -10%, rgba(91, 140, 255, .13), transparent 60%),
        radial-gradient(900px 500px at 95% 0%, rgba(139, 92, 246, .10), transparent 55%),
        var(--bg-main);
    color: var(--text-main);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(91, 140, 255, .35); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #25324a; border-radius: 99px; border: 2px solid var(--bg-main); }
::-webkit-scrollbar-thumb:hover { background: #34476a; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #8fb0ff; }
code {
    background: rgba(0, 0, 0, .32);
    border: 1px solid var(--border-soft);
    color: #bcd0ff;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: .92em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
kbd {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    border-bottom-color: #34476a;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: inherit;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Loader / toasts
   -------------------------------------------------------------------------- */
.loader-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    background: rgba(5, 8, 14, .86);
    backdrop-filter: blur(8px);
}
.loader-overlay h3 { margin: 0; color: #fff; font-size: 18px; }
.loader-overlay p { margin: 0; color: var(--text-muted); font-size: 13px; }
.spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(255, 255, 255, .10);
    border-top-color: var(--accent);
    border-right-color: var(--accent-2);
    border-radius: 50%;
    animation: spin .9s linear infinite;
    margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-host {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: min(380px, calc(100vw - 32px));
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(17, 24, 39, .96);
    box-shadow: var(--shadow-soft);
    color: var(--text-main);
    font-size: 13px;
    animation: toastIn .24s ease both;
}
.toast.success { border-color: rgba(45, 212, 167, .45); }
.toast.error { border-color: rgba(255, 107, 107, .5); }
.toast.info { border-color: rgba(91, 140, 255, .45); }
.toast .toast-ico { font-size: 16px; line-height: 1.2; }
.toast strong { display: block; font-size: 13px; margin-bottom: 2px; }
.toast small { color: var(--text-muted); font-size: 12px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background:
        radial-gradient(700px 500px at 20% 10%, rgba(91, 140, 255, .16), transparent 60%),
        radial-gradient(600px 500px at 85% 90%, rgba(139, 92, 246, .12), transparent 55%),
        #070b12;
    overflow: hidden;
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .55; pointer-events: none; }
.login-orb-a { width: 280px; height: 280px; left: -80px; bottom: -90px; background: radial-gradient(circle, rgba(40, 215, 176, .3), transparent 70%); }
.login-orb-b { width: 360px; height: 360px; right: -120px; top: -120px; background: radial-gradient(circle, rgba(91, 140, 255, .32), transparent 70%); }
.login-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: linear-gradient(180deg, rgba(22, 33, 54, .94), rgba(12, 18, 30, .96));
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
    text-align: left;
    backdrop-filter: blur(16px);
}
.login-card .brand { margin-bottom: 26px; }
.login-copy h1 { margin: 0 0 6px; font-size: 25px; letter-spacing: -.03em; color: #fff; }
.login-copy p { margin: 0 0 22px; color: var(--text-muted); font-size: 13px; }
.login-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-dim);
    font-size: 11px;
}
.login-foot .link-btn { font-size: 12px; }
.error-msg {
    display: none;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, .35);
    background: rgba(255, 107, 107, .08);
    color: #ffb3b3;
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   Shell / sidebar / topbar
   -------------------------------------------------------------------------- */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 14px 14px;
    background: linear-gradient(180deg, rgba(16, 24, 40, .95), rgba(8, 13, 23, .98));
    border-right: 1px solid var(--border-soft);
    z-index: 100;
    transition: transform .25s ease;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 14px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent-grad);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .04em;
    box-shadow: 0 8px 22px rgba(91, 140, 255, .28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 16px; letter-spacing: -.02em; color: #fff; }
.brand-text small { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; margin-top: 2px; }
.brand-lg .brand-mark { width: 44px; height: 44px; flex-basis: 44px; font-size: 16px; }
.brand-lg .brand-text strong { font-size: 18px; }
.brand-lg .brand-text small { font-size: 10px; }

.nav { flex: 1; overflow-y: auto; padding: 2px 2px 8px; display: flex; flex-direction: column; gap: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-label {
    padding: 5px 12px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #56657f;
}
.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-item .nav-ico {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, .04);
    color: var(--text-dim);
    font-size: 13px;
    transition: inherit;
}
.nav-item:hover { background: rgba(255, 255, 255, .045); color: #dfe8ff; }
.nav-item:hover .nav-ico { color: #cfe0ff; background: rgba(91, 140, 255, .13); }
.nav-item.active {
    background: linear-gradient(90deg, rgba(91, 140, 255, .18), rgba(139, 92, 246, .08));
    border-color: rgba(91, 140, 255, .24);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.nav-item.active .nav-ico { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 12px rgba(91, 140, 255, .3); }
.nav-item-quiet { font-size: 12.5px; }
.nav-badge {
    margin-left: auto;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .07);
    color: var(--text-muted);
    font-size: 10px;
    text-align: center;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .15); color: #fff; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; background: #5b6a83; }
.nav-dot.good { background: var(--rx-color); box-shadow: 0 0 0 4px rgba(45, 212, 167, .10); }
.nav-dot.warn { background: var(--sys-color); box-shadow: 0 0 0 4px rgba(245, 184, 75, .10); }
.nav-dot.bad { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 107, 107, .10); }

.sidebar-foot {
    border-top: 1px solid var(--border-soft);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 10px;
    min-width: 0;
}
.avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #22304a, #31456b);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #dbe7ff;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-meta strong { font-size: 12.5px; color: #e9f0ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: 10.5px; color: var(--text-dim); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }
.topbar {
    height: 76px;
    flex: 0 0 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 26px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(8, 13, 23, .72);
    backdrop-filter: blur(14px);
    z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumb { color: var(--text-dim); font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
.crumb span { color: #485772; }
.topbar-title { margin: 2px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: #fff; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.search-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 210px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .035);
    color: var(--text-muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: .18s ease;
}
.search-trigger:hover { border-color: #34476a; background: rgba(255, 255, 255, .06); color: #dce7ff; }
.search-trigger kbd { margin-left: auto; }
.search-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
    color: var(--text-muted);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: .18s ease;
}
.icon-btn:hover { color: #fff; border-color: #3a5078; background: rgba(255, 255, 255, .07); }
.icon-btn.active { color: #fff; border-color: rgba(91, 140, 255, .6); background: rgba(91, 140, 255, .14); }
.mobile-only { display: none !important; }

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 70px;
    scroll-behavior: smooth;
}

/* --------------------------------------------------------------------------
   Tabs / generic cards
   -------------------------------------------------------------------------- */
.tab-pane { display: none; animation: fadeIn .28s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card {
    background: linear-gradient(180deg, rgba(22, 33, 54, .82), rgba(13, 20, 33, .9));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-soft);
    min-width: 0;
}
.card h3 {
    margin: 0 0 12px;
    color: #eaf1ff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
    text-transform: none;
    white-space: normal;
}
.card p { color: var(--text-muted); }
.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}
.card-head h3 { margin: 0; }
.card-head p { margin: 3px 0 0; font-size: 12px; color: var(--text-dim); }
.card .value { font-size: 19px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sub-text { font-size: 11px; color: var(--text-muted); display: block; margin-top: 3px; }
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; margin-bottom: 18px; }
.stats-cards > .card { margin-bottom: 0; }
.controls-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.controls-row > * { min-width: 0; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 28px;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 24px;
    border: 1px solid rgba(91, 140, 255, .18);
    background:
        radial-gradient(700px 300px at 0% 0%, rgba(91, 140, 255, .18), transparent 60%),
        radial-gradient(500px 280px at 90% 110%, rgba(40, 215, 176, .10), transparent 60%),
        linear-gradient(180deg, rgba(22, 33, 54, .92), rgba(11, 18, 31, .96));
    box-shadow: 0 26px 70px rgba(0, 0, 0, .28);
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 75%);
    pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; min-width: 0; flex: 1; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #8ea7d8;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.status-dot.good { background: var(--rx-color); box-shadow: 0 0 0 5px rgba(45, 212, 167, .12); }
.status-dot.warn { background: var(--sys-color); box-shadow: 0 0 0 5px rgba(245, 184, 75, .12); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 0 5px rgba(255, 107, 107, .12); }
.hero h1 { margin: 12px 0 8px; font-size: clamp(25px, 3vw, 38px); line-height: 1.08; letter-spacing: -.045em; color: #fff; }
.hero p { margin: 0; max-width: 640px; color: #9db0cf; font-size: 13.5px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    color: #b9c8e4;
    font-size: 11.5px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.hero-traffic {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    color: var(--text-dim);
    font-size: 11px;
}
.hero-traffic b { display: block; margin-top: 2px; color: #dbe7ff; font-size: 12.5px; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hero-side {
    position: relative;
    z-index: 1;
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0 0 24px;
    border-left: 1px solid rgba(255, 255, 255, .06);
}
.score-ring {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--accent-2) calc(var(--score, 0) * 1%), rgba(255, 255, 255, .075) 0);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 18px 44px rgba(40, 215, 176, .12);
    position: relative;
}
.score-ring::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: #0d1626;
    border: 1px solid rgba(255, 255, 255, .05);
}
.score-ring > div { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.score-ring strong { font-size: 29px; letter-spacing: -.04em; color: #fff; }
.score-ring small { margin-top: 5px; font-size: 10px; color: var(--text-dim); }
.score-caption { text-align: center; display: flex; flex-direction: column; gap: 3px; }
.score-caption strong { font-size: 12.5px; color: #dce8ff; }
.score-caption span { font-size: 11.5px; color: var(--text-muted); }
.score-caption .link-btn { font-size: 11px; }
.hero-kpis { display: flex; gap: 16px; margin-top: 2px; color: var(--text-dim); font-size: 10.5px; }
.hero-kpis b { color: #dce8ff; font-size: 12px; }

/* --------------------------------------------------------------------------
   Health cards
   -------------------------------------------------------------------------- */
.health-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.health-card {
    position: relative;
    min-height: 148px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: linear-gradient(180deg, rgba(22, 33, 54, .78), rgba(12, 19, 31, .9));
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}
.health-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--text-dim);
    opacity: .5;
}
.health-card.good::before { background: var(--rx-color); opacity: 1; }
.health-card.warn::before { background: var(--sys-color); opacity: 1; }
.health-card.bad::before { background: var(--danger); opacity: 1; }
.health-card .hc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.health-card .hc-ico {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .05);
    color: #b8c9e9;
    font-size: 14px;
}
.health-card.good .hc-ico { color: var(--rx-color); background: rgba(45, 212, 167, .09); }
.health-card.warn .hc-ico { color: var(--sys-color); background: rgba(245, 184, 75, .09); }
.health-card.bad .hc-ico { color: var(--danger); background: rgba(255, 107, 107, .09); }
.health-card .hc-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.health-card .hc-value { font-size: 16px; font-weight: 700; letter-spacing: -.02em; color: #eef4ff; }
.health-card .hc-meta { font-size: 11px; color: var(--text-muted); min-height: 32px; }
.health-card .hc-action {
    margin-top: auto;
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: #8fb0ff;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
}
.health-card .hc-action:hover { color: #c4d6ff; }

/* --------------------------------------------------------------------------
   Dashboard grid / chart / recommendations
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.main-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); margin-bottom: 18px; }
.chart-card { margin-bottom: 0; }
.chart-wrap { height: 290px; width: 100%; margin-top: 4px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }
.select-compact { width: auto; max-width: 190px; padding: 7px 10px; font-size: 12px; }
.rec-card { margin-bottom: 0; }
.rec-list { display: flex; flex-direction: column; gap: 8px; }
.rec-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 11px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, .025);
}
.rec-item .rec-ico { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(91, 140, 255, .11); color: #9dbaff; font-size: 12px; }
.rec-item.warn .rec-ico { background: rgba(245, 184, 75, .11); color: var(--sys-color); }
.rec-item.bad .rec-ico { background: rgba(255, 107, 107, .10); color: var(--danger); }
.rec-item .rec-copy { min-width: 0; }
.rec-item strong { display: block; font-size: 12px; color: #e3ecff; }
.rec-item small { display: block; margin-top: 2px; color: var(--text-dim); font-size: 11px; }
.rec-item .rec-btn { margin-left: auto; align-self: center; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255, 255, 255, .04); color: #cfe0ff; font: inherit; font-size: 10.5px; cursor: pointer; white-space: nowrap; }
.rec-item .rec-btn:hover { border-color: rgba(91, 140, 255, .5); }
.skeleton-line { height: 44px; border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .075), rgba(255, 255, 255, .035)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton-line.short { width: 75%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.quick-clients { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.quick-client {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, .025);
}
.quick-client .qc-avatar { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(91, 140, 255, .12); color: #a9c2ff; font-size: 12px; font-weight: 700; }
.quick-client .qc-copy { min-width: 0; flex: 1; }
.quick-client strong { display: block; font-size: 12px; color: #e7efff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-client small { display: block; color: var(--text-dim); font-size: 10.5px; }
.quick-client .qc-status { width: 7px; height: 7px; border-radius: 50%; background: #5b6a83; }
.quick-client .qc-status.active { background: var(--rx-color); box-shadow: 0 0 0 4px rgba(45, 212, 167, .10); }
.quick-client .qc-status.recent { background: var(--sys-color); }
.quick-client button { padding: 4px 7px; border-radius: 7px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font: inherit; font-size: 10px; cursor: pointer; }
.empty-state { padding: 22px; text-align: center; color: var(--text-dim); font-size: 12px; border: 1px dashed var(--border); border-radius: 12px; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 14px;
    border-radius: 13px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, .025);
    color: var(--text-main);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: .18s ease;
}
.quick-action:hover { transform: translateY(-2px); border-color: rgba(91, 140, 255, .34); background: rgba(91, 140, 255, .07); }
.quick-action .qa-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(91, 140, 255, .13); color: #a9c2ff; font-size: 13px; margin-bottom: 4px; }
.quick-action strong { font-size: 12px; color: #e8f0ff; }
.quick-action small { font-size: 10.5px; color: var(--text-dim); }

/* --------------------------------------------------------------------------
   Buttons / forms
   -------------------------------------------------------------------------- */
button { font-family: inherit; }
.btn,
.btn-primary,
.btn-dark,
.btn-success,
.btn-danger,
.btn-soft,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .16s ease, filter .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover, .btn-primary:hover, .btn-dark:hover, .btn-success:hover, .btn-danger:hover, .btn-soft:hover, .btn-ghost:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active, .btn-primary:active, .btn-dark:active, .btn-success:active, .btn-danger:active { transform: none; }
.btn:disabled, .btn-primary:disabled, .btn-dark:disabled, .btn-success:disabled, .btn-danger:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 22px rgba(91, 140, 255, .22); }
.btn-dark { background: rgba(255, 255, 255, .045); border-color: var(--border); color: #d7e2f8; }
.btn-soft { background: rgba(91, 140, 255, .13); border-color: rgba(91, 140, 255, .25); color: #cfe0ff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { color: #fff; border-color: #3a5078; background: rgba(255, 255, 255, .04); }
.btn-success { background: #16866b; color: #fff; }
.btn-danger { background: #c94b4b; color: #fff; }
.btn-lg { padding: 12px 18px; font-size: 13.5px; border-radius: 12px; }
.btn-sm { padding: 6px 10px; font-size: 11px; border-radius: 8px; }
.link-btn { padding: 0; border: 0; background: none; color: #8fb0ff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.link-btn:hover { color: #c4d6ff; text-decoration: underline; }

a.btn-dark, a.btn-primary, a.btn-success, a.btn-danger, a.btn-ghost, a.btn-soft { color: #fff; text-decoration: none; }
a.btn-ghost { color: var(--text-muted); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; text-align: left; }
.field > span { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--text-muted); }
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.form-control,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border) !important;
    background: #0a1220 !important;
    color: var(--text-main) !important;
    font: inherit;
    font-size: 12.5px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: rgba(91, 140, 255, .8) !important;
    box-shadow: 0 0 0 3px rgba(91, 140, 255, .14) !important;
    background: #0b1424 !important;
}
input::placeholder, textarea::placeholder { color: #5e6d86; }
textarea { resize: vertical; min-height: 80px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; }
label { color: var(--text-muted); }
select option { background: #0f1828; color: var(--text-main); }
.form-label { display: block; margin-bottom: 6px; font-size: 11px; color: var(--text-muted); }
.form-check { display: inline-flex; align-items: center; gap: 7px; }
.form-check-input { margin: 0; }
.form-check-label { font-size: 12px; color: var(--text-muted); }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.col-md-6 { grid-column: span 6; }
.col-md-12 { grid-column: span 12; }
.mb-3 { margin-bottom: 13px; }
.mb-2 { margin-bottom: 8px; }
.mt-2 { margin-top: 8px; }
.p-3 { padding: 13px; }
.small { font-size: 12px; }
.fw-bold { font-weight: 700; }
.text-info { color: #8fb0ff !important; }
.text-warning { color: var(--sys-color) !important; }
.text-white { color: #fff !important; }
.bg-dark { background: #0a1220 !important; }
.border-info { border-color: rgba(91, 140, 255, .35) !important; }
.border-secondary { border-color: var(--border) !important; }
.rounded { border-radius: 10px !important; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-wrapper {
    width: 100%;
    overflow: auto;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    margin-bottom: 18px;
    background: rgba(9, 15, 26, .55);
}
table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 900px; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
th {
    background: rgba(8, 13, 23, .72);
    font-weight: 700;
    color: #7587a5;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .09em;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 1;
}
th.sortable:hover { color: #cfe0ff; }
.sort-arrow { font-size: 9px; margin-left: 4px; color: var(--accent); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(91, 140, 255, .045); }
td { color: #c7d4ea; font-size: 12.5px; }
td strong { color: #eaf1ff; }
.status-active { color: var(--rx-color); font-weight: 700; }
.status-recent { color: var(--sys-color); font-weight: 700; }
.status-inactive { color: #8b98ad; }
.val-rx { color: var(--rx-color); }
.val-tx { color: var(--tx-color); }
.val-sys { color: var(--sys-color); }
.speed-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px;
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--border-soft);
    padding: 5px 8px;
    border-radius: 7px;
    display: inline-block;
    width: 100%;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Modals / wizard / palette
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 6, 12, .76);
    backdrop-filter: blur(9px);
    animation: overlayIn .18s ease both;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
    width: 100%;
    max-width: 560px;
    max-height: min(86vh, 760px);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, #141f34, #0b1220);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
    overflow: hidden;
    animation: modalIn .22s ease both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-soft);
}
.modal-head h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-body p { color: var(--text-muted); font-size: 12.5px; }

.wizard {
    width: min(880px, 100%);
    max-height: min(90vh, 820px);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, #142037, #0a111e);
    box-shadow: 0 40px 110px rgba(0, 0, 0, .65);
    overflow: hidden;
    animation: modalIn .22s ease both;
}
.wizard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border-soft);
}
.wizard-head h2 { margin: 7px 0 0; font-size: 22px; letter-spacing: -.035em; color: #fff; }
.wizard-progress { height: 3px; background: rgba(255, 255, 255, .055); }
.wizard-progress > div { height: 100%; width: 0; background: var(--accent-grad); transition: width .28s ease; box-shadow: 0 0 16px rgba(91, 140, 255, .5); }
.wizard-body { flex: 1; overflow-y: auto; padding: 22px 24px; }
.wizard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 24px;
    border-top: 1px solid var(--border-soft);
    background: rgba(0, 0, 0, .14);
}
.wizard-foot-right { display: flex; align-items: center; gap: 12px; }
.wizard-hint { font-size: 11px; color: var(--text-dim); }
.wizard-lead { margin: 0 0 18px; color: var(--text-muted); font-size: 13px; }
.wizard-section-title { margin: 20px 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6f82a2; }
.wizard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.wizard-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.wizard-summary {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, .025);
}
.wizard-summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 11px 13px; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.wizard-summary-row:last-child { border-bottom: 0; }
.wizard-summary-row span { color: var(--text-dim); }
.wizard-summary-row b { color: #e8f0ff; font-weight: 600; text-align: right; }
.wizard-note { padding: 12px 13px; border-radius: 12px; border: 1px solid rgba(245, 184, 75, .22); background: rgba(245, 184, 75, .06); color: #e8c98d; font-size: 11.5px; line-height: 1.5; }
.wizard-note.info { border-color: rgba(91, 140, 255, .24); background: rgba(91, 140, 255, .07); color: #b9cdf5; }
.wizard-note.good { border-color: rgba(45, 212, 167, .24); background: rgba(45, 212, 167, .07); color: #a7e8d6; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 14px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .025);
    color: var(--text-main);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: .18s ease;
}
.choice:hover { border-color: rgba(91, 140, 255, .45); background: rgba(91, 140, 255, .06); transform: translateY(-1px); }
.choice.selected { border-color: rgba(91, 140, 255, .8); background: rgba(91, 140, 255, .11); box-shadow: 0 0 0 1px rgba(91, 140, 255, .2) inset; }
.choice .choice-ico { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(91, 140, 255, .12); color: #a9c2ff; font-size: 15px; margin-bottom: 5px; }
.choice strong { font-size: 12.5px; color: #eaf1ff; }
.choice small { font-size: 11px; color: var(--text-dim); line-height: 1.35; }
.choice .choice-badge { position: absolute; top: 10px; right: 10px; font-size: 9px; color: var(--rx-color); background: rgba(45, 212, 167, .09); border: 1px solid rgba(45, 212, 167, .18); padding: 2px 6px; border-radius: 99px; }
.wizard-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; padding: 8px 0; }
.wizard-result .result-ico { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; font-size: 25px; background: rgba(45, 212, 167, .1); border: 1px solid rgba(45, 212, 167, .24); color: var(--rx-color); }
.wizard-result h3 { margin: 4px 0 0; font-size: 20px; color: #fff; }
.wizard-result p { margin: 0; color: var(--text-muted); font-size: 12.5px; max-width: 520px; }
.wizard-result .result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.wizard-log { width: 100%; max-height: 180px; overflow: auto; text-align: left; background: #05080e; border: 1px solid var(--border); border-radius: 12px; padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: #9fe8c9; white-space: pre-wrap; }
.spin { display: inline-block; animation: spin 1s linear infinite; }

.palette {
    width: min(620px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: linear-gradient(180deg, #141f34, #0b1220);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
    overflow: hidden;
    animation: modalIn .18s ease both;
}
.palette-input-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); color: var(--text-dim); }
.palette-input-row input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0; font-size: 14px; }
.palette-results { max-height: 360px; overflow-y: auto; padding: 7px; }
.palette-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 11px; border: 0; border-radius: 10px; background: transparent; color: var(--text-main); font: inherit; text-align: left; cursor: pointer; }
.palette-item:hover, .palette-item.active { background: rgba(91, 140, 255, .12); }
.palette-item .pi-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .05); color: #a9c2ff; font-size: 13px; }
.palette-item .pi-copy { display: flex; flex-direction: column; min-width: 0; }
.palette-item strong { font-size: 12.5px; }
.palette-item small { font-size: 10.5px; color: var(--text-dim); }
.palette-empty { padding: 20px; text-align: center; color: var(--text-dim); font-size: 12px; }

/* --------------------------------------------------------------------------
   Badges / alerts / misc
   -------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .02em; border: 1px solid transparent; }
.badge-muted { color: var(--text-muted); background: rgba(255, 255, 255, .05); border-color: var(--border); }
.badge-good { color: var(--rx-color); background: rgba(45, 212, 167, .08); border-color: rgba(45, 212, 167, .2); }
.badge-warn { color: var(--sys-color); background: rgba(245, 184, 75, .08); border-color: rgba(245, 184, 75, .2); }
.badge-bad { color: var(--danger); background: rgba(255, 107, 107, .08); border-color: rgba(255, 107, 107, .2); }
.alert { padding: 13px 15px; border-radius: 13px; font-size: 12.5px; line-height: 1.5; margin-bottom: 18px; border: 1px solid var(--border); }
.alert-danger { background: rgba(255, 107, 107, .08); border-color: rgba(255, 107, 107, .35); color: #ffc4c4; }
.alert strong { color: #fff; }
.divider { height: 1px; background: var(--border-soft); margin: 14px 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--text-muted); }
.hidden { display: none !important; }

/* Advanced mode: всё, что помечено advanced-only, видно только эксперту. */
.advanced-only { display: none !important; }
body.expert .advanced-only { display: block !important; }
body.expert .advanced-only.flex { display: flex !important; }
.advanced-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 11px;
    border: 1px dashed var(--border);
    color: var(--text-dim);
    font-size: 11.5px;
    margin-bottom: 14px;
}
.expert-badge { display: none; }
body.expert .expert-badge { display: inline-flex; }

/* Старый левый бордер у некоторых карточек */
.card[style*="border-left"] { border-left-width: 1px !important; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
    .health-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .main-grid { grid-template-columns: 1fr; }
    .hero { flex-direction: column; }
    .hero-side { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; align-items: center; padding: 18px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .06); }
    .score-ring { width: 86px; height: 86px; }
    .score-ring strong { font-size: 22px; }
    .score-caption { text-align: left; }
    .hero-kpis { margin-left: auto; }
    .search-trigger { min-width: 0; }
    .search-label, .search-trigger kbd { display: none; }
}
@media (max-width: 860px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-105%); box-shadow: 20px 0 60px rgba(0, 0, 0, .45); }
    .sidebar.open { transform: translateX(0); }
    .mobile-only { display: inline-grid !important; }
    .topbar { padding: 0 16px; }
    .topbar-title { font-size: 17px; }
    .content-area { padding: 18px 16px 60px; }
    .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wizard-grid, .wizard-grid-3 { grid-template-columns: 1fr; }
    .topbar-right .btn-primary { padding: 9px 11px; }
    .topbar-right .btn-primary span { display: none; }
}
@media (max-width: 600px) {
    .hero { padding: 20px; border-radius: 18px; }
    .hero h1 { font-size: 25px; }
    .health-grid { grid-template-columns: 1fr; }
    .hero-side { flex-wrap: wrap; }
    .hero-kpis { margin-left: 0; width: 100%; }
    .health-card { min-height: 0; }
    .quick-grid { grid-template-columns: 1fr 1fr; }
    .quick-action { padding: 11px; }
    .card { padding: 16px; border-radius: 15px; }
    .modal-overlay { padding: 10px; }
    .wizard-head, .wizard-body, .wizard-foot { padding-left: 16px; padding-right: 16px; }
    .wizard-foot { flex-direction: column-reverse; align-items: stretch; }
    .wizard-foot .btn, .wizard-foot-right { width: 100%; }
    .wizard-foot-right { justify-content: space-between; }
    .controls-row { flex-direction: column; align-items: stretch; }
    .controls-row > * { width: 100% !important; }
    .stats-cards { grid-template-columns: 1fr; }
    .col-md-6 { grid-column: span 12; }
}

/* --------------------------------------------------------------------------
   Обновление панели
   -------------------------------------------------------------------------- */
.update-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}
.update-item {
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 0;
    font-size: 12.5px;
    color: var(--text-muted);
}
.update-item small {
    display: block;
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.update-item b, .update-item code {
    color: var(--text);
    font-weight: 600;
    word-break: break-all;
}
.update-safe {
    margin-top: 14px;
    border: 1px solid rgba(56, 189, 248, .25);
    background: rgba(56, 189, 248, .06);
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}
.update-source {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.update-note {
    margin-top: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, .18);
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
    white-space: pre-wrap;
}
.update-status {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, .18);
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: pre-line;
}
.update-status.running { border-color: rgba(56, 189, 248, .45); color: #7dd3fc; }
.update-status.ok { border-color: rgba(46, 160, 67, .45); color: #7ee787; }
.update-status.err { border-color: rgba(248, 81, 73, .45); color: #ffa198; }
.update-log {
    margin: 12px 0 0;
    max-height: 300px;
    overflow: auto;
    background: #05080f;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px;
    line-height: 1.5;
    color: #9fb3c8;
    white-space: pre-wrap;
    word-break: break-word;
}
.update-backups { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.update-backup-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 12px;
    background: rgba(255, 255, 255, .02);
}
.update-backup-row .grow { flex: 1; min-width: 180px; }
.update-backup-row code { color: var(--text); font-size: 11.5px; word-break: break-all; }
@media (max-width: 700px) {
    .update-grid { grid-template-columns: 1fr; }
}
