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

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
    padding-top: 120px; /* Space for fixed navbar */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar - Purple gradient to match new banner */
.navbar {
    background: linear-gradient(135deg, #5e35b1 0%, #7e57c2 50%, #9575cd 100%);
    color: white;
    padding: 0;
    box-shadow: 0 4px 20px rgba(94, 53, 177, 0.25);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    overflow: visible; /* was hidden; caused sub-menus to be clipped */
}

/* decorative circles like new_design header */
.navbar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px; /* Reduced from 8px for tighter layout */
    min-height: 75px;
    position: relative;
    z-index: 1;
}

/* Header Top Row: Brand and Greeting */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Header Bottom Row: Hamburger first, then Icons */
.header-bottom-row {
    display: flex;
    justify-content: space-between; /* Distribute hamburger and icons evenly */
    align-items: center;
    gap: 0; /* Remove gap, use space-between distribution */
    width: 100%;
}

.brand-hamburger-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* stacked brand elements like new header */
.brand-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-brand {
    font-size: 24px; /* 24px like new header h1 */
    font-weight: 800;
    color: white;
    text-decoration: none;
    z-index: 1001;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    letter-spacing: -0.5px;
    line-height: 1;
}

.nav-brand:hover {
    transform: translateY(-1px);
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.nav-subtitle {
    font-size: 11px; /* uppercase small subtitle */
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.95);
}

.header-greeting {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    opacity: 0.95;
    padding: 6px 12px;
    backdrop-filter: blur(10px);
}

.wave-emoji { font-size: 18px; animation: wave 2s ease-in-out infinite; }
@keyframes wave { 0%,100%{transform:rotate(0)} 10%,30%{transform:rotate(14deg)} 20%,40%{transform:rotate(-8deg)} 50%{transform:rotate(0)} }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu > li { position: relative; }

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-menu a:hover { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); transform: translateY(-2px); }

/* Hamburger Menu - keep */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    padding: 10px;
    width: 48px; /* Increased from 40px to match icons */
    height: 48px; /* Increased from 40px to match icons */
    z-index: 1001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.hamburger:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}
.hamburger span {
    width: 24px; /* Increased from 20px */
    height: 3px; /* Increased from 2.5px */
    background-color: white;
    margin: 3px 0; /* Increased from 2.5px */
    transition: all 0.3s ease;
    border-radius: 3px;
}
.hamburger.active { background: rgba(255, 255, 255, 0.25); }
.hamburger.active span:nth-child(1) { transform: rotate(-45deg) translate(-6px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(45deg) translate(-6px, -6px); }

/* Mobile Quick Access Icons - Only visible on mobile */
.mobile-quick-icons {
    display: none; /* Hidden by default (desktop) */
    gap: 12px; /* Increased spacing for larger icons */
    align-items: center;
}

.mobile-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px; /* Increased from 40px */
    height: 48px; /* Increased from 40px */
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px; /* Slightly larger radius */
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-icon-btn:active {
    transform: translateY(0);
}

/* Active state for mobile icon buttons */
.mobile-icon-btn.active {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.mobile-icon-btn.active svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Loading state for mobile icon buttons */
.mobile-icon-btn.loading svg {
    animation: icon-pulse 1s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}

.mobile-icon-btn svg {
    width: 26px; /* Increased from 22px */
    height: 26px; /* Increased from 22px */
    transition: all 0.3s ease;
}

/* Notification Badge for Events Icon */
.mobile-icon-badge {
    position: absolute;
    top: -6px; /* Adjusted for larger icon */
    right: -6px; /* Adjusted for larger icon */
    min-width: 22px; /* Slightly larger badge */
    height: 22px; /* Slightly larger badge */
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 100%);
    color: white;
    border-radius: 11px;
    font-size: 12px; /* Slightly larger text */
    font-weight: 700;
    display: none; /* Hidden by default, shown via JS */
    align-items: center;
    justify-content: center;
    padding: 0 6px; /* Slightly more padding */
    box-shadow: 0 3px 10px rgba(255, 71, 87, 0.5);
    border: 2.5px solid #5e35b1; /* Thicker border */
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Dropdown - more specific selectors to override nav-menu a styles */
.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; }
.dropdown::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 0.5rem; display: none; }
.dropdown:hover::after { display: block; }
.nav-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 0.75rem 0;
    list-style: none;
    z-index: 10000;
}
.nav-menu .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 6px solid white;
}
.nav-menu .dropdown-menu li {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    display: block !important;
}
.nav-menu .dropdown-menu a {
    padding: 0.75rem 1.5rem !important;
    color: #2c3e50 !important;
    background: transparent !important;
    display: block !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    transform: none !important;
    white-space: nowrap !important;
}
.nav-menu .dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(126, 87, 194, 0.12) 0%, rgba(149, 117, 205, 0.12) 100%) !important;
    color: #5e35b1 !important;
    transform: translateX(5px) !important;
    backdrop-filter: none !important;
}

/* Remove legacy pure-hover opening; JS now manages .open state */
/* .dropdown:hover .dropdown-menu { display: block !important; animation: fadeInDown 0.3s ease; }  <-- removed */

@keyframes fadeInDown { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.dropdown > a { padding-bottom: 0.75rem; }

/* Transition-enabled hidden state */
.nav-menu .dropdown-menu {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}
.dropdown.open > .dropdown-menu {
    display: block !important; /* ensure visible */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Desktop-specific styles - hide mobile elements */
@media (min-width: 769px) {
    .mobile-quick-icons {
        display: none !important;
    }

    .header-bottom-row {
        display: none !important;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .header-top-row {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-menu .dropdown-menu {
        display: none !important;
        position: absolute !important;
        top: calc(100% + 0.5rem) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: white !important;
        min-width: 200px !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
        border-radius: 12px !important;
        padding: 0.75rem 0 !important;
        z-index: 10000 !important;
    }
    .nav-menu .dropdown-menu li {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .nav-menu .dropdown-menu a {
        color: #2c3e50 !important;
        background: transparent !important;
        display: block !important;
        padding: 0.75rem 1.5rem !important;
        white-space: nowrap !important;
    }
    .nav-menu .dropdown-menu a:hover {
        background: linear-gradient(90deg, rgba(126, 87, 194, 0.12) 0%, rgba(149, 117, 205, 0.12) 100%) !important;
        color: #5e35b1 !important;
    }
}

/* ===== FLOATING ACTION BUTTONS (FABs) ===== */
.fab-container { display: none !important; /* Hidden - using sticky navbar icons instead */ }
.fab { display: flex; align-items: center; justify-content: center; width: auto; min-width: 49px; height: 49px; background: linear-gradient(135deg, #5e35b1 0%, #7e57c2 100%); border-radius: 24.5px; box-shadow: 0 4px 18px rgba(94,53,177,0.5); text-decoration: none; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); padding: 0 17px; overflow: visible; }
.fab-label { font-size: 11px; font-weight: 700; color: white; white-space: nowrap; opacity: 1; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); }
.fab:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 8px 25px rgba(94,53,177,0.6); }
.fab:active { transform: translateY(-2px) scale(1.02); }
.fab-diem-danh { background: linear-gradient(135deg, #5e35b1 0%, #7e57c2 100%); }
.fab-banh-mi { background: linear-gradient(135deg, #D2691E 0%, #CD853F 100%); }
.fab-banh-mi:hover { box-shadow: 0 8px 25px rgba(210,105,30,0.6); }

/* FAB visibility & mobile resilience tweaks */
.fab-container { z-index: 100000 !important; }
@media (max-width: 480px) {
  .fab-container { right: 12px !important; bottom: calc(env(safe-area-inset-bottom, 8px) + 12px) !important; }
  .fab { min-width: 42px !important; height: 42px !important; padding: 0 12px !important; }
  .fab-label { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 360px) {
  /* Ultra narrow: show icon-only */
  .fab-label { display: none; }
  .fab { min-width: 42px !important; padding: 0 10px !important; }
}

/* Global Loading Spinner */
.global-loading-spinner { border: 5px solid rgba(255,255,255,0.2); border-top: 5px solid #667eea; border-right: 5px solid #764ba2; border-radius: 50%; width: 60px; height: 60px; animation: spin 0.8s linear infinite; margin: 0 auto; }
@keyframes spin { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding-top: 90px; /* Reduced space for mobile navbar */
    }

    .hamburger { display: flex; }
    .mobile-quick-icons { display: flex !important; } /* Show quick icons on mobile */

    /* Two-row layout on mobile with tighter spacing */
    .nav-container {
        flex-direction: column;
        gap: 8px; /* Reduced gap between rows */
        padding: 10px 16px; /* Tighter padding */
        min-height: auto; /* Remove min-height for more compact look */
    }

    .header-top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-bottom-row {
        display: flex;
        justify-content: space-between; /* Evenly distribute hamburger and icons */
        align-items: center;
        gap: 0;
        margin: 0; /* Remove margin offset */
        padding: 0 4px; /* Add slight padding for breathing room */
    }

    .brand-stack {
        display: flex;
        flex-direction: column;
        gap: 1px; /* Tighter spacing */
    }

    .nav-brand {
        font-size: 22px; /* Slightly smaller on mobile */
    }

    .nav-subtitle {
        font-size: 10px; /* Slightly smaller */
    }

    .header-greeting {
        font-size: 13px; /* Smaller for mobile */
        padding: 3px 8px; /* More compact */
    }

    .wave-emoji {
        font-size: 13px;
    }

    /* Icon spacing optimized for spread layout */
    .mobile-quick-icons {
        gap: 15px; /* Spacing between larger icons */
    }

    .mobile-icon-btn {
        width: 52px; /* Larger on mobile */
        height: 52px; /* Larger on mobile */
    }

    .mobile-icon-btn svg {
        width: 28px; /* Larger icons */
        height: 28px; /* Larger icons */
    }

    /* Hamburger matches icon size on mobile */
    .hamburger {
        width: 52px; /* Match icon size */
        height: 52px; /* Match icon size */
        padding: 12px;
    }

    .hamburger span {
        width: 26px; /* Larger bars */
        height: 3px;
        margin: 3px 0;
    }
    .fab-container { bottom: 20px !important; right: 16px !important; gap: 10px !important; }
    .fab { padding: 0 14px !important; min-width: 42px !important; height: 42px !important; border-radius: 21px; display: flex; align-items: center; justify-content: center; }
    .fab-label { font-size: 11px !important; display: block; opacity: 1; }
    .fab:hover { transform: scale(1.05); }
    .fab-icon { font-size: 24px; margin: 0; }
    .nav-menu { position: fixed; left: -100%; top: 90px; flex-direction: column; background: linear-gradient(180deg, #5e35b1 0%, #7e57c2 50%, #9575cd 100%); width: 100%; text-align: center; transition: left 0.3s ease; box-shadow: 0 8px 24px rgba(0,0,0,0.2); padding: 1.5rem 0; gap: 0; z-index: 999; max-height: calc(100vh - 90px); overflow-y: auto; }
    .nav-menu.active { left: 0; }
    .nav-menu > li { width: 100%; padding: 0.5rem 0; }
    .nav-menu a { padding: 1rem; }
    .nav-menu .dropdown-menu { position: static; box-shadow: none; background: transparent; margin-top: 0.5rem; padding: 0.5rem 0; border-radius: 0; transform: none; display: none; transition: none !important; left: auto !important; }
    .nav-menu .dropdown-menu::before { display: none; }
    .nav-menu .dropdown-menu li { background: transparent; transition: none !important; }
    .nav-menu .dropdown-menu a { color: white !important; background: transparent !important; padding: 0.75rem 1.5rem; display: block; font-weight: 500; transition: background-color 0.15s ease !important; transform: none !important; }
    .nav-menu .dropdown-menu a:hover { background: rgba(255,255,255,0.1) !important; color: white !important; transform: none !important; }
    .dropdown.active .dropdown-menu { display: block; animation: none !important; }
    .dropdown:hover .dropdown-menu { display: none; }
    .dropdown.active:hover .dropdown-menu { display: block; animation: none !important; }
    .nav-menu form { display: block !important; width: 100%; padding: 0 1rem; }
    .nav-menu .btn { width: 100%; background: rgba(255,255,255,0.2); color: white; border: 2px solid rgba(255,255,255,0.3); padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: 8px; transition: all 0.3s ease; }
    .nav-menu .btn:hover { background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.5); transform: scale(1.02); }
}

@media (max-width: 640px) {
  .fab-container { bottom: calc(env(safe-area-inset-bottom, 16px) + 16px) !important; right: calc(env(safe-area-inset-right, 16px) + 10px) !important; }
  .fab { min-width: 44px !important; height: 44px !important; padding: 0 14px !important; }
  .fab-label { font-size: 12px !important; }
}

/* Prevent unintended clipping by parent wrappers */
.fab-container, .fab { will-change: transform; }

/* Login Container */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-container h2 {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.2rem;
}

/* Login form checkbox alignment */
.login-container .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.login-container .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.login-container .checkbox-label span {
    display: inline-block;
    line-height: 18px;
    vertical-align: middle;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #7f8c8d;
    font-style: italic;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    color: white;
    border: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c0392b 0%, #d68910 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.35);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.alert-info {
    background-color: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.dashboard-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dashboard-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.dashboard-card p {
    color: #7f8c8d;
}

/* Tables */
.table-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #34495e;
    color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    font-weight: 600;
}

/* Only apply hover effect to body rows, not header rows */
tbody tr:hover {
    background-color: #f9f9f9;
}

/* Keep header style on hover */
thead tr:hover {
    background-color: #34495e;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    color: #2c3e50;
}

/* Form Container */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Wide container for bookings view */
.form-container.bookings-view-container {
    max-width: 1400px;
    padding: 20px;
}

@media (max-width: 768px) {
    .form-container.bookings-view-container {
        max-width: 100%;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .form-container {
        margin-top: 15px;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        width: 100%;
        margin-top: 1rem;
    }

    .login-container {
        margin: 20px;
        padding: 30px 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 8px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Alignment helpers for forms */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    line-height: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    top: 0;
}

.checkbox-label span {
    display: inline-block;
    line-height: 18px;
    vertical-align: middle;
}

/* Member selection scroll box */
.member-scrollbox {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.member-row {
    margin-bottom: 8px;
    line-height: normal;
}

.member-row:last-child {
    margin-bottom: 0;
}

.member-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.member-name {
    display: inline-block;
    line-height: 18px;
    vertical-align: middle;
    margin-bottom: 10px;
}

/* Member search box */
.member-search-box {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

.member-search-box:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Selected members display box */
.selected-members-display {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 14px;
    min-height: 40px;
}

.selected-members-display strong {
    color: #555;
    margin-right: 8px;
}

#selectedMembersList {
    color: #2c3e50;
    word-wrap: break-word;
}

/* ==========================================================================
   DROPDOWN MENU OVERRIDE FIX
   ========================================================================== */

/* Force visibility for dropdown items on desktop */
@media (min-width: 769px) {
    .nav-menu .dropdown:hover .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-menu .dropdown-menu {
        display: none; /* Keep it hidden by default */
        list-style: none !important;
        padding: 0.75rem 0 !important;
        margin: 0 !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
        z-index: 10001 !important; /* Highest z-index */
    }

    .nav-menu .dropdown-menu li {
        display: block !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .nav-menu .dropdown-menu a {
        display: block !important;
        height: auto !important;
        padding: 0.75rem 1.5rem !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #2c3e50 !important;
        background: transparent !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        border-radius: 0 !important;
        transform: none !important;
    }

    .nav-menu .dropdown-menu a:hover {
        background: #f0eaff !important;
        color: #5e35b1 !important;
        transform: none !important;
    }
}

/* Focus styles for accessibility */
.nav-menu a:focus,
.nav-menu .dropdown-menu a:focus {
    outline: 2px solid #9575cd;
    outline-offset: 2px;
    background: rgba(149,117,205,0.15) !important;
    color: #2c3e50 !important;
}

/* Keyboard navigation visual for open dropdown parent */
.dropdown.open > .dropdown-toggle {
    background: rgba(255,255,255,0.18);
}

/* Prevent unintended clipping by parent wrappers */
.fab-container, .fab { will-change: transform; }

/* ==========================================================================
   EVENT ATTENDANCE CONFIRMATION MODAL STYLES
   ========================================================================== */

/* Fix modal overflow and sizing issues on mobile */
.modal-content {
    max-width: 90%;
    width: 360px;
    margin: 15% auto;
    padding: 20px;
    max-height: 85vh;
    overflow-y: auto;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .modal-content {
        width: 88%;
        max-width: 340px;
        margin: 12% auto;
        padding: 18px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 90%;
        max-width: 320px;
        margin: 10% auto;
        padding: 16px;
    }
}

/* Event attendance modal specific styles */
.modal h3,
.modal h4 {
    margin: 0 0 10px 0;
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
}

.modal p {
    margin: 0 0 14px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.modal textarea {
    width: 100%;
    min-height: 70px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 14px;
}

.modal textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Modal button container - HORIZONTAL LAYOUT */
.modal .modal-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 14px;
}

.modal .modal-buttons .btn {
    flex: 1;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.modal .modal-buttons .btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

.modal .modal-buttons .btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.4);
}

.modal .modal-buttons .btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #ec7063 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.modal .modal-buttons .btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.4);
}

.modal .modal-buttons .btn-secondary {
    background: #f8f9fa;
    color: #555;
    border: 1px solid #ddd;
    box-shadow: none;
}

.modal .modal-buttons .btn-secondary:hover {
    background: #e9ecef;
    border-color: #ccc;
}

@media (max-width: 480px) {
    .modal h3,
    .modal h4 {
        font-size: 16px;
    }

    .modal p {
        font-size: 12px;
    }

    .modal textarea {
        font-size: 12px;
        min-height: 60px;
    }

    .modal .modal-buttons .btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}

