:root {
    --blue: #0b4da2;
    --blue-dark: #143c78;
    --sky: #eaf6ff;
    --cream: #fffdf8;
    --gold: #d6a328;
    --ink: #17335d;
    --muted: #63738b;
    --line: #dce8f4;
    --green: #198754;
    --red: #b42318;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background:
        linear-gradient(
            135deg,
            #f4faff,
            #fffdf8
        );

    color: var(--ink);
}

a {
    color: inherit;
}

.admin-shell {
    min-height: 100vh;
}

.topbar {
    background: white;
    border-bottom: 1px solid var(--line);

    padding: 14px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff5ba;

    font-size: 22px;
}

.brand-title {
    font-weight: 700;
    color: var(--blue);
}

.brand-subtitle {
    font-size: 12px;
    color: var(--muted);
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a,
.nav button {
    text-decoration: none;

    padding: 9px 12px;

    border-radius: 8px;
    border: 0;

    background: transparent;

    font: inherit;
    color: var(--ink);

    cursor: pointer;
}

.nav a:hover,
.nav button:hover {
    background: var(--sky);
}

.container {
    width: min(1180px, calc(100% - 30px));

    margin: 30px auto 60px;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0 0 7px;

    color: var(--blue);

    font-size: 30px;
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.stats {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 25px;
}

.stat {
    background: rgba(255,255,255,.93);

    border: 1px solid var(--line);

    border-radius: 16px;

    padding: 20px;

    box-shadow:
        0 8px 30px
        rgba(18,72,125,.06);
}

.stat-label {
    color: var(--muted);
    font-size: 13px;

    margin-bottom: 7px;
}

.stat-value {
    font-size: 31px;
    font-weight: 700;

    color: var(--blue);
}

.stat-note {
    margin-top: 6px;

    font-size: 12px;

    color: var(--muted);
}

.card {
    background: rgba(255,255,255,.96);

    border: 1px solid var(--line);

    border-radius: 16px;

    box-shadow:
        0 8px 30px
        rgba(18,72,125,.05);

    overflow: hidden;

    margin-bottom: 24px;
}

.card-header {
    padding: 18px 20px;

    border-bottom: 1px solid var(--line);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
}

.card-header h2 {
    margin: 0;

    font-size: 19px;
}

.card-body {
    padding: 20px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 13px 14px;

    text-align: left;

    border-bottom:
        1px solid #edf2f7;

    vertical-align: middle;
}

th {
    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: .04em;

    color: var(--muted);
}

tr:last-child td {
    border-bottom: 0;
}

.badge {
    display: inline-block;

    border-radius: 999px;

    padding: 5px 9px;

    font-size: 12px;
    font-weight: 600;
}

.badge-green {
    background: #eaf8ef;
    color: #176b3a;
}

.badge-red {
    background: #fff0ef;
    color: #a42c25;
}

.badge-yellow {
    background: #fff8d8;
    color: #876817;
}

.badge-blue {
    background: var(--sky);
    color: var(--blue);
}

.btn {
    display: inline-block;

    text-decoration: none;

    border: 0;

    border-radius: 9px;

    padding: 10px 14px;

    cursor: pointer;

    font: inherit;

    background: var(--blue);

    color: white;
}

.btn:hover {
    filter: brightness(.94);
}

.btn-gold {
    background: var(--gold);
}

.btn-secondary {
    background: white;

    color: var(--blue);

    border:
        1px solid
        var(--line);
}

.btn-danger {
    background: var(--red);
}

.form-card {
    width: min(480px, calc(100% - 30px));

    margin: 65px auto;

    background: white;

    border:
        1px solid
        var(--line);

    border-radius: 20px;

    padding: 30px;

    box-shadow:
        0 18px 60px
        rgba(18,72,125,.10);
}

.form-card h1 {
    margin-top: 0;

    color: var(--blue);
}

label {
    display: block;

    font-size: 13px;

    color: var(--ink);

    margin:
        18px
        0
        7px;
}

input,
select,
textarea {
    width: 100%;

    border:
        1px solid
        #cbdbe7;

    border-radius: 9px;

    padding: 12px 13px;

    font: inherit;

    color: var(--ink);

    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline:
        2px solid
        rgba(11,77,162,.12);

    border-color: var(--blue);
}

.alert {
    padding: 12px 14px;

    border-radius: 9px;

    margin-bottom: 16px;

    font-size: 14px;
}

.alert-error {
    background: #fff1f0;

    border:
        1px solid
        #ffd1cc;

    color: #9b2820;
}

.alert-success {
    background: #ecf9f0;

    border:
        1px solid
        #c6ebd1;

    color: #176b3a;
}

.quick-actions {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0,1fr));

    gap: 15px;
}

.quick-action {
    padding: 20px;

    border:
        1px solid
        var(--line);

    border-radius: 14px;

    text-decoration: none;

    background:
        linear-gradient(
            145deg,
            white,
            #f8fcff
        );
}

.quick-action strong {
    display: block;

    color: var(--blue);

    margin-bottom: 5px;
}

.quick-action span {
    color: var(--muted);

    font-size: 13px;
}

.empty {
    text-align: center;

    padding: 30px;

    color: var(--muted);
}

small.help {
    display: block;

    margin-top: 6px;

    color: var(--muted);
}

@media (max-width: 900px) {

    .stats,
    .quick-actions {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }

}

@media (max-width: 600px) {

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .container {
        width:
            min(100% - 18px, 1180px);

        margin-top: 18px;
    }

}