:root {
    --bg: #0b0d12;
    --panel: #11141b;
    --panel-2: #161a23;
    --border: #1f2533;
    --border-2: #2a3142;
    --text: #e6eaf2;
    --text-dim: #8b94a7;
    --muted: #5b6479;
    --accent: #5be7c4;
    --accent-soft: rgba(91, 231, 196, 0.12);
    --warn: #f5b76b;
    --danger: #ef6f7e;
    --ok: #5be7c4;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}
code, pre, .mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }

/* App layout */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
    background: linear-gradient(180deg, #0d1018, #0b0d12);
    border-right: 1px solid var(--border);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 24px; }
.logo {
    width: 32px; height: 32px; border-radius: 9px;
    background: conic-gradient(from 200deg, #5be7c4, #4dc0e3, #5be7c4);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 6px 16px rgba(91,231,196,.18);
}
.brand-name { font-weight: 700; letter-spacing: -0.01em; }
.brand-host { font-size: 11px; color: var(--text-dim); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--text-dim);
    transition: background .12s, color .12s;
}
.nav-item svg { width: 16px; height: 16px; flex: 0 0 16px; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(91,231,196,.18);
}
.logout-form { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.logout-btn {
    display: flex; align-items: center; gap: 11px;
    width: 100%;
    padding: 9px 11px; border-radius: 8px;
    background: transparent; border: 0; color: var(--text-dim);
    cursor: pointer;
}
.logout-btn:hover { background: var(--panel); color: var(--text); }
.logout-btn svg { width: 16px; height: 16px; }
.logout-user { margin-left: auto; font-size: 11px; color: var(--muted); }

.nav-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
}
.nav-back {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    transition: background .12s, color .12s;
}
.nav-back svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.nav-back:hover {
    background: var(--panel);
    color: var(--accent);
}
.nav-site-label {
    font-size: 11px;
    color: var(--muted);
    padding: 2px 11px 10px;
    line-height: 1.35;
    word-break: break-all;
}
.site-manage-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.site-manage-nav .nav-item {
    font-size: 13px;
}

.main { padding: 36px 44px 60px; max-width: 1200px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
.page-head .muted { color: var(--text-dim); margin: 0; }

/* Cards */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card h2, .card h3 { margin-top: 0; }
.card h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.card h3 { font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.card h4 { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.muted { color: var(--text-dim); }

/* Site overview — domain / DNS */
.site-dns-card h3 { margin-bottom: 0; }
.site-dns-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px 20px;
    margin-bottom: 18px;
}
.site-dns-sub { margin: 0; max-width: 52ch; line-height: 1.5; }
.site-dns-status { flex-shrink: 0; }
.site-dns-badge.pill { padding: 6px 12px; font-size: 12px; }
.site-dns-meta {
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .2);
    border: 1px solid var(--border);
}
.site-dns-meta-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.site-dns-meta-value { font-size: 15px; font-weight: 500; word-break: break-all; }
.site-dns-meta-hint { margin-top: 8px; font-size: 12px; line-height: 1.45; }
.site-dns-warn-line { color: var(--warn); }
.site-dns-table { margin-top: 16px; }
.site-dns-table th { vertical-align: bottom; }
.site-dns-steps {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.site-dns-steps-lead { margin: 0 0 14px; line-height: 1.55; max-width: 62ch; }
.site-dns-recipe { margin-bottom: 0; }
.site-dns-recipe tbody td.mono { word-break: break-all; }
.site-dns-multi, .site-dns-note { margin: 14px 0 0; font-size: 12px; line-height: 1.5; max-width: 62ch; }
.site-dns-multi .mono { font-size: 12px; }
@media (max-width: 620px) {
    .site-dns-head { flex-direction: column; align-items: stretch; }
}
.kicker { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.stat .label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }
.stat .value { font-size: 24px; font-weight: 600; margin-top: 4px; letter-spacing: -0.01em; }
.stat .sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }

/* Table */
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
table.tbl th { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tr:hover td { background: rgba(255,255,255,.015); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background .12s, border-color .12s;
}
.btn:hover { background: #1d2332; border-color: #36405a; color: var(--text); }
.btn-primary { background: var(--accent); color: #06251f; border-color: transparent; }
.btn-primary:hover { background: #75ecd0; color: #06251f; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(239,111,126,.3); }
.btn-danger:hover { background: rgba(239,111,126,.08); color: var(--danger); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Forms */
.form-row { display: grid; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 12px; color: var(--text-dim); }
.input, .textarea {
    background: var(--bg);
    border: 1px solid var(--border-2);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 8px;
    width: 100%;
}
.input:focus, .textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,231,196,.15); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.pill-ok    { background: rgba(91,231,196,.12); color: var(--ok); }
.pill-warn  { background: rgba(245,183,107,.12); color: var(--warn); }
.pill-bad   { background: rgba(239,111,126,.12); color: var(--danger); }
.pill-muted { background: var(--panel-2); color: var(--text-dim); }
.pill .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

/* Alerts */
/* ── Audit Log (server-wide live tail) ─────────────────────────────────── */
.audit-head { align-items: flex-start; }
.audit-toolbar { gap: 8px; align-items: center; }
.audit-toolbar .btn { display: inline-flex; align-items: center; gap: 8px; }
.audit-toolbar-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 currentColor;
    animation: audit-pulse 1.8s infinite;
}
.audit-dot-live { background: var(--accent); }
.audit-dot-paused { background: #d6a657; animation: none; }
@keyframes audit-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(91,231,196,.55); }
    70%  { box-shadow: 0 0 0 6px rgba(91,231,196,0); }
    100% { box-shadow: 0 0 0 0 rgba(91,231,196,0); }
}

.audit-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
}
.audit-side { padding: 14px 16px; align-self: start; position: sticky; top: 16px; }
.audit-side-section + .audit-side-section { margin-top: 16px; }
.audit-side-label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    margin-bottom: 8px;
}
.audit-side-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.audit-side-row .audit-side-label { margin: 0 auto 0 0; }
.audit-side-hint { display: block; font-size: 11px; margin-top: 6px; }
.audit-side-info .audit-meta div { font-size: 12px; padding: 2px 0; }
.audit-link {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--accent);
    font: inherit; font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.audit-link:hover { text-decoration: underline; }

.audit-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.audit-chip {
    appearance: none;
    background: rgba(255,255,255,.025);
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 999px;
    font: inherit; font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: color .15s, background .15s, border-color .15s;
}
.audit-chip:hover { color: var(--text); border-color: var(--border-2); }
.audit-chip.active { color: var(--accent); border-color: rgba(91,231,196,.4); background: var(--accent-soft); }

.audit-src-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.audit-src-item {
    display: grid;
    grid-template-columns: 18px 22px 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.audit-src-item:hover { background: rgba(255,255,255,.03); }
.audit-src-icon { text-align: center; color: var(--text-dim); }
.audit-src-item input[type=checkbox] { accent-color: var(--accent); margin: 0; }

.audit-search {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit; font-size: 13px;
}
.audit-search:focus { outline: none; border-color: var(--accent); background: rgba(91,231,196,.05); }

.audit-stream-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    background: #0a0d12;
    border-color: #1a2028;
}
.audit-stream-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    border-bottom: 1px solid #1a2028;
    background: linear-gradient(180deg, #11151c, #0a0d12);
}
.audit-stream-title { display: flex; align-items: center; gap: 6px; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace; font-size: 12px; }
.audit-prompt { color: var(--accent); }
.audit-cmd { color: #cdd3da; }
.audit-stream-side { display: flex; align-items: center; gap: 10px; }
.audit-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}
.audit-pill-live { background: rgba(91,231,196,.14); color: var(--accent); }
.audit-pill-paused { background: rgba(214,166,87,.14); color: #d6a657; }

.audit-stream {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 0;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    color: #d3d8dd;
    background:
        repeating-linear-gradient(180deg, rgba(255,255,255,0) 0 22px, rgba(255,255,255,.015) 22px 23px),
        #0a0d12;
    max-height: 72vh;
    scrollbar-color: #2a3142 transparent;
}
.audit-empty { padding: 36px 18px; text-align: center; color: var(--text-dim); }
.audit-empty p + p { margin-top: 6px; }

.audit-row {
    display: grid;
    grid-template-columns: 160px 86px 14px minmax(0, 140px) minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding: 1px 14px;
    transition: background .12s;
    white-space: pre-wrap;
    word-break: break-word;
}
.audit-row:hover { background: rgba(255,255,255,.03); }
.audit-time { color: #6f7787; font-size: 11.5px; }
.audit-target { color: #a0a8b4; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audit-target:empty { color: transparent; }
.audit-msg { color: #d3d8dd; }
.audit-level-marker {
    width: 8px; height: 8px; border-radius: 2px;
    background: #4a5563;
    align-self: center;
    transform: translateY(-1px);
}
.audit-level-info .audit-level-marker  { background: #4a5563; }
.audit-level-warn .audit-level-marker  { background: #d6a657; box-shadow: 0 0 6px rgba(214,166,87,.4); }
.audit-level-error .audit-level-marker { background: #ef6f7e; box-shadow: 0 0 6px rgba(239,111,126,.45); }
.audit-level-debug .audit-level-marker { background: #6c7689; }
.audit-level-warn .audit-msg  { color: #f3c976; }
.audit-level-error .audit-msg { color: #ff8a98; }
.audit-level-error           { background: rgba(239,111,126,.05); }
.audit-level-error:hover     { background: rgba(239,111,126,.10); }

.audit-source-pill {
    font-size: 11px;
    text-align: center;
    padding: 1px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,.05);
    color: #c5cbd5;
    border: 1px solid rgba(255,255,255,.04);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.audit-source-tag-panel   { color: #74d0ff; border-color: rgba(116,208,255,.2); background: rgba(116,208,255,.07); }
.audit-source-tag-cli     { color: #b0a4ff; border-color: rgba(176,164,255,.2); background: rgba(176,164,255,.07); }
.audit-source-tag-backups { color: #5be7c4; border-color: rgba(91,231,196,.25); background: var(--accent-soft); }
.audit-source-tag-auth    { color: #ffa78d; border-color: rgba(255,167,141,.22); background: rgba(255,167,141,.07); }
.audit-source-tag-systemd { color: #c8c8c8; border-color: rgba(200,200,200,.18); background: rgba(200,200,200,.06); }
.audit-source-tag-nginx   { color: #8de8a4; border-color: rgba(141,232,164,.22); background: rgba(141,232,164,.07); }
.audit-source-tag-certbot { color: #f6d36a; border-color: rgba(246,211,106,.22); background: rgba(246,211,106,.07); }
.audit-source-tag-fpm     { color: #cf9bff; border-color: rgba(207,155,255,.22); background: rgba(207,155,255,.07); }
.audit-source-tag-mysql   { color: #ffd06a; border-color: rgba(255,208,106,.22); background: rgba(255,208,106,.07); }
.audit-source-tag-mail    { color: #94c8ff; border-color: rgba(148,200,255,.22); background: rgba(148,200,255,.07); }

.audit-stream-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px;
    border-top: 1px solid #1a2028;
    background: #0a0d12;
    color: var(--text-dim);
    font-size: 11px;
}

@media (max-width: 980px) {
    .audit-layout { grid-template-columns: 1fr; }
    .audit-side { position: static; }
    .audit-row { grid-template-columns: 110px 80px 12px 1fr; }
    .audit-row .audit-target { grid-column: 4; font-size: 11px; opacity: .8; }
    .audit-row .audit-msg    { grid-column: 1 / -1; padding-left: 0; }
}

/* ── Backups tab ────────────────────────────────────────────────────────── */
.bk-hero {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 22px;
    margin-bottom: 22px;
    background: linear-gradient(180deg, rgba(91,231,196,.04), rgba(91,231,196,.0));
}
.bk-hero-icon {
    flex: 0 0 auto;
    width: 56px; height: 56px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 12px;
    display: grid; place-items: center;
    border: 1px solid rgba(91,231,196,.18);
}
.bk-hero-icon svg { width: 34px; height: 34px; }
.bk-hero-text { flex: 1; min-width: 0; }
.bk-hero-text p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; }
.bk-hero-text p.muted { font-size: 12px; }
.bk-hero-text .pill { vertical-align: -1px; margin-right: 2px; }

.bk-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
    overflow-x: auto;
}
.bk-tab {
    position: relative;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition: color .15s, border-color .15s;
}
.bk-tab:hover { color: var(--text); }
.bk-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.bk-tab-count {
    background: rgba(255,255,255,.06);
    color: var(--text-dim);
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
}
.bk-tab.active .bk-tab-count { background: var(--accent-soft); color: var(--accent); }

.bk-section { margin-bottom: 22px; }
.bk-section-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
}

.bk-create-card { padding: 18px 20px; }
.bk-create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.bk-field { display: flex; flex-direction: column; gap: 6px; }
.bk-field-grow { min-width: 0; }
.bk-field-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.bk-field-hint { font-size: 12px; }
.bk-field input[type=text] {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    transition: border-color .15s, background .15s;
}
.bk-field input[type=text]:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(91,231,196,.04);
}
.bk-field input[type=text]:disabled { opacity: .55; cursor: not-allowed; }
.bk-slots { font-size: 22px; font-weight: 700; line-height: 1; }
.bk-slots strong { color: var(--accent); }
.bk-create-actions {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.bk-create-actions .btn[disabled] { opacity: .55; cursor: not-allowed; }

.bk-manage-card, .bk-history-card { padding: 0; }
/* Manage card uses visible overflow so kebab dropdowns can escape the card
 * (mirrors .tbl-wrap--menus). History cards stay clipped for clean corners. */
.bk-manage-card { overflow: visible; }
.bk-history-card { overflow: hidden; }
.bk-manage-card .bk-tbl, .bk-history-card .bk-tbl { table-layout: fixed; width: 100%; }
.bk-manage-card .bk-tbl tbody tr td { word-break: break-word; }
.bk-tbl-wrap { overflow-x: auto; overflow-y: visible; }
.bk-filters {
    display: flex;
    gap: 6px;
    padding: 14px 18px 0;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}
.bk-chip {
    appearance: none;
    background: transparent;
    color: var(--text-dim);
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 8px 14px 12px;
    font: inherit; font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0;
    transition: color .15s, border-color .15s;
}
.bk-chip:hover { color: var(--text); }
.bk-chip.active { color: var(--accent); border-bottom-color: var(--accent); }
.bk-chip-count { font-size: 11px; color: var(--text-dim); font-weight: 600; margin-left: 2px; }
.bk-chip.active .bk-chip-count { color: var(--accent); }
.bk-chip-count:empty { display: none; }

.bk-tbl { margin: 0; }
.bk-tbl th { padding-left: 20px; padding-right: 20px; }
.bk-tbl td { padding-left: 20px; padding-right: 20px; vertical-align: top; }
.bk-when-cell { width: 38%; }
.bk-when-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bk-when-row strong { font-weight: 600; }
.bk-row-label { font-size: 12px; margin-top: 4px; color: var(--text); font-weight: 500; }
.bk-row-sub { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; max-width: 100%; }
.bk-row-sub-id { font-size: 11px; opacity: .85; word-break: break-all; }
.bk-row-sub-meta { font-size: 11px; }
/* Actions column: explicit width so the kebab/Actions area is always reserved
 * and the column header is visible. `min-width` together with `width` keeps
 * `table-layout: fixed` honest about the reservation. */
.bk-action-col { width: 80px; min-width: 80px; text-align: right; white-space: nowrap; }
.bk-pill-secondary { margin-left: 4px; opacity: .8; }
.bk-empty { margin: 14px 20px 20px; border: 1px dashed var(--border-2); }

.bk-actions { position: relative; display: inline-block; }
.bk-kebab {
    appearance: none;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    color: var(--text);
    width: 30px; height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-grid; place-items: center;
    transition: background .15s, color .15s, border-color .15s;
}
.bk-kebab:hover, .bk-kebab[aria-expanded="true"] {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(91,231,196,.25);
}
.bk-kebab[disabled] { opacity: .4; cursor: not-allowed; }
.bk-actions-empty { color: var(--text-dim); font-size: 12px; }
.bk-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    min-width: 260px;
    background: #11151c;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0,0,0,.45);
    padding: 6px;
    display: flex; flex-direction: column;
}
.bk-row-form { margin: 0; }
.bk-menu-item {
    appearance: none;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: var(--text);
    padding: 9px 12px;
    border-radius: 6px;
    font: inherit; font-size: 13px;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    transition: background .12s, color .12s;
}
.bk-menu-item:hover { background: var(--accent-soft); color: var(--accent); }
.bk-menu-item-sub {
    padding-left: 26px;
    font-size: 12px;
    color: var(--text-dim);
}
.bk-menu-ico {
    flex: 0 0 18px;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
}
.bk-menu-item:hover .bk-menu-ico { color: var(--accent); }
.bk-menu-sep {
    height: 1px;
    background: var(--border);
    margin: 6px 4px;
}

@media (max-width: 720px) {
    .bk-create-grid { grid-template-columns: 1fr; }
    .bk-tbl th, .bk-tbl td { padding-left: 14px; padding-right: 14px; }
    .bk-action-col { white-space: normal; }
    .bk-menu { min-width: 220px; }
}

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; font-size: 13px; }
.alert-err { color: var(--danger); border-color: rgba(239,111,126,.3); background: rgba(239,111,126,.06); }
.alert-ok  { color: var(--ok); border-color: rgba(91,231,196,.3); background: rgba(91,231,196,.06); }
.alert-info { color: #b8c8ec; border-color: rgba(122,162,247,.3); background: rgba(122,162,247,.06); }
.alert-info .code-block { background: #0b0d12; border: 1px solid rgba(255,255,255,.06); border-radius: 6px; padding: 10px 12px; color: #cdd3da; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, monospace; white-space: pre-wrap; word-break: break-word; }
.alert-progress { color: #b8c0cc; border-color: rgba(184,192,204,.3); background: rgba(184,192,204,.06); }
.alert-progress .ssl-job-title { display: inline-block; margin-right: 6px; }
.alert-progress .ssl-job-detail { color: var(--text-dim); }
.alert-progress .ssl-job-log { margin-top: 10px; padding: 10px 12px; background: #0b0d12; border: 1px solid rgba(255,255,255,.05); border-radius: 6px; max-height: 220px; overflow: auto; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, monospace; color: #cdd3da; white-space: pre-wrap; word-break: break-word; }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(91,231,196,.06), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-brand .logo { width: 28px; height: 28px; border-radius: 8px; }
.auth-brand .name { font-weight: 700; }
.auth h1 { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.auth p.lead { color: var(--text-dim); margin: 0 0 20px; }
.auth .btn-primary { width: 100%; justify-content: center; padding: 11px; }
.auth-footer { margin-top: 16px; font-size: 12px; color: var(--text-dim); text-align: center; }

/* Misc */
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.spacer { flex: 1; }
.empty {
    display: grid; place-items: center; gap: 12px;
    padding: 60px 20px; color: var(--text-dim);
    border: 1px dashed var(--border-2); border-radius: 12px; text-align: center;
}
.empty h3 { color: var(--text); margin: 0; }

.ssl-empty .ssl-issue-form { margin-top: 18px; }
.ssl-empty-foot { margin-top: 16px; margin-bottom: 0; font-size: 12px; max-width: 52ch; }
.ssl-force-card .ssl-force-status { margin: 12px 0 0; font-size: 14px; }
.ssl-force-card .ssl-force-status-warn { margin: 12px 0 0; }
.ssl-force-card .small { font-size: 12px; margin: 6px 0 0; }
.ssl-force-form { margin-top: 14px; }
.ssl-force-options { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; margin-bottom: 14px; }
.ssl-force-options label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.ssl-force-save { margin-top: 4px; }
.code-block { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: 12.5px; }

/* Cron page */
.cron-intro { margin-bottom: 18px; }
.cron-tips {
    margin: 0;
    padding-left: 20px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.55;
}
.cron-tips li { margin-bottom: 10px; }
.cron-tips li:last-child { margin-bottom: 0; }
.cron-tips strong { color: var(--text); }

.cron-steps { display: flex; flex-direction: column; gap: 22px; margin-bottom: 20px; }
.cron-step {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 14px;
    align-items: start;
}
.cron-step-num {
    width: 32px; height: 32px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(91,231,196,.22);
}
.cron-step-body { min-width: 0; }

.cron-preview {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border-2);
}
.cron-preview-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    margin-bottom: 6px;
}
.cron-preview-main {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.45;
}
.cron-preview-tech {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.cron-quick-cmds {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.cron-job-table .cron-row-paused td { opacity: .72; }
.cron-when-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.4;
}
.cron-tech-details {
    font-size: 12px;
    color: var(--text-dim);
}
.cron-tech-details summary {
    cursor: pointer;
    user-select: none;
    color: var(--accent);
}
.cron-tech-details summary:hover { text-decoration: underline; }
.cron-tech-details code {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--muted);
}
.cron-cmd-cell {
    display: block;
    font-size: 12px;
    word-break: break-all;
    line-height: 1.45;
    padding: 4px 0;
}
.cron-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

/* Cron form grid */
.cron-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cron-fields .form-row { margin-bottom: 0; }
.cron-custom { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cron-form .form-row + .cron-fields { margin-bottom: 16px; }

@media (max-width: 720px) {
    .cron-fields, .cron-custom { grid-template-columns: 1fr 1fr; }
    .cron-custom { grid-template-columns: 1fr; }
    .cron-actions { align-items: stretch; }
    .cron-actions form { width: 100%; }
    .cron-actions .btn { width: 100%; justify-content: center; }
}

/* PHP manager */
.php-summary .php-kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
}
.php-kv-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.php-kv-val { min-width: 0; }
.php-two-col { align-items: start; }
@media (max-width: 900px) {
    .php-summary .php-kv-grid { grid-template-columns: 1fr; }
}
.php-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
}
@media (max-width: 720px) {
    .php-form-grid { grid-template-columns: 1fr; }
}
.tbl-compact td, .tbl-compact th { padding: 8px 12px; font-size: 12px; }
.php-ext-box {
    max-height: 220px;
    overflow-y: auto;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.php-ext-pill {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    color: var(--text-dim);
}

/* SSH Keys Manager (SiteGround-style layout) */
.ssh-manager { max-width: 920px; }
.ssh-manager-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.ssh-manager-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}
.ssh-manager-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -0.02em;
}
.ssh-manager-lead { margin: 0; max-width: 52ch; }
.ssh-manager-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.ssh-once-banner {
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    border: 1px solid var(--border-2);
}
.ssh-once-banner--key {
    background: rgba(245, 183, 107, .08);
    border-color: rgba(245, 183, 107, .35);
}
.ssh-once-banner--pw {
    background: rgba(91, 231, 196, .08);
    border-color: rgba(91, 231, 196, .28);
}
.ssh-once-banner__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}
.ssh-once-code { margin: 0 0 10px; font-size: 11px; }
.ssh-once-fp { margin: 0 0 10px; font-size: 12px; }
.ssh-once-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ssh-once-sub { margin: 0 0 6px; font-size: 12px; }

.ssh-edu-banner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
    padding: 20px 22px;
    margin-bottom: 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(91, 231, 196, .06), transparent 55%);
    box-shadow: var(--shadow);
}
.ssh-edu-banner__icon {
    color: var(--accent);
    opacity: .9;
    line-height: 0;
}
.ssh-edu-banner__heading {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.ssh-edu-banner__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-dim);
}
.ssh-edu-banner__text strong { color: var(--text); }

.ssh-setup-callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    margin-bottom: 18px;
    border-radius: 12px;
    border: 1px solid rgba(77, 192, 227, .35);
    background: rgba(77, 192, 227, .08);
}
.ssh-setup-callout__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-dim);
    max-width: 640px;
}
.ssh-setup-callout__text strong { color: var(--text); }
.ssh-setup-callout__form { margin: 0; }

.ssh-creds-card { margin-bottom: 18px; }
.ssh-creds-card__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}
.ssh-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 32px 0 16px;
    letter-spacing: -0.01em;
    color: var(--text);
}
.ssh-card-heading {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-dim);
}
.ssh-creds-card__hint { margin: 0; font-size: 12px; }
.ssh-env-hint { margin: 0 0 14px; font-size: 12px; }
.ssh-creds-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}
.ssh-cred-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 8px 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border-2);
}
.ssh-cred-item--wide { grid-column: 1 / -1; }
.ssh-cred-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
}
.ssh-cred-value { font-size: 13px; word-break: break-all; }
.ssh-cred-value--truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ssh-cred-copy { flex-shrink: 0; }
.ssh-quick-cmd { margin: 14px 0 0; font-size: 12px; }

.ssh-two-col {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
    align-items: start;
}
.ssh-add-card .ssh-card-heading { margin-bottom: 14px; }

.ssh-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}
.ssh-tab {
    background: none;
    border: 0;
    padding: 10px 18px 12px;
    margin-bottom: -1px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    transition: color .12s, border-color .12s;
}
.ssh-tab:hover { color: var(--text-dim); }
.ssh-tab--active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.ssh-tab-panel--hidden { display: none !important; }
.ssh-tab-help { margin: 0 0 16px; font-size: 13px; line-height: 1.5; }
.ssh-form .form-row:last-of-type { margin-bottom: 18px; }
.ssh-passphrase-note__text { margin: 0; font-size: 12px; line-height: 1.55; }
.ssh-create-btn { min-width: 120px; }

.ssh-advanced-card__text { margin: 0 0 14px; font-size: 13px; line-height: 1.55; }
.ssh-advanced-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.ssh-inline-form { margin: 0; display: inline; }

.ssh-keys-table-card { padding: 0; overflow: hidden; }
.ssh-keys-table-head { padding: 18px 22px 0; }
.ssh-keys-table-head .muted { margin: 8px 0 0; font-size: 13px; }
.ssh-keys-empty { padding: 36px 22px 42px; text-align: center; }
.tbl-wrap { overflow-x: auto; }
/* Dropdown menus in tables need visible overflow (otherwise panel is clipped). */
.tbl-wrap--menus { overflow: visible; }
.ssh-keys-tbl { margin: 0; }
.ssh-keys-actions-col { width: 56px; text-align: right; }
.ssh-keys-actions-cell { text-align: right; vertical-align: middle; }
.ssh-key-name { font-weight: 500; }
.ssh-type-cell { font-size: 12px; color: var(--text-dim); }

.ssh-menu { position: relative; display: inline-block; text-align: left; }
.ssh-menu-trigger {
    font-size: 18px;
    line-height: 1;
    letter-spacing: 2px;
    padding: 4px 10px;
    min-width: 40px;
}
.ssh-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 220px;
    padding: 6px;
    border-radius: 10px;
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    box-shadow: var(--shadow);
    z-index: 40;
}
.ssh-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}
.ssh-menu-item:hover { background: var(--panel); color: var(--accent); }
.ssh-menu-item--danger { color: var(--danger); }
.ssh-menu-item--danger:hover { background: rgba(239, 111, 126, .1); color: var(--danger); }
.ssh-menu-sep { height: 1px; margin: 6px 4px; background: var(--border); }
.ssh-menu-delete-form { margin: 0; }

.ssh-footnote { margin-top: 18px; font-size: 12px; text-align: center; }

.ssh-dialog {
    padding: 0;
    border: 1px solid var(--border-2);
    border-radius: 14px;
    background: var(--panel);
    color: var(--text);
    max-width: min(480px, calc(100vw - 32px));
    box-shadow: var(--shadow);
}
.ssh-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}
.ssh-dialog__inner { padding: 22px 22px 18px; position: relative; }
.ssh-dialog__title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 600;
}
.ssh-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}
.ssh-dialog-close:hover { color: var(--text); }
.ssh-dialog-dl { margin: 0 0 18px; display: grid; gap: 10px; }
.ssh-dialog-dl > div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    font-size: 13px;
}
.ssh-dialog-dl dt { margin: 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.ssh-dialog-dl dd { margin: 0; word-break: break-all; }
.ssh-dialog-pub {
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 11px;
}
.ssh-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

@media (max-width: 820px) {
    .ssh-two-col { grid-template-columns: 1fr; }
    .ssh-creds-grid { grid-template-columns: 1fr; }
    .ssh-dialog-dl > div { grid-template-columns: 1fr; }
}

/* Email manager */
.email-manager { max-width: 920px; }
.email-create-card { margin-bottom: 18px; }
.email-create-head { margin-bottom: 14px; }
.email-create-hint { margin: 6px 0 0; font-size: 13px; }
.email-create-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px 18px;
}
.email-quota-row { grid-column: 1 / -1; max-width: 360px; }
.email-quota-hint { margin: 6px 0 0; font-size: 12px; }
.email-input-suffix {
    display: flex;
    align-items: stretch;
    background: var(--bg);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    overflow: hidden;
}
.email-input-suffix .input {
    border: 0;
    border-radius: 0;
    background: transparent;
    flex: 1;
    min-width: 0;
}
.email-input-suffix .input:focus {
    box-shadow: none;
}
.email-input-suffix:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91, 231, 196, .15);
}
.email-input-suffix__suffix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: var(--panel-2);
    color: var(--text-dim);
    font-size: 13px;
    border-left: 1px solid var(--border-2);
    white-space: nowrap;
}
.email-password-wrap {
    display: flex;
    gap: 0;
    align-items: stretch;
    background: var(--bg);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    overflow: hidden;
}
.email-password-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91, 231, 196, .15);
}
.email-password-wrap .input { flex: 1; border: 0; background: transparent; border-radius: 0; box-shadow: none !important; }
.email-pw-toggle, .email-pw-generate { white-space: nowrap; margin: 4px; padding: 4px 10px; }
.email-create-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
}
.email-generate-check { font-size: 13px; color: var(--text-dim); }

.email-table-card { padding: 0; overflow: hidden; }
.email-table-head { padding: 18px 22px 0; }
.email-table-head .muted { margin: 8px 0 0; font-size: 13px; }
.email-tbl { margin: 0; }
.email-tbl tbody tr td { vertical-align: middle; }
.email-acct-name { font-weight: 500; }
.email-usage-col { width: 45%; }
.email-actions-col { width: 56px; text-align: right; }
.email-usage-cell { min-width: 200px; }
.email-usage-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--panel-2);
    overflow: hidden;
    margin-bottom: 6px;
}
.email-usage-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width .2s ease;
}
.email-usage-fill.is-ok { background: var(--accent); }
.email-usage-fill.is-warn { background: var(--warn); }
.email-usage-fill.is-bad { background: var(--danger); }
.email-usage-text {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.email-dialog-sub { margin: -6px 0 14px; font-size: 13px; }
.email-config-heading {
    margin: 18px 0 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-dim);
}
.email-config-hint { margin: 0 0 14px; font-size: 12px; }

@media (max-width: 720px) {
    .email-create-grid { grid-template-columns: 1fr; }
    .email-quota-row { max-width: none; }
    .email-create-actions { flex-direction: column; align-items: stretch; }
    .email-create-actions .btn { width: 100%; justify-content: center; }
    .email-password-wrap { flex-wrap: wrap; }
    .email-password-wrap .input { width: 100%; }
}

@media (max-width: 900px) {
    .sidebar { flex-direction: row; padding: 12px; align-items: flex-start; overflow-x: auto; flex-wrap: wrap; }
    .sidebar .brand { padding: 0 12px 0 4px; flex: 0 0 auto; }
    .nav { flex-direction: row; flex: 1 1 auto; gap: 4px; flex-wrap: wrap; min-width: 0; }
    .nav-stack { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; gap: 4px; }
    .site-manage-nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 auto; }
    .nav-site-label { flex: 1 1 100%; padding: 4px 8px 0; order: -1; }
    .sidebar nav:not(.nav-stack) .nav-item span { display: none; }
    .logout-form { padding: 0; border: 0; margin: 0 0 0 auto; }
    .logout-btn span:not(.logout-user) { display: none; }
    .main { padding: 24px 18px 40px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}

/* Unified tool pages (SSH + Email) */
.tool-page {
    width: 100%;
    max-width: 1040px;
}
.tool-hero {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 180px;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}
.tool-hero__icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--accent);
    background: radial-gradient(circle at 35% 20%, rgba(91, 231, 196, .22), rgba(91, 231, 196, .06));
    border: 1px solid rgba(91, 231, 196, .22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.tool-eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .11em;
    color: var(--muted);
    text-transform: uppercase;
}
.tool-hero h1 {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: -0.03em;
}
.tool-hero p {
    margin: 0;
    color: var(--text-dim);
    max-width: 68ch;
}
.tool-hero p strong { color: var(--text); }
.tool-status-card {
    justify-self: end;
    min-width: 160px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)), var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.tool-status-card strong {
    display: block;
    margin-top: 9px;
    font-size: 28px;
    line-height: 1;
}
.tool-status-card span:last-child {
    display: block;
    margin-top: 4px;
    color: var(--text-dim);
    font-size: 12px;
}
.tool-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
}
.tool-status.is-ok {
    color: var(--ok);
    background: rgba(91, 231, 196, .12);
}
.tool-status.is-warn {
    color: var(--warn);
    background: rgba(245, 183, 107, .12);
}
.tool-secret-card,
.tool-explain,
.tool-callout,
.tool-card {
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.006)), var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.tool-secret-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    margin-bottom: 18px;
    border-color: rgba(91, 231, 196, .26);
}
.tool-secret-card.is-warning { border-color: rgba(245, 183, 107, .32); }
.tool-secret-card h2,
.tool-explain h2,
.tool-callout h2,
.tool-card h2,
.tool-table-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.015em;
}
.tool-secret-code {
    margin: 0;
    max-height: 240px;
    white-space: pre-wrap;
    word-break: break-all;
}
.tool-small-label {
    margin: 0 0 -6px;
    font-size: 12px;
}
.tool-explain {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
    margin-bottom: 18px;
}
.tool-explain__media {
    width: 72px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(91, 231, 196, .18);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 800;
    letter-spacing: .06em;
}
.tool-explain p,
.tool-callout p,
.tool-card p {
    margin: 8px 0 0;
    color: var(--text-dim);
}
.tool-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 18px;
    border-color: rgba(77, 192, 227, .3);
    background: linear-gradient(135deg, rgba(77, 192, 227, .09), rgba(77, 192, 227, .02));
}
.tool-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}
.tool-grid--connection { grid-template-columns: minmax(0, 1.6fr) minmax(300px, .9fr); }
.tool-grid--ssh-add { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
.tool-grid--secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-card {
    padding: 22px;
}
.tool-card--primary { padding: 0; overflow: hidden; }
.tool-card--primary .tool-card__head { padding: 22px 22px 0; }
.tool-card__head { margin-bottom: 16px; }
.tool-section-kicker {
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.tool-tabs {
    display: flex;
    gap: 0;
    margin-top: 18px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.012);
}
.tool-tab {
    border: 0;
    border-right: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    padding: 13px 22px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tool-tab.is-active {
    color: var(--accent);
    background: rgba(91, 231, 196, .075);
    box-shadow: inset 0 -2px 0 var(--accent);
}
.tool-tab-panel { padding: 20px 22px 22px; }
.tool-form-grid {
    display: grid;
    gap: 16px;
}
.tool-form-grid--email {
    grid-template-columns: minmax(220px, 1.2fr) minmax(240px, 1fr) minmax(150px, .55fr);
    align-items: start;
}
.tool-field-help {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}
.tool-info-box {
    padding: 13px 14px;
    border-radius: 12px;
    background: rgba(91, 231, 196, .07);
    border: 1px solid rgba(91, 231, 196, .16);
}
.tool-info-box strong {
    display: block;
    margin-bottom: 4px;
}
.tool-info-box span {
    display: block;
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.5;
}
.tool-main-btn { margin-top: 4px; justify-content: center; }
.tool-input-suffix,
.tool-password-field {
    display: flex;
    min-height: 42px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    border-radius: 10px;
    overflow: hidden;
}
.tool-input-suffix:focus-within,
.tool-password-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91,231,196,.13);
}
.tool-input-suffix .input,
.tool-password-field .input {
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none !important;
}
.tool-input-suffix span {
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: var(--text-dim);
    background: var(--panel-2);
    border-left: 1px solid var(--border-2);
    white-space: nowrap;
}
.tool-input-suffix--compact { max-width: 180px; }
.tool-password-field button {
    border: 0;
    border-left: 1px solid var(--border-2);
    background: transparent;
    color: var(--accent);
    padding: 0 11px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}
.tool-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-dim);
    font-size: 12px;
}
.tool-kv-list {
    display: grid;
    gap: 10px;
    margin: 0;
}
.tool-kv-list > div {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border-2);
}
.tool-kv-list dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tool-kv-list dd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    min-width: 0;
}
.tool-kv-list code { word-break: break-all; }
.tool-kv-list button {
    border: 0;
    border-radius: 7px;
    background: var(--panel-2);
    color: var(--text-dim);
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
}
.tool-kv-list button:hover { color: var(--accent); }
.tool-kv-list--dialog { margin: 14px 0; }
.tool-command {
    margin-top: 14px;
    padding: 13px;
    border-radius: 12px;
    background: rgba(255,255,255,.025);
    border: 1px dashed var(--border-2);
}
.tool-command span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}
.tool-command code { word-break: break-all; }
.tool-inline-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    margin-bottom: 14px;
}
.tool-inline-status span { color: var(--muted); }
.tool-action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.tool-action-row form { margin: 0; }
.tool-checklist {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--text-dim);
}
.tool-checklist li {
    position: relative;
    padding-left: 22px;
}
.tool-checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(91,231,196,.12);
}
.tool-table-card { padding: 0; overflow: visible; }
.tool-table-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 14px;
}
.tool-count {
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--text-dim);
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    font-size: 12px;
}
.tool-table th,
.tool-table td {
    padding: 13px 16px !important;
    vertical-align: middle;
}
.tool-table td strong { font-weight: 600; }
.tool-fp {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}
.tool-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--text-dim);
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    font-size: 11px;
}
.tool-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.tool-row-actions form { margin: 0; }
.tool-kebab-th {
    width: 48px;
}
.tool-kebab-cell {
    position: relative;
    text-align: right;
    vertical-align: middle;
}
.tool-kebab-hidden-form {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}
.tool-kebab {
    position: relative;
    z-index: 2;
    display: inline-flex;
    justify-content: flex-end;
}
.tool-kebab-btn {
    width: 36px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--border-2);
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    letter-spacing: -2px;
}
.tool-kebab-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.tool-kebab-panel {
    /* position top/left set in JS (fixed) so menu stays beside the ⋮ in table layouts */
    min-width: 212px;
    z-index: 400;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-2);
    background: var(--panel);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.38);
}
.tool-kebab-panel[hidden] {
    display: none !important;
}
.tool-kebab-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    margin: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
}
.tool-kebab-item:hover {
    background: var(--panel-2);
}
.tool-kebab-danger {
    color: #f87171 !important;
}
.tool-empty {
    margin: 0 22px 22px;
    padding: 38px 20px;
    border-radius: 14px;
    border: 1px dashed var(--border-2);
    display: grid;
    place-items: center;
    gap: 6px;
    color: var(--text-dim);
}
.tool-empty strong { color: var(--text); }
.tool-meter {
    width: min(320px, 100%);
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--panel-2);
    margin-bottom: 6px;
}
.tool-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #4dc0e3);
}

/* File manager */
.fm-page { max-width: 1180px; }
.fm-console {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.fm-console__tabs {
    display: inline-flex;
    margin: 16px 0 0 16px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    border: 1px solid var(--border);
}
.fm-tab {
    border: 0;
    border-radius: 999px;
    padding: 8px 18px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.fm-tab.is-active {
    background: linear-gradient(135deg, #6657ff, #7557d8);
    color: #fff;
    box-shadow: 0 8px 20px rgba(102, 87, 255, .22);
}
.fm-console__toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 18px 14px;
    border-bottom: 1px solid var(--border);
}
.fm-toolgroup {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-right: 12px;
    border-right: 1px solid var(--border);
}
.fm-toolgroup:last-of-type { border-right: 0; }
.fm-toolbar-spacer { flex: 1; }
.fm-toolbtn {
    min-width: 44px;
    min-height: 38px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    padding: 5px 8px;
}
.fm-toolbtn span {
    color: #8a7cff;
    font-size: 18px;
    line-height: 1;
}
.fm-toolbtn small {
    font-size: 10px;
    line-height: 1.1;
}
.fm-toolbtn:hover {
    background: rgba(255,255,255,.045);
    color: var(--text);
}
.fm-upload-label { margin: 0; }
.fm-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 220px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    color: var(--muted);
}
.fm-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 13px;
}
.fm-pathbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.015);
}
.fm-pathbar__root {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}
.fm-breadcrumb {
    min-width: 0;
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.fm-crumb,
.fm-crumb--root {
    background: transparent;
    border: none;
    padding: 2px 4px;
    margin: 0;
    cursor: pointer;
    color: var(--accent);
    font: inherit;
    font-family: inherit;
}
.fm-crumb--root {
    font-weight: 600;
}
.fm-crumb:hover,
.fm-crumb--root:hover {
    text-decoration: underline;
}
.fm-crumb-sep {
    color: var(--muted);
    pointer-events: none;
}
.fm-workspace {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 470px;
}
.fm-tree-pane {
    border-right: 1px solid var(--border);
    background: rgba(255,255,255,.012);
    padding: 14px 10px;
    min-width: 0;
}
.fm-pane-title {
    padding: 0 10px 10px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.fm-tree-root,
.fm-tree-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    padding: 8px 10px;
    text-align: left;
}
.fm-tree-root.is-active,
.fm-tree-root:hover,
.fm-tree-item:hover {
    background: rgba(91,231,196,.08);
    color: var(--text);
}
.fm-tree-list {
    display: grid;
    gap: 2px;
    padding: 4px 0 0 20px;
}
.fm-tree-muted {
    color: var(--muted);
    font-size: 12px;
    padding: 8px 10px;
}
.fm-table-pane {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.fm-table-scroll {
    overflow: auto;
    flex: 1;
}
.fm-table {
    min-width: 780px;
}
.fm-table th {
    background: var(--panel);
    position: sticky;
    top: 0;
    z-index: 1;
}
.fm-table tbody td {
    height: 48px;
}
.fm-table tr:hover td {
    background: rgba(91,231,196,.035);
}
.fm-sort {
    color: #8a7cff;
    margin-left: 4px;
    font-size: 12px;
}
.fm-table .fm-col-size {
    width: 110px;
    text-align: right;
}
.fm-table .fm-col-time {
    width: 170px;
    white-space: nowrap;
}
.fm-table .fm-col-perms,
.fm-table .fm-col-inode {
    width: 110px;
    text-align: center;
}
.fm-table .fm-col-actions {
    width: 220px;
    text-align: right;
    vertical-align: middle;
}
.fm-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.fm-file-icon {
    width: 22px;
    height: 17px;
    display: inline-block;
    flex: 0 0 auto;
    border-radius: 3px;
    background: #8f98a8;
    position: relative;
    opacity: .95;
}
.fm-file-icon--dir::before {
    content: "";
    position: absolute;
    left: 2px;
    top: -4px;
    width: 10px;
    height: 5px;
    border-radius: 3px 3px 0 0;
    background: #8f98a8;
}
.fm-file-icon--file {
    width: 17px;
    height: 21px;
    border-radius: 3px;
    background: linear-gradient(135deg, #8f98a8 0 78%, #687284 79%);
}
.fm-link {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text);
    font: inherit;
    font-weight: 600;
}
.fm-file-link {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text);
    font: inherit;
}
.fm-link:hover,
.fm-file-link:hover {
    color: var(--accent);
}
.fm-empty-cell {
    color: var(--text-dim);
    text-align: center;
    padding: 46px 12px !important;
}
.fm-statusbar {
    min-height: 36px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 8px 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fm-edit-textarea {
    width: 100%;
    min-height: 320px;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.45;
}
.fm-dialog {
    padding: 0;
    border: 1px solid var(--border-2);
    border-radius: 14px;
    background: var(--panel);
    color: var(--text);
    box-shadow: var(--shadow);
    max-width: min(960px, 96vw);
}
.fm-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}
.fm-dialog__inner {
    padding: 20px;
    border: none;
    margin: 0;
}
.fm-dialog__inner h2 {
    margin: 0 0 8px;
    font-size: 18px;
}
.fm-dialog__btns {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}
.fm-hint {
    margin: -8px 0 0;
    font-size: 12px;
}

/* Email tool — dedicated layout */
.mail-shell {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.mail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 24px;
    align-items: stretch;
    padding: 26px 28px;
    border-radius: 20px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(99, 102, 241, 0.18), transparent 52%),
        radial-gradient(80% 100% at 0% 100%, rgba(52, 211, 153, 0.12), transparent 50%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
        var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.mail-hero__brand {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.mail-hero__icon {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #a5b4fc;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.06));
    border: 1px solid rgba(129, 140, 248, 0.35);
}
.mail-hero__titles h1 {
    margin: 4px 0 10px;
    font-size: clamp(26px, 3.2vw, 34px);
    letter-spacing: -0.035em;
    line-height: 1.08;
}
.mail-hero__eyebrow {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.mail-hero__lede {
    margin: 0;
    color: var(--text-dim);
    max-width: 62ch;
    line-height: 1.55;
    font-size: 15px;
}
.mail-hero__lede strong { color: var(--text); }

.mail-hero__stats {
    display: grid;
    gap: 12px;
}
.mail-stat {
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mail-stat--ok { border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.06); }
.mail-stat--pending { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.07); }
.mail-stat--muted { opacity: 0.95; }
.mail-stat__label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}
.mail-stat__state { font-size: 14px; font-weight: 600; color: var(--text); }
.mail-stat__value { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--text); }

.mail-alert { margin: 0; }

.mail-once-banner {
    display: grid;
    gap: 14px;
    padding: 22px 24px;
    border-radius: 18px;
    border: 1px solid rgba(52, 211, 153, 0.35);
    background: linear-gradient(180deg, rgba(52, 211, 153, 0.1), rgba(52, 211, 153, 0.02));
}
.mail-once-banner h2 { margin: 0 0 6px; font-size: 18px; }
.mail-once-banner__secret {
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    font-size: 14px;
    word-break: break-all;
    max-height: 200px;
    overflow: auto;
}

.mail-banner {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 18px;
    padding: 22px 24px;
    border-radius: 18px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: linear-gradient(125deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.02));
}
.mail-banner--warn .mail-banner__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.mail-banner__body h2 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.02em; }
.mail-banner__body p { margin: 0 0 14px; color: var(--text-dim); line-height: 1.55; max-width: 85ch; }
.mail-banner__dots {
    margin: 14px 0 0;
    padding-left: 1.2rem;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.55;
}
.mail-banner__dots li { margin-bottom: 6px; }
.mail-cmd-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}
.mail-cmd {
    flex: 1 1 280px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    font-size: 12px;
    line-height: 1.45;
    overflow-x: auto;
}

.mail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
    gap: 20px;
    align-items: start;
}
.mail-panel {
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 22px 24px 24px;
}
.mail-panel__head { margin-bottom: 18px; }
.mail-panel__head h2 {
    margin: 6px 0 8px;
    font-size: 20px;
    letter-spacing: -0.02em;
}
.mail-panel__head p {
    margin: 0;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.5;
    max-width: 58ch;
}
.mail-step {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #818cf8;
}
.mail-form__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}
.mail-checkbox-full { display: flex; width: 100%; }
.mail-submit { width: 100%; margin-top: 4px; padding: 12px 18px; font-weight: 700; }

.mail-chip {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    color: var(--text-dim);
}
.mail-chip--info {
    background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.25);
}

.mail-endpoints { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.mail-endpoint {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--border-2);
}
.mail-endpoint dt {
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}
.mail-endpoint dd {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.mail-endpoint__val { font-size: 14px; color: var(--accent); }
.mail-endpoint__hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}
.mail-endpoint--plain dd { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.mail-copy-mini { flex-shrink: 0; }
.mail-webmail-btn { width: 100%; margin-top: 8px; justify-content: center; }

.btn-secondary-soft {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-2);
    color: var(--text-dim);
}
.btn-secondary-soft:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.mail-dns {
    padding: 24px 26px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
}
.mail-dns__head h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.02em; }
.mail-dns__head p { margin: 0; color: var(--text-dim); font-size: 14px; max-width: 72ch; line-height: 1.5; }
.mail-dns__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}
.mail-dns-card {
    padding: 16px 16px 18px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    min-height: 100%;
}
.mail-dns-card h3 { margin: 8px 0 8px; font-size: 15px; }
.mail-dns-card p { margin: 0 0 10px; font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.mail-dns-card__tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #a5b4fc;
    text-transform: uppercase;
}
.mail-dns-snippet {
    display: block;
    margin: 0;
    padding: 10px 11px;
    border-radius: 10px;
    background: var(--panel);
    border: 1px solid var(--border-2);
    font-size: 11px;
    line-height: 1.45;
    word-break: break-word;
}

.mail-security-note {
    padding: 18px 22px;
    border-radius: 16px;
    border: 1px dashed var(--border-2);
    background: rgba(255, 255, 255, 0.02);
}
.mail-security-note h2 { margin: 0 0 8px; font-size: 16px; }
.mail-security-note p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.55; max-width: 85ch; }

.mail-accounts {
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.mail-accounts__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}
.mail-accounts__head h2 { margin: 6px 0 0; font-size: 19px; }
.mail-accounts__count {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}
.mail-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-dim);
}
.mail-empty strong { display: block; margin-bottom: 8px; color: var(--text); font-size: 16px; }
.mail-tbl-wrap { padding: 0 0 8px; }
.mail-tbl th { white-space: nowrap; }
.mail-tbl__actions { width: 38%; min-width: 240px; }
.mail-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}
.mail-inline-form { display: inline; margin: 0; }
.mail-meter { margin-bottom: 4px; }

@media (max-width: 1080px) {
    .mail-form__grid { grid-template-columns: 1fr; }
    .mail-dns__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .mail-hero { grid-template-columns: 1fr; }
    .mail-layout { grid-template-columns: 1fr; }
    .mail-dns__grid { grid-template-columns: 1fr; }
    .mail-row-actions { justify-content: flex-start; }
    .mail-tbl__actions { width: auto; }
}

/* SiteGround-style file manager skin */
.fm-page {
    max-width: none;
    min-height: calc(100vh - 96px);
    margin: -18px -24px -36px;
    padding: 18px 20px 26px;
    border-radius: 18px;
    background: #f7f7f8;
    color: #34343a;
}
.fm-titlebar h1 {
    margin: 0 0 16px;
    color: #2f2f33;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.fm-page .alert {
    color: #b42318;
    background: #fff1f0;
    border-color: #ffccc7;
}
.fm-console {
    height: min(640px, calc(100vh - 165px));
    min-height: 530px;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #4a4a50;
    border: 1px solid #e2e2e8;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.fm-console__tabs {
    position: absolute;
    z-index: 3;
    margin: 12px 0 0 12px;
    background: #f0edff;
    border: 0;
    padding: 0;
    box-shadow: none;
}
.fm-tab {
    min-width: 70px;
    padding: 9px 13px;
    color: #5143b8;
    font-size: 11px;
    font-weight: 800;
}
.fm-tab.is-active {
    background: #4b39e6;
    color: #fff;
    box-shadow: 0 5px 12px rgba(75, 57, 230, .22);
}
.fm-console__toolbar {
    min-height: 52px;
    padding: 8px 12px 8px 164px;
    gap: 0;
    border-bottom: 1px solid #dfe1e7;
    background: #fff;
}
.fm-toolgroup {
    gap: 8px;
    padding: 0 14px;
    border-right: 1px solid #e0e1e8;
}
.fm-toolgroup:first-child { padding-left: 0; }
.fm-toolbtn {
    min-width: 28px;
    min-height: 34px;
    padding: 5px 6px;
    border-radius: 7px;
    color: #8f929a;
}
.fm-toolbtn span {
    color: #5748c9;
    font-size: 20px;
}
.fm-toolbtn small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.fm-toolbtn:hover { background: #f4f3ff; color: #5748c9; }
.fm-search {
    min-width: 38px;
    width: 38px;
    height: 34px;
    padding: 0;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #5748c9;
}
.fm-search input {
    position: absolute;
    right: 12px;
    top: 57px;
    width: min(260px, calc(100% - 24px));
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #dedee6;
    background: #fff;
    color: #33343a;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}
.fm-search:focus-within input,
.fm-search:hover input {
    opacity: 1;
    pointer-events: auto;
}
.fm-pathbar {
    min-height: 36px;
    padding: 0 18px;
    gap: 6px;
    background: #fff;
    border-bottom: 1px solid #ececf1;
}
.fm-pathbar__root {
    color: #a0a3ac;
    font-size: 12px;
}
.fm-breadcrumb,
.fm-crumb,
.fm-crumb--root {
    color: #9ca0aa;
    font-size: 12px;
}
.fm-crumb,
.fm-crumb--root {
    padding: 0 3px;
    text-decoration: none;
}
.fm-crumb:hover,
.fm-crumb--root:hover { color: #5748c9; text-decoration: none; }
.fm-workspace {
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 0;
    flex: 1;
}
.fm-tree-pane {
    padding: 12px 8px;
    background: #fff;
    border-right: 1px solid #e3e4ea;
    overflow: auto;
}
.fm-pane-title {
    color: #c0c2ca;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.fm-tree-root,
.fm-tree-item {
    color: #4a4b52;
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 13px;
}
.fm-tree-root strong { font-weight: 600; }
.fm-tree-root.is-active,
.fm-tree-root.is-current,
.fm-tree-root:hover,
.fm-tree-item:hover,
.fm-tree-item.is-current {
    background: #f1f3f8;
    color: #292a2f;
}
.fm-tree-caret {
    width: 14px;
    color: #8f92a0;
    flex: 0 0 14px;
}
.fm-tree-list {
    gap: 0;
    padding-left: 20px;
}
.fm-table-pane,
.fm-editor-pane {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}
.fm-table-pane[hidden],
.fm-editor-pane[hidden] { display: none !important; }
.fm-table-scroll {
    flex: 1;
    overflow: auto;
}
.fm-table {
    min-width: 860px;
    color: #5d6068;
    table-layout: fixed;
}
.fm-table th,
.fm-table td {
    padding: 8px 16px !important;
    border-bottom: 1px solid #e4e5eb !important;
}
.fm-table th {
    height: 45px;
    background: #fff;
    color: #3f4046 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
.fm-table tbody td {
    height: 40px;
    color: #a0a2aa;
}
.fm-table tr:hover td { background: #f7f8fb; }
.fm-table tr.is-selected td { background: #e8eefb; }
.fm-sort {
    color: #5948d6;
    font-size: 14px;
}
.fm-name-wrap { gap: 9px; }
.fm-file-icon,
.fm-file-icon--dir::before {
    background: #9ea1a8;
}
.fm-file-icon--file {
    background: linear-gradient(135deg, #4c5ee8 0 20%, #8465d8 21% 100%);
}
.fm-link,
.fm-file-link {
    color: #4b4c52;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}
.fm-link:hover,
.fm-file-link:hover { color: #4b39e6; }
.fm-table .fm-col-time { width: 180px; }
.fm-table .fm-col-perms { width: 130px; }
.fm-table .fm-col-inode { width: 110px; }
.fm-table .fm-col-size { width: 110px; }
.fm-table .fm-col-actions { width: 180px; }
.fm-page .btn {
    background: #fff;
    border-color: #dadce5;
    color: #5d6068;
}
.fm-page .btn:hover {
    background: #f6f6fb;
    border-color: #cfd1dc;
    color: #4b39e6;
}
.fm-page .btn-primary {
    background: #4b39e6;
    border-color: #4b39e6;
    color: #fff;
}
.fm-page .btn-danger {
    color: #c13645;
    border-color: #f0c9cf;
}
.fm-statusbar {
    min-height: 34px;
    padding: 8px 20px;
    background: #fff;
    border-top: 1px solid #e4e5eb;
    color: #b5b7bf;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
}
.fm-statusbar span:first-child { color: #7c7f89; }
.fm-editor-tabs {
    height: 45px;
    display: flex;
    align-items: end;
    padding-left: 10px;
    background: #f0f0f2;
    border-bottom: 1px solid #dfe0e6;
}
.fm-editor-tab {
    height: 36px;
    min-width: 120px;
    padding: 0 14px;
    border: 0;
    border-bottom: 2px solid #4b39e6;
    background: #fff;
    color: #4b4c52;
    font-size: 13px;
    text-align: left;
}
.fm-editor-shell {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 118px;
    overflow: hidden;
    background: #fff;
}
.fm-editor-gutter,
.fm-editor-minimap {
    margin: 0;
    padding: 10px 8px;
    overflow: hidden;
    color: #8790a0;
    background: #fbfbfc;
    border-right: 1px solid #ececf1;
    font-size: 13px;
    line-height: 22px;
    text-align: right;
    user-select: none;
}
.fm-editor-minimap {
    border-right: 0;
    border-left: 1px solid #ececf1;
    color: transparent;
    text-shadow: 0 0 1px rgba(70, 75, 90, .45);
    font-size: 4px;
    line-height: 5px;
    white-space: pre-wrap;
}
.fm-editor-textarea {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 10px 14px;
    border: 0;
    resize: none;
    outline: 0;
    background: #fff;
    color: #2f3340;
    font-size: 13px;
    line-height: 22px;
    tab-size: 4;
}
.fm-editor-actions {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-top: 1px solid #e4e5eb;
    background: #fff;
}
.fm-editor-actions span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: #989ba5;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fm-dialog {
    background: #fff;
    color: #33343a;
    border-color: #dedee6;
}
.fm-dialog__inner .input {
    background: #fff;
    color: #33343a;
    border-color: #dedee6;
}
.fm-hint {
    margin: 10px 0 0;
    color: #7b7f89;
}

.fm-row { cursor: default; outline: none; }
.fm-row:focus-visible { box-shadow: inset 0 0 0 2px rgba(75, 57, 230, 0.35); }
.fm-name-cell {
    user-select: none;
    -webkit-user-select: none;
}
.fm-entry-name {
    font-size: 13px;
    font-weight: 500;
    color: #4b4c52;
    cursor: default;
}
.fm-entry-name--dir { color: #37383e; cursor: pointer; }

.fm-tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
}
.fm-tree-caret-btn {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #8f92a0;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}
.fm-tree-caret-btn:hover {
    background: #e8eaf0;
    color: #5748c9;
}
.fm-tree-label { flex: 1; min-width: 0; }

.fm-context {
    position: fixed;
    z-index: 10050;
    min-width: 188px;
    padding: 6px;
    margin: 0;
    background: #fff;
    border: 1px solid #e4e5eb;
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16);
}
.fm-context__item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 9px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #3a3b42;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.fm-context__item:hover,
.fm-context__item:focus-visible {
    background: #f1f3f8;
    color: #4b39e6;
}

.fm-editor-mid {
    min-width: 0;
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #2d2d2d;
}
.fm-editor-sync {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
.fm-editor-inner {
    position: relative;
    min-height: 200px;
}
.fm-editor-highlight-wrap {
    margin: 0;
    padding: 10px 14px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 13px;
    line-height: 22px;
    background: transparent;
}
.fm-editor-highlight-wrap code[class*="language-"],
.fm-editor-highlight-wrap code {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.fm-editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    resize: none;
    overflow: hidden;
    z-index: 2;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 13px;
    line-height: 22px;
    tab-size: 4;
    color: transparent !important;
    caret-color: #e0e6f0;
    background: transparent;
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
    outline: none;
}

.fm-console--editor .fm-editor-gutter,
.fm-console--editor .fm-editor-minimap {
    background: #24242b;
    color: #7d8290;
    border-color: #353540;
}
.fm-console--editor .fm-editor-tabs {
    background: #2a2a31;
    border-color: #3a3a44;
}
.fm-console--editor .fm-editor-tab {
    background: #2d2d2d;
    color: #d2d4dc;
    border-bottom-color: #6b5cff;
}
.fm-console--editor .fm-editor-actions {
    background: #2d2d2d;
    border-color: #3a3a44;
}
.fm-console--editor .fm-editor-actions span {
    color: #9a9dad;
}

@media (max-width: 980px) {
    .tool-hero { grid-template-columns: 56px minmax(0, 1fr); }
    .tool-status-card { grid-column: 1 / -1; justify-self: stretch; }
    .tool-grid--connection,
    .tool-grid--ssh-add,
    .tool-grid--secondary,
    .tool-form-grid--email { grid-template-columns: 1fr; }
    .fm-workspace { grid-template-columns: 1fr; }
    .fm-tree-pane {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .fm-tree-list {
        display: flex;
        flex-wrap: wrap;
        padding-left: 0;
    }
    .fm-tree-item { width: auto; }
}
@media (max-width: 640px) {
    .tool-hero { grid-template-columns: 1fr; }
    .tool-hero__icon { width: 56px; height: 56px; }
    .tool-explain { grid-template-columns: 1fr; }
    .tool-callout { align-items: stretch; flex-direction: column; }
    .tool-callout .btn { width: 100%; justify-content: center; }
    .tool-row-actions { justify-content: flex-start; }
    .tool-row-actions .btn,
    .tool-row-actions form,
    .tool-row-actions button { width: 100%; justify-content: center; }
    .tool-tab { flex: 1; padding-inline: 10px; }
    .fm-console__toolbar,
    .fm-pathbar,
    .fm-statusbar {
        align-items: stretch;
        flex-direction: column;
    }
    .fm-toolgroup {
        border-right: 0;
        padding-right: 0;
        width: 100%;
        justify-content: space-between;
    }
    .fm-toolbtn { flex: 1; }
    .fm-search { min-width: 0; width: 100%; }
}

/* ─────────────────────────────────────────────────────────────────────
 * Server Migration page (/migration)
 * ───────────────────────────────────────────────────────────────────── */
.mig-overview .stats { margin-bottom: 16px; }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .stats-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .stats-4 { grid-template-columns: 1fr; } }

.mig-hardening {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}

.mig-form { max-width: 720px; }
.mig-form .form-row-checks {
    display: flex; flex-wrap: wrap; gap: 14px 24px; margin-bottom: 16px;
}
.mig-form .check {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text);
    cursor: pointer;
}
.mig-form .form-row-warn {
    padding: 10px 14px; border: 1px solid rgba(245,183,107,.3);
    border-radius: 8px; background: rgba(245,183,107,.06);
    color: var(--warn); font-size: 13px;
}
.mig-form input[type="password"], .mig-form input[type="text"] {
    background: var(--panel-2); border: 1px solid var(--border);
    border-radius: 8px; padding: 9px 11px; color: var(--text);
    font: inherit; width: 100%;
}
.mig-form input[type="password"]:focus, .mig-form input[type="text"]:focus {
    outline: 2px solid rgba(91,231,196,.45); outline-offset: -1px;
}

.mig-job-card { border-color: rgba(91,231,196,.25); }
.mig-progress {
    margin: 8px 0 14px;
    display: grid; gap: 6px;
}
.mig-progress-bar {
    height: 10px; border-radius: 999px;
    background: var(--panel-2); overflow: hidden;
}
.mig-progress-bar span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--accent), #75ecd0);
    transition: width .4s ease;
}
.mig-progress-meta {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-dim);
}
.mig-log {
    background: #0a0e17; color: #d7dbe6;
    padding: 12px; border-radius: 8px;
    border: 1px solid var(--border);
    max-height: 320px; overflow: auto;
    white-space: pre-wrap;
    font-size: 11.5px; line-height: 1.45;
}

.mig-bundles td { vertical-align: middle; }
.mig-bundles .mig-row-actions {
    display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
.inline-form { margin: 0; display: inline-flex; }

.mig-steps { padding-left: 22px; }
.mig-steps li { margin-bottom: 10px; line-height: 1.55; }
.mig-steps pre {
    background: #0a0e17; color: #d7dbe6;
    padding: 10px 12px; border-radius: 8px;
    border: 1px solid var(--border);
    margin: 6px 0 0; overflow-x: auto;
    font-size: 12px;
}

@media (max-width: 760px) {
    .mig-bundles .mig-row-actions { justify-content: flex-start; }
}
