:root {
    color-scheme: dark;
    --background: #050505;
    --panel: #121212;
    --panel-light: #191919;
    --red: #ff2e2e;
    --red-dark: #c91f1f;
    --text: #f5f5f5;
    --muted: #a5a5a5;
    --border: #292929;
    --success: #42c982;
    --warning: #f0b84b;
    --danger: #ff5555;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background) !important;
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--background) !important;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--red);
    text-decoration: none;
}

a:hover {
    color: #ff7070;
}

button {
    cursor: pointer;
}

.site-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 5%;
    background: #090909;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 19px;
    font-weight: 800;
}

.brand img {
    width: 43px;
    height: 43px;
    object-fit: contain;
}

.brand span {
    color: var(--red);
}

.header-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.header-links a {
    color: var(--muted);
    font-size: 14px;
}

.header-links a:hover,
.header-links a.active {
    color: white;
}

.page {
    width: min(1180px, 92%);
    margin: 0 auto;
    padding: 42px 0 70px;
}

.page-heading {
    margin-bottom: 28px;
}

.page-heading h1 {
    margin: 0 0 9px;
    font-size: clamp(27px, 5vw, 38px);
}

.page-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.red {
    color: var(--red);
}

.panel {
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.panel h2,
.panel h3 {
    margin-top: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.stat {
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

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

.form {
    display: grid;
    gap: 15px;
}

label {
    display: grid;
    gap: 8px;
    color: #ddd;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    color: white;
    background: #090909;
    border: 1px solid #353535;
    border-radius: 7px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--red);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 11px 17px;
    color: white;
    background: var(--red);
    border: 0;
    border-radius: 7px;
    font-weight: 700;
}

.btn:hover {
    background: var(--red-dark);
}

.btn.secondary {
    background: #252525;
    border: 1px solid #393939;
}

.btn.danger {
    background: #8d2020;
}

.btn.small {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
}

.message {
    display: none;
    padding: 12px 14px;
    border-radius: 7px;
    background: #202020;
    border: 1px solid var(--border);
    line-height: 1.5;
}

.message.show {
    display: block;
}

.message.error {
    border-color: #9c3030;
    color: #ffaaaa;
}

.message.success {
    border-color: #27794c;
    color: #9af0bd;
}

.auth-wrap {
    min-height: calc(100vh - 76px);
    display: grid;
    place-items: center;
    padding: 35px 16px;
}

.auth-card {
    width: min(440px, 100%);
    padding: 30px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 15px;
}

.auth-logo {
    display: block;
    width: 85px;
    height: 85px;
    object-fit: contain;
    margin: 0 auto 18px;
}

.auth-card h1 {
    text-align: center;
    margin: 0 0 8px;
}

.auth-card > p {
    color: var(--muted);
    text-align: center;
    margin-bottom: 25px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

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

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

td select {
    min-width: 150px;
    min-height: 36px;
    padding: 7px;
    font-size: 12px;
}

.status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    background: #252525;
    font-size: 11px;
    text-transform: capitalize;
}

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

.status.pending {
    color: var(--warning);
}

.status.suspended,
.status.inactive {
    color: var(--danger);
}

.content-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 11px;
}

.content-card h3 {
    margin: 0;
}

.content-card p {
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.empty-state {
    padding: 35px;
    text-align: center;
    color: var(--muted);
    background: var(--panel);
    border: 1px dashed #383838;
    border-radius: 12px;
}

.footer {
    padding: 22px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 650px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-links {
        gap: 13px;
    }

    .page {
        padding-top: 28px;
    }

    .panel {
        padding: 17px;
    }
}
