* {
    box-sizing: border-box;
}

:root {
    --bg: #0b0f14;
    --panel: #121922;
    --panel-2: #171f2a;
    --border: #263241;
    --text: #f4f7fb;
    --muted: #93a2b6;
    --accent: #f2b84b;
    --accent-dark: #d79b28;
    --danger: #ff667a;
    --success: #55d68b;
    --shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
}

.page-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 20%, rgba(242,184,75,.10), transparent 34%),
        radial-gradient(circle at 80% 80%, rgba(90,120,160,.08), transparent 35%),
        var(--bg);
}

.auth-card {
    width: min(100%, 460px);
    border: 1px solid var(--border);
    background: rgba(18,25,34,.97);
    border-radius: 18px;
    padding: 34px;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #16120a;
    font-weight: 900;
    letter-spacing: .04em;
}

.brand h1,
.brand p {
    margin: 0;
}

.brand h1 {
    font-size: 20px;
}

.brand p,
.brand span {
    color: var(--muted);
    font-size: 13px;
}

.brand.compact {
    margin: 0;
}

.brand.compact .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.brand.compact div:last-child {
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    letter-spacing: -.02em;
}

h2 {
    margin: 0 0 7px;
    font-size: 28px;
}

h3 {
    margin: 0 0 10px;
}

.muted {
    color: var(--muted);
    line-height: 1.55;
}

label {
    display: block;
    margin: 18px 0 8px;
    color: #c9d4e1;
    font-size: 14px;
    font-weight: 650;
}

input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #0e141c;
    color: var(--text);
    outline: none;
    padding: 0 14px;
    font-size: 15px;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(242,184,75,.10);
}

button {
    border: 0;
    border-radius: 10px;
    height: 46px;
    padding: 0 18px;
    background: var(--accent);
    color: #18130a;
    font-weight: 800;
    cursor: pointer;
}

.auth-card button {
    width: 100%;
    margin-top: 22px;
}

button:hover:not(:disabled) {
    background: var(--accent-dark);
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.button-secondary {
    background: #1c2632;
    color: #e9eff6;
    border: 1px solid var(--border);
}

.button-secondary:hover:not(:disabled) {
    background: #253140;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin: 18px 0;
    font-size: 14px;
    line-height: 1.45;
}

.alert-error {
    color: #ffd6dc;
    background: rgba(255,102,122,.10);
    border: 1px solid rgba(255,102,122,.35);
}

.alert-success {
    color: #d9ffea;
    background: rgba(85,214,139,.10);
    border: 1px solid rgba(85,214,139,.35);
}

.status-pill,
.eyebrow {
    display: inline-flex;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    margin-bottom: 13px;
}

.security-note {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    background: rgba(11,15,20,.92);
    backdrop-filter: blur(14px);
}

.topbar-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar form {
    margin: 0;
}

.dashboard {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 70px;
}

.hero-panel,
.panel {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.16);
}

.hero-panel {
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.hero-panel h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 40px);
}

.hero-panel p {
    color: var(--muted);
    margin: 0;
}

.server-badge {
    min-width: 210px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    border-radius: 12px;
    padding: 16px;
}

.server-badge span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.server-badge strong {
    font-size: 18px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 18px 0;
}

.panel {
    padding: 22px;
    margin-bottom: 18px;
}

.big-value {
    font-size: 24px;
    font-weight: 850;
    word-break: break-all;
}

.big-value.small {
    font-size: 20px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 750;
    margin: 15px 0;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.dot.warning {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(242,184,75,.10);
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.placeholder-controls {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    margin-top: 20px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

th, td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

th {
    color: var(--muted);
    font-weight: 700;
}

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

    .hero-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .server-badge {
        width: 100%;
    }

    .placeholder-controls {
        grid-template-columns: 1fr;
    }
}


.action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.action-card {
    border: 1px solid var(--border);
    background: var(--panel-2);
    border-radius: 12px;
    padding: 18px;
    display: grid;
    gap: 12px;
}

.action-card strong {
    font-size: 16px;
}

.action-card span {
    color: var(--muted);
    font-size: 14px;
}

.action-card button {
    width: fit-content;
}

.inline-form {
    margin: 0;
}

.button-danger {
    background: rgba(255,102,122,.12);
    color: #ffd3d9;
    border: 1px solid rgba(255,102,122,.35);
}

.button-danger:hover:not(:disabled) {
    background: rgba(255,102,122,.20);
}

.dot.ok {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(85,214,139,.10);
}

.dot.danger {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(255,102,122,.10);
}

.status-text {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
}

.status-text.active {
    color: var(--success);
}

.status-text.permanent {
    color: var(--accent);
}

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


.monitor-heading {
    align-items: center;
}

.monitor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.monitor-message {
    margin: 14px 0 18px;
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.metric-card {
    border: 1px solid var(--border);
    background: var(--panel-2);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.metric-card span,
.metric-card small {
    color: var(--muted);
}

.metric-card strong {
    font-size: 26px;
}

.manual-ban-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 18px;
}

.hidden-form {
    display: none;
}

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

    .monitor-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .manual-ban-form {
        grid-template-columns: 1fr;
    }
}
