/* ═══════════════════════════════════════════
   RSVP Event — Premium Theme
   Black / White / Gold
   ═══════════════════════════════════════════ */

:root {
    --black: #0a0a0a;
    --dark: #111111;
    --dark2: #1a1a1a;
    --dark3: #222222;
    --white: #ffffff;
    --off-white: #f0f0f0;
    --gold: #f9ad2a;
    --gold-light: #e8cc6e;
    --gold-dark: #b8960c;
    --red: #e74c3c;
    --green: #27ae60;
    --warn: #f39c12;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─── Public Landing ─────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem 1.25rem;
    max-width: 480px;
    width: 100%;
}

.hero-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 0.25rem;
    letter-spacing: 0.04em;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--off-white);
    opacity: 0.85;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.hero-body {
    font-size: 1.05rem;
    color: var(--off-white);
    opacity: 0.9;
    margin-bottom: 1.25rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

.hero-details {
    font-size: 0.9rem;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.hero-dresscode {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.hero-subtitle .detail-icon {
    color: var(--gold);
    margin-right: 0.3rem;
}

/* ─── Form ────────────────────────────────── */
.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.3rem; text-align: left; }

.form-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    font-weight: 600;
}

.form-group input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--white);
    font-size: 1rem;
    font-family: var(--font);
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255,255,255,0.12);
}

.form-group input::placeholder { color: rgba(255,255,255,0.35); }

/* Toggle +1 */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 28px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider { background: var(--gold); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(24px); }

.btn-confirm {
    display: inline-block;
    background: var(--gold);
    color: var(--black);
    border: none;
    border-radius: 6px;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

.btn-confirm:hover { background: var(--gold-light); }
.btn-confirm:active { transform: scale(0.97); }

/* ─── Messages ────────────────────────────── */
.msg {
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1rem;
}

.msg-success { background: rgba(39,174,96,0.2); border: 1px solid var(--green); color: #a0f0c0; }
.msg-error   { background: rgba(231,76,60,0.2);  border: 1px solid var(--red);   color: #f0a0a0; }
.msg-info    { background: rgba(212,175,55,0.15); border: 1px solid var(--gold);  color: var(--gold-light); }

/* ─── Success state ──────────────────────── */
.success-check {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold);
    animation: popIn 0.4s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════ */

.admin-wrap {
    min-height: 100vh;
    background: var(--black);
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--dark);
    border-bottom: 1px solid rgba(212,175,55,0.25);
    flex-wrap: wrap;
}

.admin-nav .nav-brand {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--gold);
    margin-right: auto;
    text-decoration: none;
}

.admin-nav a {
    color: var(--off-white);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active { background: rgba(212,175,55,0.15); color: var(--gold); }

.admin-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ─── Cards ───────────────────────────────── */
.card {
    background: var(--dark2);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ─── Stats row ──────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--dark2);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold);
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.55);
    margin-top: 0.25rem;
}

/* ─── Capacity grid ──────────────────────── */
.seat-grid {
    display: grid;
    grid-template-columns: repeat(25, 1fr);
    gap: 2px;
}

.seat-grid .seat {
    aspect-ratio: 1;
    border-radius: 2px;
    background: var(--dark3);
    transition: background 0.15s;
}

.seat-grid .seat-filled {
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
}

.seat-grid .seat-filled:hover {
    transform: scale(1.6);
    z-index: 2;
    position: relative;
    box-shadow: 0 0 8px rgba(212,175,55,0.5);
    border-radius: 3px;
}

/* Tooltip */
.seat-tooltip {
    position: absolute;
    z-index: 100;
    background: var(--dark);
    border: 1px solid var(--gold);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--white);
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    max-width: 280px;
}

/* ─── Legend ──────────────────────────────── */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

/* ─── Progress bar ───────────────────────── */
.progress-wrap {
    background: var(--dark3);
    border-radius: 6px;
    height: 14px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
    background: var(--gold);
}

/* ─── Alert banners ──────────────────────── */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-warn { background: rgba(243,156,18,0.15); border: 1px solid var(--warn); color: var(--warn); }
.alert-danger { background: rgba(231,76,60,0.2); border: 1px solid var(--red); color: var(--red); }

/* ─── Table ──────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    white-space: nowrap;
}

.data-table th {
    background: var(--dark3);
    color: var(--gold);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.7rem 0.75rem;
    text-align: left;
    position: sticky;
    top: 0;
    cursor: pointer;
    user-select: none;
}

.data-table th:hover { color: var(--gold-light); }

.data-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--off-white);
}

.data-table tr:hover td { background: rgba(212,175,55,0.04); }

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-yes { background: rgba(39,174,96,0.2); color: var(--green); }
.badge-no  { background: rgba(231,76,60,0.15); color: #f0a0a0; }

/* ─── Admin form elements ────────────────── */
.admin-input {
    background: var(--dark3);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    color: var(--white);
    font-size: 0.9rem;
    font-family: var(--font);
    width: 100%;
}

.admin-input:focus { outline: none; border-color: var(--gold); }

.btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
}

.btn:hover { opacity: 0.85; }

.btn-gold { background: var(--gold); color: var(--black); }
.btn-green { background: var(--green); color: var(--white); }
.btn-red { background: var(--red); color: var(--white); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.78rem; }

/* ─── Login page ─────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    padding: 1rem;
}

.login-card {
    background: var(--dark2);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
}

.login-card h1 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.login-card .form-group { margin-bottom: 1rem; }

/* ─── Checkin page ───────────────────────── */
.checkin-search {
    position: relative;
}

.checkin-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark2);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 0 0 6px 6px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.checkin-results .result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}

.checkin-results .result-item:hover { background: rgba(212,175,55,0.1); }

.checkin-results .result-item .ri-name { font-weight: 600; }
.checkin-results .result-item .ri-email { font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.checkin-results .result-item .ri-badge {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    margin-left: 0.5rem;
}

.guest-detail {
    background: var(--dark2);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.guest-detail h3 { color: var(--gold); margin-bottom: 0.75rem; }

/* ─── Responsive ─────────────────────────── */
@media (max-width: 768px) {
    .hero-title { font-size: 1.7rem; }
    .seat-grid { grid-template-columns: repeat(20, 1fr); gap: 1px; }
    .admin-nav { gap: 0.4rem; padding: 0.75rem 1rem; }
    .admin-nav a { font-size: 0.78rem; padding: 0.35rem 0.6rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-value { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .seat-grid { grid-template-columns: repeat(16, 1fr); }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-container { padding: 1rem 0.75rem; }
}
