:root {
    --bg: #110506;
    --bg-soft: #21090a;
    --panel: rgba(58, 9, 11, 0.92);
    --panel-2: rgba(100, 15, 18, 0.9);
    --line: rgba(255, 210, 210, 0.16);
    --text: #f6e7e5;
    --muted: #d0a9a2;
    --red: #d11f28;
    --red-strong: #8b0000;
    --gold: #d1b16f;
    --success: #ffcf8a;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Source Sans 3', sans-serif;
    background:
        radial-gradient(circle at top, rgba(161, 17, 22, 0.22), transparent 35%),
        linear-gradient(180deg, #160607 0%, #090203 100%);
    color: var(--text);
}

.page-shell {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(209, 177, 111, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(209, 177, 111, 0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, black 65%, transparent 100%);
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.topbar,
.card,
.nav {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(79, 10, 12, 0.95), rgba(35, 7, 8, 0.95));
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo,
.brand-seal {
    width: 74px;
    height: 74px;
    border-radius: 50%;
}

.brand-logo {
    object-fit: cover;
    border: 2px solid rgba(209, 177, 111, 0.35);
}

.brand-seal {
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 30%, #c0282e, #5d0508 72%);
    border: 2px solid rgba(209, 177, 111, 0.42);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand-seal.large {
    width: 88px;
    height: 88px;
    margin: 0 auto 12px;
}

.brand-title,
h1,
h2 {
    font-family: 'Cinzel', serif;
}

.brand-title {
    font-size: 1.35rem;
    color: #ffe8e1;
}

.brand-subtitle,
.session-role,
.muted,
.intro,
.demo-note,
.section-kicker {
    color: var(--muted);
}

.session-box {
    text-align: right;
}

.session-name {
    font-weight: 700;
    color: #ffe5dd;
}

.nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0 22px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(50, 10, 12, 0.88);
}

.nav a,
.button {
    transition: 0.2s ease;
}

.nav a {
    padding: 10px 14px;
    border-radius: 12px;
    color: #ffd6d0;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
}

.nav a:hover,
.button:hover {
    transform: translateY(-1px);
}

.content {
    display: grid;
    gap: 18px;
}

.card {
    background: linear-gradient(180deg, rgba(61, 9, 10, 0.94), rgba(33, 6, 7, 0.94));
    border-radius: 24px;
    padding: 24px;
}

.narrow {
    max-width: 620px;
}

.hero h1,
.card h1 {
    margin: 0 0 10px;
}

.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    margin-bottom: 10px;
}

.stats-grid,
.two-columns {
    display: grid;
    gap: 18px;
}

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

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

.metric-card span,
.metric-card small {
    display: block;
}

.metric-card strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 1.8rem;
    color: #fff4f1;
}

.plain-list {
    margin: 0;
    padding-left: 20px;
}

.plain-list li + li {
    margin-top: 10px;
}

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

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

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

th {
    color: #f8c4ba;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.badge,
.alert,
.success,
.demo-note {
    border-radius: 14px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    background: rgba(209, 177, 111, 0.12);
    border: 1px solid rgba(209, 177, 111, 0.18);
}

.stack {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

input,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 240, 240, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
}

input:focus,
textarea:focus {
    outline: 2px solid rgba(209, 31, 40, 0.5);
    border-color: rgba(209, 31, 40, 0.55);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border: 0;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    background: linear-gradient(135deg, var(--red), var(--red-strong));
    color: white;
}

.alert,
.success,
.demo-note {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.alert {
    background: rgba(209, 31, 40, 0.18);
}

.success {
    margin-bottom: 16px;
    background: rgba(209, 177, 111, 0.12);
    color: #ffe2aa;
}

.demo-note {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.login-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(100%, 520px);
}

.login-card {
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(68, 8, 10, 0.98), rgba(26, 4, 5, 0.98));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

@media (max-width: 720px) {
    .page {
        width: calc(100% - 20px);
        padding-top: 14px;
    }

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

    .session-box {
        text-align: left;
    }

    .login-card,
    .card {
        padding: 18px;
    }
}
