:root {
    --sic-burgundy: #921125;
    --sic-footer: #77001F;
    --sic-accent: #d0090c;
    --sic-button: #731010;
    --sic-text: #161616;
    --sic-muted: #444444;
    --sic-bg: #ffffff;
    --sic-soft: #f7f7f7;
    --sic-border: #e8e8e8;
    --sic-radius: 10px;
    --header-h: 84px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    color: var(--sic-muted);
    background: var(--sic-soft);
    line-height: 1.5;
}

a { color: var(--sic-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: var(--sic-burgundy);
    color: #fff;
    min-height: var(--header-h);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.brand {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand:hover { text-decoration: none; color: #fff; }

.brand-kicker {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.9;
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: #ffd7dc;
    line-height: 1.3;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-nav a,
.nav-user {
    color: #f0f0f0;
    font-weight: 500;
}

.site-nav a:hover {
    color: #fff;
    text-decoration: none;
}

.nav-user { opacity: 0.85; }

.site-main {
    min-height: calc(100vh - 180px);
    padding: 36px 0 48px;
}

.site-footer {
    background: var(--sic-footer);
    color: #fff;
    padding: 18px 0;
    font-size: 13px;
}

.site-footer p { margin: 0 0 4px; }
.site-footer a { color: #fff; }

.page-title {
    margin: 0 0 8px;
    color: var(--sic-text);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-title em {
    font-style: normal;
    color: var(--sic-accent);
}

.lead {
    margin: 0 0 24px;
    max-width: 640px;
}

.card {
    background: var(--sic-bg);
    border-radius: var(--sic-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    padding: 28px;
    max-width: 560px;
}

.card-wide {
    max-width: none;
}

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

label {
    display: block;
    font-weight: 500;
    color: var(--sic-text);
    margin-bottom: 6px;
}

.required { color: var(--sic-accent); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font: inherit;
    color: var(--sic-text);
    background: #fff;
}

input:focus {
    outline: 2px solid var(--sic-burgundy);
    border-color: var(--sic-burgundy);
}

.btn {
    display: inline-block;
    border: 0;
    background: var(--sic-button);
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
}

.btn:hover {
    background: var(--sic-burgundy);
    text-decoration: none;
    color: #fff;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.muted { color: #666; font-size: 14px; }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success { background: #e8f6ec; color: #146c2e; }
.alert-error { background: #fde8ea; color: #921125; }

.wait-card {
    text-align: center;
    padding: 36px 28px;
}

.wait-kicker {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    color: #666;
}

.wait-when {
    margin: 0 0 16px;
    color: var(--sic-text);
    font-size: 22px;
    font-weight: 700;
}

.video-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(146, 17, 37, 0.18);
}

.video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form input { min-width: 240px; }

.search-form .btn {
    padding: 8px 14px;
    font-size: 13px;
}

.btn-tiny {
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 999px;
}

.btn-secondary {
    background: #444;
}

.btn-secondary:hover {
    background: #222;
}

.btn-link {
    border: 0;
    background: none;
    padding: 0;
    color: var(--sic-accent);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-link:hover { text-decoration: underline; }

body.modal-open { overflow: hidden; }

.modal {
    display: none !important;
}

.modal.is-open {
    display: flex !important;
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 22, 22, 0.45);
}

.modal-card {
    position: relative;
    width: min(420px, 100%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    padding: 22px 22px 18px;
    z-index: 1;
}

.modal-title {
    margin: 0 0 16px;
    font-size: 18px;
    color: var(--sic-text);
}

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

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

table.data {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table.data th,
table.data td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--sic-border);
    font-size: 14px;
    vertical-align: top;
}

table.data th {
    color: var(--sic-text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fbfbfb;
}

table.data tbody tr:hover { background: #fff8f8; }

.empty {
    padding: 24px;
    text-align: center;
    color: #666;
}

.video-wrap.is-blocked {
    display: none;
}

@media (max-width: 640px) {
    .page-title { font-size: 26px; }
    .card { padding: 20px; }
    .search-form input { min-width: 0; }
}
