﻿:root {
    --bg: #eef5ff;
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.88);
    --surface-strong: #f9fbff;
    --primary: #005bbb;
    --primary-strong: #003f86;
    --primary-soft: #dcebff;
    --primary-line: #b7d2f6;
    --sidebar: linear-gradient(180deg, #0b4da2 0%, #003d85 100%);
    --text: #0f2746;
    --muted: #617b9f;
    --border: #c7daf4;
    --danger: #b3261e;
    --success: #16794d;
    --shadow: 0 24px 60px rgba(0, 67, 143, 0.14);
    --shadow-soft: 0 12px 30px rgba(0, 67, 143, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(0, 120, 255, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(0, 91, 187, 0.18), transparent 26%),
        linear-gradient(135deg, #f7fbff 0%, #e9f2ff 48%, #fdfefe 100%);
    color: var(--text);
}

.layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.layout-auth {
    grid-template-columns: 1fr;
}

.sidebar {
    background: var(--sidebar);
    color: #fff;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    box-shadow: 14px 0 36px rgba(0, 45, 102, 0.18);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.brand-mark img {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
}

.sidebar nav {
    display: grid;
    gap: 10px;
}

.sidebar a,
.sidebar .linkish {
    color: #eef6ff;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    border-radius: 12px;
    transition: background-color .18s ease, transform .18s ease;
}

.sidebar nav a:hover,
.sidebar .linkish:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.logout-form {
    margin-top: auto;
}

.content {
    padding: 28px;
    width: min(100%, 1420px);
}

.content-auth {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}

.auth-shell {
    width: 100%;
    max-width: 520px;
    display: grid;
    gap: 18px;
}

.auth-brand {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.auth-brand img {
    width: min(280px, 75vw);
    height: auto;
    display: block;
}

.auth-brand p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    letter-spacing: 0.03em;
}

.card,
.stat-card {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.card + .card {
    margin-top: 18px;
}

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

.auth-card h2 {
    margin-bottom: 20px;
    color: var(--primary-strong);
    font-size: 2rem;
}

.narrow {
    width: 100%;
    max-width: 460px;
}

.header-row,
.form-actions,
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-row {
    margin-bottom: 16px;
}

.header-row h2 {
    margin: 0;
    font-size: 2.05rem;
    line-height: 1.1;
    color: var(--primary-strong);
    letter-spacing: -0.02em;
}

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

.stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(242,248,255,0.9) 100%);
}

.stat-card span {
    display: block;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 0.72rem;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin-top: 10px;
    color: var(--primary-strong);
}

.form-grid {
    display: grid;
    gap: 18px;
}

.two-col {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: var(--primary-strong);
}

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

input,
select,
textarea {
    min-height: 48px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--primary-line);
    background: rgba(255,255,255,0.96);
    color: var(--text);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

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

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 91, 187, 0.12);
    background: #fff;
}

button,
.button {
    min-height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, #0a74df 100%);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 22px rgba(0, 91, 187, 0.2);
}

button:hover,
.button:hover {
    background: linear-gradient(135deg, var(--primary-strong) 0%, var(--primary) 100%);
}

.form-actions {
    justify-content: flex-start;
}

.checkbox-row {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary-strong);
    padding: 0 4px;
}

.checkbox-row input {
    min-height: auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
    box-shadow: none;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.actions a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.actions form {
    margin: 0;
}

.actions button {
    min-height: 40px;
    padding: 10px 18px;
}

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

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255,255,255,0.78);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

thead th {
    padding: 16px 14px;
    color: var(--primary-strong);
    background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
    text-align: left;
    font-size: 0.95rem;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 16px 14px;
    border-bottom: 1px solid #d9e7fb;
    vertical-align: middle;
    color: var(--text);
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: rgba(220, 235, 255, 0.32);
}

tbody td:first-child,
thead th:first-child {
    padding-left: 18px;
}

tbody td:last-child,
thead th:last-child {
    padding-right: 18px;
}

.pagination {
    margin-top: 16px;
}

.section-copy {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 680px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.84rem;
    font-weight: 800;
}

.status-badge-danger {
    background: rgba(179, 38, 30, 0.12);
    color: var(--danger);
}

.muted-text {
    color: var(--muted);
    font-weight: 600;
}
.error {
    color: var(--danger);
    margin-top: 0;
    font-weight: 700;
}

.success {
    color: var(--success);
    font-weight: 700;
}

@media (max-width: 1100px) {
    .content {
        width: 100%;
    }

    .two-col {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

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

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 5;
    }

    .content {
        padding: 16px;
    }

    .content-auth {
        padding: 28px 16px;
        align-items: flex-start;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-row h2 {
        font-size: 1.7rem;
    }

    .card,
    .stat-card {
        padding: 18px;
        border-radius: 20px;
    }
}

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

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .actions button,
    .actions a,
    .form-actions .button,
    .form-actions button {
        width: 100%;
    }

    thead th,
    tbody td {
        font-size: 0.92rem;
    }
}

