:root {
    --sl24-bg: #090a0f;
    --sl24-surface: #11131a;
    --sl24-surface-alt: #171a22;
    --sl24-border: #262a35;
    --sl24-text: #f7f9fc;
    --sl24-text-muted: #a6adbb;
    --sl24-accent: #e1062a;
    --sl24-accent-strong: #b70320;
    --sl24-success: #1ea672;
    --sl24-info: #ef4444;
    --sl24-warning: #d97706;
    --sl24-danger: #dc2626;
    --sl24-radius-sm: 8px;
    --sl24-radius-md: 12px;
    --sl24-radius-lg: 18px;
    --sl24-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

html {
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--sl24-text);
    background:
        radial-gradient(circle at 10% 0%, rgba(225, 6, 42, 0.12), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(183, 3, 32, 0.16), transparent 45%),
        var(--sl24-bg);
}

a {
    color: inherit;
}

a:visited {
    color: inherit;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.site-header {
    border-bottom: 1px solid var(--sl24-border);
    background: rgba(7, 8, 12, 0.85);
    backdrop-filter: blur(8px);
}

.site-header-inner {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 82px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    width: 170px;
    max-width: 100%;
    height: auto;
}

.site-main {
    width: min(1240px, calc(100% - 2rem));
    margin: 2.1rem auto;
}

.site-footer {
    margin-top: 2.5rem;
    padding: 1.2rem 1rem 1.8rem;
    color: var(--sl24-text-muted);
    text-align: center;
    border-top: 1px solid var(--sl24-border);
}

.top-nav {
    border: 1px solid var(--sl24-border);
    border-radius: var(--sl24-radius-md);
    background: rgba(17, 19, 26, 0.9);
    margin: 1rem auto 0;
    width: min(1240px, calc(100% - 2rem));
    box-shadow: var(--sl24-shadow);
}

.top-nav-list {
    list-style: none;
    padding: 0.6rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.top-nav-link {
    text-decoration: none;
    color: var(--sl24-text-muted);
    font-weight: 600;
    font-size: 0.98rem;
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.top-nav-link:hover,
.top-nav-link:focus-visible {
    color: var(--sl24-text);
    border-color: var(--sl24-border);
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.top-nav-link.active {
    color: var(--sl24-text);
    background: linear-gradient(135deg, rgba(225, 6, 42, 0.32), rgba(225, 6, 42, 0.2));
    border-color: rgba(225, 6, 42, 0.5);
}

.nav-logout-form {
    margin-left: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--sl24-radius-sm);
    padding: 0.58rem 0.95rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:focus-visible {
    outline: 2px solid rgba(225, 6, 42, 0.65);
    outline-offset: 2px;
}

.btn:visited {
    color: inherit;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--sl24-accent), var(--sl24-accent-strong));
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--sl24-text);
    background: var(--sl24-surface-alt);
    border-color: var(--sl24-border);
}

.btn-secondary:hover {
    border-color: rgba(225, 6, 42, 0.5);
}

.btn-ghost {
    color: var(--sl24-text-muted);
    border-color: var(--sl24-border);
    background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
    color: var(--sl24-text);
    border-color: rgba(225, 6, 42, 0.45);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.btn-pill {
    border-radius: 999px;
}

.card {
    background: linear-gradient(180deg, rgba(23, 26, 34, 0.96), rgba(17, 19, 26, 0.96));
    border: 1px solid var(--sl24-border);
    border-radius: var(--sl24-radius-lg);
    box-shadow: var(--sl24-shadow);
}

.card-body {
    padding: 1.35rem;
}

.muted {
    color: var(--sl24-text-muted);
}

.messages {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.7rem;
}

.messages li {
    border-radius: var(--sl24-radius-sm);
    padding: 0.8rem 1rem;
    border: 1px solid var(--sl24-border);
    background: var(--sl24-surface);
}

.messages .success {
    border-color: rgba(30, 166, 114, 0.45);
    background: rgba(30, 166, 114, 0.12);
}

.messages .error {
    border-color: rgba(220, 38, 38, 0.45);
    background: rgba(220, 38, 38, 0.12);
}

.messages .warning {
    border-color: rgba(217, 119, 6, 0.45);
    background: rgba(217, 119, 6, 0.1);
}

.messages .info {
    border-color: rgba(225, 6, 42, 0.45);
    background: rgba(225, 6, 42, 0.1);
}

.alert {
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--sl24-radius-sm);
    border: 1px solid transparent;
}

.alert-danger {
    color: #fecaca;
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.5);
}

.alert-warning {
    color: #ffedd5;
    background: rgba(217, 119, 6, 0.14);
    border-color: rgba(217, 119, 6, 0.45);
}

.form-control,
.form-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    color: var(--sl24-text);
    border: 1px solid var(--sl24-border);
    border-radius: var(--sl24-radius-sm);
    padding: 0.6rem 0.7rem;
    font-size: 0.95rem;
}

.form-select {
    color-scheme: dark;
    background-image: linear-gradient(180deg, rgba(23, 26, 34, 0.96), rgba(17, 19, 26, 0.96));
}

.form-select option,
.form-select optgroup {
    background-color: #11131a;
    color: #f7f9fc;
}

.form-select option:checked,
.form-select option:hover {
    background: linear-gradient(135deg, rgba(225, 6, 42, 0.36), rgba(183, 3, 32, 0.3));
    color: #ffffff;
}

.form-select:focus option:checked {
    background: linear-gradient(135deg, rgba(225, 6, 42, 0.5), rgba(183, 3, 32, 0.45));
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(225, 6, 42, 0.55);
    outline: 2px solid rgba(225, 6, 42, 0.3);
    outline-offset: 1px;
}

.errorlist {
    margin: 0.5rem 0;
    padding-left: 1rem;
    color: #fecaca;
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--sl24-radius-md);
    border: 1px solid var(--sl24-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    background: rgba(11, 13, 20, 0.8);
}

th,
td {
    padding: 0.82rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--sl24-text-muted);
    font-size: 0.84rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table-responsive table tbody tr:nth-child(even),
.table-responsive table tbody tr:nth-child(odd) {
    background: rgba(11, 13, 20, 0.86);
}

.table-responsive table tbody tr:hover,
.table-responsive table tbody tr:nth-child(even):hover,
.table-responsive table tbody tr:nth-child(odd):hover {
    background: rgba(225, 6, 42, 0.1);
}

.table-responsive table td,
.table-responsive table th {
    color: var(--sl24-text);
}

.table-responsive table th {
    color: var(--sl24-text-muted);
}

.mobile-hide {
    display: table-cell;
}

@media (max-width: 900px) {
    .top-nav-list {
        align-items: stretch;
    }

    .nav-logout-form {
        margin-left: 0;
        width: 100%;
    }

    .nav-logout-form .btn {
        width: 100%;
    }

    .mobile-hide {
        display: none;
    }

    .site-main {
        margin: 1rem auto;
    }
}
