:root {
    --primary: #3767f6;
    --primary-dark: #2451d2;
    --navy: #101a35;
    --ink: #1d2942;
    --muted: #75809a;
    --canvas: #f4f6fb;
    --line: #e7eaf1;
    --sidebar-width: 264px;
}

* { box-sizing: border-box; }

body {
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

.btn {
    border-radius: 10px;
    font-weight: 650;
    padding: .68rem 1rem;
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    box-shadow: 0 7px 18px rgba(55, 103, 246, .18);
}

.btn-light { --bs-btn-bg: #f2f4f8; --bs-btn-border-color: #f2f4f8; }

.btn-soft {
    color: var(--primary);
    border: 1px solid #dbe4ff;
    background: #edf2ff;
}

.form-control, .form-select {
    border: 1px solid #dfe3eb;
    border-radius: 10px;
    min-height: 44px;
    color: var(--ink);
}

.form-control:focus, .form-select:focus {
    border-color: #9bb3ff;
    box-shadow: 0 0 0 .22rem rgba(55, 103, 246, .11);
}

.form-label { font-size: .86rem; font-weight: 650; color: #46516a; }

.brand-mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    color: white;
    background: linear-gradient(145deg, #4778ff, #2854dd);
    font-size: .92rem;
    font-weight: 850;
    letter-spacing: .06em;
    box-shadow: 0 8px 22px rgba(55, 103, 246, .3);
}

.auth-page { min-height: 100vh; background: #fff; }

.auth-shell { display: grid; min-height: 100vh; grid-template-columns: 1.08fr .92fr; }

.auth-visual {
    position: relative;
    overflow: hidden;
    align-items: flex-end;
    padding: clamp(3rem, 7vw, 7rem);
    color: #fff;
    background:
        radial-gradient(circle at 72% 18%, rgba(93, 127, 255, .7), transparent 28%),
        radial-gradient(circle at 18% 65%, rgba(24, 205, 178, .22), transparent 26%),
        linear-gradient(145deg, #111b36 10%, #182a5a 55%, #2348a1);
}

.auth-visual::before, .auth-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}
.auth-visual::before { width: 520px; height: 520px; top: -130px; right: -180px; }
.auth-visual::after { width: 280px; height: 280px; top: -10px; right: -60px; }

.auth-visual > div { position: relative; z-index: 1; max-width: 650px; }
.auth-visual h1 { font-size: clamp(2.8rem, 4.5vw, 5.2rem); font-weight: 750; line-height: 1.02; letter-spacing: -.045em; margin: 1.1rem 0 1.5rem; }
.auth-visual p { max-width: 520px; color: #c8d5fa; font-size: 1.15rem; }

.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.auth-visual .eyebrow { color: #8faaff; }
.auth-form-panel { display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(430px, 100%); }
.brand strong, .sidebar-brand strong { display: block; line-height: 1.1; }
.brand small, .sidebar-brand small { display: block; margin-top: .2rem; color: var(--muted); font-size: .74rem; }
.login-card h2 { font-size: 2rem; font-weight: 760; letter-spacing: -.035em; }
.login-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin: 1.15rem 0 0;
    color: #8a94a8;
    font-size: .73rem;
    text-align: center;
}
.login-security-note i { color: #6f7c95; font-size: .68rem; }

.input-icon { position: relative; }
.input-icon i { position: absolute; z-index: 2; left: 1rem; top: 50%; transform: translateY(-50%); color: #8d97ab; }
.input-icon .form-control { padding-left: 2.8rem; }

.install-card { max-width: 760px; border-radius: 22px; }

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    z-index: 1040;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    color: #fff;
    background: var(--navy);
}

.sidebar-brand { display: flex; align-items: center; gap: .8rem; padding: 1.65rem 1.4rem 1.4rem; }
.sidebar-brand small { color: #7f8ba7; }
.sidebar-close { margin-left: auto; border: 0; color: #b5bed2; background: transparent; font-size: 1.1rem; }

.sidebar-nav {
    display: grid;
    gap: .35rem;
    overflow-y: auto;
    padding: 1.1rem .85rem;
    scrollbar-gutter: stable;
}
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: 100%;
    padding: .84rem 1rem;
    border: 0;
    border-radius: 10px;
    color: #929db5;
    background: transparent;
    font-size: .9rem;
    font-weight: 630;
    text-align: left;
    transition: .16s ease;
}
.sidebar-nav .nav-link i { width: 20px; font-size: 1.05rem; text-align: center; }
.sidebar-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,.045); }
.sidebar-nav .nav-link.active { color: #fff; background: rgba(67, 111, 255, .18); box-shadow: inset 3px 0 #5b80ff; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: auto;
    padding: 1.1rem 1.2rem;
    border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user .avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; background: #2d3d66; font-weight: 750; }
.sidebar-user strong { display: block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.sidebar-user small { display: block; color: #78849e; font-size: .68rem; }
.logout-link { margin-left: auto; padding: .4rem; color: #8390aa; font-size: 1.15rem; }
.logout-link:hover { color: #fff; }

.main-content { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar {
    position: sticky;
    z-index: 100;
    top: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 90px;
    padding: 1rem 2.25rem;
    border-bottom: 1px solid rgba(226, 230, 239, .88);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px);
}
.topbar-kicker { margin: 0 0 .1rem; color: var(--muted); font-size: .72rem; font-weight: 650; }
.topbar h1 { margin: 0; font-size: 1.45rem; font-weight: 760; letter-spacing: -.025em; }
.topbar-actions { display: flex; gap: .7rem; margin-left: auto; }
.menu-toggle { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 1.35rem; }

.content-area { max-width: 1600px; margin: 0 auto; padding: clamp(1.25rem, 2vw, 2rem) clamp(1.25rem, 2.3vw, 2.25rem) 3rem; }
.page-section { display: none; animation: sectionIn .18s ease both; }
.page-section.active { display: block; }
@keyframes sectionIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 118px;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 7px 28px rgba(28, 39, 67, .045);
}
.stat-card::after { content: ""; position: absolute; width: 84px; height: 84px; right: -34px; bottom: -42px; border-radius: 50%; background: currentColor; opacity: .06; }
.stat-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: currentColor; background: currentColor; }
.stat-icon i { color: #fff; font-size: 1.15rem; }
.stat-card span { display: block; margin-bottom: .15rem; color: var(--muted); font-size: .78rem; }
.stat-card strong { display: block; color: var(--ink); font-size: 1.8rem; line-height: 1; }
.stat-card small { display: block; overflow: hidden; margin-top: .35rem; color: #929bae; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.accent-blue { color: #4774f8; } .accent-violet { color: #8759e8; } .accent-green { color: #1eb893; } .accent-amber { color: #f0a132; }
.accent-cyan { color: #19a6b8; } .accent-indigo { color: #5968dc; } .accent-rose { color: #dc5571; } .accent-slate { color: #65738f; }

.dashboard-panels { margin-top: .15rem; }

.analytics-filter-card { margin-bottom: 1rem; }
.analytics-date-field { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--muted); font-size: .72rem; font-weight: 700; }
.analytics-date-field .form-control { width: 150px; }
.analytics-stats { margin-bottom: 1rem; }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.analytics-wide { grid-column: 1 / -1; }
.analytics-note { color: var(--muted); font-size: .7rem; }
.analytics-chart { display: flex; align-items: flex-end; gap: .7rem; min-height: 270px; padding: 1.4rem 1.5rem 1rem; overflow-x: auto; }
.analytics-chart-column { display: grid; flex: 1 0 42px; grid-template-rows: 20px 180px 34px; min-width: 42px; text-align: center; }
.analytics-chart-value { color: #66728b; font-size: .65rem; font-weight: 700; }
.analytics-chart-bar { position: relative; overflow: hidden; border-radius: 8px 8px 3px 3px; background: #f0f3f9; }
.analytics-chart-bar span { position: absolute; inset: auto 0 0; border-radius: inherit; background: linear-gradient(180deg, #6689f8, var(--primary)); }
.analytics-chart-column small { align-self: end; color: #8d97aa; font-size: .6rem; white-space: nowrap; transform: rotate(-35deg); transform-origin: center; }
.analytics-ranking { min-height: 310px; padding: .8rem 1.4rem 1.2rem; }
.analytics-rank-row { padding: .72rem 0; border-bottom: 1px solid #f0f2f6; }
.analytics-rank-row:last-child { border-bottom: 0; }
.analytics-rank-label { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem .8rem; margin-bottom: .45rem; }
.analytics-rank-label strong { overflow: hidden; color: #3d4860; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-rank-label small { grid-column: 1; color: var(--muted); font-size: .65rem; }
.analytics-rank-label span { grid-column: 2; grid-row: 1 / span 2; color: #69758d; font-size: .72rem; font-weight: 750; }
.analytics-rank-track { overflow: hidden; height: 5px; border-radius: 10px; background: #edf1f7; }
.analytics-rank-track span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.analytics-recent-wrap { max-height: 520px; overflow: auto; }
.analytics-table { min-width: 960px; }
.analytics-table thead { position: sticky; z-index: 1; top: 0; }
.analytics-path-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.panel-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 7px 28px rgba(28, 39, 67, .045);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.35rem 1.5rem; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: .2rem 0 0; font-size: 1.02rem; font-weight: 750; }
.text-button { border: 0; color: var(--primary); background: transparent; font-size: .8rem; font-weight: 650; }

.item-list { min-height: 200px; }
.dashboard-list-scroll {
    height: 300px;
    min-height: 300px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.list-item { display: flex; align-items: center; gap: .9rem; padding: .95rem 1.5rem; border-bottom: 1px solid #f0f2f6; }
.list-item:last-child { border-bottom: 0; }
.list-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; color: var(--primary); background: #edf2ff; font-weight: 750; }
.list-item-main { min-width: 0; flex: 1; }
.list-item-main strong { display: block; overflow: hidden; color: #303b54; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.list-item-main small { display: block; overflow: hidden; margin-top: .15rem; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.list-meta { color: #768199; font-size: .73rem; text-align: right; }
.truncate-code { color: #7e5a74 !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.empty-state { display: grid; place-items: center; min-height: 190px; padding: 2rem; color: #98a2b5; text-align: center; }
.empty-state i { display: block; margin-bottom: .5rem; font-size: 1.6rem; }

.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--line); }
.search-box { position: relative; flex: 1 1 280px; max-width: 520px; }
.search-box i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #909aaf; }
.search-box input { width: 100%; min-height: 43px; padding: .55rem .8rem .55rem 2.5rem; border: 1px solid #e0e4ec; border-radius: 10px; outline: none; }
.search-box input:focus { border-color: #9bb3ff; box-shadow: 0 0 0 .2rem rgba(55, 103, 246, .1); }
.filter-select { width: auto; min-width: 165px; }

.ts-wrapper { min-width: 0; }
.ts-wrapper.form-select,
.ts-wrapper.single {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
}
.ts-control {
    min-height: 44px;
    padding: .68rem .8rem;
    border: 1px solid #dfe3eb;
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    box-shadow: none;
}
.ts-wrapper.focus .ts-control {
    border-color: #9bb3ff;
    box-shadow: 0 0 0 .22rem rgba(55, 103, 246, .11);
}
.ts-control > input { min-width: 8rem; color: var(--ink); }
.ts-dropdown {
    z-index: 1080;
    overflow: hidden;
    margin-top: .35rem;
    border: 1px solid #dfe3eb;
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(25, 36, 65, .14);
}
.ts-dropdown .option {
    padding: .7rem .8rem;
    color: #4d5971;
    font-size: .82rem;
}
.ts-dropdown .active { color: var(--primary); background: #edf2ff; }
.table-toolbar > .ts-wrapper {
    flex: 0 1 260px;
    width: 260px;
}

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: .85rem 1.25rem; border-bottom: 1px solid var(--line); color: #8690a5; background: #fafbfc; font-size: .69rem; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.data-table th button { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.data-table th button i { margin-left: .25rem; font-size: .7rem; }
.data-table td { padding: 1rem 1.25rem; border-bottom: 1px solid #f0f2f6; color: #525d75; font-size: .82rem; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfdff; }
.data-table td a { overflow-wrap: anywhere; }
.cell-primary { display: block; color: #303b54; font-weight: 680; }
.cell-secondary { display: block; margin-top: .17rem; color: #8a94a8; font-size: .71rem; }
.contact-cell a { display: block; color: #53617b; text-decoration: none; }
.contact-cell a + a { margin-top: .23rem; }
.contact-cell i { width: 17px; color: #8b96aa; }
.count-pill { display: inline-grid; place-items: center; min-width: 28px; height: 25px; padding: 0 .45rem; border-radius: 20px; color: #56637d; background: #eef1f6; font-size: .72rem; font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .34rem .6rem; border-radius: 20px; font-size: .7rem; font-weight: 700; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-active { color: #14856b; background: #e7f8f3; }
.status-inactive { color: #8a94a8; background: #eff1f5; }
.status-pending { color: #9b6b16; background: #fff5dc; }
.status-failed { color: #bd3f50; background: #fff0f2; }
.actions { display: flex; justify-content: flex-end; gap: .35rem; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid #e3e7ee; border-radius: 9px; color: #748099; background: #fff; }
.icon-button:hover { border-color: #cbd7fb; color: var(--primary); background: #f3f6ff; }
.icon-button.danger:hover { border-color: #f1c8cd; color: #ce4050; background: #fff4f5; }
.credential-actions { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .4rem; }
.credential-chip { padding: .2rem .4rem; border: 0; border-radius: 6px; color: #6a7690; background: #eef1f6; font-size: .64rem; font-weight: 650; }
.credential-chip:hover { color: var(--primary); background: #e8eeff; }

.table-footer { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.35rem; border-top: 1px solid var(--line); font-size: .75rem; }
.table-scroll-area {
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.notify-servers-scroll { max-height: 430px; }
.notify-detail-scroll { height: 340px; max-height: 340px; }
.ssh-table-scroll { max-height: calc(100dvh - 305px); min-height: 320px; }
.table-scroll-area .data-table thead th {
    position: sticky;
    z-index: 2;
    top: 0;
    box-shadow: 0 1px 0 var(--line);
}
.per-page { display: flex; align-items: center; gap: .4rem; color: #7b869b; }
.per-page select { padding: .3rem 1.5rem .3rem .45rem; border: 1px solid #e0e4ec; border-radius: 7px; background: #fff; }
.pagination-wrap { display: flex; gap: .25rem; margin-left: auto; }
.page-button { display: grid; place-items: center; min-width: 31px; height: 31px; padding: 0 .45rem; border: 1px solid #e1e5ed; border-radius: 8px; color: #69758d; background: #fff; font-size: .72rem; }
.page-button.active { border-color: var(--primary); color: #fff; background: var(--primary); }
.page-button:disabled { opacity: .45; }

.modal { overflow-y: auto; }
.modal-dialog-scrollable {
    height: auto;
    max-height: calc(100dvh - 2rem);
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.modal-dialog-scrollable .modal-content {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: calc(100dvh - 2rem);
}
.modal-dialog-scrollable .modal-content > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.modal-dialog-scrollable .modal-header,
.modal-dialog-scrollable .modal-footer {
    flex: 0 0 auto;
}
.modal-content { overflow: hidden; border: 0; border-radius: 18px; box-shadow: 0 25px 80px rgba(21, 31, 58, .18); }
.modal-header { padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal-title { margin-top: .15rem; font-size: 1.16rem; font-weight: 760; }
.modal-dialog-scrollable .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #b7c0d3 #f1f3f7;
}
.modal-dialog-scrollable .modal-body::-webkit-scrollbar { width: 10px; }
.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track { background: #f1f3f7; }
.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    border: 2px solid #f1f3f7;
    border-radius: 10px;
    background: #b7c0d3;
}
.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover { background: #929db3; }
.modal-body { min-height: 0; padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field-full { grid-column: 1 / -1; }
.form-section + .form-section { margin-top: 1.7rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.form-section h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; color: #38445e; font-size: .87rem; font-weight: 750; }
.form-section h3 i { color: var(--primary); }
.credential-edit-note { display: none; justify-content: space-between; gap: 1rem; margin-top: .45rem; color: #7a859b; font-size: .69rem; }
.credential-edit-note.visible { display: flex; }
.credential-edit-note i { color: var(--primary); }
.credential-edit-note label { white-space: nowrap; cursor: pointer; }
.credential-edit-note input { margin-right: .25rem; }
.logo-preview-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .8rem;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8f9fc;
}
.logo-preview-wrap img { width: 72px; height: 72px; border-radius: 10px; object-fit: contain; background: #fff; }
.logo-preview-wrap strong, .logo-preview-wrap small { display: block; }
.logo-preview-wrap small { margin-top: .2rem; color: var(--muted); font-size: .74rem; }

.security-callout { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.2rem; padding: 1rem; border-radius: 12px; color: #59657d; background: #f3f6fd; }
.security-callout i { color: var(--primary); font-size: 1.5rem; }
.security-callout p { margin: 0; font-size: .82rem; }
.host-key-candidate {
    display: grid;
    gap: .6rem;
    margin-top: .85rem;
    padding: .9rem 1rem;
    border: 1px solid #cfe0ff;
    border-radius: 12px;
    background: #f5f8ff;
}
.host-key-candidate div span,
.host-key-candidate div strong { display: block; }
.host-key-candidate div span { color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.host-key-candidate div strong { margin-top: .12rem; color: #35415b; font-size: .82rem; }
.host-key-candidate code { overflow-wrap: anywhere; color: #214fab; font-size: .78rem; }
.host-key-candidate small { color: var(--muted); font-size: .72rem; }
.host-key-candidate .btn { justify-self: start; }
.host-key-candidate-success { border-color: #bfe6d7; background: #f0fbf7; }
.host-key-candidate-success code { color: #14755f; }
.host-key-candidate-danger { border-color: #f0c4c8; background: #fff5f6; }
.host-key-candidate-danger code { color: #b52f3d; }
.revealed-value { display: flex; align-items: flex-start; gap: .5rem; padding: .85rem; border: 1px solid #d9e2fa; border-radius: 10px; background: #f7f9ff; }
.revealed-value code { flex: 1; overflow-wrap: anywhere; color: #263658; white-space: pre-wrap; }
.revealed-value button { border: 0; color: var(--primary); background: transparent; }
.danger-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: #d74655; background: #fff0f1; font-size: 1.35rem; }
.security-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .65rem; border-radius: 20px; color: #16866c; background: #e8f8f3; font-size: .7rem; font-weight: 700; }
.security-badge-warning { color: #9b6810; background: #fff3d6; }

.account-form { padding: 1.5rem; }
.account-intro {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: .25rem;
    padding: 1rem;
    border: 1px solid #e4e9f5;
    border-radius: 12px;
    background: #f7f9fe;
}
.account-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, #4778ff, #2854dd);
    font-weight: 800;
}
.account-intro strong, .account-intro small { display: block; }
.account-intro small { margin-top: .2rem; color: var(--muted); font-size: .75rem; }
.optional-label { margin-left: .25rem; color: #929bae; font-size: .68rem; font-weight: 550; }
.ssh-notice {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 1.2rem 1.4rem 0;
    padding: .9rem 1rem;
    border: 1px solid #dce5fb;
    border-radius: 12px;
    color: #52617e;
    background: #f5f8ff;
}
.ssh-notice > i { color: var(--primary); font-size: 1.25rem; }
.ssh-notice strong, .ssh-notice small { display: block; }
.ssh-notice small { margin-top: .15rem; color: var(--muted); font-size: .73rem; }
.ssh-connect-button { border-color: #c9d8ff; color: var(--primary); background: #f3f6ff; }
.ssh-connect-button:disabled { border-color: #e4e7ed; color: #aab1bf; background: #f6f7f9; opacity: .72; }
.ssh-terminal-modal .modal-dialog {
    width: min(1920px, calc(100vw - 1rem));
    max-width: none;
    height: calc(100dvh - 1rem);
    margin: .5rem auto;
}
.ssh-terminal-modal .modal-content { height: 100%; overflow: hidden; background: #101521; }
.ssh-terminal-modal.is-expanded .modal-dialog { width: 100vw; height: 100dvh; margin: 0; }
.ssh-terminal-modal.is-expanded .modal-content { border: 0; border-radius: 0; }
.ssh-terminal-modal .modal-header,
.ssh-terminal-modal .modal-footer { flex: 0 0 auto; background: #fff; }
.ssh-terminal-modal .modal-header > div:first-child { min-width: 0; }
.ssh-terminal-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .75rem; margin-left: auto; padding-left: 1rem; }
.ssh-terminal-header-actions .btn-close { margin: 0; }
.ssh-workspace { --ssh-terminal-width: 38%; display: flex; flex: 1 1 auto; min-height: 0; background: #101521; }
.ssh-terminal-frame-wrap { position: relative; flex: 1 1 100%; min-width: 0; min-height: 0; background: #101521; transition: flex-basis .2s ease; }
.ssh-terminal-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; outline: 0; pointer-events: auto; touch-action: auto; background: #101521; }
.ssh-terminal-viewport { width: 100%; height: 100%; min-width: 0; min-height: 0; padding: 10px 8px 4px; background: #101521; }
.ssh-terminal-viewport .terminal.xterm { height: 100%; }
.ssh-terminal-viewport .xterm-viewport { overflow-y: auto; }
.ssh-sftp-workspace { display: none; min-width: 0; min-height: 0; border-left: 1px solid #303849; background: #f7f8fb; }
.ssh-workspace.sftp-open .ssh-terminal-frame-wrap { flex: 0 0 var(--ssh-terminal-width); }
.ssh-workspace.sftp-open .ssh-sftp-workspace { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); overflow: hidden; }
.ssh-workspace-divider { position: relative; z-index: 3; display: none; width: 8px; flex: 0 0 8px; border: 0; border-right: 1px solid #303849; border-left: 1px solid #303849; outline: 0; background: #202838; cursor: col-resize; touch-action: none; }
.ssh-workspace-divider::after { position: absolute; top: 50%; left: 50%; width: 3px; height: 44px; border-radius: 5px; background: #73809a; content: ""; transform: translate(-50%, -50%); }
.ssh-workspace-divider:hover, .ssh-workspace-divider:focus-visible { background: #3156bd; }
.ssh-workspace-divider:hover::after, .ssh-workspace-divider:focus-visible::after { background: #fff; }
.ssh-workspace.sftp-open .ssh-workspace-divider { display: block; }
body.ssh-resizing, body.ssh-resizing * { cursor: col-resize !important; user-select: none !important; }
body.ssh-resizing .ssh-terminal-frame-wrap { transition: none; }
.ssh-files-panel { --ssh-actions-width: 38px; display: flex; min-width: 0; min-height: 0; flex-direction: column; background: #fff; }
.ssh-remote-files { --ssh-actions-width: 146px; }
.ssh-files-panel + .ssh-files-panel { border-left: 1px solid #dfe4ec; }
.ssh-files-heading { display: flex; flex: 0 0 auto; min-height: 64px; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .8rem; border-bottom: 1px solid #e5e9f0; background: #fff; }
.ssh-files-heading strong { display: block; color: #202b43; font-size: .84rem; }
.ssh-files-heading .eyebrow { font-size: .58rem; }
.ssh-files-actions { display: flex; gap: .4rem; }
.ssh-files-path { flex: 0 0 auto; overflow: hidden; padding: .55rem .75rem; border-bottom: 1px solid #e8ebf1; color: #667085; background: #fafbfc; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.ssh-remote-path-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .45rem; padding: .35rem .55rem; }
.ssh-remote-path-form input { width: 100%; min-width: 0; border: 1px solid #dfe4ec; border-radius: 7px; padding: .35rem .5rem; color: #344054; background: #fff; font: inherit; }
.ssh-remote-path-form input:focus { border-color: #6f92ff; outline: 0; box-shadow: 0 0 0 2px rgba(76, 111, 255, .12); }
.ssh-sftp-tools { display: grid; flex: 0 0 auto; grid-template-columns: minmax(120px, 1fr) minmax(90px, .65fr) auto auto; gap: .35rem; padding: .4rem .55rem; border-bottom: 1px solid #e8ebf1; background: #fff; }
.ssh-sftp-search { display: flex; min-width: 0; align-items: center; gap: .35rem; padding: .35rem .5rem; border: 1px solid #dfe4ec; border-radius: 7px; color: #8791a5; background: #fafbfc; }
.ssh-sftp-search input, .ssh-sftp-tools select { width: 100%; min-width: 0; border: 0; outline: 0; color: #344054; background: transparent; font-size: .66rem; }
.ssh-sftp-tools select { border: 1px solid #dfe4ec; border-radius: 7px; padding: .35rem .45rem; background: #fafbfc; }
.ssh-sftp-tools .btn.active { color: #b87900; border-color: #ffd36a; background: #fff7dc; }
.ssh-audit-scroll { max-height: 340px; overflow: auto; }
.ssh-bulk-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .6rem; border-bottom: 1px solid #cbd8ff; color: #264aa8; background: #edf2ff; font-size: .66rem; }
.ssh-bulk-toolbar[hidden] { display: none !important; }
.ssh-bulk-toolbar > div { display: flex; gap: .3rem; }
.ssh-file-row-actions { display: flex; align-items: center; gap: .3rem; }
.ssh-file-row-actions .btn { display: inline-grid; width: 34px; height: 34px; flex: 0 0 34px; place-content: center; padding: 0; }
.ssh-local-list, .ssh-remote-list { flex: 1 1 auto; overflow: auto; min-height: 0; }
.ssh-remote-list { position: relative; }
.ssh-remote-list.drop-active::after { position: absolute; z-index: 4; inset: .65rem; display: grid; place-content: center; border: 2px dashed #4c6fff; border-radius: 12px; color: #274fc5; background: rgba(237, 242, 255, .94); content: "Solte para enviar ao servidor remoto"; font-size: .82rem; font-weight: 700; pointer-events: none; }
.ssh-files-empty { display: grid; min-height: 220px; place-content: center; gap: .65rem; padding: 1.5rem; color: #8a94a7; text-align: center; font-size: .75rem; }
.ssh-files-empty i { font-size: 2rem; }
.ssh-file-columns, .ssh-local-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px var(--ssh-actions-width); align-items: center; gap: .6rem; min-width: 390px; }
.ssh-file-columns { flex: 0 0 auto; padding: .38rem .65rem; border-bottom: 1px solid #e5e9f0; color: #8993a6; background: #f7f9fc; font-size: .58rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ssh-file-columns span:last-child { text-align: right; }
.ssh-local-row { min-height: 48px; padding: .45rem .65rem; border-bottom: 1px solid #eef1f5; }
.ssh-local-row:hover { background: #f5f8ff; }
.ssh-local-row.is-selected { background: #edf2ff; box-shadow: inset 3px 0 #4c6fff; }
.ssh-file-primary { display: flex; min-width: 0; align-items: center; gap: .45rem; }
.ssh-entry-select { width: .9rem; height: .9rem; flex: 0 0 .9rem; margin: 0; }
.ssh-selection-spacer { width: .9rem; flex: 0 0 .9rem; }
.ssh-local-file { display: flex; width: 100%; min-width: 0; align-items: center; gap: .55rem; border: 0; padding: 0; color: #344054; background: transparent; text-align: left; cursor: pointer; }
.ssh-local-file > i { flex: 0 0 auto; color: #5e76af; font-size: 1rem; }
.ssh-local-file-text { display: block; overflow: hidden; min-width: 0; }
.ssh-local-file-text strong, .ssh-local-file-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ssh-local-file-text strong { font-size: .73rem; font-weight: 600; }
.ssh-local-file-text small { color: #98a2b3; font-size: .62rem; }
.ssh-file-modified { overflow: hidden; color: #667085; font-size: .62rem; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.ssh-file-actions-placeholder { display: block; width: var(--ssh-actions-width); }
.ssh-local-upload { flex: 0 0 auto; }
.ssh-remote-files .ssh-local-file > i { color: #3971d6; }
.ssh-terminal-footer { justify-content: space-between; color: #718096; font-size: .76rem; }
.ssh-code-editor-overlay[hidden] { display: none !important; }
.ssh-code-editor-overlay { position: absolute; z-index: 20; inset: 0; display: flex; min-width: 0; min-height: 0; flex-direction: column; color: #d8deeb; background: #101521; }
.ssh-monitor-overlay[hidden], .ssh-editor-history[hidden] { display: none !important; }
.ssh-monitor-overlay { position: absolute; z-index: 19; inset: 0; display: flex; min-width: 0; min-height: 0; flex-direction: column; color: #e4eaf5; background: #101521; }
.ssh-monitor-header { display: flex; flex: 0 0 auto; min-height: 78px; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid #303849; background: #171d2a; }
.ssh-monitor-header strong, .ssh-monitor-header small { display: block; }
.ssh-monitor-header strong { font-size: 1rem; }
.ssh-monitor-header small { margin-top: .15rem; color: #8e9ab0; font-size: .68rem; }
.ssh-monitor-header > div:last-child { display: flex; gap: .45rem; }
.ssh-monitor-body { flex: 1 1 auto; overflow: auto; padding: 1rem; }
.ssh-monitor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.ssh-monitor-card, .ssh-monitor-services, .ssh-quick-commands { border: 1px solid #303849; border-radius: 12px; background: #171d2a; box-shadow: 0 10px 25px rgba(0,0,0,.12); }
.ssh-monitor-card { min-height: 135px; padding: 1rem; }
.ssh-monitor-card > span, .ssh-monitor-services > span { color: #8692a8; font-size: .65rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ssh-monitor-card strong, .ssh-monitor-card small { display: block; }
.ssh-monitor-card strong { margin-top: .55rem; color: #fff; font-size: 1.35rem; }
.ssh-monitor-card small { overflow: hidden; margin-top: .25rem; color: #9eabc0; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.ssh-meter { overflow: hidden; height: 5px; margin-top: .8rem; border-radius: 5px; background: #2b3444; }
.ssh-meter i { display: block; height: 100%; border-radius: inherit; background: #5f82ff; }
.ssh-monitor-services { grid-column: 1 / -1; padding: 1rem; }
.ssh-monitor-services > div { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.ssh-service-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .55rem; border-radius: 999px; color: #bbc5d6; background: #242c3a; font-size: .66rem; }
.ssh-service-pill i { font-size: .45rem; }
.ssh-service-pill.is-active i { color: #31c48d; }
.ssh-service-pill.is-failed i { color: #f06470; }
.ssh-service-pill.is-unknown i { color: #8791a5; }
.ssh-monitor-loading { display: grid; grid-column: 1 / -1; min-height: 260px; place-content: center; gap: .75rem; color: #9eabc0; text-align: center; }
.ssh-monitor-loading.is-error { color: #ff929b; }
.ssh-quick-commands { margin-top: .8rem; padding: 1rem; }
.ssh-quick-commands h3 { margin: .15rem 0 0; font-size: 1rem; }
.ssh-command-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin: .85rem 0 .65rem; }
.ssh-quick-commands > small { color: #8e9ab0; font-size: .67rem; }
.ssh-terminal-modal .modal-content { position: relative; }
.ssh-code-editor-header, .ssh-code-editor-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-color: #303849; background: #171d2a; }
.ssh-code-editor-header { min-height: 72px; border-bottom: 1px solid #303849; }
.ssh-code-editor-header > div:first-child { min-width: 0; }
.ssh-code-editor-header strong, .ssh-code-editor-header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ssh-code-editor-header strong { color: #f4f7fc; font-size: .95rem; }
.ssh-code-editor-header small { max-width: min(70vw, 900px); margin-top: .15rem; color: #8e9ab0; font: .7rem/1.3 "JetBrains Mono", Consolas, monospace; }
.ssh-code-editor-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .75rem; }
.ssh-editor-status { max-width: 420px; overflow: hidden; color: #9dacbf; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.ssh-editor-status.is-dirty { color: #ffc857; }
.ssh-code-editor-mount { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.ssh-code-editor-mount .cm-editor { height: 100%; font-size: 13px; }
.ssh-code-editor-mount .cm-scroller { overflow: auto; font-family: "JetBrains Mono", "Fira Code", Consolas, monospace; }
.ssh-code-editor-footer { min-height: 62px; border-top: 1px solid #303849; color: #92a0b5; font-size: .72rem; }
.ssh-editor-history { position: absolute; z-index: 6; top: 72px; right: 0; bottom: 62px; display: flex; width: min(390px, 92vw); flex-direction: column; border-left: 1px solid #303849; color: #d8deeb; background: #171d2a; box-shadow: -15px 0 35px rgba(0,0,0,.25); }
.ssh-editor-history > header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: .7rem; padding: .8rem; border-bottom: 1px solid #303849; }
.ssh-editor-history > header strong { display: block; font-size: .85rem; }
.ssh-editor-history-list { flex: 1 1 auto; overflow: auto; }
.ssh-history-item { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .75rem .8rem; border-bottom: 1px solid #2a3343; }
.ssh-history-item strong, .ssh-history-item small { display: block; }
.ssh-history-item strong { color: #eef3fb; font-size: .72rem; }
.ssh-history-item small { margin-top: .2rem; color: #8e9ab0; font-size: .62rem; }
.ssh-history-empty { display: grid; min-height: 180px; place-content: center; gap: .6rem; padding: 1rem; color: #8e9ab0; text-align: center; font-size: .7rem; }
.form-check-label { color: #4e5a72; font-size: .84rem; }
.totp-secret {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1rem;
    border: 1px solid #d9e2fa;
    border-radius: 10px;
    background: #f7f9ff;
}
.totp-secret code { flex: 1; overflow-wrap: anywhere; color: #263658; font-size: .95rem; letter-spacing: .08em; }
.totp-secret button { border: 0; color: var(--primary); background: transparent; }
.totp-uri { display: block; overflow-wrap: anywhere; margin-top: .6rem; padding: .7rem; border-radius: 8px; background: #f2f4f8; font-size: .68rem; }
.totp-qr {
    display: grid;
    place-items: center;
    width: min(280px, 100%);
    margin: 1rem auto .75rem;
    padding: .8rem;
    border: 1px solid #dfe4ed;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(27, 39, 67, .08);
}
.totp-qr svg { display: block; width: 100%; height: auto; }
.totp-qr-help { margin: 0; color: #6f7b92; font-size: .72rem; text-align: center; }
.totp-qr-help i { margin-right: .25rem; color: var(--primary); }

.sidebar-nav,
.dashboard-list-scroll,
.table-scroll-area {
    scrollbar-width: thin;
    scrollbar-color: #bdc5d5 transparent;
}
.sidebar-nav::-webkit-scrollbar,
.dashboard-list-scroll::-webkit-scrollbar,
.table-scroll-area::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb,
.dashboard-list-scroll::-webkit-scrollbar-thumb,
.table-scroll-area::-webkit-scrollbar-thumb { border-radius: 10px; background: #bdc5d5; }

.toast { color: #fff; background: #17213a; box-shadow: 0 12px 35px rgba(20, 30, 55, .2); }
.toast.toast-error { background: #bf3d4c; }

.loading-row td { padding: 2.5rem; color: #98a2b5; text-align: center; }
.loading-block { position: relative; }
.loading-block::after { content: ""; position: absolute; top: 50%; left: 50%; width: 24px; height: 24px; margin: -12px; border: 2px solid #d8dfef; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sidebar-backdrop { display: none; }

.backup-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.backup-stat-text { font-size: 1rem !important; line-height: 1.25 !important; }
.backup-requirements {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 1px solid #ccecdf;
    border-radius: 12px;
    color: #15755c;
    background: #f0fbf7;
}
.backup-requirements i { font-size: 1.15rem; }
.backup-requirements strong, .backup-requirements small { display: block; }
.backup-requirements small { margin-top: .1rem; color: #5b7f74; }
.backup-requirements-error { border-color: #f3c9cf; color: #b72f41; background: #fff4f5; }
.backup-requirements-error small { color: #9e6069; }
.backup-requirements-warning { border-color: #f0dfad; color: #8b6616; background: #fffbec; }
.backup-requirements-warning small { color: #8c7b52; }
.backup-restore-status { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 1px solid #ccecdf; border-radius: 12px; background: #f0fbf7; color: #15755c; }
.backup-restore-status i { font-size: 1.15rem; }
.backup-restore-status strong, .backup-restore-status small { display: block; }
.backup-restore-status small { margin-top: .1rem; color: inherit; opacity: .8; }
.backup-restore-status.pending { border-color: #f0dfad; background: #fffbec; color: #8b6616; }
.backup-restore-status.processing { border-color: #cbd9ff; background: #f2f6ff; color: #315dbb; }
.backup-restore-status.error { border-color: #f3c9cf; background: #fff4f5; color: #b72f41; }
.restore-warning { display: flex; gap: .75rem; padding: 1rem; margin-bottom: 1rem; border: 1px solid #f1c4ca; border-radius: 12px; background: #fff5f6; color: #ab3040; }
.restore-warning i { flex: 0 0 auto; }
.restore-warning strong, .restore-warning small { display: block; }
.restore-warning small { margin-top: .2rem; color: #93616a; }
.restore-selected-source { padding: .85rem 1rem; margin-bottom: 1rem; border: 1px solid #cbd9ff; border-radius: 12px; background: #f4f7ff; }
.restore-selected-source span, .restore-selected-source strong { display: block; }
.restore-selected-source span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.restore-selected-source strong { margin-top: .15rem; overflow-wrap: anywhere; }
.restore-page-intro { display: flex; align-items: center; gap: 1rem; padding: 1.35rem; border: 1px solid #d8e1f7; border-radius: 18px; background: linear-gradient(135deg, #fff 0%, #f3f6ff 100%); box-shadow: var(--shadow); }
.restore-page-icon { display: grid; flex: 0 0 54px; width: 54px; height: 54px; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--primary), #7656e8); font-size: 1.45rem; }
.restore-page-intro h2 { margin: .15rem 0 .3rem; font-size: 1.2rem; }
.restore-page-intro p { max-width: 760px; margin: 0; color: var(--muted); font-size: .82rem; }
.restore-page-intro .btn { flex: 0 0 auto; margin-left: auto; }
.restore-table-scroll { max-height: 620px; }
.account-security-content { padding: 1.25rem; }
.recovery-code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.recovery-code-grid code { display: block; padding: .65rem .75rem; border: 1px solid #dbe2f1; border-radius: 9px; color: #283653; background: #f6f8fc; text-align: center; font-size: .85rem; letter-spacing: .05em; }
.backup-settings-form { padding: 1.25rem; }
.backup-switch { display: flex; align-items: flex-start; gap: .65rem; padding: .9rem 1rem .9rem 3.2rem; border: 1px solid var(--line); border-radius: 12px; background: #f8faff; }
.backup-switch .form-check-input { margin-left: -2rem; }
.backup-switch strong, .backup-switch small { display: block; }
.backup-switch small { margin-top: .2rem; color: var(--muted); font-size: .73rem; }
.backup-form-divider { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.backup-form-divider::before, .backup-form-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.backup-history-scroll { max-height: 650px; }
.backup-error-text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button[disabled] { cursor: not-allowed; opacity: .45; }

@media (max-width: 1199.98px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .backup-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .auth-shell { display: block; }
    .auth-form-panel { min-height: 100vh; }
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: none; }
    .sidebar-backdrop { position: fixed; z-index: 1035; inset: 0; background: rgba(9, 15, 31, .48); }
    .sidebar-backdrop.show { display: block; }
    .restore-page-intro { align-items: flex-start; flex-wrap: wrap; }
    .restore-page-intro .btn { width: 100%; margin-left: 0; }
    .main-content { margin-left: 0; }
    .ssh-workspace.sftp-open .ssh-terminal-frame-wrap { display: none; }
    .ssh-workspace.sftp-open .ssh-workspace-divider { display: none; }
    .ssh-workspace.sftp-open .ssh-sftp-workspace { flex: 1 1 100%; }
    .ssh-monitor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-grid { grid-template-columns: 1fr; }
    .analytics-wide { grid-column: auto; }
}

@media (max-width: 767.98px) {
    .topbar { min-height: 76px; padding: .8rem 1rem; }
    .topbar-kicker { display: none; }
    .topbar h1 { font-size: 1.15rem; }
    .content-area { padding: 1rem 1rem 2rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .stat-card { min-height: 96px; padding: .9rem; }
    .stat-icon { width: 40px; height: 40px; }
    .stat-card strong { font-size: 1.45rem; }
    .dashboard-list-scroll { height: 270px; min-height: 270px; }
    .table-toolbar { align-items: stretch; }
    .search-box { max-width: none; }
    .filter-select { flex: 1; min-width: 140px; }
    .data-table { min-width: 780px; }
    .table-footer { flex-wrap: wrap; }
    .pagination-wrap { width: 100%; justify-content: flex-end; }
    .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .notify-detail-scroll { height: 300px; max-height: 300px; }
    .ssh-files-heading { align-items: flex-start; flex-wrap: wrap; }
    .ssh-files-actions { width: 100%; flex-wrap: wrap; }
    .ssh-sftp-tools { grid-template-columns: minmax(0, 1fr) auto auto; }
    .ssh-sftp-tools select { grid-column: 1 / -1; grid-row: 2; }
    .ssh-bulk-toolbar { align-items: flex-start; flex-direction: column; }
    .ssh-bulk-toolbar > div { width: 100%; overflow-x: auto; }
    .ssh-code-editor-header, .ssh-code-editor-footer { padding: .65rem .75rem; }
    .ssh-editor-status { display: none; }
    .ssh-monitor-grid { grid-template-columns: 1fr; }
    .ssh-monitor-services { grid-column: auto; }
    .backup-summary-grid { grid-template-columns: 1fr; }
    .analytics-date-field { flex: 1 1 180px; }
    .analytics-date-field .form-control { width: 100%; }
}

@media (max-width: 575.98px) {
    .topbar-actions .btn { padding: .65rem .75rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 88px; }
    .table-toolbar { flex-direction: column; }
    .filter-select { width: 100%; }
    .credential-edit-note { flex-direction: column; gap: .35rem; }
    .panel-heading { align-items: flex-start; padding: 1.1rem; }
    .security-badge { white-space: nowrap; }
    .account-form { padding: 1rem; }
    .modal-dialog-scrollable {
        height: auto;
        max-height: calc(100dvh - 1rem);
        margin: .5rem;
    }
    .modal-dialog-scrollable .modal-content { max-height: calc(100dvh - 1rem); }
    .modal-header, .modal-body, .modal-footer { padding-left: 1rem; padding-right: 1rem; }
    .ssh-terminal-modal .modal-dialog { width: 100%; height: 100dvh; margin: 0; }
    .ssh-terminal-modal .modal-content { border: 0; border-radius: 0; }
    .recovery-code-grid { grid-template-columns: 1fr; }
    .ssh-terminal-header-actions .btn { padding: .45rem .6rem; font-size: .68rem; }
    .ssh-terminal-header-actions { gap: .35rem; padding-left: .45rem; }
    .ssh-workspace.sftp-open .ssh-sftp-workspace { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
    .ssh-files-panel + .ssh-files-panel { border-top: 1px solid #dfe4ec; border-left: 0; }
    .ssh-terminal-footer span { display: none; }
    .ssh-terminal-footer .btn { width: 100%; }
}
