/* SIC Mass Roster - Native Mobile Premium */

/* --- VARIABLES --- */
:root {
    --primary-navy: #0f172a;    /* Deep Navy */
    --church-gold: #b49433;     /* Muted Gold */
    --bg-mobile: #ffffff;       /* Pure white for mobile */
    --bg-desktop: #f1f5f9;      /* Light grey for desktop background */
    --input-bg: #f8fafc;
    --text-grey: #64748b;
}

/* --- CORE LAYOUT (MOBILE DEFAULT) --- */
body {
    background-color: var(--bg-mobile);
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--primary-navy);
    
    display: flex;
    flex-direction: column;
    /* Move content slightly up visually */
    justify-content: flex-start; 
    padding: 40px 25px; /* Comfortable mobile padding */
}

/* --- THE CONTAINER (TRANSPARENT ON MOBILE) --- */
.premium-card {
    width: 100%; 
    max-width: 100%;
    background: transparent; /* No white box */
    box-shadow: none;        /* No shadow */
    border: none;            /* No border */
    padding: 0;
    margin: 0 auto;
}

/* We remove the gold top bar on mobile as it looks cleaner without it */
.premium-card::before {
    display: none;
}

/* --- TYPOGRAPHY --- */
.church-brand {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.church-brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0;
    color: var(--primary-navy);
    letter-spacing: -0.5px;
}

.church-brand span {
    display: block;
    margin-top: 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--church-gold);
}

.page-title {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-navy);
    text-align: left; /* Left align feels more like an app form */
}

/* --- FORMS (NATIVE FEEL) --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-grey);
}

.form-control {
    width: 100%;
    height: 58px; /* Nice and tall */
    padding: 0 20px;
    border-radius: 16px; /* Modern rounded corners */
    border: 2px solid #eef2f6; /* Very subtle border */
    background: var(--input-bg);
    
    /* 16px prevents zoom on iPhone */
    font-size: 16px; 
    color: var(--primary-navy);
    box-sizing: border-box; 
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-navy); /* Dark focus border */
    background: #fff;
    outline: none;
}

/* --- BUTTONS --- */
.btn-primary {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 16px;
    background: var(--primary-navy);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.2);
    margin-top: 10px;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-google {
    width: 100%;
    height: 58px;
    margin-top: 15px;
    border: 2px solid #eef2f6;
    border-radius: 16px;
    background: white;
    color: var(--primary-navy);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* --- UTILITIES --- */
.auth-toggle {
    text-align: center;
    margin-top: 30px;
    font-size: 0.95rem;
    color: var(--text-grey);
}

.auth-toggle a {
    color: var(--church-gold); /* Gold link color */
    font-weight: 800;
    text-decoration: none;
}

.alert-box {
    background: #fef2f2;
    color: #991b1b;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #fecaca;
}

.d-none { display: none; }

/* --- DESKTOP ENHANCEMENTS (Min-width 768px) --- */
/* This is where we BRING BACK the card for big screens */
@media (min-width: 768px) {
    body {
        background-color: var(--bg-desktop);
        justify-content: center; /* Center vertically on desktop */
        background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
        background-size: 20px 20px;
    }

    .premium-card {
        background: #ffffff;
        max-width: 450px;
        padding: 50px 40px;
        border-radius: 24px;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255,255,255,0.8);
        position: relative;
    }
    
    /* Bring back the gold bar only on desktop */
    .premium-card::before {
        display: block;
        content: "";
        position: absolute;
        top: 0; left: 0; right: 0;
        height: 6px;
        background: var(--church-gold);
    }

    .church-brand {
        margin-top: 0;
    }
    
    .page-title {
        text-align: center; /* Center title on desktop card */
    }
}

/* --- DASHBOARD & INSIDE PAGES --- */

/* Dashboard Background: Light Grey to make white cards pop */
body.dashboard-mode {
    background-color: #f1f5f9;
    display: block; /* Reset flex from login page */
    padding: 0;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Header Section */
.app-header {
    background: #ffffff;
    padding: 20px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-welcome {
    font-size: 0.9rem;
    color: var(--text-grey);
    font-weight: 600;
}

.user-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-navy);
    line-height: 1.2;
}

/* Content Container */
.dashboard-content {
    padding: 25px;
    max-width: 600px;
    margin: 0 auto;
}

/* The Big "Add Booking" Button */
.btn-add-booking {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
    margin-bottom: 30px;
    transition: transform 0.2s;
    text-decoration: none;
}

.btn-add-booking:active {
    transform: scale(0.98);
}

/* Section Title */
.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Booking Card (The Ticket Look) */
.booking-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border-left: 5px solid var(--church-gold); /* Gold accent stripe */
    position: relative;
}

.booking-date {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-navy);
}

.booking-time {
    font-size: 1rem;
    color: var(--text-grey);
    margin-bottom: 10px;
    font-weight: 500;
}

.booking-role {
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-navy);
    display: inline-block;
}

.status-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-confirmed { color: #15803d; }
.status-pending { color: #b45309; }

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    height: 75px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 200;
    padding-bottom: 10px; /* Safe area for modern phones */
}

.nav-item {
    text-decoration: none;
    color: #94a3b8;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex: 1;
}

.nav-item.active {
    color: var(--primary-navy);
}

.nav-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 4px;
}

/* --- LOGOUT MODAL (Fixed Layout) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.7); /* Slightly darker for better focus */
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.logout-card {
    background: white;
    width: 85%;
    max-width: 320px;
    padding: 30px;
    border-radius: 24px; /* Softer roundness */
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* FIX: Ensure padding doesn't expand width */
    box-sizing: border-box; 
}

.modal-overlay.active .logout-card {
    transform: scale(1);
}

.logout-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 8px;
}

.logout-text {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%; /* Ensure it fits container */
}

.btn-confirm-logout {
    background: #ef4444;
    color: white;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    
    /* FIXES */
    display: block; 
    text-decoration: none; 
    box-sizing: border-box; /* Keeps padding inside */
    border: 2px solid #ef4444; /* Match border to background */
    transition: transform 0.1s;
}

.btn-confirm-logout:active {
    transform: scale(0.98);
}

.btn-cancel-logout {
    background: #f1f5f9;
    color: var(--primary-navy);
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    
    /* FIXES */
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

/* --- PROFILE PAGE STYLES --- */
.profile-header {
    background: white;
    text-align: center;
    padding: 40px 20px;
    border-radius: 0 0 30px 30px; /* Round only the bottom corners */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    margin-bottom: 15px;
}

.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 5px;
}

.profile-role {
    display: inline-block;
    background: #f1f5f9;
    color: #64748b;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.profile-section-title {
    padding: 0 25px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.info-card {
    background: white;
    margin: 0 20px 20px 20px;
    border-radius: 20px;
    padding: 10px; /* Inner spacing */
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.info-row {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
    border-bottom: none;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: #f8fafc;
    color: var(--primary-navy);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
}

.info-content {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 2px;
}

.info-value {
    display: block;
    font-size: 1.05rem;
    color: var(--primary-navy);
    font-weight: 600;
}

/* --- WIZARD UI (Booking System) --- */

/* The Container for the Steps */
.wizard-container {
    background: white;
    min-height: 80vh; /* Takes up most of screen */
    border-radius: 20px 20px 0 0; /* Rounded top */
    padding: 25px;
    margin-top: -20px; /* Overlap header slightly */
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
    position: relative;
    padding-bottom: 100px; /* Space for fixed bottom buttons */
}

/* Progress Steps (Dots at top) */
.wizard-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.step-dot {
    width: 10px;
    height: 10px;
    background: #e2e8f0;
    border-radius: 50%;
    transition: 0.3s;
}

.step-dot.active {
    background: var(--church-gold);
    transform: scale(1.2);
}

.step-dot.completed {
    background: var(--primary-navy);
}

/* Step Content (Hidden by default) */
.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.wizard-step.active {
    display: block;
}

/* Big Question Titles */
.wizard-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 15px;
    line-height: 1.3;
}

.wizard-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Selection Cards (The "Radio Button" replacement) */
.selection-card {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
}

/* When Selected */
.selection-card.selected {
    border-color: var(--primary-navy);
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* The actual radio/checkbox input (Hidden visually but functional) */
.selection-input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-navy);
}

/* Fixed Bottom Action Bar */
.wizard-actions {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 500;
}

.btn-back {
    color: #64748b;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-next {
    background: var(--primary-navy);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

.btn-next:disabled {
    background: #cbd5e1;
    box-shadow: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Warning Box for Double Duty */
.warning-box {
    background: #fff7ed;
    border: 1px solid #ffedd5;
    color: #9a3412;
    padding: 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

/* --- ADMIN PANEL STYLES --- */
.admin-nav {
    background: white;
    padding: 15px 20px;
    display: flex;
    gap: 15px;
    overflow-x: auto; /* Scrollable on small phones */
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.admin-nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 8px 15px;
    border-radius: 20px;
    white-space: nowrap;
}

.admin-nav-link.active {
    background: var(--primary-navy);
    color: white;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-navy);
}

.admin-add-form {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

.btn-delete {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
}