:root {
    --bg: #070b12;
    --panel: #0f1723;
    --panel-2: #131e2e;
    --text: #dbe8f7;
    --muted: #8aa0b7;
    --line: #22364f;
    --accent: #11c5bf;
    --accent-2: #2fc3ff;
    --danger: #ff595e;
    --ok: #2ec27e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(1200px 500px at 10% -20%, rgba(17, 197, 191, 0.2), transparent),
        radial-gradient(900px 400px at 90% -10%, rgba(47, 195, 255, 0.17), transparent),
        linear-gradient(160deg, #06090f 0%, #0a111c 50%, #0b1320 100%);
    font-family: "Sora", "Space Grotesk", sans-serif;
    min-height: 100vh;
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
}

.topbar {
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
    background: rgba(4, 10, 18, 0.66);
    position: sticky;
    top: 0;
    z-index: 30;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    font-family: "Orbitron", "Sora", sans-serif;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.menu {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.menu a {
    color: var(--muted);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 6px;
}

.menu a:hover,
.menu a.active {
    color: var(--text);
    border-color: var(--line);
    background: rgba(18, 30, 46, 0.7);
}

.card {
    background: linear-gradient(160deg, rgba(15, 23, 35, 0.95), rgba(19, 30, 46, 0.9));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

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

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

h1, h2, h3 {
    margin: 0 0 0.75rem;
    font-weight: 600;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table th,
.table td {
    text-align: left;
    padding: 0.62rem;
    border-bottom: 1px solid var(--line);
}

.table th {
    color: var(--muted);
    font-weight: 600;
}

input,
select,
textarea,
button {
    width: 100%;
    background: #0a1422;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.62rem 0.75rem;
}

button,
.btn {
    cursor: pointer;
    text-decoration: none;
    color: #061019;
    background: linear-gradient(100deg, var(--accent), var(--accent-2));
    border: none;
    font-weight: 600;
}

.row {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.kv {
    color: var(--muted);
    font-size: 0.9rem;
}

.flash {
    border: 1px solid var(--ok);
    background: rgba(46, 194, 126, 0.14);
    padding: 0.7rem;
    border-radius: 6px;
    margin-bottom: 0.8rem;
}

.errors {
    border: 1px solid var(--danger);
    background: rgba(255, 89, 94, 0.12);
    padding: 0.7rem;
    border-radius: 6px;
    margin-bottom: 0.8rem;
}

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