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

.hidden {
    display: none !important;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #002855;
    min-height: 100vh;
    width: 100%;
    padding: 8px;
    position: relative;
    color: #002855;
}

.container {
    width: 100%;
    max-width: none;
}

/* Login Section */
#login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
}

.login-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
}

.login-card h1 {
    font-size: 32px;
    color: #002855;
    margin-bottom: 12px;
}

.subtitle {
    color: #002855;
    font-size: 16px;
    margin-bottom: 32px;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 28px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
    transform: translateY(-2px);
}

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

/* Stats Section */
#stats-section {
    background: white;
    border-radius: 12px;
    padding: 4px;
    box-shadow: none;
    margin: 0;
    max-width: none;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    padding: 20px 24px 20px 24px;
    border-bottom: none;
    gap: 16px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.header-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-info-row {
    display: flex;
    align-items: center;
}

.email-years-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.header-logo {
    height: 35px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    object-position: left;
    margin-bottom: 12px;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    margin-left: 24px;
}

.header h2 {
    font-size: 24px;
    color: #002855;
    margin: 0;
    line-height: 1.2;
}

.email-text {
    color: #002855;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

.years-text {
    color: #002855;
    font-size: 14px;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.years-text span {
    color: #667eea;
    font-weight: 700;
}

.header-buttons {
}

.info-icon {
    background: #002855;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.info-icon:hover {
    background: #003a75;
}

.info-icon svg {
    display: block;
}

.icon-button {
    background: transparent;
    color: #002855;
    border: 2px solid #002855;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.icon-button:hover {
    background: rgba(0, 40, 85, 0.1);
    transform: translateY(-1px);
}

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

.icon-button svg {
    display: block;
}

.modal-header .icon-button {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-header .icon-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Menu Container & Dropdown */
.menu-container {
    position: relative;
}

.menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 8px 0;
    z-index: 1000;
    border: 1px solid #e2e8f0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    width: 100%;
    border: none;
    background: none;
    color: #002855;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.menu-item:hover {
    background: #f7fafc;
}

.menu-item svg {
    flex-shrink: 0;
    color: #64748b;
}

.menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

.admin-link {
    background: #002855;
    color: white;
    text-decoration: none;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    height: 36px;
    line-height: 36px;
    white-space: nowrap;
    width: auto;
}

.admin-link:hover {
    background: #003a75;
}

.sign-out-btn {
    background: #002855;
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: auto;
}

.sign-out-btn:hover {
    background: #003a75;
}

.notifications-btn {
    background: #002855;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.notifications-btn:hover {
    background: #003a75;
}

.notifications-btn svg {
    display: block;
}

/* Notification Controls (deprecated - now in modal) */
.notification-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 22px;
    background-color: #ddd;
    border-radius: 22px;
    transition: background-color 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background-color: #002855;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* Disabled toggle - still shows as "on" but with reduced opacity and no pointer */
.toggle-switch input[type="checkbox"]:disabled + .toggle-slider {
    opacity: 0.7;
    cursor: not-allowed;
}

.toggle-switch input[type="checkbox"]:checked:disabled + .toggle-slider {
    background-color: #002855;
}

.toggle-switch:has(input[type="checkbox"]:disabled) {
    cursor: not-allowed;
}

.toggle-label {
    font-size: 13px;
    color: #002855;
    font-weight: 500;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column-reverse;
        align-items: center;
        gap: 16px;
    }

    .header-left {
        width: 100%;
        align-items: center;
    }

    .header-right {
        width: 100%;
        align-items: stretch;
        order: -1;
    }

    .header-logo {
        align-self: center;
        margin-bottom: 8px;
    }

    .name-row {
        align-self: center;
        margin-left: 0;
        margin-bottom: 0;
    }

    .notification-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .header-buttons {
        width: 100%;
        justify-content: center;
    }

    .admin-link,
    .sign-out-btn {
        text-align: center;
    }
}

/* Stats Modal */
.stats-modal-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats-modal-grid .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stats-modal-grid .stat-label {
    font-size: 14px;
    color: #002855;
    font-weight: 600;
}

.stats-modal-grid .stat-value {
    font-size: 16px;
    color: #002855;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Notifications Modal */
.notifications-modal-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    gap: 16px;
    border-left: 4px solid #002855;
}

.notification-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.notification-label {
    font-size: 14px;
    color: #002855;
    font-weight: 600;
}

.notification-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Stats Card */
.stats-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 16px;
    margin-bottom: 20px;
}

.stats-card .subsection-header {
    margin-bottom: 4px;
    padding-bottom: 3px;
}

.stats-card .subsection-header h4 {
    font-size: 16px;
    font-weight: 600;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px 5px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 14px;
    color: #002855;
    font-weight: 700;
}

.stat-value {
    font-size: 14px;
    color: #002855;
    font-weight: 700;
}

.stat-row-divider {
    height: 1px;
    background: #d0d0d0;
    margin: 12px 0;
}

.stat-value.editable {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    min-width: 150px;
    max-width: 100%;
    text-align: right;
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.stat-value.editable:hover {
    background: #f0f0f0;
}

.stat-value.editable:focus {
    outline: 2px solid #667eea;
    background: white;
    cursor: text;
    font-size: 16px;
}

.stat-value.editable:empty:before {
    content: attr(data-placeholder);
    color: #999;
    font-style: italic;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.settings-tab {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.settings-tab:hover {
    color: #002855;
    background: #f8f9fa;
}

.settings-tab.active {
    color: #002855;
    border-bottom-color: #002855;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Admin Management */
.admins-list-container {
    padding: 10px 0;
}

.admins-list-container h3 {
    font-size: 16px;
    color: #002855;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.admins-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 24px;
    min-height: 100px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
}

.admin-item:last-child {
    margin-bottom: 0;
}

.admin-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-name {
    font-size: 14px;
    font-weight: 600;
    color: #002855;
}

.admin-email {
    font-size: 12px;
    color: #666;
}

.remove-admin-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.remove-admin-btn:hover {
    background: #c82333;
}

.add-admin-section {
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.add-admin-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-email-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.admin-email-input:focus {
    outline: none;
    border-color: #667eea;
}

.add-admin-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.add-admin-btn:hover {
    background: #5568d3;
}

.loading-text {
    color: #999;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* Events Card */
.events-card {
    background: #e0e2e6;
    border-radius: 12px;
    padding: 4px;
    margin: 0 auto 20px auto;
    max-width: 1200px;
}

.subsection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding: 12px 4px 8px 4px;
    border-bottom: 2px solid #e0e0e0;
}

.subsection-header h4 {
    font-size: 16px;
    color: #002855;
    font-weight: 600;
    margin: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    background-color: #002855;
    min-width: 32px;
    height: 32px;
    text-align: center;
}

/* Filter badge styles */
.filter-badge {
    background-color: transparent;
    border: 2px solid #002855;
    color: #002855;
    transition: all 0.2s ease;
}

.filter-badge:hover {
    opacity: 0.8;
}

.filter-badge.active {
    background-color: #002855;
    color: white;
}

/* RSVP filter badge */
.filter-badge[data-filter="rsvp"] {
    border-color: #4caf50;
    color: #4caf50;
}

.filter-badge[data-filter="rsvp"].active {
    background-color: #4caf50;
    color: white;
}

/* Waitlist filter badge */
.filter-badge[data-filter="waitlist"] {
    border-color: #ff9800;
    color: #ff9800;
}

.filter-badge[data-filter="waitlist"].active {
    background-color: #ff9800;
    color: white;
}

.events-list {
    display: flex;
    flex-direction: column;
    background: #e0e2e6;
    border-radius: 8px;
    padding: 4px;
}

.event-card-item:first-child {
    border-radius: 8px 8px 0 0;
}

.event-card-item:last-child {
    border-radius: 0 0 8px 8px;
}

.event-card-item:only-child {
    border-radius: 8px;
}

.no-data {
    color: #999;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* Event Item */
.event-item {
    background: white;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.event-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.event-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.event-item:hover {
    background: #fafafa;
}

/* Shift row with RSVP - subtle green background */
.shift-rsvpd {
    background-color: rgba(34, 197, 94, 0.05) !important;
}

/* Shift row with waitlist - subtle yellow background */
.shift-waitlisted {
    background-color: rgba(255, 159, 10, 0.05) !important;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.event-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-title {
    font-size: 16px;
    font-weight: 600;
    color: #002855;
}

.event-link {
    color: #002855;
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.event-link:hover {
    opacity: 1;
}

.event-more-link {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    background: #f5f7ff;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.event-more-link:hover {
    background: #eef1ff;
    color: #5568d3;
}

.event-more-link svg:first-child {
    flex-shrink: 0;
}

.event-more-link svg:last-child {
    flex-shrink: 0;
    opacity: 0.6;
}

.parking-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.parking-icon.ada {
    font-size: 18px;
}

.event-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-status.checked-in {
    background: #d4edda;
    color: #155724;
}

.event-status.checked-out {
    background: #cce5ff;
    color: #004085;
}

.event-status.rsvped {
    background: white;
    color: #28a745;
    border: 2px solid #28a745;
}

.event-status.confirmed {
    background: #28a745;
    color: white;
    border: none;
}

.event-status.waitlisted {
    background: #fff3e0;
    color: #e65100;
}

.event-status.declined {
    background: #9e9e9e;
    color: white;
}

.event-status.parking-instructions {
    background: #d0e7ff;
    color: #002855;
    cursor: pointer;
}

.event-status.parking-instructions:hover {
    background: #b8d9ff;
}

.event-status.parking-requested {
    background: #e3f2fd;
    color: #667eea;
    font-weight: 600;
}

.event-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-left: 0;
}

.event-detail-item {
    display: flex;
    gap: 6px;
}

.event-detail-label {
    font-weight: 600;
    color: #555;
}

.event-detail-value {
    color: #666;
}

.event-detail-badge {
    display: inline-block;
    padding: 6px 12px;
    color: #002855;
    background: white;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.event-label-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #002855;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
}

.event-content-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.event-content-wrapper .event-details {
    flex: 1;
}

.event-map-preview {
    flex-shrink: 0;
}

.event-map-preview .map-preview-link {
    display: inline-block;
    position: relative;
    cursor: pointer;
}

.event-map-preview iframe {
    border: 0;
    border-radius: 8px;
}

.event-map-preview .map-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 4px 6px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.event-map-preview .map-preview-link:hover .map-preview-overlay {
    opacity: 1;
}

/* Time Log Item */
.time-log-item {
    background: white;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.time-log-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.time-log-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.time-log-item:hover {
    background: #fafafa;
}

.time-log-left {
    flex: 1;
}

.time-log-event {
    font-size: 16px;
    font-weight: 600;
    color: #002855;
    margin-bottom: 6px;
}

.time-log-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #666;
}

.time-log-date {
    font-weight: 500;
    color: #555;
}

.time-log-shift {
    color: #999;
}

.time-log-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.time-log-hours {
    font-size: 16px;
    font-weight: 700;
    color: #002855;
    white-space: nowrap;
}

.manual-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: white;
    background-color: #9e9e9e;
}

.time-log-notes {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5563;
    font-style: italic;
    border-left: 3px solid #667eea;
}

/* Error Card */
.error-card {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.error-card h3 {
    color: #856404;
    margin-bottom: 12px;
    font-size: 20px;
}

.error-card p {
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-top: 20px;
}

/* Loading Spinner */
.loading {
    background: white;
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #666;
    font-size: 16px;
}

/* RSVP Button */
.rsvp-button {
    margin-top: 0;
    margin-bottom: 24px;
    width: 100%;
    background: #002855;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease;
    font-family: inherit;
}

.rsvp-button:hover {
    background: #003a75;
}

.rsvp-event-button {
    margin-top: 12px;
    width: 100%;
    padding: 10px;
    background: #002855;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.rsvp-event-button:hover {
    background: #003a75;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 40, 85, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    pointer-events: auto;
}

.modal[style*="display: flex"],
.modal[style*="display:flex"] {
    display: block !important;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden; /* Preserve rounded corners - scrolling happens in modal-body */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.modal-content.small {
    max-width: 600px;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #002855;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0; /* Prevent header from shrinking */
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: white;
    font-weight: 700;
}

.modal-header-subtitle {
    margin: 6px 0 0 0;
    font-size: 14px;
    color: white;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.modal-close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 24px;
    background-color: white;
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* Allow flex child to shrink below content size */
}

.modal-body h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 16px;
    font-weight: 600;
}

.modal-body h4 {
    font-size: 16px;
    color: #555;
    margin: 16px 0 12px 0;
    font-weight: 600;
}

.modal-body p {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-list-item {
    background-color: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-list-item:hover {
    background-color: #e9ecef;
    border-color: #002855;
}

.modal-list-item.selected {
    background-color: #e3f2fd;
    border-color: #002855;
}

.modal-list-item.disabled {
    background-color: #f1f1f1;
    border-color: transparent;
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-list-item.already-registered {
    background-color: #e8f5e9;
    border-color: #4caf50;
    opacity: 0.7;
}

.modal-list-item.waitlisted {
    background-color: #fff3e0;
    border-color: #ff9800;
    opacity: 0.7;
}

.modal-list-item.disabled:hover {
    background-color: #f1f1f1;
    border-color: transparent;
}

.modal-list-item.already-registered:hover {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.modal-list-item.waitlisted:hover {
    background-color: #fff3e0;
    border-color: #ff9800;
}

.modal-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.modal-item-subtitle {
    font-size: 14px;
    color: #666;
}

.event-date-text {
    color: #002855;
    font-size: 15px;
    margin-bottom: 16px;
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 16px;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.parking-options {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-details-item.parking-section {
    flex-direction: column;
    align-items: flex-start;
}

.event-details-item.parking-section .parking-options {
    margin-top: 12px;
    margin-left: 0;
    width: 100%;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
}

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

.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message svg {
    margin-bottom: 20px;
}

.success-message h3 {
    color: #4caf50;
    font-size: 24px;
    margin-bottom: 12px;
}

.success-message p {
    color: #666;
    font-size: 16px;
}

.event-details-modal {
    margin-bottom: 24px;
}

.event-details-section {
    margin-bottom: 20px;
}

.event-details-section:last-child {
    margin-bottom: 0;
}

.event-details-section h5 {
    font-size: 14px;
    font-weight: 700;
    color: #002855;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #002855;
}

.event-details-item {
    display: flex;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.event-details-item .event-details-value:only-child {
    color: #666;
    font-weight: 400;
}

.event-details-label {
    font-weight: 600;
    color: #002855;
    min-width: 120px;
    flex-shrink: 0;
}

.event-details-value {
    color: #666;
    flex: 1;
}

.event-details-value a {
    color: #667eea;
    text-decoration: underline;
}

.event-details-value a:hover {
    text-decoration: underline;
}


.map-preview-container {
    display: block !important;
    padding: 0 !important;
    flex-direction: column;
}

.map-preview-link {
    display: block;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.map-preview-link iframe {
    display: block;
    width: 100%;
}

.map-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 8px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.map-preview-link:hover .map-preview-overlay {
    opacity: 1;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.button-secondary,
.button-danger,
.button-success {
    flex: 1;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.button-secondary {
    background-color: #e9ecef;
    color: #333;
    border: 2px solid #ddd;
}

.button-secondary:hover {
    background-color: #dee2e6;
    border-color: #999;
}

.button-danger {
    background-color: #dc3545;
    color: white;
    border: 1px solid transparent;
}

.button-danger:hover {
    background-color: #c82333;
}

.button-success {
    background-color: transparent;
    color: #002855;
    border: 1px solid #002855;
}

.button-success:hover {
    background-color: #002855;
    border-color: #002855;
    color: white;
}

.rsvp-submit-button {
    width: 100%;
    background: #002855;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease;
    font-family: inherit;
    margin-top: 20px;
}

.rsvp-submit-button:hover:not(:disabled) {
    background: #003a75;
}

.rsvp-submit-button:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.event-item.clickable {
    cursor: pointer;
}

.event-item.clickable:hover {
    background: #f0f0f0;
}

/* Responsive */
@media (max-width: 640px) {
    .login-card {
        padding: 32px 24px;
    }

    .login-logo {
        max-width: 150px;
        margin: 0 auto 16px auto;
    }

    .login-card h1 {
        font-size: 24px;
    }

    #stats-section {
        padding: 4px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header h2 {
        font-size: 22px;
    }

    .stat-label {
        font-size: 14px;
    }

    .stat-value {
        font-size: 18px;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
        padding: 0;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-header {
        padding: 16px;
    }

    .stats-modal-grid .stat-row {
        padding: 10px 12px;
    }

    .stat-value.editable {
        min-width: 100px;
        font-size: 16px;
    }

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

    /* Keep event content horizontal on mobile, map stays to the right */
    .event-content-wrapper {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
    }

    .event-content-wrapper .event-details {
        flex: 1 !important;
        min-width: 0 !important;
    }

    /* Keep map to the right on mobile */
    .event-content-wrapper .event-map-preview {
        flex-shrink: 0 !important;
        align-self: flex-start !important;
    }

    .event-map-preview iframe {
        width: 80px !important;
        height: 80px !important;
    }

    .event-item {
        padding: 12px;
    }

    .event-title {
        font-size: 14px;
    }

    .event-detail-label,
    .event-detail-value {
        font-size: 13px;
    }

    .event-detail-item {
        padding: 4px 0;
    }
}

/* Photo badge hover preview */
.photo-badge {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.photo-badge .photo-preview {
    display: none;
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    transform: translateY(-50%);
    width: 150px;
    height: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 10000;
    border: 2px solid white;
    object-fit: cover;
}

.photo-badge:hover .photo-preview {
    display: block;
}

/* Mobile modal fixes for keyboard */
@media (max-width: 768px) {
    .modal {
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .modal-content {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        max-height: none;
        border-radius: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        flex-shrink: 0;
        position: relative;
        z-index: 10;
        border-radius: 0;
    }

    .modal-body {
        flex: 1 1 auto;
        padding: 20px;
        padding-bottom: 100px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
    }

    /* Make event details modal cover entire screen on mobile with white background */
    #rsvp-modal,
    #cancel-modal {
        background-color: white !important; /* Solid white background to cover homepage */
        min-height: 100vh;
    }

    /* Ensure modal content also has white background and proper flex */
    #rsvp-modal .modal-content,
    #cancel-modal .modal-content {
        background-color: white;
        min-height: 100vh;
        height: auto;
    }

    /* Round bottom corners for small modals on mobile */
    #stats-modal .modal-content,
    #notifications-modal .modal-content,
    #contact-modal .modal-content {
        border-radius: 0 0 16px 16px;
    }

    #contact-message {
        min-height: 120px;
        max-height: none;
    }

    #contact-subject,
    #contact-message {
        font-size: 16px !important;
    }
}
