﻿/* ========================================================= */
/* DESIGN TOKENS  — one professional neutral system          */
/* ========================================================= */
:root {
    --ink: #1a1a1a;          /* primary near-black            */
    --ink-soft: #333333;     /* hover / secondary ink        */
    --accent: #1a1a1a;       /* button / brand fill          */
    --accent-soft: #333333;  /* button hover fill            */
    --surface: #ffffff;      /* cards / panels               */
    --bg: #f4f5f7;           /* app background               */
    --bg-grad-1: #f7f8fc;
    --bg-grad-2: #eef1f7;
    --text: #222730;         /* body copy                    */
    --muted: #6b7280;        /* secondary copy               */
    --muted-soft: #9aa0a8;   /* hints / placeholders         */
    --border: #e5e7eb;       /* hairline borders             */
    --border-strong: #d6d9de;
    --success: #1f9d57;
    --danger: #d64550;
    --warning: #c08a2d;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow-sm: 0 2px 10px rgba(16, 24, 40, 0.05);
    --shadow: 0 6px 22px rgba(16, 24, 40, 0.07);
    --shadow-lg: 0 18px 45px rgba(16, 24, 40, 0.10);
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ========================= */
/* GLOBAL                    */
/* ========================= */
body {
    background: var(--bg);
    font-family: var(--font);
    color: var(--text);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.01em;
}

a {
    color: var(--ink);
    text-decoration-color: var(--border-strong);
    text-underline-offset: 2px;
}

a:hover {
    color: var(--ink-soft);
}

/* ========================= */
/* CARD                      */
/* ========================= */
.card-clean {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* ========================= */
/* LOGIN                     */
/* ========================= */
.login-container {
    max-width: 420px;
    margin: 80px auto;
    background: white;
    padding: 40px 30px;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* Toggle buttons */
.role-toggle {
    display: flex;
    margin-bottom: 20px;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.role-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: #f1f1f1;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

    .role-btn.active {
        background: var(--accent);
        color: #fff;
    }

/* Panels */
.login-panel {
    display: block;
}

    .login-panel.hidden {
        display: none;
    }

/* Titles */
.login-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.login-desc {
    font-size: 14px;
    margin-bottom: 20px;
    color: #777;
}

/* Buttons */
.admin-login-btn,
.staff-login-btn {
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: var(--radius);
    font-weight: 600;
    margin-top: 10px;
    transition: 0.3s;
}

.admin-login-btn {
    background: var(--accent);
    color: #fff;
}

    .admin-login-btn:hover {
        background: var(--accent-soft);
        color: #fff;
    }

/* ========================= */
/* TABLE SECTIONS            */
/* ========================= */
.table-section {
    border: 1px solid #eee;
    padding: 12px;
    border-radius: 12px;
    background: #fafafa;
    margin-bottom: 15px;
}

.table-title {
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--ink);
}

/* ========================= */
/* SEAT GRID                 */
/* ========================= */
.seat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 8px;
}

/* ========================= */
/* SEAT                      */
/* ========================= */
.seat-wrapper {
    cursor: pointer;
    display: block;
}

    .seat-wrapper input {
        display: none;
    }

.seat-box {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 45px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 13px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

/* FREE */
.seat-box {
    background: #f8f9fa;
}

    .seat-box:hover {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
    }

/* SELECTED */
.seat-wrapper input:checked + .seat-box {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* TAKEN */
.seat-taken {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ========================= */
/* FORM                      */
/* ========================= */
.form-label {
    font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="file"],
input[type="email"],
input[type="search"],
input[type="date"] {
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    border: 1px solid var(--border);
}

/* ========================= */
/* BUILDER LAYOUT (NEW UI)   */
/* ========================= */
.builder-layout {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    height: calc(100vh - 60px);
    gap: 10px;
    padding: 10px;
}

/* LEFT PANEL */
.builder-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow-y: auto;
}

/* CANVAS */
.builder-canvas {
    background: #e9ecef;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* RIGHT PANEL */
.builder-actions {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* ========================= */
/* CANVAS SYSTEM             */
/* ========================= */
#canvasContainer {
    max-width: 100%;
}

#canvasWrapper {
    position: relative;
    display: inline-block;
    border: 2px solid #ddd;
    background: #fff;
    max-width: 100%;
}

#baseImage {
    display: block;
    max-width: 100%;
    height: auto;
}

/* QR */
#qrOverlay {
    position: absolute;
    width: 120px;
    top: 50px;
    left: 50px;
    cursor: move;
}

/* ========================= */
/* INPUT HELPERS             */
/* ========================= */
.small-input {
    width: 90px;
}

/* ========================= */
/* PROGRESS BAR              */
/* ========================= */
.progress {
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #eee;
}

.progress-bar {
    width: 0%;
    background: var(--accent);
    color: #fff;
    font-weight: bold;
    text-align: center;
    font-size: 12px;
}

/* ========================= */
/* SCANNER PAGE              */
/* ========================= */

.scanner-container {
    display: flex;
    justify-content: center;
    padding: 40px 10px;
}

.scanner-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.camera-wrapper {
    width: 100%;
    height: 240px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

#cameraPreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* RESULT CARD */
.result-card {
    background: #f9fafb;
    padding: 15px;
    border-radius: 12px;
}

.result-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* SEAT CARDS */
.seats-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.seat-card {
    background: #fff;
    border: 2px solid #1a1a1a;
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
}

.seat-table-name {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    text-transform: uppercase;
}

.seat-number {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-top: 2px;
}

/* SCAN COUNTER */
.scan-count-badge {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
}

/* STATUS BADGES */
.status-badge {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

    .status-badge.pending {
        background: #fff3cd;
    }

    .status-badge.present {
        background: #d4edda;
    }

    .status-badge.declined {
        background: #f8d7da;
    }

/* ========================= */
/* STAFF PORTAL              */
/* ========================= */

.staff-portal-container {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    /* soft gradient background */
    background: linear-gradient(135deg, #f7f8fc, #eef1f7);
}

.staff-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 30px 25px;
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

    .staff-card:hover {
        transform: translateY(-4px);
    }

/* TITLE */
.staff-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #222;
}

/* SUBTEXT */
.staff-subtitle {
    color: #666;
    font-size: 15px;
}

/* BUTTON */
.staff-btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    background: #111;
    color: #fff;
    transition: all 0.2s ease;
}

    .staff-btn:hover {
        background: #333;
        color: #fff;
        transform: translateY(-2px);
    }

/* MOBILE POLISH */
@media (max-width: 500px) {
    .staff-card {
        padding: 25px 18px;
    }

    .staff-title {
        font-size: 20px;
    }
}

/* STAFF USER TEXT */
.staff-user {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

    .staff-user strong {
        color: #222;
    }

/* ========================= */
/* STAFF LOGIN PAGE          */
/* ========================= */

.staff-login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f7f8fc 0%, #eaecf4 100%);
    padding: 20px;
}

.staff-login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.09);
    text-align: center;
}

.staff-login-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.staff-login-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 6px;
}

.staff-login-sub {
    font-size: 0.88rem;
    color: #888;
    margin-bottom: 28px;
}

.staff-login-field {
    text-align: left;
    margin-bottom: 18px;
}

.staff-login-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #444;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.staff-login-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #111;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

    .staff-login-input:focus {
        border-color: #111;
        background: #fff;
    }

.staff-login-btn {
    width: 100%;
    padding: 13px;
    margin-top: 8px;
    background: #111;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.2s, transform 0.15s;
}

    .staff-login-btn:hover {
        background: #333;
        transform: translateY(-2px);
    }

.staff-login-error {
    background: #fff3f3;
    color: #c0392b;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 18px;
    text-align: left;
}

/* ========================= */
/* ABOUT US / PRIVACY PAGES  */
/* ========================= */

.info-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

/* HERO BANNER */
.info-hero {
    text-align: center;
    padding: 56px 20px 40px;
}

.info-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
}

.info-hero-sub {
    font-size: 1rem;
    color: #888;
}

/* SECTIONS */
.info-section {
    padding: 36px 32px;
    background: #fff;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

.info-section-dark {
    background: #111;
    color: #eee;
}

    .info-section-dark .info-section-title {
        color: #fff;
    }

    .info-section-dark .info-section-text {
        color: #ccc;
    }

    .info-section-dark a {
        color: #fff;
        text-decoration: underline;
        text-underline-offset: 2px;
    }

.info-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 14px;
}

.info-section-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.75;
    margin-bottom: 12px;
}

.info-list {
    padding-left: 20px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.9;
}

/* FEATURE CARDS GRID */
.info-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.info-feature-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 22px 18px;
    text-align: center;
}

.info-feature-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.info-feature-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
}

.info-feature-card p {
    font-size: 0.84rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .info-hero-title {
        font-size: 1.6rem;
    }

    .info-section {
        padding: 24px 18px;
    }

    .info-features {
        grid-template-columns: 1fr;
    }
}

/* ========================================================= */
/* BOOTSTRAP HARMONIZATION                                   */
/* Restyles default Bootstrap components so every admin /    */
/* form / list page adopts the same professional neutral     */
/* system automatically.                                     */
/* ========================================================= */

/* ---- Page rhythm ---- */
main.pb-3 {
    padding-top: 8px;
}

.container h1,
.container h2,
.container h3 {
    margin-bottom: 4px;
}

/* ---- NAVBAR ---- */
.navbar {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm);
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.navbar .navbar-brand {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink) !important;
    font-size: 1.15rem;
}

.navbar .nav-link {
    color: var(--muted) !important;
    font-weight: 500;
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
    transition: color 0.15s ease;
}

    .navbar .nav-link:hover,
    .navbar .nav-link.active {
        color: var(--ink) !important;
    }

.nav-pill-btn {
    background: var(--accent);
    color: #fff !important;
    border-radius: 999px;
    padding: 0.45rem 1.1rem !important;
}

    .nav-pill-btn:hover {
        background: var(--accent-soft);
        color: #fff !important;
    }

/* ---- FOOTER ---- */
.footer {
    border-top: 1px solid var(--border) !important;
    background: var(--surface);
    color: var(--muted) !important;
    padding: 22px 0;
    margin-top: 40px;
    font-size: 0.9rem;
}

    .footer a {
        color: var(--ink);
        text-decoration: none;
    }

    .footer a:hover {
        text-decoration: underline;
    }

/* ---- BUTTONS (shared) ---- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

    .btn:active {
        transform: translateY(1px);
    }

    .btn:focus,
    .btn:focus-visible {
        box-shadow: 0 0 0 0.2rem rgba(26, 26, 26, 0.15);
        outline: none;
    }

/* Primary / dark / info => near-black */
.btn-primary,
.btn-dark,
.btn-info {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

    .btn-primary:hover,
    .btn-dark:hover,
    .btn-info:hover,
    .btn-primary:focus,
    .btn-dark:focus,
    .btn-info:focus {
        background-color: var(--accent-soft);
        border-color: var(--accent-soft);
        color: #fff;
    }

/* Secondary => light neutral chip */
.btn-secondary {
    background-color: #f3f4f6;
    border-color: var(--border-strong);
    color: var(--ink);
}

    .btn-secondary:hover,
    .btn-secondary:focus {
        background-color: #e7e9ee;
        border-color: var(--border-strong);
        color: var(--ink);
    }

/* Outlines */
.btn-outline-dark,
.btn-outline-secondary {
    border-color: var(--border-strong);
    color: var(--ink);
    background-color: transparent;
}

    .btn-outline-dark:hover,
    .btn-outline-secondary:hover,
    .btn-outline-dark:focus,
    .btn-outline-secondary:focus {
        background-color: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

/* Semantic actions (refined, single family) */
.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    color: #fff;
}

    .btn-success:hover,
    .btn-success:focus {
        background-color: #198049;
        border-color: #198049;
        color: #fff;
    }

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

    .btn-danger:hover,
    .btn-danger:focus {
        background-color: #bf3942;
        border-color: #bf3942;
        color: #fff;
    }

.btn-warning {
    background-color: var(--warning);
    border-color: var(--warning);
    color: #fff;
}

    .btn-warning:hover,
    .btn-warning:focus {
        background-color: #a8771f;
        border-color: #a8771f;
        color: #fff;
    }

/* Primary CTA pill used across dashboards */
.wedding-btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.12s ease;
}

    .wedding-btn:hover {
        background: var(--accent-soft);
        color: #fff;
        transform: translateY(-1px);
    }

/* ---- TABLES ---- */
.table {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
    vertical-align: middle;
}

    .table > thead {
        background: #fafbfc;
    }

        .table > thead th {
            border-bottom: 1px solid var(--border) !important;
            color: var(--muted);
            font-weight: 700;
            font-size: 0.78rem;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            padding: 0.85rem 0.9rem;
        }

    .table > tbody td {
        border-color: var(--border) !important;
        padding: 0.8rem 0.9rem;
        color: var(--text);
    }

    .table.table-bordered,
    .table.table-bordered th,
    .table.table-bordered td {
        border-color: var(--border) !important;
    }

    .table > tbody tr:hover {
        background: #f8f9fb;
    }

/* ---- FORMS ---- */
.form-label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.form-control,
.form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    color: var(--text);
    background-color: var(--surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .form-control::placeholder {
        color: var(--muted-soft);
    }

    .form-control:focus,
    .form-select:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 0.18rem rgba(26, 26, 26, 0.10);
        background-color: var(--surface);
    }

/* keep older .form-group spacing consistent */
.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        font-weight: 600;
        margin-bottom: 0.35rem;
        display: inline-block;
    }

/* ---- CARDS ---- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}

.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--ink);
}

/* ---- BADGES ---- */
.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.4em 0.7em;
    border-radius: 999px;
}

    .badge.bg-success {
        background-color: var(--success) !important;
    }

    .badge.bg-secondary {
        background-color: var(--muted) !important;
    }

    .badge.bg-danger {
        background-color: var(--danger) !important;
    }

    .badge.bg-warning {
        background-color: var(--warning) !important;
        color: #fff !important;
    }

/* ---- ALERTS / VALIDATION ---- */
.alert {
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.text-danger,
.field-validation-error,
.validation-summary-errors {
    color: var(--danger) !important;
}

/* ---- PANEL CARD HELPER (forms on neutral bg) ---- */
.panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 26px;
    max-width: 640px;
}

.page-head {
    margin: 6px 0 20px;
}

    .page-head .page-sub {
        color: var(--muted);
        font-size: 0.95rem;
    }

/* ---- Legacy card alias used by several form views ---- */
.wedding-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 26px 24px;
}

/* Tame Bootstrap accent text to the neutral system */
.text-primary {
    color: var(--ink) !important;
}

.text-success {
    color: var(--success) !important;
}

/* ---- Status pills (attendee list) ---- */
.custom-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-pending {
    background: #fff4e0;
    color: #9a6700;
    border-color: #ffe2b3;
}

.badge-sent {
    background: #e8eefc;
    color: #274bb5;
    border-color: #cdd9f7;
}

.badge-accepted {
    background: #e4f6ec;
    color: #1f7a47;
    border-color: #c4ecd4;
}

.badge-present {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.badge-declined {
    background: #fde7e9;
    color: #b32430;
    border-color: #f6c9ce;
}

.badge-expired,
.badge-secondary {
    background: #eef0f2;
    color: #5b6370;
    border-color: #e1e4e8;
}

/* Keep wide admin tables usable on small screens (no view changes needed) */
@media (max-width: 768px) {
    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* ========================================================= */
/* PAGINATION  — shared _Pager partial                       */
/* ========================================================= */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.pager-info {
    color: var(--muted);
    font-size: 0.85rem;
}

    .pager-info strong {
        color: var(--ink);
        font-weight: 700;
    }

.pager-dot {
    margin: 0 4px;
    color: var(--muted-soft);
}

.pager-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Prev / Next buttons */
.pager-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

    .pager-btn:hover {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
        transform: translateY(-1px);
    }

    .pager-btn.disabled {
        opacity: 0.4;
        pointer-events: none;
    }

    .pager-btn span {
        font-size: 1.05rem;
        line-height: 1;
    }

/* Numbered page chips */
.pager-pages {
    display: inline-flex;
    gap: 4px;
    margin: 0 4px;
}

.pager-page {
    min-width: 36px;
    text-align: center;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .pager-page:hover {
        background: #f3f4f6;
    }

    .pager-page.active {
        background: var(--accent);
        color: #fff;
    }

.pager-ellipsis {
    padding: 7px 4px;
    color: var(--muted-soft);
    align-self: center;
}

/* On small screens drop the number chips, keep Prev / Next */
@media (max-width: 560px) {
    .pager-pages {
        display: none;
    }

    .pager {
        justify-content: center;
    }
}

/* ========================================================= */
/* ROWS-PER-PAGE  — shared _PageSize segmented control        */
/* ========================================================= */
.page-size {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.page-size-label {
    font-size: 0.74rem;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.page-size-options {
    display: inline-flex;
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.page-size-opt {
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 40px;
    text-align: center;
    padding: 6px 14px;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

    .page-size-opt:hover {
        color: var(--ink);
    }

    .page-size-opt.active {
        background: var(--accent);
        color: #fff;
        box-shadow: var(--shadow-sm);
    }

/* ========================= */
/* HOME / LANDING HERO       */
/* ========================= */
.home-hero {
    padding: 70px 0 30px;
}

.home-eyebrow {
    display: inline-block;
    background: #eef1f7;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.home-title {
    font-size: 2.7rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 18px;
}

.home-lead {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.home-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.home-feature-grid {
    margin-top: 56px;
}

@media (max-width: 600px) {
    .home-hero {
        padding: 44px 0 20px;
    }

    .home-title {
        font-size: 1.95rem;
    }

    .home-lead {
        font-size: 1rem;
    }
}

/* ========================================================= */
/* THEME TOGGLE BUTTON  (navbar)                             */
/* ========================================================= */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 8px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

    .theme-toggle:hover {
        background: var(--bg);
        transform: translateY(-1px);
    }

    .theme-toggle:active {
        transform: translateY(0);
    }

    .theme-toggle:focus-visible {
        outline: none;
        box-shadow: 0 0 0 0.2rem rgba(79, 91, 213, 0.25);
    }

.theme-toggle-icon {
    pointer-events: none;
}

/* ========================================================= */
/* DARK MODE                                                 */
/* Activated by data-theme="dark" on <html> (set by the      */
/* navbar toggle + a no-flash script in _Layout's <head>).   */
/* Components read the design tokens, so we flip the tokens   */
/* first, then patch the rules that hardcode light colours.   */
/* ========================================================= */
html[data-theme="dark"] {
    --ink: #f4f6fb;          /* primary text / headings (now light) */
    --ink-soft: #d7dbe4;
    --surface: #1c2230;      /* cards / panels                      */
    --bg: #11151e;           /* app background                      */
    --bg-grad-1: #161c28;
    --bg-grad-2: #0e121a;
    --text: #dfe3ec;         /* body copy                           */
    --muted: #9aa3b4;        /* secondary copy                      */
    --muted-soft: #6b7384;   /* hints / placeholders                */
    --border: #2a3242;       /* hairline borders                    */
    --border-strong: #3a4456;
    --accent: #4f5bd5;       /* button / brand fill (white text)    */
    --accent-soft: #6370e6;  /* button hover                        */
    --success: #2bb673;
    --danger: #e2606d;
    --warning: #d6a23e;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.45);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.65);
    color-scheme: dark;
}

/* Smooth the flip */
body {
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* --- Surfaces that hardcode white / very-light backgrounds --- */
html[data-theme="dark"] .card-clean,
html[data-theme="dark"] .login-container,
html[data-theme="dark"] .builder-sidebar,
html[data-theme="dark"] .builder-actions,
html[data-theme="dark"] .scanner-card,
html[data-theme="dark"] .staff-card,
html[data-theme="dark"] .staff-login-card,
html[data-theme="dark"] .info-section,
html[data-theme="dark"] .table,
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel-card,
html[data-theme="dark"] .wedding-card,
html[data-theme="dark"] #canvasWrapper {
    background: var(--surface);
    color: var(--text);
}

html[data-theme="dark"] #canvasWrapper {
    border-color: var(--border-strong);
}

html[data-theme="dark"] .builder-canvas {
    background: #0c0f16;
}

/* --- Neutral fill blocks (chips / table heads / segmented tracks) --- */
html[data-theme="dark"] .table > thead,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .role-btn,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .page-size-options,
html[data-theme="dark"] .home-eyebrow,
html[data-theme="dark"] .table-section,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .info-feature-card,
html[data-theme="dark"] .seat-box {
    background: #232b3b;
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] .table > tbody tr:hover,
html[data-theme="dark"] .pager-page:hover,
html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .page-size-opt:hover {
    background: #2b3447;
    color: var(--ink);
}

/* --- Inputs --- */
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="file"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .staff-login-input {
    background-color: #161c28;
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .staff-login-input:focus {
    background-color: #161c28;
    border-color: var(--accent);
    box-shadow: 0 0 0 0.18rem rgba(79, 91, 213, 0.25);
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .staff-login-input::placeholder {
    color: var(--muted-soft);
}

/* --- Hardcoded dark fills that should follow the accent --- */
html[data-theme="dark"] .staff-btn,
html[data-theme="dark"] .staff-login-btn,
html[data-theme="dark"] .scan-count-badge {
    background: var(--accent);
    color: #fff;
}

    html[data-theme="dark"] .staff-btn:hover,
    html[data-theme="dark"] .staff-login-btn:hover {
        background: var(--accent-soft);
        color: #fff;
    }

/* --- Hardcoded text colours → light --- */
html[data-theme="dark"] .result-name,
html[data-theme="dark"] .seat-table-name,
html[data-theme="dark"] .staff-title,
html[data-theme="dark"] .staff-user strong,
html[data-theme="dark"] .staff-login-title,
html[data-theme="dark"] .info-hero-title,
html[data-theme="dark"] .info-section-title,
html[data-theme="dark"] .info-feature-card h3 {
    color: var(--ink);
}

html[data-theme="dark"] .seat-number,
html[data-theme="dark"] .staff-subtitle,
html[data-theme="dark"] .staff-user,
html[data-theme="dark"] .staff-login-sub,
html[data-theme="dark"] .staff-login-label,
html[data-theme="dark"] .login-desc,
html[data-theme="dark"] .info-hero-sub,
html[data-theme="dark"] .info-section-text,
html[data-theme="dark"] .info-list,
html[data-theme="dark"] .info-feature-card p {
    color: var(--muted);
}

/* Seat card outline */
html[data-theme="dark"] .seat-card {
    background: var(--surface);
    border-color: var(--accent);
}

/* Gradient page backgrounds */
html[data-theme="dark"] .staff-portal-container,
html[data-theme="dark"] .staff-login-page {
    background: linear-gradient(135deg, #11151e 0%, #0c0f16 100%);
}

/* Progress track */
html[data-theme="dark"] .progress {
    background: #2a3242;
}

/* Navbar hamburger visibility on dark */
html[data-theme="dark"] .navbar-toggler {
    border-color: var(--border-strong);
}

html[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1) grayscale(1) brightness(1.6);
}

/* Status pills keep dark text on their pale backgrounds */
html[data-theme="dark"] .status-badge.pending,
html[data-theme="dark"] .status-badge.present,
html[data-theme="dark"] .status-badge.declined {
    color: #15202b;
}
