/* ==========================================================================
   99 Batch Reunion – application styles
   ========================================================================== */

:root {
    --navy: #14213d;
    --navy-2: #1d3557;
    --navy-3: #2a4172;
    --gold: #fca311;
    --gold-dark: #e08e00;
    --ink: #212529;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background-color: #f6f7fb;
}

a { text-decoration: none; }

/* ------------------------------------------------------------------ public */

.site-nav {
    background: rgba(20, 33, 61, 0.97);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.15);
}
.site-nav .navbar-brand { color: #fff; font-size: 1.05rem; }
.site-nav .nav-link { color: rgba(255, 255, 255, 0.82); font-weight: 500; }
.site-nav .nav-link:hover,
.site-nav .nav-link.active { color: var(--gold); }
.site-nav .navbar-toggler { border-color: rgba(255, 255, 255, 0.35); }
.site-nav .navbar-toggler-icon { filter: invert(1); }

.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
    color: #fff;
    padding: 4.5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(252, 163, 17, 0.12);
}
.hero::before { width: 320px; height: 320px; top: -120px; right: -80px; }
.hero::after { width: 220px; height: 220px; bottom: -90px; left: -60px; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-weight: 800; letter-spacing: -0.5px; }
.hero .lead { color: rgba(255, 255, 255, 0.82); }

.hero-badge {
    display: inline-block;
    background: rgba(252, 163, 17, 0.18);
    border: 1px solid rgba(252, 163, 17, 0.5);
    color: var(--gold);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.countdown { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.countdown .count-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.85rem;
    padding: 1rem 0.9rem;
    min-width: clamp(5.5rem, 9vw, 8.5rem);
    text-align: center;
}
.countdown .count-num { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; line-height: 1.05; color: var(--gold); font-variant-numeric: tabular-nums; }
.countdown .count-label { font-size: clamp(0.7rem, 1.1vw, 0.86rem); font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255, 255, 255, 0.7); margin-top: 0.3rem; }

.section-title {
    font-weight: 800;
    color: var(--navy);
    position: relative;
    padding-bottom: 0.6rem;
    margin-bottom: 1.6rem;
}
.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 4px;
    border-radius: 4px;
    background: var(--gold);
}

.info-card {
    background: #fff;
    border: 1px solid #eef0f6;
    border-radius: 1rem;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 6px 24px rgba(20, 33, 61, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(20, 33, 61, 0.12); }
.info-card .icon-box,
.report-card .icon-box {
    width: 46px;
    height: 46px;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(252, 163, 17, 0.15);
    color: var(--gold-dark);
    font-size: 1.3rem;
    margin-bottom: 0.9rem;
}

.fee-card {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
}
.fee-card .fee-amount { font-size: 2.1rem; font-weight: 800; color: var(--gold); }
.fee-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
    font-size: 0.93rem;
}
.fee-line:last-child { border-bottom: 0; }

.notice-list li {
    background: #fff;
    border: 1px solid #eef0f6;
    border-left: 4px solid var(--gold);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.6rem;
    list-style: none;
}

.step {
    text-align: center;
    background: #fff;
    border: 1px solid #eef0f6;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    height: 100%;
}
.step .step-num {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.site-footer { background: var(--navy); color: #fff; padding: 2.5rem 0 1.5rem; margin-top: 3rem; }

/* ------------------------------------------------------------------- auth */

.auth-wrap { min-height: calc(100vh - 140px); display: flex; align-items: center; padding: 2.5rem 0; }
/* .auth-wrap is a flex container, so the Bootstrap .row would shrink to its
   content width instead of filling the container. Force full width so the
   grid columns (and the card centering) behave normally. */
.auth-wrap > .row { width: 100%; margin-left: 0; margin-right: 0; }
.auth-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 18px 50px rgba(20, 33, 61, 0.12);
    overflow: hidden;
    border: 1px solid #eef0f6;
}
.auth-card .auth-head {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff;
    padding: 1.4rem 1.75rem;
}
.auth-card .auth-body { padding: 1.75rem; }

/* --------------------------------------------------------- participant */

.participant-nav { background: var(--navy); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12); }
.participant-nav .navbar-brand { color: #fff; }
.participant-nav .nav-link { color: rgba(255, 255, 255, 0.8); font-weight: 500; font-size: 0.94rem; }
.participant-nav .nav-link:hover,
.participant-nav .nav-link.active { color: var(--gold); }
.participant-nav .navbar-toggler { border-color: rgba(255, 255, 255, 0.35); }
.participant-nav .navbar-toggler-icon { filter: invert(1); }
.participant-footer { background: #fff; border-top: 1px solid #eef0f6; }

.page-head {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff;
    border-radius: 1rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}
.page-head h1, .page-head h2 { font-weight: 700; margin: 0; }
.page-head .sub { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }

.stat-card {
    background: #fff;
    border: 1px solid #eef0f6;
    border-radius: 1rem;
    padding: 1.15rem 1.25rem;
    height: 100%;
    box-shadow: 0 4px 18px rgba(20, 33, 61, 0.05);
}
.stat-card .stat-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.7px; color: #6c757d; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1.3; }
.stat-card .stat-icon {
    width: 42px; height: 42px; border-radius: 0.7rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem;
    background: rgba(20, 33, 61, 0.08); color: var(--navy);
}
.stat-card.accent-gold .stat-icon { background: rgba(252, 163, 17, 0.18); color: var(--gold-dark); }
.stat-card.accent-green .stat-icon { background: rgba(25, 135, 84, 0.14); color: #198754; }
.stat-card.accent-red .stat-icon { background: rgba(220, 53, 69, 0.14); color: #dc3545; }
.stat-card.accent-blue .stat-icon { background: rgba(13, 110, 253, 0.14); color: #0d6efd; }

.card-plain {
    background: #fff;
    border: 1px solid #eef0f6;
    border-radius: 1rem;
    box-shadow: 0 4px 18px rgba(20, 33, 61, 0.05);
}
.card-plain .card-plain-head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eef0f6;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.card-plain .card-plain-body { padding: 1.25rem; }

.quick-link {
    display: block;
    background: #fff;
    border: 1px solid #eef0f6;
    border-radius: 0.9rem;
    padding: 1.1rem 1.2rem;
    color: var(--ink);
    transition: all 0.16s ease;
}
.quick-link:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(20, 33, 61, 0.1);
    color: var(--navy);
}
.quick-link i { color: var(--gold-dark); font-size: 1.4rem; }
.quick-link .ql-title { font-weight: 700; display: block; margin-top: 0.5rem; }
.quick-link .ql-sub { font-size: 0.83rem; color: #6c757d; }

/* ---------------------------------------------------------------- admin */

.admin-body { background: #f2f4f9; }
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    flex: 0 0 250px;
    background: var(--navy);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.15rem 1.25rem;
    font-size: 1.02rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}
.sidebar-brand i { color: var(--gold); font-size: 1.3rem; }
.sidebar-brand strong { color: var(--gold); }
.sidebar-nav { padding: 0.85rem 0.7rem; flex: 1; overflow-y: auto; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: rgba(255, 255, 255, 0.78);
    padding: 0.62rem 0.9rem;
    border-radius: 0.55rem;
    margin-bottom: 0.25rem;
    font-size: 0.93rem;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-nav a.active {
    background: rgba(252, 163, 17, 0.16);
    color: var(--gold);
    border-left-color: var(--gold);
    font-weight: 600;
}
.sidebar-footer { padding: 0.8rem 0.7rem 1.1rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-footer a {
    display: flex; align-items: center; gap: 0.7rem;
    color: rgba(255, 255, 255, 0.7); padding: 0.5rem 0.9rem; font-size: 0.9rem; border-radius: 0.5rem;
}
.sidebar-footer a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e6e9f0;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.admin-topbar-title { font-weight: 700; color: var(--navy); flex: 1; }
.admin-topbar-user { display: flex; align-items: center; gap: 0.65rem; font-size: 0.92rem; }
.admin-content { padding: 1.4rem; flex: 1; }
.admin-flash { padding: 0.25rem 0 0.5rem; }

.filter-bar {
    background: #fff;
    border: 1px solid #eef0f6;
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1.1rem;
}
.table-card {
    background: #fff;
    border: 1px solid #eef0f6;
    border-radius: 0.9rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(20, 33, 61, 0.05);
}
.table-card .table { margin-bottom: 0; }
.table-card thead th {
    background: #f7f8fc;
    color: #495057;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 2px solid #eef0f6;
    white-space: nowrap;
}
.table-card tbody td { vertical-align: middle; font-size: 0.92rem; }
.table-card tfoot td { background: #f7f8fc; font-weight: 600; }

.avatar-sm {
    width: 38px; height: 38px; border-radius: 50%;
    object-fit: cover; border: 2px solid #eef0f6;
}
.avatar-lg { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(20,33,61,.18); }

.detail-grid dt { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.4px; }
.detail-grid dd { font-weight: 600; margin-bottom: 0.8rem; color: var(--ink); }

.screenshot-thumb { max-width: 100%; border-radius: 0.6rem; border: 1px solid #eef0f6; }

.report-card {
    background: #fff;
    border: 1px solid #eef0f6;
    border-radius: 1rem;
    padding: 1.4rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 18px rgba(20, 33, 61, 0.05);
}
.report-card h6 { font-weight: 700; color: var(--navy); }

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.report-actions .btn { flex: 1 1 auto; white-space: nowrap; }

/* ------------------------------------------------------- confirmation */

.certificate {
    background: #fff;
    border: 2px solid var(--navy);
    border-radius: 1rem;
    padding: 2.2rem;
    position: relative;
}
.certificate::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(252, 163, 17, 0.55);
    border-radius: 0.7rem;
    pointer-events: none;
}
.certificate .cert-title { color: var(--navy); font-weight: 800; }
.certificate .cert-id {
    font-family: "Courier New", monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-dark);
    letter-spacing: 2px;
}

/* ---------------------------------------------------------------- print */

@media print {
    .site-nav, .participant-nav, .site-footer, .participant-footer,
    .no-print, .admin-topbar, .sidebar, .alert { display: none !important; }
    body, .participant-body { background: #fff !important; }
    .admin-content, main { padding: 0 !important; }
    .certificate { border-color: #000; box-shadow: none; }
    .card-plain, .page-head { box-shadow: none; }
    .page-head { background: #fff !important; color: #000 !important; border: 1px solid #ccc; }
    .page-head .sub { color: #444 !important; }
}

/* ------------------------------------------------------- entry pass / QR */

.entry-pass { padding: 1.9rem; }
.entry-pass .pass-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 0.9rem;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(20, 33, 61, 0.18);
}
.entry-pass .pass-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: var(--gold);
    font-size: 3rem;
    font-weight: 800;
}
.entry-pass .pass-name { font-size: 1.45rem; font-weight: 800; color: var(--navy); line-height: 1.2; }
.entry-pass .pass-meta dt { font-weight: 600; color: #64748b; }
.entry-pass .pass-meta dd { font-weight: 600; color: var(--navy); }
.entry-pass .pass-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: #64748b; }
.entry-pass .pass-value { font-weight: 700; color: var(--navy); }

.pass-qr {
    display: inline-block;
    background: #fff;
    padding: 0.55rem;
    border: 1px solid #e6e9f2;
    border-radius: 0.8rem;
}
.pass-qr svg { display: block; width: 100%; height: auto; max-width: 220px; }

.scan-verdict {
    border-radius: 1rem;
    padding: 2.1rem 1.5rem;
    text-align: center;
    color: #fff;
    box-shadow: 0 18px 44px rgba(20, 33, 61, 0.18);
}
.scan-valid { background: linear-gradient(135deg, #0b7a45, #16a34a); }
.scan-invalid { background: linear-gradient(135deg, #8f1230, #dc2626); }
.scan-verdict .verdict-icon { font-size: 3.4rem; line-height: 1; margin-bottom: 0.4rem; }
.scan-verdict .verdict-title { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; letter-spacing: 2px; }
.scan-verdict .verdict-sub { opacity: 0.85; font-size: 0.85rem; }
.scan-photo { width: 110px; height: 110px; object-fit: cover; border-radius: 0.8rem; }
.scan-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    color: var(--gold);
    font-size: 2.4rem;
    font-weight: 800;
}

/* compact QR thumbnail for admin tables / dashboard chips */
.pass-qr.pass-qr-sm { padding: 0.3rem; border-radius: 0.55rem; vertical-align: middle; }
.pass-qr.pass-qr-sm svg { max-width: 76px; }

.pass-strip { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pass-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid #e6e9f2;
    border-radius: 0.8rem;
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pass-chip:hover {
    border-color: var(--navy);
    box-shadow: 0 8px 20px rgba(20, 33, 61, 0.08);
    color: inherit;
}
.pass-chip-body { display: flex; flex-direction: column; line-height: 1.25; }
.pass-chip-name { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.pass-chip-id { font-family: "Courier New", monospace; font-size: 0.74rem; color: var(--gold-dark); }
.pass-chip-issued { font-size: 0.7rem; color: #64748b; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        z-index: 1050;
        transition: left 0.22s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }
    .sidebar.open { left: 0; }
    .admin-content { padding: 1rem; }
    .hero { padding: 3rem 0 2.75rem; }
}

@media (max-width: 576px) {
    .certificate { padding: 1.4rem; }
    .stat-card .stat-value { font-size: 1.3rem; }
}
