/* ============================================================
   Server Status — панель, вход и 404
   Тот же язык, что у лендинга: obsidian + acid lime,
   Unbounded в заголовках, Manrope в тексте, стеклянные
   оболочки, пилюли и вложенные карточки.
   ============================================================ */

:root {
    --ink: #050607;
    --ink-2: #090b0e;
    --paper: #f2f1e9;
    --faint: #6b7571;
    --lime: #c9f56b;
    --lime-deep: #a9d94b;

    --bg: var(--ink);
    --bg-soft: #080a0c;
    --panel: #0c0f13;
    --panel-2: #12161c;
    --line: rgba(242, 241, 233, 0.09);
    --line-soft: rgba(242, 241, 233, 0.06);
    --line-strong: rgba(242, 241, 233, 0.16);
    --text: var(--paper);
    --muted: #98a29e;
    --accent: var(--lime);
    --accent-2: var(--lime-deep);
    --green: var(--lime);
    --red: #ff6b5e;
    --amber: #f0c85a;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 40px 110px rgba(0, 0, 0, 0.55);

    --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
    --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.panel,
body.login-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-weight: 500;
    line-height: 1.6;
}

body.panel::before,
body.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(242, 241, 233, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(242, 241, 233, 0.035) 1px, transparent 1px);
    background-size: 84px 84px;
    mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, black 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, black 20%, transparent 78%);
}

body.panel::after,
body.login-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(620px 620px at 4% -14%, rgba(201, 245, 107, 0.14), transparent 68%),
        radial-gradient(720px 720px at 98% 4%, rgba(88, 150, 255, 0.07), transparent 68%);
}

body.panel ::selection,
body.login-page ::selection {
    background: var(--lime);
    color: #0a0d08;
}

body.panel :focus-visible,
body.login-page :focus-visible {
    outline: 2px solid rgba(201, 245, 107, 0.55);
    outline-offset: 2px;
}

/* ---------- логотип и бренд ---------- */

.brand-logo {
    border-radius: 50%;
    object-fit: contain;
    background: none;
    box-shadow: 0 6px 18px rgba(56, 182, 255, 0.24);
}

/* ---------- кнопки ---------- */

.btn {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: transform 0.4s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.4s var(--ease);
}

.btn-primary {
    background: var(--lime);
    border-color: var(--lime);
    color: #0a0d08;
    box-shadow: 0 12px 34px rgba(201, 245, 107, 0.16);
}

.btn-primary:hover {
    background: #d7ff85;
    border-color: #d7ff85;
    box-shadow: 0 18px 46px rgba(201, 245, 107, 0.24);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.035);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line-strong);
}

.btn-danger {
    background: rgba(255, 107, 94, 0.12);
    border-color: rgba(255, 107, 94, 0.35);
    color: #ffb4ae;
}

/* ---------- вход и 404 ---------- */

.login-wrap {
    padding: 32px 20px;
    background: none;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 32px 30px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 90% at 82% 0%, rgba(201, 245, 107, 0.07), transparent 55%),
        linear-gradient(180deg, #10141a, #0a0d11);
    box-shadow:
        0 0 120px rgba(201, 245, 107, 0.08),
        0 40px 110px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
}

.login-card .brand {
    gap: 10px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.login-card .brand-logo {
    width: 38px;
    height: 38px;
}

.login-card h1 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.login-card .link-lime,
.sidebar-foot a {
    color: var(--lime);
}

.login-card .link-lime:hover,
.sidebar-foot a:hover {
    color: #d7ff85;
}

.btn-discord {
    gap: 10px;
    padding: 13px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--paper);
    font-weight: 700;
}

.btn-discord svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.btn-discord:hover {
    background: rgba(201, 245, 107, 0.12);
    border-color: rgba(201, 245, 107, 0.28);
    color: var(--lime);
}

.btn-discord.is-off {
    opacity: 0.45;
    pointer-events: none;
}

.login-hint {
    margin: 10px 0 0;
    color: var(--faint);
    font-size: 11.5px;
    line-height: 1.55;
}

.login-sep {
    color: var(--faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-sep::before,
.login-sep::after {
    background: var(--line);
}

.form-error {
    color: #ffb4ae;
}

.err-code {
    font-family: var(--font-display);
    font-size: 54px;
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--lime);
    margin: 0 0 6px;
}

/* ---------- поля ввода ---------- */

.field label {
    color: rgba(242, 241, 233, 0.55);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

input,
select,
textarea {
    border-radius: 12px;
    background: #0a0d10;
    padding: 11px 14px;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

input::placeholder,
textarea::placeholder {
    color: #5c6663;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(201, 245, 107, 0.55);
    box-shadow: 0 0 0 3px rgba(201, 245, 107, 0.14);
    background: #0c1013;
}

.checkline {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
}

.checkline input {
    background: #151a20;
    border-color: rgba(242, 241, 233, 0.14);
}

.checkline input::after {
    background: #98a29e;
}

.checkline input:checked {
    background: var(--lime);
    border-color: var(--lime);
}

.checkline input:checked::after {
    background: #0a0d08;
}

/* ---------- каркас панели ---------- */

.panel-shell {
    grid-template-columns: 252px 1fr;
    gap: 12px;
    padding: 12px;
    align-items: start;
}

.sidebar {
    top: 12px;
    height: calc(100vh - 24px);
    padding: 20px 12px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.sidebar-brand {
    padding: 0 8px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.sidebar-brand .brand-logo {
    width: 36px;
    height: 36px;
}

.sidebar-nav {
    gap: 3px;
}

.nav-item {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: rgba(201, 245, 107, 0.12);
    border-color: rgba(201, 245, 107, 0.22);
    color: var(--lime);
}

.sidebar-foot {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--faint);
}

.topbar {
    top: 12px;
    margin-bottom: 4px;
    padding: 10px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(9, 11, 14, 0.72);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.topbar-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.bot-pill {
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-weight: 600;
}

.status-dot.online {
    box-shadow: 0 0 9px rgba(201, 245, 107, 0.6);
}

.who {
    color: var(--muted);
}

.who b {
    color: var(--paper);
    font-weight: 700;
}

.content {
    padding: 16px 4px 28px;
    gap: 16px;
}

.view {
    gap: 16px;
}

/* ---------- карточки и блоки ---------- */

.card {
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #10141a, #0c0f13);
    transition: border-color 0.3s var(--ease), transform 0.4s var(--ease);
}

.card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.card-label {
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.card-value {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.card-note {
    margin-top: 6px;
    color: var(--faint);
}

.cards > .card:first-child {
    border-color: transparent;
    background: linear-gradient(160deg, var(--lime), var(--lime-deep));
    color: #0a0d08;
    box-shadow: 0 18px 50px rgba(201, 245, 107, 0.16);
}

.cards > .card:first-child .card-label,
.cards > .card:first-child .card-note {
    color: rgba(10, 13, 8, 0.62);
}

.box {
    border-radius: 24px;
    background: linear-gradient(180deg, #10141a, #0b0e12);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.box-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.box-head h3 {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.box-body {
    padding: 18px 20px;
}

/* ---------- таблицы ---------- */

table.data th {
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--faint);
    font-size: 10.5px;
    letter-spacing: 0.14em;
}

table.data td {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(242, 241, 233, 0.05);
}

/* первая колонка — имя, ей можно переноситься; остальные держим в одну строку */
table.data td:nth-child(n + 2),
table.data th:nth-child(n + 2) {
    white-space: nowrap;
}

table.data tr:hover td {
    background: rgba(255, 255, 255, 0.022);
}

table.data select,
table.data input {
    border-radius: 999px;
}

/* ---------- метки, заметки, прогресс ---------- */

.tag {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(242, 241, 233, 0.06);
    color: var(--muted);
    font-size: 10.5px;
    letter-spacing: 0.1em;
}

.tag.on {
    background: rgba(201, 245, 107, 0.12);
    border-color: rgba(201, 245, 107, 0.22);
    color: var(--lime);
}

.tag.off {
    background: rgba(255, 107, 94, 0.12);
    border-color: rgba(255, 107, 94, 0.28);
    color: #ffb4ae;
}

.tag.admin {
    background: rgba(240, 200, 90, 0.12);
    border-color: rgba(240, 200, 90, 0.28);
    color: #f0c85a;
}

.tag.pro {
    background: rgba(201, 245, 107, 0.12);
    border-color: rgba(201, 245, 107, 0.22);
    color: var(--lime);
}

/* выключенные тех-работы — нейтральное состояние, не активное */
#maintenance-state.tag.on {
    background: rgba(242, 241, 233, 0.06);
    border-color: var(--line);
    color: var(--muted);
}

.note {
    color: var(--faint);
}

/* ---------- уведомления ---------- */

.toast {
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #10141a;
    color: var(--paper);
    font-weight: 600;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.toast.ok {
    border-color: rgba(201, 245, 107, 0.35);
    color: #d7ff85;
}

.toast.err {
    border-color: rgba(255, 107, 94, 0.45);
    color: #ffb4ae;
}

/* ---------- адаптив ---------- */

@media (max-width: 980px) {
    .panel-shell {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }

    .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
        border-radius: 22px;
        overflow-x: auto;
    }

    .nav-item {
        padding: 9px 14px;
    }

    .topbar {
        top: 8px;
    }
}

@media (max-width: 700px) {
    .topbar {
        border-radius: 22px;
        padding: 12px 16px;
    }

    .topbar-right {
        gap: 8px;
    }

    .who {
        width: auto;
    }

    .content {
        padding: 14px 2px 24px;
    }

    .card-value {
        font-size: 26px;
    }

    .login-card {
        padding: 26px 22px;
    }
}

/* ---------- переключатель языка (панель и вход) ---------- */

.sidebar-foot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
}

.lang-btn {
    appearance: none;
    border: 0;
    background: none;
    height: 26px;
    padding: 0 11px;
    border-radius: 999px;
    color: var(--faint);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: none;
    cursor: pointer;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.lang-btn:hover { color: var(--paper); }

.lang-btn.is-active {
    color: #0a0d08;
    background: var(--lime);
}

.lang-btn:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

.login-lang {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

@media (max-width: 980px) {
    /* на узком экране сайдбар становится строкой — язык уезжает вправо */
    .sidebar-foot {
        flex-direction: row;
        align-items: center;
        margin-left: auto;
        gap: 12px;
    }
}

@media (max-width: 700px) {
    .lang-btn { padding: 0 8px; font-size: 10.5px; height: 24px; }
}

/* ---------- дискорд-серверы бота ---------- */

.guild-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.guild-card {
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.guild-card:hover {
    border-color: var(--line-strong, rgba(242, 241, 233, 0.16));
    background: rgba(255, 255, 255, 0.035);
}

/* Верх карточки — ссылка на сервер в Discord. */
.guild-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
}

.guild-main:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

.guild-open {
    flex: none;
    margin-left: auto;
    padding-left: 8px;
    color: var(--faint);
    font-size: 13px;
    line-height: 1;
    opacity: 0.5;
    transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.guild-main:hover .guild-open,
.guild-main:focus-visible .guild-open {
    color: var(--lime);
    opacity: 1;
}

.guild-icon {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.guild-icon-empty {
    display: grid;
    place-items: center;
    color: var(--lime);
    background: rgba(201, 245, 107, 0.12);
    border: 1px solid rgba(201, 245, 107, 0.2);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
}

.guild-info { min-width: 0; }

.guild-name {
    color: var(--paper);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guild-meta {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11.5px;
}

.guild-id {
    margin-top: 2px;
    color: var(--faint);
    font-size: 10.5px;
}

.guild-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.guild-channel {
    flex: 1 1 120px;
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--paper);
    font: inherit;
    font-size: 11.5px;
}

.guild-actions .btn { flex: none; }

.guild-invite-result {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 8px;
    border: 1px solid rgba(201, 245, 107, 0.25);
    border-radius: 10px;
    background: rgba(201, 245, 107, 0.07);
}

.guild-invite-result[hidden] { display: none; }

.invite-link {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--lime);
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .guild-list { grid-template-columns: 1fr; }
}

.notify-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.6fr) auto minmax(160px, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--line-soft);
}

.notify-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.notify-name {
    min-width: 0;
    font-weight: 600;
}

.notify-name small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notify-row select {
    max-width: 100%;
}

.notify-toggle {
    margin: 0;
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
}

.notify-toggle.is-on {
    border-color: rgba(201, 245, 107, 0.38);
    background: rgba(201, 245, 107, 0.07);
    color: var(--lime);
}

@media (max-width: 720px) {
    .notify-row { grid-template-columns: 1fr; gap: 8px; }
}

.login-join {
    width: 100%;
    margin: 12px 0 0;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 550;
    text-align: left;
}
