[hidden] { display: none !important; }

:root {
    --bg: #0a0d14;
    --bg-soft: #0f1420;
    --panel: #121828;
    --panel-2: #161e30;
    --line: #232d42;
    --line-soft: #1a2233;
    --text: #e8eefb;
    --muted: #8d9cb5;
    --accent: #5865f2;
    --accent-2: #8b5cf6;
    --green: #3fb950;
    --red: #f85149;
    --amber: #d29922;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.02em; }

p { margin: 0 0 12px; }

.mono { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ============================== КНОПКИ ============================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 24px rgba(88, 101, 242, 0.32);
}

.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: #33405c; background: rgba(255, 255, 255, 0.03); }
.btn-danger { background: rgba(248, 81, 73, 0.12); color: #ff9089; border-color: rgba(248, 81, 73, 0.35); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-icon { width: 35px; height: 35px; padding: 0; }
.btn-icon svg { width: 18px; height: 18px; }

/* ============================== САЙТ ============================== */
.site { position: relative; overflow-x: hidden; }

.bg-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(700px 420px at 12% -8%, rgba(88, 101, 242, 0.28), transparent 65%),
        radial-gradient(620px 380px at 92% 4%, rgba(139, 92, 246, 0.2), transparent 62%),
        radial-gradient(900px 500px at 50% 110%, rgba(63, 185, 80, 0.07), transparent 70%);
    z-index: 0;
}

.site::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(circle at 50% 0%, black, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

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

.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(10, 13, 20, 0.72);
    border-bottom: 1px solid rgba(35, 45, 66, 0.7);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav.is-scrolled {
    background: rgba(10, 13, 20, 0.93);
    border-bottom-color: rgba(88, 101, 242, 0.3);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
}

.nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.35);
}

.brand-logo svg { width: 19px; height: 19px; }

.nav-links { display: flex; gap: 22px; margin-left: 10px; font-size: 14px; color: #98a29e; }
.nav-links a:hover { color: #f2f1e9; }
.nav-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.maintenance-bar { background: rgba(210, 153, 34, 0.12); border-bottom: 1px solid rgba(210, 153, 34, 0.38); color: #f0c85a; }
.maintenance-inner { max-width: 1180px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.maintenance-inner strong { text-transform: uppercase; font-size: 11.5px; letter-spacing: 0.08em; }
.maintenance-inner .muted { color: #c9a95c; }

.hero { max-width: 1180px; margin: 0 auto; padding: 76px 24px 40px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }

.hero h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -0.035em; }
.hero h1 span { background: linear-gradient(120deg, #8ea1ff, #c4a7ff 55%, #7ee2a8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 17px; max-width: 520px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }


.hero-art { background: linear-gradient(180deg, rgba(22, 30, 48, 0.95), rgba(15, 20, 32, 0.95)); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.hero-art-head { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.hero-art-title { margin-left: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); margin-bottom: 8px; border: 1px solid transparent; }
.mock-row:last-child { margin-bottom: 0; }
.mock-row > div:first-child { min-width: 0; }
.mock-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-count { font-size: 13px; font-weight: 700; color: #7ee2a8; white-space: nowrap; }
.mock-count.muted { color: var(--muted); }

.stats-strip { max-width: 1180px; margin: 8px auto 0; padding: 0 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { background: rgba(18, 24, 40, 0.8); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.section { max-width: 1180px; margin: 0 auto; padding: 72px 24px 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 6px; }
.section-head p { color: var(--muted); margin: 0; max-width: 520px; }

.servers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.server-card { background: linear-gradient(180deg, #10141a, #0c0f13); border: 1px solid rgba(242, 241, 233, 0.09); border-radius: var(--radius); padding: 18px; transition: border-color 0.15s ease, transform 0.15s ease; }
.server-card:hover { border-color: rgba(201, 245, 107, 0.22); transform: translateY(-2px); }
.server-head { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.server-name { font-weight: 650; font-size: 15px; word-break: break-word; }
.server-address { font-size: 12px; color: #6b7571; margin-top: 2px; }

.chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(201, 245, 107, 0.1); color: #c9f56b; border: 1px solid rgba(201, 245, 107, 0.18); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }

.server-status { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; margin: 14px 0 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4a5a78; }
.status-dot.online { background: var(--green); box-shadow: 0 0 9px rgba(63, 185, 80, 0.7); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 9px rgba(248, 81, 73, 0.5); }
.status-online { color: #7ee2a8; }
.status-offline { color: #ff9089; }
.status-unknown { color: var(--muted); }

.progress { height: 6px; border-radius: 999px; background: #1c2537; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3fb950, #7ee2a8); transition: width 0.4s ease; }
.server-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; gap: 10px; flex-wrap: wrap; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.feature { background: linear-gradient(180deg, #10141a, #0c0f13); border: 1px solid rgba(242, 241, 233, 0.09); border-radius: var(--radius); padding: 22px; }
.feature-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(201, 245, 107, 0.1); border: 1px solid rgba(201, 245, 107, 0.2); margin-bottom: 14px; }
.feature-icon svg { width: 20px; height: 20px; fill: none; stroke: #c9f56b; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { color: #98a29e; font-size: 14px; margin: 0; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; align-items: stretch; }
.price-card { background: linear-gradient(180deg, #10141a, #0c0f13); border: 1px solid rgba(242, 241, 233, 0.09); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.price-card.featured { border-color: rgba(201, 245, 107, 0.34); background: linear-gradient(180deg, rgba(201, 245, 107, 0.1), #0c0f13); box-shadow: 0 20px 50px rgba(201, 245, 107, 0.14); }
.price-name { font-size: 14px; font-weight: 700; color: #c9f56b; text-transform: uppercase; letter-spacing: 0.08em; }
.price-amount { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin: 10px 0 2px; }
.price-amount small { font-size: 14px; font-weight: 500; color: var(--muted); }
.price-list { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; font-size: 13.5px; color: rgba(242, 241, 233, 0.78); }
.price-list li { display: flex; gap: 8px; align-items: flex-start; }
.price-list li::before { content: "✓"; color: #c9f56b; font-weight: 700; }
.price-card .btn { margin-top: auto; }

.footer { max-width: 1180px; margin: 64px auto 0; padding: 26px 24px 40px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #6f7f99; font-size: 13px; }
.footer a:hover { color: var(--text); }

.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 34px; text-align: center; color: var(--muted); font-size: 14px; }

/* ============================== ЛОГИН ============================== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(700px 420px at 50% 0%, rgba(88, 101, 242, 0.22), transparent 65%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 18px; }
.login-card h1 { font-size: 21px; margin-bottom: 6px; }
.login-card p { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }

/* ============================== ФОРМЫ ============================== */
.checkline { display: flex; align-items: center; gap: 12px; width: fit-content; margin-bottom: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.02); font-size: 14px; font-weight: 550; cursor: pointer; }
.checkline input { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; padding: 0; border-radius: 999px; background: #1b2434; border: 1px solid #2d3a52; position: relative; flex: none; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.checkline input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #8b9bb4; transition: transform 0.15s ease, background 0.15s ease; }
.checkline input:checked { background: rgba(88, 101, 242, 0.35); border-color: var(--accent); }
.checkline input:checked::after { transform: translateX(18px); background: #fff; }
.checkline input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#maintenance-form .field { max-width: 560px; }
#m-until { cursor: pointer; }
#m-until::-webkit-calendar-picker-indicator { width: 18px; height: 18px; filter: invert(1); opacity: 0.65; cursor: pointer; }
#m-until::-webkit-calendar-picker-indicator:hover { opacity: 1; }
#maintenance-form textarea { min-height: 120px; }
#maintenance-form .note { max-width: 560px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: #a7b4c9; }
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0d1320;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.18); }
textarea { resize: vertical; min-height: 96px; }
.form-error { color: #ff9089; font-size: 13px; min-height: 18px; margin-top: 10px; }

/* ============================== ПАНЕЛЬ ============================== */
.panel { background: #070a11; }
.panel-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.sidebar { background: #0b101b; border-right: 1px solid var(--line-soft); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-weight: 700; }
.sidebar-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #9aabc4; font-size: 14px; font-weight: 550; cursor: pointer; border: 1px solid transparent; background: none; text-align: left; font-family: inherit; width: 100%; }
.nav-item:hover { background: rgba(255, 255, 255, 0.035); color: var(--text); }
.nav-item.active { background: rgba(88, 101, 242, 0.14); border-color: rgba(88, 101, 242, 0.3); color: #c3cbff; }
.nav-item .ico { width: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nav-item .ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot { margin-top: auto; padding: 0 6px; font-size: 11.5px; color: #5b6a82; line-height: 1.5; }

.panel-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 16px 26px; border-bottom: 1px solid var(--line-soft); background: rgba(11, 16, 27, 0.8); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.topbar-title { font-size: 16px; font-weight: 650; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.bot-pill { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #b7c3d6; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.bot-pill img { width: 20px; height: 20px; border-radius: 50%; }

.content { padding: 26px; display: grid; gap: 22px; max-width: 1320px; width: 100%; }
.view { display: none; gap: 22px; }
.view.active { display: grid; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.card-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }
.card-value { font-size: 27px; font-weight: 700; letter-spacing: -0.03em; margin-top: 4px; }
.card-note { font-size: 12px; color: #6f7f99; margin-top: 2px; }

.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.box-head { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.box-head h3 { margin: 0; font-size: 15px; }
.box-head .spacer { margin-left: auto; }
.box-body { padding: 16px 18px; }
.box-body.flush { padding: 0; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.toolbar .field { margin-bottom: 0; min-width: 130px; flex: 1; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: #7486a1; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; font-weight: 700; }
table.data td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(255, 255, 255, 0.018); }
table.data td.actions { white-space: nowrap; display: flex; gap: 6px; }
table.data select, table.data input { padding: 6px 8px; font-size: 13px; border-radius: 8px; }

.who { font-size: 12.5px; color: #a7b4c9; }
.who b { color: #e6edf7; font-weight: 600; }
body.role-user [data-owner] { display: none !important; }
body.role-user .owner-col { display: none; }
.btn-discord { display: flex; align-items: center; justify-content: center; width: 100%; background: #5865f2; color: #fff; text-decoration: none; }
.btn-discord:hover { background: #4752c4; }
.login-sep { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: #7d8aa0; font-size: 12px; }
.login-sep::before, .login-sep::after { content: ''; height: 1px; flex: 1; background: #243044; }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #1a2233; color: #a7b4c9; text-transform: uppercase; letter-spacing: 0.04em; }
.tag.on { background: rgba(63, 185, 80, 0.14); color: #7ee2a8; }
.tag.off { background: rgba(248, 81, 73, 0.13); color: #ff9089; }
.tag.admin { background: rgba(210, 153, 34, 0.14); color: #f0c85a; }
.tag.pro { background: rgba(88, 101, 242, 0.16); color: #b9c1ff; }

.note { font-size: 12.5px; color: var(--muted); }

.toast-host { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { padding: 11px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 550; background: #16203a; border: 1px solid #2a3a5c; box-shadow: var(--shadow); max-width: 340px; animation: toast-in 0.18s ease; }
.toast.ok { border-color: rgba(63, 185, 80, 0.4); color: #b7f3c4; }
.toast.err { border-color: rgba(248, 81, 73, 0.45); color: #ffb4ae; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================== АДАПТИВ ============================== */
@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; padding-top: 52px; }
    .hero-art { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links { display: none; }
    .panel-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 12px; overflow-x: auto; gap: 12px; }
    .sidebar-brand { display: none; }
    .sidebar-nav { display: flex; gap: 6px; }
    .nav-item { white-space: nowrap; width: auto; }
    .sidebar-foot { display: none; }
    .content { padding: 16px; }
}

@media (max-width: 700px) {
    .topbar { padding: 12px 16px; flex-wrap: wrap; row-gap: 8px; }
    .topbar-title { width: 100%; }
    .topbar-right { margin-left: 0; width: 100%; flex-wrap: wrap; }
    .sidebar { flex-wrap: wrap; overflow-x: visible; }
    .sidebar-nav { flex-wrap: wrap; }
    .nav-item { padding: 8px 10px; font-size: 13px; }
    .who { width: 100%; }
    .content { gap: 16px; }
    .checkline { width: 100%; }
}

@media (max-width: 560px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .section { padding-top: 52px; }
    .hero-actions .btn { flex: 1; }
}
