/* ============================================================
   CMCM Annual Convention Registration — v2
   Premium Emerald / Gold / Cream  ·  Dark Admin Suite
   ============================================================ */

:root {
    --emerald: #0d7377;
    --emerald-dark: #095c5f;
    --emerald-light: #14a085;
    --gold: #c9a227;
    --gold-light: #e8c84a;
    --gold-dark: #a8841a;
    --cream: #faf8f3;
    --cream-dark: #f5f0e6;
    --charcoal: #14141f;
    --charcoal-light: #1e1e2e;
    --ink: #1a1a2e;
    --white: #ffffff;
    --danger: #e05252;
    --success: #2fbf71;
    --warning: #f0a020;
    --info: #38a3c7;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.10);
    --shadow-lg: 0 24px 60px rgba(0,0,0,0.14);
    --radius: 18px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   PUBLIC — HERO
   ============================================================ */
.hero {
    background: linear-gradient(140deg, #0b4f52 0%, var(--emerald) 38%, var(--emerald-dark) 62%, #10101c 100%);
    color: var(--white);
    padding: 72px 20px 110px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.hero-glow-1 {
    top: -30%; right: -15%;
    width: 620px; height: 620px;
    background: radial-gradient(circle, rgba(201,162,39,0.22) 0%, transparent 65%);
    animation: floatGlow 9s ease-in-out infinite;
}

.hero-glow-2 {
    bottom: -40%; left: -12%;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 65%);
    animation: floatGlow 12s ease-in-out infinite reverse;
}

@keyframes floatGlow {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-24px) scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
    animation: heroIn 0.9s ease both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    padding: 8px 22px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 26px;
    border: 1px solid rgba(255,255,255,0.16);
}

.hero-badge .dot {
    width: 8px; height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(1.25); }
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    font-weight: 900;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    line-height: 1.08;
}

.hero-theme {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.6vw, 1.45rem);
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 28px;
    font-style: italic;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    opacity: 0.88;
}

.hero-meta span { display: flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 18px; height: 18px; opacity: 0.75; }

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 38px;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 14px 10px;
    min-width: 82px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.count-num {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.count-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    opacity: 0.75;
}

.count-live {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold-light);
    padding: 10px;
}

/* ============================================================
   PUBLIC — FORM
   ============================================================ */
.form-section {
    margin-top: -56px;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 44px;
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid rgba(0,0,0,0.04);
}

.form-card h2 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    margin-bottom: 6px;
}

.form-card .subtitle {
    color: #8a8a96;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group { margin-bottom: 22px; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.form-group label .required { color: var(--danger); margin-left: 2px; }

.field-hint { color: #9a9aa6; font-size: 0.78rem; margin-top: 6px; display: block; }

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9e6de;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--ink);
}

.form-control:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(13,115,119,0.12);
}

.form-control::placeholder { color: #bfc0c8; }

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Segmented member/visitor picker */
.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.segment { cursor: pointer; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }

.segment-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 12px;
    border: 2px solid #e9e6de;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    color: #6b6b76;
    transition: var(--transition);
    background: var(--white);
}

.segment-icon { font-size: 1.15rem; }

.segment input:checked + .segment-body {
    border-color: var(--emerald);
    background: rgba(13,115,119,0.07);
    color: var(--emerald-dark);
    box-shadow: 0 0 0 4px rgba(13,115,119,0.10);
}

.segment:hover .segment-body { border-color: #cfccc2; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-lg { padding: 17px 32px; font-size: 1.05rem; width: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
    color: var(--white);
    box-shadow: 0 6px 18px rgba(13,115,119,0.32);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(13,115,119,0.42); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-gold {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    color: #2a2205;
    box-shadow: 0 4px 15px rgba(201,162,39,0.30);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(201,162,39,0.42); }

.btn-sm { padding: 8px 15px; font-size: 0.82rem; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--emerald);
    color: var(--emerald);
}
.btn-outline:hover { background: var(--emerald); color: var(--white); }

.btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.25);
    color: #cfd2dd;
}
.btn-outline-light:hover { border-color: var(--gold); color: var(--gold-light); }

/* ============================================================
   PUBLIC — STATS
   ============================================================ */
.stats-section { padding: 70px 20px; background: var(--cream-dark); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 22px;
    max-width: 960px;
    margin: 0 auto;
}

.stat-card {
    background: var(--white);
    padding: 30px 18px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
}

.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.4rem;
}

.stat-card:nth-child(4n+1) .stat-icon { background: rgba(13,115,119,0.10); }
.stat-card:nth-child(4n+2) .stat-icon { background: rgba(201,162,39,0.12); }
.stat-card:nth-child(4n+3) .stat-icon { background: rgba(47,191,113,0.10); }
.stat-card:nth-child(4n+4) .stat-icon { background: rgba(56,163,199,0.10); }

.stat-number {
    font-family: var(--font-display);
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 0.88rem; color: #8a8a96; margin-top: 7px; }

/* ============================================================
   FOOTER / FLASH / SUCCESS
   ============================================================ */
.footer {
    background: var(--charcoal);
    color: rgba(255,255,255,0.55);
    text-align: center;
    padding: 32px 20px;
    font-size: 0.88rem;
}
.footer a { color: var(--gold); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.flash {
    padding: 15px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: 500;
    font-size: 0.92rem;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-success { background: rgba(47,191,113,0.10); color: #1d7a48; border: 1px solid rgba(47,191,113,0.25); }
.flash-error { background: rgba(224,82,82,0.09); color: #b03030; border: 1px solid rgba(224,82,82,0.25); }
.flash-info { background: rgba(56,163,199,0.10); color: #247491; border: 1px solid rgba(56,163,199,0.25); }
.flash-icon { font-weight: 700; font-size: 1.05rem; line-height: 1.4; }

.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(201,162,39,0.12), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(13,115,119,0.12), transparent 40%),
        linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
    padding: 20px;
}

.success-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 54px 44px;
    text-align: center;
    max-width: 520px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: popIn 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.92) translateY(14px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.success-icon {
    width: 84px; height: 84px;
    background: linear-gradient(135deg, var(--success) 0%, #1e9e57 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 26px;
    font-size: 2.6rem;
    color: var(--white);
    box-shadow: 0 10px 34px rgba(47,191,113,0.35);
}

.success-card h2 { font-family: var(--font-display); font-size: 1.9rem; margin-bottom: 12px; }
.success-card p { color: #8a8a96; margin-bottom: 28px; }
.success-actions .btn { width: 100%; }

.closed-notice { text-align: center; padding: 20px 0; }
.closed-icon { font-size: 2.6rem; margin-bottom: 14px; }
.closed-notice p { color: #8a8a96; }

/* ============================================================
   ADMIN — DARK PREMIUM SUITE
   ============================================================ */
.admin-body {
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(13,115,119,0.14), transparent 60%),
        radial-gradient(900px 400px at -10% 110%, rgba(201,162,39,0.08), transparent 55%),
        #101018;
    color: #e6e8f0;
    min-height: 100vh;
}

.admin-header {
    background: rgba(16,16,24,0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header .logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.admin-header .logo span { color: var(--gold-light); }

.admin-header nav { display: flex; gap: 4px; flex-wrap: wrap; }

.admin-header nav a {
    color: rgba(230,232,240,0.6);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.admin-header nav a:hover { color: #fff; background: rgba(255,255,255,0.07); }

.admin-header nav a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(13,115,119,0.55), rgba(13,115,119,0.30));
    box-shadow: inset 0 0 0 1px rgba(20,160,133,0.35);
}

.admin-header nav a.nav-logout:hover { color: #ff9c9c; background: rgba(224,82,82,0.12); }

.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    padding: 8px 13px;
    border-radius: 10px;
    cursor: pointer;
}

.admin-main {
    padding: 30px 28px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-card {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    padding: 28px;
    margin-bottom: 26px;
}

.admin-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-card p.muted, .muted { color: #9a9eb0; }

/* Admin stats */
.admin-body .stat-card {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: none;
}
.admin-body .stat-number { color: #fff; }
.admin-body .stat-label { color: #9a9eb0; }

/* ============================================================
   TABLE (dark)
   ============================================================ */
.table-responsive { overflow-x: auto; border-radius: var(--radius-sm); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table th, .data-table td {
    padding: 13px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
}

.data-table th {
    background: rgba(255,255,255,0.05);
    font-weight: 600;
    color: #b9bdcf;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
}

.data-table td { color: #d6d9e4; }
.data-table td strong { color: #fff; }
.data-table tr:hover td { background: rgba(13,115,119,0.08); }

.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-member { background: rgba(13,115,119,0.22); color: #5fd6d0; }
.badge-visitor { background: rgba(201,162,39,0.18); color: var(--gold-light); }
.badge-imported { background: rgba(56,163,199,0.18); color: #7cc7e0; }
.badge-website { background: rgba(47,191,113,0.16); color: #6fdfaa; }
.badge-yes { background: rgba(47,191,113,0.16); color: #6fdfaa; }
.badge-no { background: rgba(255,255,255,0.07); color: #9a9eb0; }

/* ============================================================
   FILTERS (dark)
   ============================================================ */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    align-items: center;
}

.filter-bar input, .filter-bar select {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: #e6e8f0;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-family: inherit;
    min-width: 170px;
}

.filter-bar select option { background: #1c1c2a; color: #e6e8f0; }

.filter-bar input:focus, .filter-bar select:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 0 3px rgba(20,160,133,0.18);
}

.filter-bar input::placeholder { color: #7a7e92; }

/* Pagination (dark) */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}

.pagination a {
    background: rgba(255,255,255,0.05);
    color: #d6d9e4;
    border: 1px solid rgba(255,255,255,0.10);
}
.pagination a:hover { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.pagination .current { background: var(--emerald); color: #fff; }

/* Attendance toggle */
.attendance-check { cursor: pointer; font-size: 1.25rem; user-select: none; transition: transform 0.15s; display: inline-block; }
.attendance-check:hover { transform: scale(1.2); }

.actions { display: flex; gap: 6px; }
.actions .btn { padding: 6px 12px; font-size: 0.76rem; }

/* ============================================================
   CHARTS (pure CSS/SVG)
   ============================================================ */
.charts-row {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 26px;
    margin-bottom: 26px;
}

.donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.donut { transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; }
.donut .donut-bg { stroke: rgba(255,255,255,0.07); }
.donut .donut-seg { stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(0.4,0,0.2,1); }

.donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.donut-legend span { display: flex; align-items: center; gap: 9px; color: #c3c7d6; }
.legend-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.bar-chart { display: flex; flex-direction: column; gap: 13px; }

.bar-row { display: grid; grid-template-columns: 190px 1fr 46px; gap: 12px; align-items: center; font-size: 0.83rem; }
.bar-row .bar-name { color: #c3c7d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: rgba(255,255,255,0.06); border-radius: 6px; height: 12px; overflow: hidden; }
.bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--emerald) 0%, var(--emerald-light) 60%, var(--gold) 130%);
    animation: barGrow 1s ease both;
}
.bar-row .bar-val { color: #fff; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

@keyframes barGrow { from { width: 0 !important; } }

/* ============================================================
   LOGIN (dark)
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(800px 400px at 75% 10%, rgba(13,115,119,0.35), transparent 60%),
        radial-gradient(700px 380px at 15% 90%, rgba(201,162,39,0.16), transparent 55%),
        linear-gradient(150deg, #0d1b1e 0%, #101018 100%);
    padding: 20px;
}

.login-card {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.09);
    backdrop-filter: blur(16px);
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
    padding: 48px 40px;
    width: 100%;
    max-width: 430px;
    text-align: center;
    animation: popIn 0.5s ease both;
}

.login-card .logo-icon {
    width: 62px; height: 62px;
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.7rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(13,115,119,0.4);
}

.login-card h2 { font-family: var(--font-display); font-size: 1.55rem; margin-bottom: 6px; color: #fff; }
.login-card .subtitle { color: #9a9eb0; font-size: 0.9rem; margin-bottom: 30px; }
.login-card .form-group { text-align: left; }
.login-card .form-group label { color: #c3c7d6; }

.login-card .form-control {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}
.login-card .form-control:focus { border-color: var(--emerald-light); box-shadow: 0 0 0 4px rgba(20,160,133,0.18); }
.login-card .form-control::placeholder { color: #6d7185; }

.lockout-note {
    margin-top: 18px;
    font-size: 0.82rem;
    color: #9a9eb0;
}

/* ============================================================
   IMPORT (dark)
   ============================================================ */
.upload-zone {
    border: 2px dashed rgba(255,255,255,0.18);
    border-radius: var(--radius);
    padding: 52px 30px;
    text-align: center;
    background: rgba(255,255,255,0.03);
    transition: var(--transition);
    cursor: pointer;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--emerald-light);
    background: rgba(13,115,119,0.08);
}

.upload-zone .upload-icon { font-size: 2.8rem; margin-bottom: 14px; opacity: 0.6; }
.upload-zone p { color: #9a9eb0; margin-bottom: 6px; }
.upload-zone p strong { color: #e6e8f0; }
.upload-zone .hint { font-size: 0.8rem; color: #6d7185; }

.guide-box {
    margin-top: 22px;
    padding: 18px;
    background: rgba(13,115,119,0.09);
    border: 1px solid rgba(20,160,133,0.2);
    border-radius: var(--radius-sm);
}
.guide-box ol { padding-left: 20px; color: #b9bdcf; line-height: 1.9; font-size: 0.9rem; }
.guide-box a { color: var(--gold-light); }

/* ============================================================
   MODAL (dark)
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5,5,10,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
    background: #1b1b29;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--radius);
    box-shadow: 0 30px 90px rgba(0,0,0,0.6);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: popIn 0.3s ease both;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { font-size: 1.1rem; margin: 0; color: #fff; font-family: var(--font-display); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #9a9eb0; line-height: 1; text-decoration: none; }
.modal-close:hover { color: #fff; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal .form-group label { color: #c3c7d6; }
.modal .form-control {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}
.modal .form-control:focus { border-color: var(--emerald-light); box-shadow: 0 0 0 4px rgba(20,160,133,0.18); }
.modal select.form-control option { background: #1c1c2a; }

/* ============================================================
   CHECK-IN MODE
   ============================================================ */
.checkin-hero {
    text-align: center;
    margin-bottom: 28px;
}
.checkin-hero h2 { font-family: var(--font-display); font-size: 1.8rem; color: #fff; margin-bottom: 6px; }
.checkin-hero p { color: #9a9eb0; }

.checkin-search {
    max-width: 640px;
    margin: 0 auto 26px;
    position: relative;
}

.checkin-search input {
    width: 100%;
    padding: 20px 24px 20px 60px;
    font-size: 1.15rem;
    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-family: inherit;
    transition: var(--transition);
}
.checkin-search input:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 0 5px rgba(20,160,133,0.18);
}
.checkin-search input::placeholder { color: #6d7185; }
.checkin-search .search-icon {
    position: absolute;
    left: 22px; top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    opacity: 0.55;
}

.checkin-live-count {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(47,191,113,0.12);
    border: 1px solid rgba(47,191,113,0.3);
    color: #6fdfaa;
    padding: 9px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.92rem;
    margin-top: 14px;
}

.checkin-results {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkin-card {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideDown 0.25s ease;
}

.checkin-avatar {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkin-info { flex: 1; min-width: 0; }
.checkin-name { font-weight: 700; color: #fff; font-size: 1.02rem; }
.checkin-sub { color: #9a9eb0; font-size: 0.82rem; margin-top: 2px; }

.btn-checkin {
    background: linear-gradient(135deg, var(--success), #1e9e57);
    color: #fff;
    padding: 14px 26px;
    font-size: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(47,191,113,0.3);
}
.btn-checkin:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(47,191,113,0.45); }

.checkin-done {
    background: rgba(47,191,113,0.10);
    border: 1px solid rgba(47,191,113,0.25);
    color: #6fdfaa;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-undo {
    background: none;
    border: none;
    color: #7a7e92;
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
}
.btn-undo:hover { color: #ffb1b1; }

.checkin-empty {
    text-align: center;
    color: #6d7185;
    padding: 34px 20px;
    font-size: 0.95rem;
}

/* ============================================================
   MESSAGES TOOL
   ============================================================ */
.messages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
}

.phone-output {
    background: #0d0d15;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--radius-sm);
    padding: 18px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.82rem;
    color: #9fe8c8;
    max-height: 300px;
    overflow-y: auto;
    word-break: break-all;
    line-height: 1.8;
    white-space: pre-wrap;
}

.template-card {
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.03);
}
.template-card h4 { color: #fff; font-size: 0.95rem; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.template-card p { color: #b9bdcf; font-size: 0.86rem; line-height: 1.7; white-space: pre-wrap; }

.copy-btn {
    background: rgba(201,162,39,0.14);
    border: 1px solid rgba(201,162,39,0.35);
    color: var(--gold-light);
    padding: 6px 13px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.copy-btn:hover { background: rgba(201,162,39,0.28); }
.copy-btn.copied { background: rgba(47,191,113,0.2); border-color: rgba(47,191,113,0.4); color: #6fdfaa; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
}

.settings-grid .form-group label { color: #c3c7d6; }
.settings-grid .form-control {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}
.settings-grid .form-control:focus { border-color: var(--emerald-light); box-shadow: 0 0 0 4px rgba(20,160,133,0.18); }

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}
.toggle-row .toggle-label strong { color: #fff; display: block; font-size: 0.95rem; }
.toggle-row .toggle-label span { color: #9a9eb0; font-size: 0.8rem; }

.switch { position: relative; width: 52px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.14);
    border-radius: 28px;
    cursor: pointer;
    transition: var(--transition);
}
.slider::before {
    content: '';
    position: absolute;
    width: 22px; height: 22px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
}
.switch input:checked + .slider { background: var(--emerald); }
.switch input:checked + .slider::before { transform: translateX(24px); }

.danger-zone {
    border: 1px solid rgba(224,82,82,0.3);
    background: rgba(224,82,82,0.06);
}

/* ============================================================
   MISC / RESPONSIVE
   ============================================================ */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(128,128,150,0.35); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(128,128,150,0.55); }

.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }

@media (max-width: 900px) {
    .charts-row { grid-template-columns: 1fr; }
    .messages-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero { padding: 56px 18px 96px; }
    .form-card { padding: 30px 22px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .countdown-item { min-width: 68px; padding: 11px 8px; }
    .count-num { font-size: 1.5rem; }

    .admin-header { flex-wrap: wrap; padding: 12px 16px; gap: 10px; }
    .nav-toggle { display: block; }
    .admin-header nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 2px;
        padding-top: 10px;
    }
    .admin-header nav.open { display: flex; }
    .admin-header nav a { padding: 11px 14px; }
    .admin-main { padding: 20px 14px 50px; }
    .admin-card { padding: 20px 16px; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar input, .filter-bar select { width: 100%; min-width: 0; }

    .bar-row { grid-template-columns: 110px 1fr 40px; }

    .checkin-card { flex-wrap: wrap; }
    .btn-checkin { width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .hero-meta { flex-direction: column; gap: 8px; }
    .segmented { grid-template-columns: 1fr; }
}

/* ============================================================
   NEW: PUBLIC CHECK-IN / LOOKUP STYLES
   ============================================================ */

.lookup-section { text-align: center; }
.lookup-section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.lookup-found {
    text-align: center;
    padding: 10px 0;
}

.lookup-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 8px 24px rgba(13,115,119,0.35);
}

.lookup-found h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.lookup-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #8a8a96;
    font-size: 0.92rem;
    margin-bottom: 24px;
}

.lookup-details .badge {
    font-size: 0.72rem;
    padding: 3px 10px;
}

.already-checked {
    background: rgba(47,191,113,0.08);
    border: 1px solid rgba(47,191,113,0.2);
    border-radius: var(--radius-sm);
    padding: 24px;
    margin-bottom: 20px;
}

.checkin-done-public {
    color: var(--success);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.checkin-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon-small {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--success), #1e9e57);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(47,191,113,0.3);
}

.checkin-success h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.checkin-success p {
    color: #8a8a96;
    margin-bottom: 20px;
}

.lookup-divider,
.register-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 36px 0;
    color: #b5b5c0;
    font-size: 0.85rem;
    font-weight: 500;
}

.lookup-divider::before,
.lookup-divider::after,
.register-divider::before,
.register-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e9e6de;
}

.lookup-divider span,
.register-divider span {
    padding: 0 16px;
}

.register-section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 6px;
}

/* ============================================================
   NEW: CONVENTION INFO SECTION
   ============================================================ */
.info-section {
    padding: 0 20px 70px;
    background: var(--cream-dark);
}

.info-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 44px;
    max-width: 720px;
    margin: 0 auto;
    border: 1px solid rgba(0,0,0,0.04);
    text-align: center;
}

.info-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 18px;
    color: var(--emerald-dark);
}

.info-card p {
    color: #5a5a66;
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 14px;
}

.info-card p strong {
    color: var(--ink);
}

.info-highlight {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--emerald-dark);
    margin: 22px 0;
    padding: 16px;
    background: rgba(13,115,119,0.06);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--emerald);
}

.info-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 28px;
    text-align: left;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--cream);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.04);
}

.info-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.info-item div {
    display: flex;
    flex-direction: column;
}

.info-item div strong {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8a8a96;
    margin-bottom: 4px;
}

.info-item div span {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .info-card { padding: 28px 22px; }
    .info-meta { grid-template-columns: 1fr; }
    .lookup-details { flex-direction: column; gap: 6px; }
}

/* ============================================================
   ADMIN MOBILE OVERHAUL
   ============================================================ */

@media (max-width: 768px) {
    /* Header: better hamburger, full-width nav */
    .admin-header {
        padding: 12px 16px;
        flex-wrap: nowrap;
    }
    .admin-header .logo {
        font-size: 1.05rem;
    }
    .nav-toggle {
        display: block;
        background: rgba(255,255,255,0.08);
        border: none;
        color: #fff;
        font-size: 1.3rem;
        padding: 10px 14px;
        border-radius: 10px;
        cursor: pointer;
        margin-left: auto;
    }
    .admin-header nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        padding-top: 12px;
        margin-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.08);
    }
    .admin-header nav.open {
        display: flex;
    }
    .admin-header nav a {
        padding: 14px 16px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    /* Main padding */
    .admin-main {
        padding: 18px 14px 40px;
    }

    /* Stats: 2 columns on small tablets, stacked nicely */
    .admin-body .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .admin-body .stat-card {
        padding: 20px 12px;
    }
    .admin-body .stat-number {
        font-size: 1.6rem;
    }

    /* Charts: full width stack */
    .charts-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .donut-wrap {
        padding: 10px 0;
    }

    /* Filters: vertical stack, full width */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .filter-bar input,
    .filter-bar select {
        width: 100%;
        min-width: 0;
        padding: 14px 16px;
        font-size: 1rem;
    }
    .filter-bar button,
    .filter-bar .btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }

    /* Tables: better scroll hint */
    .table-responsive {
        border-radius: var(--radius-sm);
        border: 1px solid rgba(255,255,255,0.08);
    }
    .data-table th,
    .data-table td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    /* Pagination */
    .pagination {
        gap: 8px;
    }
    .pagination a,
    .pagination span {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Check-in page */
    .checkin-hero h2 {
        font-size: 1.45rem;
    }
    .checkin-search input {
        padding: 18px 18px 18px 54px;
        font-size: 1.05rem;
    }
    .checkin-card {
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
    }
    .checkin-avatar {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        border-radius: 12px;
    }
    .checkin-name {
        font-size: 0.95rem;
    }
    .btn-checkin {
        width: 100%;
        padding: 14px;
    }

    /* Modal: edge-to-edge feel */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .modal {
        max-width: 100%;
        border-radius: var(--radius) var(--radius) 0 0;
        max-height: 92vh;
    }
    .modal-header {
        padding: 18px 20px;
    }
    .modal-body {
        padding: 20px;
    }
    .modal-footer {
        padding: 14px 20px;
        flex-direction: column;
    }
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    /* Settings grid */
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    /* Messages */
    .messages-grid {
        grid-template-columns: 1fr;
    }
    .phone-output {
        font-size: 0.78rem;
        padding: 14px;
    }

    /* Login */
    .login-card {
        padding: 36px 24px;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    /* Stats: single column on very small phones */
    .admin-body .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .admin-body .stat-card {
        padding: 16px 10px;
    }
    .admin-body .stat-number {
        font-size: 1.4rem;
    }
    .admin-body .stat-label {
        font-size: 0.78rem;
    }

    /* Bar chart: smaller branch names */
    .bar-row {
        grid-template-columns: 100px 1fr 36px;
        gap: 8px;
    }
    .bar-name {
        font-size: 0.75rem;
    }
    .bar-val {
        font-size: 0.8rem;
    }

    /* Action buttons in table */
    .actions {
        flex-direction: column;
        gap: 6px;
    }
    .actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Smooth table scrolling indicator */
.table-responsive {
    background:
        linear-gradient(to right, rgba(16,16,24,0.9), transparent 40px) left,
        linear-gradient(to left, rgba(16,16,24,0.9), transparent 40px) right;
    background-size: 50px 100%;
    background-repeat: no-repeat;
    background-attachment: local;
}

/* Better touch targets on mobile */
.btn, .checkin-card, .template-card, .upload-zone {
    -webkit-tap-highlight-color: transparent;
}

/* Fix iOS input zoom */
input, select, textarea {
    font-size: 16px;
}
