:root {
    --brand: #8b1e3f;
    --brand-dark: #5c1229;
    --brand-soft: #f8eef1;
    --accent: #e8a33d;
    --ink: #1f2430;
    --muted: #6b7280;
    --surface: #ffffff;
    --page: #f6f4f1;
    --line: #e7e2dc;

    --bs-primary: var(--brand);
    --bs-primary-rgb: 139, 30, 63;
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: 139, 30, 63;
    --bs-link-hover-color: var(--brand-dark);
    --bs-body-font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--page);
    --bs-border-color: var(--line);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--page);
}

main { flex: 1 0 auto; }

h1, h2, h3, .display-title {
    font-family: "Noto Serif", Georgia, serif;
    letter-spacing: -0.01em;
}

/* Buttons & accents ---------------------------------------------------- */
.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
    --bs-btn-disabled-bg: var(--brand);
    --bs-btn-disabled-border-color: var(--brand);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
}

.btn-accent {
    --bs-btn-color: #2b1a00;
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #2b1a00;
    --bs-btn-hover-bg: #d99128;
    --bs-btn-hover-border-color: #d99128;
}

.text-brand { color: var(--brand) !important; }
.bg-brand { background: var(--brand) !important; color: #fff; }
.bg-brand-soft { background: var(--brand-soft) !important; }

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: rgba(139, 30, 63, .5);
    box-shadow: 0 0 0 .2rem rgba(139, 30, 63, .15);
}
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* Header ----------------------------------------------------------------- */
.topstrip {
    background: #2a0d16;
    color: rgba(255, 255, 255, .78);
    font-size: .8rem;
}

.site-header {
    background: linear-gradient(120deg, var(--brand-dark), var(--brand) 60%, #a52a4d);
    color: #fff;
}

/* ORMAS logo (round, transparent corners) */
.brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff, 0 3px 10px rgba(0, 0, 0, .25);
}
.brand-logo-sm { width: 38px; height: 38px; }

.auth-logo {
    display: block;
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
}

.print-only { display: none; }

.site-header .navbar-brand { white-space: normal; min-width: 0; flex: 1 1 auto; margin-right: .5rem; }
.site-header .brand-title { font-family: "Noto Serif", Georgia, serif; font-size: 1.25rem; font-weight: 700; line-height: 1.1; }
.site-header .brand-sub { font-size: .8rem; opacity: .8; }

.hero .badge { white-space: normal; text-align: left; line-height: 1.4; }

.site-header .nav-link { color: rgba(255, 255, 255, .85); font-weight: 500; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: #fff; }
.site-header .navbar-toggler { border-color: rgba(255, 255, 255, .4); }
.site-header .navbar-toggler-icon { filter: invert(1); }

/* Hero ------------------------------------------------------------------- */
.hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(232, 163, 61, .25), transparent 40%),
        linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    padding: 3.5rem 0 5.5rem;
}

.hero .lead { color: rgba(255, 255, 255, .85); }

.hero-stat {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    padding: .9rem 1.1rem;
}
.hero-stat .num { font-size: 1.6rem; font-weight: 700; font-family: "Noto Serif", Georgia, serif; }
.hero-stat .lbl { font-size: .8rem; opacity: .85; }

.lift { margin-top: -3.5rem; }

/* Cards ------------------------------------------------------------------ */
.card {
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(31, 36, 48, .04), 0 6px 20px rgba(31, 36, 48, .04);
}
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 600; }

.scheme-card .scheme-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); font-size: 1.5rem;
}

.fact { border-left: 3px solid var(--accent); padding-left: .75rem; }
.fact .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fact .v { font-weight: 700; }

.seat-bar { height: 6px; border-radius: 6px; background: #eee6e0; overflow: hidden; }
.seat-bar > span { display: block; height: 100%; background: var(--brand); }
.seat-bar.full > span { background: #9ca3af; }

.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #faf8f6; }

.section-title { font-size: 1.05rem; font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: .5rem; }
.section-title .step {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--brand); color: #fff; font-size: .85rem;
    display: inline-grid; place-items: center; font-family: system-ui, sans-serif;
}

.dl-grid { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: .45rem 1rem; margin: 0; }
.dl-grid dt { color: var(--muted); font-weight: 500; }
.dl-grid dd { margin: 0; word-break: break-word; }

.doc-tile {
    border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem;
    display: flex; align-items: center; gap: .6rem; background: #fff;
    text-decoration: none; color: var(--ink);
}
.doc-tile:hover { border-color: var(--brand); color: var(--brand); }
.doc-tile i { font-size: 1.3rem; color: var(--brand); }

.status-timeline { list-style: none; padding: 0; margin: 0; }
.status-timeline li { position: relative; padding: 0 0 1rem 1.6rem; }
.status-timeline li::before {
    content: ""; position: absolute; left: 5px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
    background: #d1c7c0;
}
.status-timeline li::after {
    content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: #eee6e0;
}
.status-timeline li:last-child::after { display: none; }
.status-timeline li.done::before { background: var(--brand); }
.status-timeline li.current::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(232, 163, 61, .25); }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: #2a0d16; color: rgba(255, 255, 255, .7); font-size: .85rem; }
.site-footer a { color: rgba(255, 255, 255, .85); }

/* Admin ------------------------------------------------------------------ */
.admin-shell { display: flex; min-height: calc(100vh - 56px); }
.admin-sidebar {
    width: 240px; flex-shrink: 0; background: #23101a; color: rgba(255, 255, 255, .75);
    padding: 1rem .75rem;
}
.admin-sidebar .nav-link { color: rgba(255, 255, 255, .72); border-radius: 8px; padding: .5rem .75rem; display: flex; gap: .6rem; align-items: center; }
.admin-sidebar .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-sidebar .nav-link.active { background: var(--brand); color: #fff; }
.admin-sidebar .group-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .4); padding: .9rem .75rem .35rem; }
.admin-main { flex: 1; min-width: 0; padding: 1.5rem; }
.admin-topbar { background: var(--brand-dark); color: #fff; min-height: 56px; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }

.stat-card .num { font-size: 1.7rem; font-weight: 700; font-family: "Noto Serif", Georgia, serif; line-height: 1.1; }
.stat-card .lbl { color: var(--muted); font-size: .82rem; }

@media (max-width: 991.98px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-main { padding: 1rem; }
}

@media (max-width: 575.98px) {
    .dl-grid { grid-template-columns: 1fr; gap: 0 0; }
    .dl-grid dd { margin-bottom: .5rem; }
    .hero { padding: 2rem 0 4.5rem; }
    .hero h1 { font-size: 1.9rem; }
    .hero .lead { font-size: 1.05rem; }
    .site-header .brand-logo { width: 46px; height: 46px; }
    .site-header .brand-title { font-size: 1.05rem; }
    .site-header .brand-sub { font-size: .72rem; }
    .topstrip { font-size: .72rem; }
}

/* Print ------------------------------------------------------------------ */
@media print {
    .no-print, .site-header, .topstrip, .site-footer { display: none !important; }
    .print-only { display: block; }
    body { background: #fff; }
    .card { box-shadow: none; border-color: #999; }
}
