:root {
    --bg: #07100c;
    --bg-2: #0b1711;
    --panel: rgba(13, 24, 18, 0.78);
    --panel-strong: rgba(16, 31, 23, 0.94);
    --panel-soft: rgba(255, 255, 255, 0.045);
    --border: rgba(167, 243, 208, 0.16);
    --border-strong: rgba(134, 239, 172, 0.28);
    --text: #f2fff7;
    --muted: #a9bdb1;
    --accent: #5dfc8d;
    --accent-dark: #18a957;
    --accent-2: #f8c35f;
    --accent-3: #58d7ff;
    --danger: #ff6b5c;
    --warning: #f5ad42;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --shadow-soft: 0 14px 32px rgba(0, 0, 0, 0.24);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 15px;
    --sidebar-width: 292px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    background:
        linear-gradient(120deg, rgba(4, 12, 8, 0.58), rgba(5, 14, 10, 0.52)),
    radial-gradient(circle at 12% 8%, rgba(93, 252, 141, 0.16), transparent 25%),
    radial-gradient(circle at 88% 10%, rgba(88, 215, 255, 0.12), transparent 28%),
    radial-gradient(circle at 65% 85%, rgba(248, 195, 95, 0.1), transparent 24%),
    url("/static/img/minecraft_vps_hero.png") center center / cover no-repeat fixed,
        linear-gradient(135deg, #06100b 0%, #0b1711 45%, #06100c 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.11;
    background-image:
        linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a { color: inherit; }
button { cursor: pointer; font: inherit; }
code { color: #bdfbd0; }

.app-body { overflow-x: hidden; }
.page-shell {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 20px 22px 34px 20px;
}

.ambient {
    position: fixed;
    border-radius: 999px;
    filter: blur(16px);
    opacity: 0.9;
    pointer-events: none;
}
.ambient-one { top: -150px; right: -110px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(93, 252, 141, 0.22), transparent 68%); }
.ambient-two { bottom: -120px; left: 15%; width: 380px; height: 380px; background: radial-gradient(circle, rgba(88, 215, 255, 0.13), transparent 65%); }
.ambient-three { top: 35%; right: 16%; width: 230px; height: 230px; background: radial-gradient(circle, rgba(248, 195, 95, 0.11), transparent 68%); }

.sidebar {
    position: sticky;
    top: 20px;
    width: var(--sidebar-width);
    padding: 22px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(21, 40, 29, 0.92), rgba(7, 14, 10, 0.88)),
        rgba(9, 18, 13, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 22px;
    z-index: 5;
    scrollbar-width: thin;
    scrollbar-color: rgba(167, 243, 208, 0.18) rgba(255, 255, 255, 0.03);
}
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(167, 243, 208, 0.18);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 243, 208, 0.28);
}

.brand-block {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(167, 243, 208, 0.11);
}

.brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #06100c;
    font-weight: 950;
    letter-spacing: -0.05em;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.58), transparent 35%),
        linear-gradient(135deg, var(--accent), #19c66a 55%, #0b8b4b);
    box-shadow: 0 16px 32px rgba(31, 216, 107, 0.22);
}

.big-mark {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    font-size: 1.2rem;
}

.brand-block h1,
.hero-copy h3,
.login-hero h1,
.login-card h2,
.card h2,
.topbar h2 { margin: 0; }

.brand-block h1 {
    font-size: 1.58rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.brand-copy,
.muted,
small,
.topbar span,
.hero-points span,
.hero-stat small { color: var(--muted); }
.brand-copy { margin: 6px 0 0; font-size: 0.88rem; line-height: 1.45; }

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-2);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sidebar-nav { display: grid; gap: 9px; }
.sidebar-nav a,
.sidebar-submenu-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: #dceee3;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid transparent;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.sidebar-submenu-toggle {
    cursor: default;
    font: inherit;
    text-align: left;
}
.sidebar-nav a span,
.sidebar-submenu-toggle span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #c8fbd6;
    background: rgba(93, 252, 141, 0.08);
}
.sidebar-nav a:hover,
.sidebar-submenu:hover .sidebar-submenu-toggle,
.sidebar-submenu:focus-within .sidebar-submenu-toggle {
    transform: translateX(4px);
    color: #ffffff;
    background: rgba(93, 252, 141, 0.09);
    border-color: rgba(93, 252, 141, 0.16);
}
.sidebar-nav a.active,
.sidebar-submenu.is-open .sidebar-submenu-toggle,
.sidebar-submenu.is-active .sidebar-submenu-toggle {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(93, 252, 141, 0.22), rgba(88, 215, 255, 0.08));
    border-color: var(--border-strong);
    box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar-submenu {
    position: relative;
}
.sidebar-submenu-toggle::after {
    content: ">";
    margin-left: auto;
    color: #9bc9ac;
    font-size: 0.86rem;
    transition: transform .18s ease, color .18s ease;
}
.sidebar-submenu.is-open .sidebar-submenu-toggle::after {
    color: #ffffff;
    transform: rotate(90deg);
}
.sidebar-submenu-panel {
    position: absolute;
    width: 220px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(167, 243, 208, 0.16);
    background:
        linear-gradient(180deg, rgba(18, 33, 24, 0.96), rgba(8, 15, 11, 0.94)),
        rgba(9, 18, 13, 0.76);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
    display: grid;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 8;
}
.sidebar-submenu-floating {
    position: fixed;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(167, 243, 208, 0.16);
    background:
        linear-gradient(180deg, rgba(18, 33, 24, 0.96), rgba(8, 15, 11, 0.94)),
        rgba(9, 18, 13, 0.76);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
    display: grid;
    gap: 8px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(167, 243, 208, 0.18) rgba(255, 255, 255, 0.03);
    z-index: 30;
}
.sidebar-submenu-floating[hidden] {
    display: none;
}
.sidebar-submenu-floating::-webkit-scrollbar {
    width: 8px;
}
.sidebar-submenu-floating::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}
.sidebar-submenu-floating::-webkit-scrollbar-thumb {
    background: rgba(167, 243, 208, 0.18);
    border-radius: 999px;
}
.sidebar-submenu-floating::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 243, 208, 0.28);
}
.sidebar-submenu-floating a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: #dceee3;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid transparent;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.sidebar-submenu-floating a span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #c8fbd6;
    background: rgba(93, 252, 141, 0.08);
}
.sidebar-submenu-floating a:hover {
    transform: translateX(4px);
    color: #ffffff;
    background: rgba(93, 252, 141, 0.09);
    border-color: rgba(93, 252, 141, 0.16);
}
.sidebar-submenu-floating a.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(93, 252, 141, 0.22), rgba(88, 215, 255, 0.08));
    border-color: var(--border-strong);
    box-shadow: inset 3px 0 0 var(--accent);
}
@media (min-width: 1121px) {
    .sidebar-submenu-panel {
        display: none !important;
    }
}
.logout-link { margin-top: 8px; color: #ffd5cf !important; }

.sidebar-footer,
.topbar-badge {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #dffbea;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.075);
}
.pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(93, 252, 141, 0.12);
}

.content-shell {
    flex: 1;
    min-width: 0;
    min-height: calc(100vh - 54px);
    padding: 0;
}
.topbar {
    min-height: 112px;
    padding: 26px 30px 18px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}
.topbar h2 {
    font-size: clamp(1.85rem, 3vw, 2.85rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}
.topbar-badge { margin: 0; white-space: nowrap; }
.container { width: 100%; max-width: none; margin: 0; padding: 0 30px 42px; }

.hero-panel,
.card,
.login-panel {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}
.hero-panel {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    padding: 26px;
    border-radius: var(--radius-xl);
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, rgba(93, 252, 141, 0.15), rgba(88, 215, 255, 0.08)),
        rgba(12, 25, 18, 0.82);
    overflow: hidden;
    position: relative;
}
.hero-panel::after {
    content: "";
    position: absolute;
    right: -50px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 54px;
    transform: rotate(18deg);
    background: linear-gradient(135deg, rgba(93, 252, 141, 0.16), rgba(248, 195, 95, 0.08));
}
.hero-copy { display: grid; gap: 12px; align-content: center; position: relative; z-index: 1; }
.hero-copy h3 {
    font-size: clamp(1.85rem, 3vw, 3.05rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
    max-width: 15ch;
}
.hero-grid { display: grid; gap: 14px; position: relative; z-index: 1; }
.hero-grid-info { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.hero-stat,
.hero-points div {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(2, 8, 5, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.085);
}
.hero-stat { min-height: 122px; display: flex; flex-direction: column; justify-content: center; }
.hero-stat-address { grid-column: 1 / -1; }
.hero-stat span {
    display: block;
    color: #9bf7bb;
    margin-bottom: 9px;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    font-weight: 800;
}
.hero-stat strong,
.hero-points strong { display: block; margin-bottom: 4px; }
.hero-stat strong { font-size: 1.26rem; word-break: break-word; }

.dashboard-section { margin-bottom: 18px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.metric-card { margin-bottom: 0; min-height: 168px; display: flex; flex-direction: column; justify-content: space-between; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr); gap: 18px; margin-bottom: 18px; }
.players-card { align-self: start; }
.stack,
.command-list { display: grid; gap: 18px; }

.card {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045), transparent),
        var(--panel);
    padding: 21px;
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
}
.card h2 { color: #f8fff9; margin-bottom: 16px; letter-spacing: -0.025em; }
.script-risk-warning {
    margin: 10px 0 18px;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid rgba(245, 173, 66, 0.44);
    background:
        linear-gradient(135deg, rgba(245, 173, 66, 0.18), rgba(255, 107, 92, 0.12)),
        rgba(27, 12, 8, 0.66);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.script-risk-warning strong {
    display: block;
    margin-bottom: 7px;
    color: #ffd79c;
    letter-spacing: 0.01em;
}
.script-risk-warning p {
    margin: 0;
    color: #ffe7c2;
    line-height: 1.45;
}
.script-risk-warning p + p {
    margin-top: 8px;
}
.script-risk-warning code {
    color: #ffd79c;
    font-weight: 700;
}
.highlight-card {
    background:
        linear-gradient(145deg, rgba(93, 252, 141, 0.14), rgba(88, 215, 255, 0.065)),
        var(--panel-strong);
}
.controls-card .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.controls-card .actions form,
.controls-card .actions .btn { width: 100%; }
.controls-card .actions .btn { justify-content: center; }

.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.big { font-size: 2.32rem; font-weight: 900; margin: 6px 0 10px; letter-spacing: -0.05em; }
.status { font-size: 2rem; font-weight: 900; margin: 6px 0 10px; }
.online { color: var(--accent); }
.offline { color: var(--danger); }

.meter { width: 100%; height: 10px; margin-top: 14px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 18px rgba(93, 252, 141, 0.32); }

label { display: block; margin: 16px 0 8px; color: #e2efe7; font-weight: 750; }
input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(167, 243, 208, 0.14);
    background: rgba(2, 8, 5, 0.62);
    color: #fff;
    border-radius: 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus,
select:focus,
textarea:focus { border-color: rgba(93, 252, 141, 0.58); box-shadow: 0 0 0 4px rgba(93, 252, 141, 0.11); background: rgba(3, 10, 7, 0.82); }
input[type="file"] { padding: 16px; }
textarea.editor { min-height: 70vh; font-family: Consolas, "Courier New", monospace; line-height: 1.55; white-space: pre; resize: vertical; }

.login-card button,
.btn {
    border: none;
    border-radius: 14px;
    padding: 13px 22px;
    color: #06100c;
    font-weight: 850;
    text-decoration: none;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.login-card button:hover,
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.start { background: linear-gradient(135deg, var(--accent), #23c86d); box-shadow: 0 12px 24px rgba(35, 200, 109, 0.18); }
.stop { background: linear-gradient(135deg, #ff8a78, #e04d3e); color: #fff; box-shadow: 0 12px 24px rgba(224, 77, 62, 0.16); }
.restart { background: linear-gradient(135deg, #ffd27b, #e59b37); box-shadow: 0 12px 24px rgba(229, 155, 55, 0.16); }
.save { background: linear-gradient(135deg, #78e7ff, #38c7a7); box-shadow: 0 12px 24px rgba(56, 199, 167, 0.16); }
.btn-small { padding: 9px 14px; border-radius: 11px; font-size: 0.92rem; }

.actions,
.inline-form,
.console-form,
.upload-form,
.action-row { display: flex; gap: 12px; flex-wrap: wrap; }
.inline-form input,
.console-form input,
.upload-form input { flex: 1 1 260px; }

.logs {
    margin: 0;
    background: rgba(1, 5, 3, 0.82);
    color: #d8e6dc;
    padding: 20px;
    border-radius: 16px;
    overflow: auto;
    height: 420px;
    white-space: pre-wrap;
    border: 1px solid rgba(167, 243, 208, 0.11);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025);
}
.logs.full { height: 75vh; }

.alert { background: rgba(255, 107, 92, 0.13); border: 1px solid rgba(255, 107, 92, 0.30); color: #ffd8d3; padding: 14px 16px; border-radius: 16px; margin-bottom: 18px; }
.alert p { margin: 0; }
.alert.success {
    background: rgba(93, 252, 141, 0.13);
    border-color: rgba(93, 252, 141, 0.30);
    color: #dbffe8;
}
.alert.error {
    background: rgba(255, 107, 92, 0.13);
    border-color: rgba(255, 107, 92, 0.30);
    color: #ffd8d3;
}
.empty-state { margin: 0; padding: 18px; border-radius: 16px; background: rgba(255,255,255,0.035); border: 1px dashed rgba(167, 243, 208, 0.18); color: var(--muted); }
.broadcast-status { display: inline-block; margin-top: 4px; }
.broadcast-status-success { color: #5dfc8d; }
.broadcast-status-running { color: #f8c35f; }
.broadcast-status-error { color: #ff8f8f; }
.broadcast-status-disabled { color: #9fb2a7; }
.broadcast-status-idle { color: var(--muted); }

.player-list { margin: 0; padding-left: 20px; }
.player-grid { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.player-grid li { padding: 14px 16px; border-radius: 14px; background: rgba(2,8,5,0.46); border: 1px solid rgba(255,255,255,0.065); color: #eafaf0; }

.table-wrap,
table { width: 100%; }
table { border-collapse: collapse; overflow: hidden; }
th, td { padding: 14px 12px; border-bottom: 1px solid rgba(167, 243, 208, 0.10); text-align: left; vertical-align: middle; }
th { color: #d0e5d7; background: rgba(255,255,255,0.045); font-size: 0.84rem; }
td { color: #eefaf2; }
.table-link { color: #8dfad6; text-decoration: none; font-weight: 800; }
.table-link:hover { color: #d7fff3; }
.table-action { background: transparent; border: none; padding: 0; font: inherit; }
.danger-link { color: #ffaaa1; }
.danger-link:hover { color: #ffe0dc; }

.badge { padding: 8px 12px; border-radius: 999px; background: rgba(248,195,95,0.12); border: 1px solid rgba(248,195,95,0.22); color: #ffe5b6; font-size: 0.88rem; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 999px; font-size: 0.85rem; font-weight: 800; }
.status-enabled { background: rgba(93,252,141,0.14); border: 1px solid rgba(93,252,141,0.24); color: #cbffd9; }
.status-disabled { background: rgba(245,173,66,0.14); border: 1px solid rgba(245,173,66,0.24); color: #ffe2ac; }
.command-list code { background: rgba(1,5,3,0.82); padding: 12px; border-radius: 12px; color: #befbd1; border: 1px solid rgba(93,252,141,0.12); }

.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; overflow: hidden; }
.login-bg-slideshow { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.login-bg-slideshow::after { content: ""; position: absolute; inset: 0; background: rgba(6, 14, 10, var(--login-overlay-opacity, 0.58)); }
.login-bg-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .85s ease; background-position: center; background-repeat: no-repeat; background-size: cover; }
.login-bg-slide.is-active { opacity: 1; }
.login-bg-grid { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.2; background-image: linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px); background-size: 46px 46px; }
.login-panel { position: relative; z-index: 2; width: min(1120px, 100%); display: grid; grid-template-columns: 1.08fr .92fr; border-radius: 30px; overflow: hidden; background: rgba(7, 15, 10, 0.14); }
.login-panel-single { width: min(520px, 100%); grid-template-columns: 1fr; }
.login-toast-stack {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 4;
    width: min(440px, calc(100% - 32px));
    display: grid;
    gap: 10px;
    transform: translateX(-50%);
    pointer-events: none;
}
.login-toast {
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 107, 92, 0.34);
    color: #ffe4df;
    background:
        linear-gradient(135deg, rgba(255, 107, 92, 0.20), rgba(14, 25, 20, 0.72)),
        rgba(9, 18, 13, 0.80);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(18px);
    animation: login-toast-enter .28s ease;
}
.login-toast p { margin: 0; font-weight: 700; }
.login-toast.is-hiding {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity .32s ease, transform .32s ease;
}
.login-toast-error::before {
    content: "Acesso negado";
    display: block;
    margin-bottom: 4px;
    color: #ffb6ad;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.login-hero,
.login-card { padding: 48px; }
.login-hero { background: linear-gradient(145deg, rgba(93,252,141,.06), rgba(88,215,255,.018)), linear-gradient(180deg, rgba(12,25,18,.13), rgba(7,15,10,.22)); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.login-hero h1 { font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.01; letter-spacing: -0.07em; max-width: 12ch; }
.login-hero p { margin: 0; max-width: 44ch; color: #dfeee4; }
.hero-points { display: grid; gap: 14px; margin-top: 8px; }
.login-card { background: rgba(9, 18, 13, 0.18); }
.login-card .muted { margin-bottom: 18px; }
.login-card button { width: 100%; margin-top: 22px; background: linear-gradient(135deg, var(--accent), #23c86d); box-shadow: 0 16px 30px rgba(35, 200, 109, 0.2); }

@keyframes login-toast-enter {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.backups-page .container { display: grid; gap: 18px; }
.users-page .container { display: grid; gap: 18px; }
.users-form-grid { display: grid; gap: 12px; }
.users-pages-block { margin-top: 8px; }
.users-pages-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.users-check-item { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(167, 243, 208, 0.12); background: rgba(2, 8, 5, 0.36); }
.users-check-item input { width: auto; margin: 0; }
.users-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.users-item { padding: 16px; border-radius: 16px; border: 1px solid rgba(167, 243, 208, 0.12); background: rgba(2, 8, 5, 0.36); display: grid; gap: 12px; }
.users-item-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.users-item-form { display: grid; gap: 8px; }
.users-item-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.login-bg-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.login-bg-gallery-preview { margin-top: 6px; }
.login-bg-card,
.login-bg-manage-card {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(167, 243, 208, 0.14);
    background: rgba(2, 8, 5, 0.38);
    display: grid;
    gap: 12px;
}
.login-bg-card { cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.login-bg-card:hover {
    transform: translateY(-2px);
    border-color: rgba(93, 252, 141, 0.28);
    background: rgba(5, 15, 10, 0.48);
}
.login-bg-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.login-bg-card-body { display: grid; gap: 4px; }
.login-bg-card-title {
    display: block;
    color: #f4fff8;
    font-weight: 800;
    word-break: break-word;
}
.login-bg-card-meta { color: var(--muted); font-size: 0.92rem; }
.login-bg-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    justify-self: start;
}
.range-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(120, 231, 255, 0.95), rgba(93, 252, 141, 0.95));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.range-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 999px;
    background: transparent;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin-top: -6px;
    border: 2px solid rgba(6, 16, 11, 0.82);
    border-radius: 50%;
    background: #f4fff8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}
.range-slider::-moz-range-track {
    height: 10px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(120, 231, 255, 0.95), rgba(93, 252, 141, 0.95));
}
.range-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(6, 16, 11, 0.82);
    border-radius: 50%;
    background: #f4fff8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}
.range-value {
    min-width: 74px;
    padding: 10px 12px;
    border-radius: 12px;
    text-align: center;
    color: #f4fff8;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(167, 243, 208, 0.14);
}
.backups-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: stretch; margin-bottom: 0; }
.backups-hero-copy { display: grid; align-content: center; gap: 10px; }
.backups-hero-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.35rem); line-height: 1.06; letter-spacing: -0.045em; max-width: 20ch; margin: 0; }
.backups-hero-copy .muted { margin: 0; max-width: 50ch; }
.backups-hero-stats { display: grid; gap: 12px; }
.backups-hero-stats div { padding: 18px; border-radius: 16px; background: rgba(2,8,5,0.36); border: 1px solid rgba(255,255,255,0.085); }
.backups-hero-stats span { display: block; color: #9bf7bb; text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; margin-bottom: 8px; font-weight: 800; }
.backups-hero-stats strong { display: block; font-size: 1.28rem; color: #f5fff8; }
.backups-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.backup-action-card { margin-bottom: 0; }
.backup-action-card .muted { margin: 0 0 16px; }
.backup-form-stack { display: grid; gap: 10px; }
.backup-form-stack label { margin-top: 0; }
.backup-form-stack .btn { width: fit-content; min-width: 170px; }
.backups-list-card { margin-bottom: 0; }
.backups-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid rgba(167,243,208,.12); background: rgba(2,8,5,.36); }
.backups-table { min-width: 720px; }
.backups-table .backup-name { max-width: 320px; font-weight: 850; color: #f8fff9; word-break: break-word; }
.backup-empty-state { display: grid; gap: 6px; }
.backup-empty-state p { margin: 0; }

@media (max-width: 1120px) {
    .page-shell { display: block; padding: 0; }
    .sidebar { position: static; width: auto; margin: 18px 18px 0; max-height: none; }
    .content-shell { margin-left: 0; min-height: 100vh; padding: 0 18px 30px; }
    .topbar, .container { padding-left: 0; padding-right: 0; }
    .sidebar-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sidebar-submenu-panel {
        position: static;
        width: 100%;
        margin-top: 8px;
        padding: 8px 0 0;
        border: none;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    .sidebar-submenu.is-open .sidebar-submenu-panel { display: grid; }
    .sidebar-footer { display: none; }
    .hero-panel, .split-layout, .login-panel, .backups-hero, .backups-actions-grid, .users-list-grid, .login-bg-gallery { grid-template-columns: 1fr; }
    .users-pages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 740px) {
    body { background-attachment: fixed; }
    .login-body { padding: 16px; }
    .page-shell { padding: 0; }
    .sidebar { padding: 16px; border-radius: 22px; }
    .brand-block { grid-template-columns: 46px 1fr; }
    .brand-mark { width: 46px; height: 46px; border-radius: 15px; }
    .sidebar-nav { grid-template-columns: 1fr 1fr; }
    .sidebar-nav a,
    .sidebar-submenu-toggle { padding: 12px; font-size: .94rem; }
    .topbar { align-items: flex-start; flex-direction: column; padding-top: 18px; min-height: auto; }
    .topbar-badge { display: none; }
    .hero-grid-info, .metric-grid { grid-template-columns: 1fr; }
    .users-pages-grid { grid-template-columns: 1fr; }
    .hero-stat-address { grid-column: auto; }
    .hero-panel, .card, .login-hero, .login-card { padding: 20px; }
    .controls-card .actions { grid-template-columns: 1fr; }
    .range-control { grid-template-columns: 1fr; }
    .inline-form, .console-form, .upload-form { flex-direction: column; }
    .backup-form-stack .btn { width: 100%; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .login-hero h1 { max-width: none; }
}
