:root {
    --bg: #eef4ff;
    --bg-deep: #071120;
    --panel: rgba(255, 255, 255, 0.78);
    --panel-strong: rgba(255, 255, 255, 0.92);
    --line: rgba(110, 132, 184, 0.18);
    --line-strong: rgba(101, 125, 182, 0.26);
    --text: #12233f;
    --text-soft: #587093;
    --brand: #2563eb;
    --brand-strong: #1338a8;
    --brand-soft: rgba(37, 99, 235, 0.12);
    --mint: #12b981;
    --mint-soft: rgba(18, 185, 129, 0.14);
    --warn: #f59e0b;
    --danger: #ef4444;
    --violet: #7c3aed;
    --shadow: 0 24px 80px rgba(21, 36, 79, 0.12);
    --shadow-soft: 0 14px 40px rgba(17, 30, 66, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    background: #edf3ff;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI Variable Text', 'Microsoft YaHei', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 12%, rgba(37, 99, 235, 0.11), transparent 20rem),
        radial-gradient(circle at 88% 14%, rgba(124, 58, 237, 0.09), transparent 16rem),
        radial-gradient(circle at 50% 100%, rgba(18, 185, 129, 0.08), transparent 18rem),
        linear-gradient(180deg, #f5f8ff 0%, #ecf2ff 42%, #f8fbff 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(86, 109, 163, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(86, 109, 163, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.26), transparent 72%);
}

h1,
h2,
h3,
h4,
strong {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.shell {
    display: grid;
    grid-template-columns: 292px 1fr;
    min-height: 100vh;
    transition: grid-template-columns 240ms ease;
}

.shell.sidebar-collapsed {
    grid-template-columns: 104px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 18px;
    height: 100vh;
    min-height: 0;
    padding: 18px 16px 18px 18px;
    background:
        linear-gradient(180deg, rgba(5, 16, 32, 0.98), rgba(9, 22, 45, 0.98)),
        var(--bg-deep);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.sidebar-glow {
    position: absolute;
    width: 240px;
    height: 240px;
    top: -110px;
    left: -72px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.32), rgba(59, 130, 246, 0));
    filter: blur(12px);
    pointer-events: none;
}

.sidebar-head,
.sidebar-body,
.brand-row,
.nav,
.status-panel {
    position: relative;
    z-index: 1;
}

.sidebar-head {
    padding: 2px 2px 0 0;
}

.sidebar-body {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    margin-right: -6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(132, 165, 241, 0.24) transparent;
}

.sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(132, 165, 241, 0.24);
    border-radius: 999px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 17px;
    background: linear-gradient(135deg, #1d4ed8, #22c1c3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 16px 34px rgba(37, 99, 235, 0.34);
}

.brand-mark span,
.brand-mark span::before,
.brand-mark span::after {
    position: absolute;
    left: 50%;
    display: block;
    content: '';
    transform: translateX(-50%);
    border-radius: 999px;
    background: #fff;
}

.brand-mark span {
    top: 24px;
    width: 24px;
    height: 3px;
}

.brand-mark span::before {
    width: 5px;
    height: 5px;
    top: -5px;
    left: -2px;
}

.brand-mark span::after {
    width: 7px;
    height: 7px;
    top: -9px;
    left: 17px;
}

.brand-copy {
    min-width: 0;
}

.brand-name {
    color: #f7fbff;
    font-size: 1.08rem;
    white-space: nowrap;
}

.brand-tag {
    margin-top: 4px;
    color: rgba(212, 224, 255, 0.6);
    font-size: 0.82rem;
    white-space: nowrap;
}

.sidebar-toggle {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(132, 165, 241, 0.18);
    border-radius: 14px;
    color: #d9e7ff;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(132, 165, 241, 0.28);
}

.sidebar-toggle span {
    width: 10px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 220ms ease;
}

.shell.sidebar-collapsed .sidebar-toggle span:first-child {
    transform: translateX(2px) rotate(35deg);
}

.shell.sidebar-collapsed .sidebar-toggle span:last-child {
    transform: translateX(-2px) rotate(-35deg);
}

.nav {
    display: grid;
    gap: 8px;
    align-content: start;
}

.nav-group {
    margin: 2px 0 6px;
    padding: 0 12px 0 14px;
    font-size: 0.73rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(197, 214, 248, 0.45);
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 11px 14px;
    border-radius: 18px;
    color: rgba(225, 235, 255, 0.78);
    border: 1px solid transparent;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(16, 185, 129, 0.04));
    opacity: 0;
    transition: opacity 180ms ease;
}

.nav-icon,
.nav-text {
    position: relative;
    z-index: 1;
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(162, 188, 255, 0.08);
    color: #dfe9ff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.nav-text {
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    transform: translateX(3px);
    color: #fff;
    border-color: rgba(111, 146, 255, 0.22);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.nav-link.active .nav-icon {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(34, 197, 94, 0.78));
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.status-panel {
    margin-top: 0;
    padding: 16px 18px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(141, 171, 255, 0.14);
    color: #e7efff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

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

.panel-title {
    font-size: 0.88rem;
    color: rgba(231, 239, 255, 0.76);
}

.panel-chip {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(18, 185, 129, 0.12);
    color: #6ee7b7;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.status-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    color: rgba(231, 239, 255, 0.76);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.status-row:last-child {
    border-bottom: 0;
}

.status-user {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(141, 171, 255, 0.12);
    color: rgba(231, 239, 255, 0.8);
}

.status-user span {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(197, 214, 248, 0.56);
}

.sidebar-logout {
    margin-top: 14px;
}

.sidebar-logout .button {
    width: 100%;
}

.ok {
    color: var(--mint);
}

.warn {
    color: var(--warn);
}

.content {
    padding: 26px 28px 34px;
    transition: opacity 180ms ease, transform 180ms ease;
}

.content.is-updating {
    opacity: 0.74;
    transform: translateY(3px);
}

.topbar,
.hero-panel,
.stat-card,
.server-card,
.alert-item,
.management-card {
    background: var(--panel);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    border-radius: 30px;
    margin-bottom: 24px;
}

.topbar-title {
    min-width: 0;
}

.topbar-side {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(18, 185, 129, 0.1);
    border: 1px solid rgba(18, 185, 129, 0.16);
    color: #0f8a61;
    font-size: 0.9rem;
    font-weight: 600;
}

.topbar-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 6px rgba(18, 185, 129, 0.14);
}

.eyebrow,
.section-kicker,
.hero-kicker,
.meta-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #7387aa;
}

.topbar h1 {
    margin: 10px 0 6px;
    font-size: 2.08rem;
}

.subtitle {
    color: var(--text-soft);
}

.topbar-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.topbar-highlight {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: var(--brand-strong);
    font-size: 0.88rem;
    font-weight: 600;
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(120, 145, 190, 0.16);
}

.signal-ring {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, 0.12);
    background: rgba(255, 255, 255, 0.9);
}

.signal-ring::before,
.signal-ring::after {
    content: '';
    position: absolute;
    inset: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.signal-ring::before {
    width: 22px;
    height: 22px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.92), rgba(37, 99, 235, 0.22));
}

.signal-ring::after {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(18, 185, 129, 0.24);
}

.hero-panel {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border-radius: 32px;
    margin-bottom: 22px;
    overflow: hidden;
}

.hero-panel::before {
    content: '';
    position: absolute;
    inset: auto -60px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16), transparent 68%);
}

.hero-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 48%);
    pointer-events: none;
}

.hero-panel > * {
    position: relative;
    z-index: 1;
}

.hero-panel h2 {
    margin-top: 12px;
    max-width: 760px;
    font-size: 1.95rem;
    line-height: 1.36;
}

.hero-copy {
    min-width: 0;
}

.hero-text {
    max-width: 760px;
    margin-top: 14px;
    color: var(--text-soft);
    line-height: 1.7;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(115, 138, 190, 0.14);
    color: var(--brand-strong);
    font-size: 0.88rem;
    font-weight: 600;
}

.hero-actions,
.card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.card-actions form {
    margin: 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 600;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
    cursor: pointer;
    position: relative;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: wait;
}

.button.is-loading {
    pointer-events: none;
    color: transparent;
}

.button.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(37, 99, 235, 0.18);
    border-top-color: currentColor;
    animation: spin 760ms linear infinite;
}

.button.primary.is-loading::after {
    border-color: rgba(255, 255, 255, 0.28);
    border-top-color: #fff;
}

.button.primary {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.button.secondary,
.button.ghost,
.button.danger {
    background: rgba(255, 255, 255, 0.84);
}

.button.secondary {
    border-color: rgba(37, 99, 235, 0.18);
    color: var(--brand-strong);
}

.button.ghost {
    border-color: rgba(18, 35, 63, 0.08);
    color: var(--text);
}

.button.danger {
    border-color: rgba(239, 68, 68, 0.16);
    color: var(--danger);
}

.stats-grid,
.server-grid,
.management-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 28px;
}

.stat-card {
    position: relative;
    padding: 22px;
    border-radius: 24px;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    right: -28px;
    top: -36px;
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
    transform: rotate(18deg);
}

.stat-card p,
.stat-card span,
.stat-card strong {
    position: relative;
    z-index: 1;
}

.stat-card p {
    color: var(--text-soft);
    margin-bottom: 12px;
}

.stat-card strong {
    display: block;
    font-size: 2.12rem;
    margin-bottom: 8px;
}

.stat-card span {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.stat-card.blue strong { color: var(--brand); }
.stat-card.green strong { color: var(--mint); }
.stat-card.orange strong { color: var(--warn); }
.stat-card.violet strong { color: var(--violet); }

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

.section-head h3 {
    margin-top: 8px;
    font-size: 1.58rem;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-menu {
    position: relative;
}

.action-menu-list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 164px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(113, 137, 182, 0.16);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    display: grid;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 12;
}

.action-menu:hover .action-menu-list,
.action-menu:focus-within .action-menu-list,
.action-menu.is-open .action-menu-list {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.action-menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
}

.action-menu-item:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-strong);
}

.server-open-menu .action-menu-list {
    min-width: 176px;
}

.section-note {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-strong);
    font-size: 0.88rem;
    font-weight: 600;
}

.section-head.compact {
    margin-top: 28px;
}

.flash-banner,
.form-card,
.empty-state,
.list-card {
    background: var(--panel);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.flash-banner {
    margin-bottom: 18px;
    padding: 18px 20px;
    border-radius: 22px;
}

.flash-banner strong {
    display: block;
    margin-bottom: 6px;
}

.flash-banner p {
    color: var(--text-soft);
}

.flash-banner.success {
    border-color: rgba(18, 185, 129, 0.24);
    background: linear-gradient(180deg, rgba(236, 253, 245, 0.86), rgba(255, 255, 255, 0.9));
}

.flash-banner.error {
    border-color: rgba(239, 68, 68, 0.2);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.92));
}

.form-card {
    margin-bottom: 22px;
    padding: 22px;
    border-radius: 28px;
    position: relative;
    overflow: visible;
}

.collapsible-panel[hidden] {
    display: none;
}

.collapsible-panel.is-open {
    animation: panelReveal 220ms ease;
}

.list-card {
    padding: 22px;
    border-radius: 28px;
    position: relative;
    overflow: visible;
}

.form-card.has-floating-select,
.list-card.has-floating-select {
    z-index: 40;
}

.top-gap {
    margin-top: 22px;
}

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

.server-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.stack-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    color: var(--text-soft);
    font-size: 0.92rem;
    font-weight: 600;
}

.field-wide {
    grid-column: 1 / -1;
}

.input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 15px;
    border: 1px solid rgba(113, 137, 182, 0.16);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.select-shell {
    position: relative;
    display: block;
}

.select-shell::before {
    content: '';
    position: absolute;
    top: 7px;
    right: 8px;
    bottom: 7px;
    width: 44px;
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(241, 245, 255, 0.95), rgba(233, 240, 255, 0.88));
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
    transition: background 180ms ease, transform 180ms ease;
    pointer-events: none;
}

.select-shell::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 24px;
    width: 9px;
    height: 9px;
    border-right: 2px solid rgba(19, 56, 168, 0.78);
    border-bottom: 2px solid rgba(19, 56, 168, 0.78);
    transform: translateY(-62%) rotate(45deg);
    transition: transform 180ms ease, border-color 180ms ease;
    pointer-events: none;
}

.select-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.select-shell:hover::before {
    background: linear-gradient(180deg, rgba(232, 240, 255, 0.98), rgba(220, 233, 255, 0.92));
    transform: translateY(-1px);
}

.select-shell:hover::after {
    border-color: rgba(37, 99, 235, 0.92);
}

.select-shell:hover .select-input {
    border-color: rgba(37, 99, 235, 0.2);
}

.select-shell:focus-within::before {
    background: linear-gradient(180deg, rgba(225, 236, 255, 1), rgba(214, 230, 255, 0.95));
}

.select-shell:focus-within::after {
    border-color: rgba(37, 99, 235, 1);
    transform: translateY(-52%) rotate(45deg);
}

.select-input option {
    color: var(--text);
    background: #fff;
}

.select-trigger {
    width: 100%;
    min-height: 48px;
    padding: 0 64px 0 14px;
    border-radius: 18px;
    border: 1px solid rgba(113, 137, 182, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 10px 24px rgba(17, 30, 66, 0.05);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.select-trigger:hover {
    border-color: rgba(37, 99, 235, 0.22);
}

.select-trigger:focus-visible {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    outline: none;
}

.select-trigger-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-trigger-label.is-placeholder {
    color: rgba(18, 35, 63, 0.72);
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    gap: 6px;
    padding: 8px;
    max-height: min(320px, 48vh);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px;
    border: 1px solid rgba(113, 137, 182, 0.16);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 52px rgba(16, 24, 40, 0.16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 30;
}

.select-dropdown::-webkit-scrollbar {
    width: 8px;
}

.select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(113, 137, 182, 0.28);
    border-radius: 999px;
}

.select-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.select-shell.is-open {
    z-index: 31;
}

.select-shell.is-open::after {
    transform: translateY(-38%) rotate(225deg);
}

.select-shell.is-open .select-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.select-shell.is-open .select-trigger {
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08), 0 16px 36px rgba(17, 30, 66, 0.08);
}

.select-option {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.select-option:hover,
.select-option:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-strong);
    outline: none;
    transform: translateX(1px);
}

.select-option.is-selected {
    background: linear-gradient(180deg, rgba(227, 237, 255, 0.98), rgba(218, 232, 255, 0.92));
    color: var(--brand-strong);
}

.select-shell.is-invalid .select-trigger {
    border-color: rgba(239, 68, 68, 0.34);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
    background: rgba(255, 248, 248, 0.96);
}

.select-shell.is-invalid::before {
    background: linear-gradient(180deg, rgba(255, 236, 236, 0.98), rgba(255, 226, 226, 0.92));
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.12);
}

.select-shell.is-invalid::after {
    border-color: rgba(220, 38, 38, 0.82);
}

.input:focus {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.input.is-invalid {
    border-color: rgba(239, 68, 68, 0.34);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
    background: rgba(255, 248, 248, 0.96);
}

.field-error {
    color: var(--danger);
    font-size: 0.84rem;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    align-items: end;
}

.server-form .form-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.empty-state {
    display: grid;
    gap: 8px;
    padding: 26px;
    border-radius: 24px;
}

.empty-state p {
    color: var(--text-soft);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 460px);
    gap: 28px;
    align-items: stretch;
    padding: 28px;
}

.auth-hero,
.auth-panel {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.auth-hero {
    display: grid;
    align-items: end;
    min-height: 560px;
    padding: 38px;
    background:
        radial-gradient(circle at 20% 18%, rgba(96, 165, 250, 0.26), transparent 18rem),
        radial-gradient(circle at 82% 16%, rgba(129, 140, 248, 0.18), transparent 16rem),
        linear-gradient(145deg, rgba(7, 17, 32, 0.98), rgba(13, 29, 55, 0.96));
    color: #f5f9ff;
}

.auth-copy {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.auth-kicker {
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.72);
}

.auth-hero h1 {
    margin-top: 16px;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 0.98;
    color: #fff;
}

.auth-text {
    margin-top: 18px;
    max-width: 460px;
    color: rgba(224, 233, 255, 0.78);
    line-height: 1.8;
    font-size: 1rem;
}

.auth-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.auth-points span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: rgba(239, 246, 255, 0.88);
    backdrop-filter: blur(12px);
}

.auth-orbit {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(8px);
}

.auth-orbit-one {
    top: -70px;
    left: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.42), rgba(96, 165, 250, 0));
}

.auth-orbit-two {
    right: -40px;
    bottom: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.2), rgba(45, 212, 191, 0));
}

.auth-panel {
    display: grid;
    align-content: center;
    gap: 18px;
    padding: 34px;
    background: rgba(255, 255, 255, 0.84);
}

.auth-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
}

.auth-panel h2 {
    margin-top: 8px;
    font-size: 2rem;
}

.auth-form {
    gap: 18px;
}

.auth-actions {
    justify-content: flex-end;
}

.install-shell {
    grid-template-columns: minmax(0, 0.9fr) minmax(520px, 0.95fr);
}

.install-panel {
    align-content: start;
}

.install-form {
    gap: 16px;
}

.install-block-label {
    padding-top: 6px;
}

.install-block-label span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-strong);
}

.install-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.settings-instruction {
    line-height: 1.7;
}

.settings-command {
    display: grid;
    gap: 10px;
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(113, 137, 182, 0.12);
}

.settings-command-label {
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-command code {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--brand-strong);
    font-family: Consolas, 'Courier New', monospace;
    line-height: 1.7;
}

.settings-value-break {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-shell {
    overflow-x: auto;
    border-radius: 22px;
    border: 1px solid rgba(113, 137, 182, 0.12);
    background: rgba(255, 255, 255, 0.5);
}

.site-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.site-table th,
.site-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(113, 137, 182, 0.1);
    vertical-align: top;
}

.site-table thead th {
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.48);
}

.site-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.45);
}

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

.table-sub {
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.table-link {
    color: var(--brand-strong);
    word-break: break-all;
}

.server-grid,
.management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.server-card,
.management-card {
    border-radius: 28px;
    padding: 22px;
}

.dashboard-card {
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: rgba(37, 99, 235, 0.18);
}

.dashboard-card.risk-critical::before {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.98), rgba(249, 115, 22, 0.7));
}

.dashboard-card.risk-warning::before {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.98), rgba(250, 204, 21, 0.7));
}

.dashboard-card.risk-stable::before {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.96), rgba(37, 99, 235, 0.55));
}

.dashboard-pill-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.summary-chip {
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(113, 137, 182, 0.12);
    box-shadow: var(--shadow-soft);
}

.summary-chip span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 0.86rem;
}

.summary-chip strong {
    font-size: 1.28rem;
}

.summary-chip.is-danger {
    background: linear-gradient(180deg, rgba(255, 244, 244, 0.98), rgba(255, 255, 255, 0.95));
    border-color: rgba(239, 68, 68, 0.16);
}

.dashboard-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.dashboard-card-actions {
    margin-top: 18px;
}

.dashboard-card-actions .button.primary {
    min-width: 136px;
}

.icon-pill {
    width: 38px;
    height: 38px;
    justify-content: center;
    padding: 0;
    transition: transform 180ms ease, background 180ms ease;
}

.icon-pill:hover,
.action-pill:hover {
    transform: translateY(-1px);
}

.icon-pill span {
    font-size: 1rem;
    line-height: 1;
}

.action-pill {
    min-height: 38px;
}

.server-card-head,
.management-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.server-card-head h4,
.management-head h4 {
    margin-bottom: 6px;
    font-size: 1.24rem;
}

.server-card-head p,
.management-head p,
.site-row p,
.alert-item p {
    color: var(--text-soft);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.84rem;
    font-weight: 700;
}

.pill.ok {
    background: var(--mint-soft);
    color: var(--mint);
}

.pill.warn {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warn);
}

.pill.danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.pill.primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.pill.ghost {
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-strong);
}

.action-menu-trigger.pill {
    cursor: pointer;
    box-shadow: none;
}

.action-menu-trigger.pill.ghost {
    border-color: rgba(37, 99, 235, 0.08);
    background: rgba(37, 99, 235, 0.07);
}

.action-menu-trigger.pill.ghost:hover,
.action-menu-trigger.pill.ghost:focus-visible,
.action-menu.is-open .action-menu-trigger.pill.ghost {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.14);
    color: var(--brand-strong);
    outline: none;
}

.server-summary,
.management-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.server-summary span,
.server-summary a,
.management-meta div {
    padding: 14px;
    border-radius: 16px;
    background: var(--panel-strong);
    border: 1px solid rgba(113, 137, 182, 0.12);
    color: var(--text-soft);
    box-shadow: var(--shadow-soft);
}

.server-summary a {
    color: var(--brand-strong);
    font-weight: 600;
}

.management-meta span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
}

.management-meta strong {
    font-size: 1.25rem;
}

.management-meta strong.metric-emphasis {
    font-size: 1.38rem;
}

.site-list {
    display: grid;
    gap: 12px;
}

.site-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid rgba(113, 137, 182, 0.12);
    box-shadow: var(--shadow-soft);
}

.site-row strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.site-danger {
    border-color: rgba(239, 68, 68, 0.22);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 14px 34px rgba(239, 68, 68, 0.08);
}

.site-danger::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(239, 68, 68, 1), rgba(249, 115, 22, 0.72));
}

.site-empty {
    border-style: dashed;
    background: linear-gradient(180deg, rgba(245, 248, 255, 0.96), rgba(255, 255, 255, 0.96));
}

.site-metrics {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-soft);
    font-size: 0.9rem;
    align-items: center;
}

.state-text {
    font-weight: 700;
    color: var(--text);
}

.state-text.is-danger {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.alert-list {
    display: grid;
    gap: 14px;
}

.alert-item {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    align-items: start;
    padding: 18px 20px;
    border-radius: 22px;
}

.alert-time {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--brand-strong);
    font-weight: 700;
}

.alert-item p {
    margin-top: 6px;
}

.tag-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.site-tag {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-strong);
    font-size: 0.9rem;
}

.site-tag.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.shell.sidebar-collapsed .brand-copy,
.shell.sidebar-collapsed .nav-group,
.shell.sidebar-collapsed .nav-text,
.shell.sidebar-collapsed .status-panel {
    opacity: 0;
    visibility: hidden;
    display: none;
}

.shell.sidebar-collapsed .brand-row {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.shell.sidebar-collapsed .sidebar-glow {
    top: -80px;
    left: -30px;
}

.shell.sidebar-collapsed .brand {
    justify-content: center;
    width: 100%;
}

.shell.sidebar-collapsed .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 15px;
}

.shell.sidebar-collapsed .sidebar-toggle {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

.shell.sidebar-collapsed .nav-link {
    width: 56px;
    min-height: 56px;
    justify-content: center;
    padding: 0;
    margin-inline: auto;
    border-radius: 20px;
}

.shell.sidebar-collapsed .nav-link:hover,
.shell.sidebar-collapsed .nav-link.active {
    transform: none;
}

.shell.sidebar-collapsed .sidebar {
    padding: 18px 10px 16px;
}

.shell.sidebar-collapsed .sidebar-head,
.shell.sidebar-collapsed .sidebar-body {
    width: 100%;
}

.shell.sidebar-collapsed .sidebar-head {
    display: grid;
    justify-items: center;
}

.shell.sidebar-collapsed .sidebar-body {
    padding-right: 0;
    margin-right: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.shell.sidebar-collapsed .nav {
    width: 100%;
    justify-items: center;
    gap: 10px;
}

.shell.sidebar-collapsed .nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    font-size: 0.84rem;
}

.shell.sidebar-collapsed .nav-link::before {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.2), rgba(16, 185, 129, 0.08));
}

.shell.sidebar-collapsed .nav-link.active {
    border-color: rgba(111, 146, 255, 0.24);
    background: rgba(255, 255, 255, 0.02);
}

.shell.sidebar-collapsed .nav-link.active .nav-icon {
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1200;
    display: grid;
    gap: 12px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast-card {
    position: relative;
    overflow: hidden;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(113, 137, 182, 0.18);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(22px);
    box-shadow: 0 22px 44px rgba(17, 30, 66, 0.18);
    animation: toast-in 220ms ease;
}

.toast-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--brand);
}

.toast-card.toast-success::before {
    background: var(--mint);
}

.toast-card.toast-error::before {
    background: var(--danger);
}

.toast-title {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.toast-message {
    color: var(--text-soft);
    line-height: 1.55;
}

.toast-card.is-leaving {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transition: opacity 220ms ease, transform 220ms ease;
}

.progress-hud,
.confirm-layer {
    position: fixed;
    inset: 0;
    z-index: 1300;
    pointer-events: none;
}

.progress-hud {
    display: grid;
    place-items: end right;
    padding: 24px;
}

.progress-card {
    width: min(380px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(9, 22, 45, 0.92);
    color: #f4f8ff;
    border: 1px solid rgba(130, 166, 255, 0.18);
    box-shadow: 0 26px 60px rgba(5, 16, 32, 0.34);
    transform: translateY(12px);
    opacity: 0;
    transition: opacity 220ms ease, transform 220ms ease;
}

.progress-hud.is-visible .progress-card {
    opacity: 1;
    transform: translateY(0);
}

.progress-orbit {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top-color: #7dd3fc;
    animation: spin 960ms linear infinite;
    flex: 0 0 auto;
}

.progress-orbit::after {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.9), rgba(96, 165, 250, 0.16));
}

.progress-copy {
    min-width: 0;
}

.progress-title {
    display: block;
    margin-bottom: 6px;
    color: #fff;
}

.progress-message {
    color: rgba(231, 239, 255, 0.78);
    line-height: 1.55;
}

.confirm-layer.is-visible {
    pointer-events: auto;
}

.confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 16, 32, 0.46);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 220ms ease;
}

.confirm-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(460px, calc(100vw - 28px));
    padding: 24px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(113, 137, 182, 0.14);
    box-shadow: 0 30px 70px rgba(17, 30, 66, 0.26);
    transform: translate(-50%, -46%) scale(0.98);
    opacity: 0;
    transition: opacity 220ms ease, transform 220ms ease;
}

.confirm-layer.is-visible .confirm-backdrop {
    opacity: 1;
}

.confirm-layer.is-visible .confirm-card {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.confirm-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #7387aa;
}

.confirm-title {
    margin-top: 10px;
    font-size: 1.62rem;
}

.confirm-message {
    margin-top: 12px;
    color: var(--text-soft);
    line-height: 1.7;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.is-fresh {
    animation: card-fresh 380ms ease both;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes panelReveal {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes card-fresh {
    from {
        opacity: 0;
        transform: translateY(10px);
        box-shadow: 0 0 0 rgba(37, 99, 235, 0);
    }

    50% {
        box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08), 0 18px 48px rgba(37, 99, 235, 0.08);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        box-shadow: var(--shadow);
    }
}

@media (max-width: 1180px) {
    .stats-grid,
    .server-grid,
    .management-grid {
        grid-template-columns: 1fr;
    }

    .server-summary,
    .dashboard-summary,
    .management-meta,
    .server-form,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: 360px;
    }

    .install-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .shell,
    .shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        align-self: stretch;
        height: auto;
        min-height: auto;
    }

    .sidebar-body {
        overflow: visible;
        padding-right: 0;
        margin-right: 0;
    }

    .shell.sidebar-collapsed .brand-copy,
    .shell.sidebar-collapsed .nav-group,
    .shell.sidebar-collapsed .nav-text,
    .shell.sidebar-collapsed .status-panel {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .shell.sidebar-collapsed .brand-row,
    .shell.sidebar-collapsed .brand,
    .shell.sidebar-collapsed .nav-link {
        justify-content: flex-start;
        flex-direction: row;
    }

    .shell.sidebar-collapsed .sidebar {
        position: fixed;
        top: 12px;
        left: 12px;
        right: 12px;
        z-index: 90;
        grid-template-rows: auto;
        gap: 0;
        height: auto;
        min-height: 0;
        padding: 12px 14px;
        border-radius: 22px;
        border: 1px solid rgba(141, 171, 255, 0.16);
        box-shadow: 0 18px 42px rgba(5, 16, 32, 0.22);
        backdrop-filter: blur(20px);
    }

    .shell.sidebar-collapsed .sidebar-head {
        padding: 0;
    }

    .shell.sidebar-collapsed .sidebar-body,
    .shell.sidebar-collapsed .status-panel {
        display: none;
    }

    .shell.sidebar-collapsed .brand-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .shell.sidebar-collapsed .brand {
        min-width: 0;
        flex: 1 1 auto;
    }

    .shell.sidebar-collapsed .sidebar-toggle {
        width: 38px;
        height: 38px;
    }

    .shell.sidebar-collapsed .content {
        padding-top: 98px;
    }

    .table-shell {
        overflow: visible;
        border: 0;
        background: transparent;
        border-radius: 0;
    }

    .site-table {
        min-width: 0;
        display: block;
    }

    .site-table thead {
        display: none;
    }

    .site-table tbody {
        display: grid;
        gap: 14px;
    }

    .site-table tbody tr {
        display: grid;
        gap: 10px;
        padding: 16px;
        border-radius: 22px;
        border: 1px solid rgba(113, 137, 182, 0.12);
        background: rgba(255, 255, 255, 0.86);
        box-shadow: var(--shadow-soft);
    }

    .site-table tbody td {
        display: grid;
        gap: 6px;
        padding: 0;
        border-bottom: 0;
    }

    .site-table tbody td::before {
        content: attr(data-label);
        color: var(--text-soft);
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .site-table tbody td:last-child {
        padding-bottom: 0;
    }

    .site-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.9);
    }

    .site-table tbody td[data-label="操作"] {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }

    .site-table tbody td[data-label="操作"]::before {
        width: 100%;
    }

    .site-table tbody td[data-label="操作"] form {
        margin: 0;
    }

    .settings-command {
        padding: 12px 14px;
    }

    .topbar,
    .hero-panel,
    .section-head,
    .form-card-head,
    .site-row,
    .auth-panel-head {
        flex-direction: column;
        align-items: start;
    }

    .topbar-side {
        width: 100%;
        justify-content: flex-start;
    }

    .content {
        padding: 18px;
    }

    .toast-stack {
        top: 18px;
        right: 18px;
        width: min(340px, calc(100vw - 24px));
    }

    .progress-hud {
        padding: 18px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-shell {
        gap: 18px;
        padding: 18px;
    }

    .auth-hero,
    .auth-panel {
        border-radius: 26px;
    }

    .auth-hero,
    .auth-panel {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .alert-item {
        grid-template-columns: 1fr;
    }

    .confirm-actions {
        justify-content: stretch;
    }

    .confirm-actions .button {
        width: 100%;
    }
}
