.expense-form-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 2rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 0 0 20px 20px;
}

.form-container { background: white; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); padding: 2.5rem; max-width: 800px; margin: 0 auto; }
.form-label { font-weight: 600; color: #2c3e50; margin-bottom: 0.5rem; }
.form-control, .form-select { border-radius: 8px; border: 2px solid #e3e3e3; padding: 0.75rem; transition: all 0.2s ease; }
.form-control:focus, .form-select:focus { border-color: #e74c3c; box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.15); }
.btn-modern { border-radius: 8px; padding: 0.75rem 2rem; font-weight: 500; transition: all 0.2s ease; border: none; }
.btn-modern:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.required::after { content: ' *'; color: #dc3545; }
.info-box { background: #fff3cd; border-left: 4px solid #ffc107; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; color: #2c3e50; }
/* 
 * Additional Components CSS
 * Modals, Lightbox, Footer, Forms, Gallery
 */

/* ============================================
   MODAL STYLES (Gallery)
   ============================================ */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.modal.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}

.modal-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(10px);
    z-index: 99998 !important;
}

.modal-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90vw !important;
    max-width: 1400px !important;
    height: 85vh !important;
    max-height: none !important;
    background: #1a1a1a !important;
    border-radius: 20px;
    padding: 2rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border: 2px solid #d4af37 !important;
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.5) !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    background: #d4af37 !important;
    border: none;
    border-radius: 50%;
    color: #000 !important;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100000 !important;
}

.modal-close:hover {
    background: #f1c40f !important;
    transform: rotate(90deg);
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem !important;
    margin-top: 0 !important;
    color: #d4af37 !important;
    font-weight: bold;
    flex-shrink: 0 !important;
}

/* ============================================
   GALLERY GRID
   ============================================ */
.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 1rem !important;
    background: rgba(212, 175, 55, 0.1) !important;
    min-height: 400px !important;
    flex: 1 !important;
    overflow-y: auto !important;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid #d4af37 !important;
    background: #000 !important;
    min-height: 200px !important;
}

.gallery-item img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    display: block !important;
    transition: all 0.3s ease;
    background: #333 !important;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(241, 196, 15, 0.2));
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9), transparent);
    color: var(--white);
    font-size: 1rem;
    text-align: center;
    transform: translateY(100%);
    transition: var(--transition-medium);
}

.gallery-item:hover .item-title {
    transform: translateY(0);
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 15px;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: var(--transition-fast);
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--gold-primary);
}

.no-items, .error {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: var(--medium-gray);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lightbox.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.lightbox-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98) !important;
    cursor: pointer;
    z-index: 999998 !important;
}

.lightbox-close {
    position: fixed !important;
    top: 2rem !important;
    right: 2rem !important;
    width: 60px;
    height: 60px;
    background: #d4af37 !important;
    border: none;
    border-radius: 50%;
    color: #000 !important;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000000 !important;
}

.lightbox-close:hover {
    background: #f1c40f !important;
    transform: rotate(90deg) scale(1.1);
}

.lightbox-content {
    position: relative !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
}

.lightbox-content img {
    max-width: 100% !important;
    max-height: 95vh !important;
    object-fit: contain !important;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-title {
    position: fixed !important;
    bottom: 3rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: #d4af37 !important;
    padding: 1rem 2rem !important;
    border-radius: 30px;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    z-index: 1000000 !important;
    border: 2px solid #d4af37;
}

/* Navigation arrows for lightbox */
.lightbox-nav {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.3) !important;
    border: 2px solid #d4af37;
    border-radius: 50%;
    color: #d4af37 !important;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000000 !important;
}

.lightbox-nav:hover {
    background: #d4af37 !important;
    color: #000 !important;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 2rem !important;
}

.lightbox-nav.next {
    right: 2rem !important;
}

.lightbox-title {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: var(--gold-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: linear-gradient(135deg, var(--royal-black) 0%, var(--glossy-black) 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding: 3rem 5% 1.5rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 0.95rem;
    color: var(--medium-gray);
    font-style: italic;
}

.footer-links h4,
.footer-social h4 {
    color: var(--gold-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: var(--font-secondary);

/* ============================================
   RESPONSIVE TABLE HELPERS & SCROLL HINT
   Put responsive table styles here so multiple templates can reuse them.
   The `.table-responsive` wrapper enables horizontal scrolling on small
   viewports. A subtle right-edge fade is shown when horizontal scrolling
   is available to hint users to swipe/scroll.
   ============================================ */

.table-responsive {
    position: relative;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive table {
    min-width: 640px; /* tune this if you want columns to collapse earlier */
}

/* Right-edge fade hint — appears when the container is scrollable */
.table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(0,0,0,0.06) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.table-responsive.is-scrollable::after {
    opacity: 1;
}

/* Utility 2-column responsive grid */
.responsive-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 768px) {
    .responsive-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Work table container helper (used on dashboard) */
.work-table-container {
    overflow: auto;
}

/* Expense table wrapper hint — reuse same responsive helper */
.expense-table .table-modern {
    min-width: 640px;
}

/* ============================================
   Expense management page styles (moved from admin_expenses_list.html)
   ============================================ */
.expense-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 2rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 0 0 20px 20px;
}

.filter-panel {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.filter-panel:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.filter-panel .form-label {
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

.filter-panel .form-control-sm,
.filter-panel .form-select-sm {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.filter-panel .form-control-sm:focus,
.filter-panel .form-select-sm:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.15);
}

@media (max-width: 768px) {
    .filter-panel .row.g-2 {
        gap: 0.75rem !important;
    }
    .filter-panel .col-md-3,
    .filter-panel .col-md-2,
    .filter-panel .col-auto {
        width: 100%;
    }
    .filter-panel .btn-sm.btn-modern {
        width: 100%;
    }
}

.expense-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.expense-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #e74c3c;
    transition: all 0.3s ease;
}

.expense-card:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }

.category-badge { padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 500; display: inline-block; }

.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.summary-card { background: white; border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-align: center; border-top: 4px solid #e74c3c; }
.summary-value { font-size: 2rem; font-weight: 700; color: #e74c3c; margin: 0.5rem 0; }
.summary-label { color: #6c757d; font-size: 0.9rem; }
.empty-state { text-align: center; padding: 4rem 2rem; color: #6c757d; }
.empty-state-icon { font-size: 5rem; margin-bottom: 1rem; opacity: 0.5; }
.table-modern { width: 100%; border-collapse: collapse; }
.table-modern thead { background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; }
.table-modern th { padding: 1rem; text-align: left; font-weight: 600; }
.table-modern td { padding: 1rem; border-bottom: 1px solid #f0f0f0; }
.table-modern tbody tr:hover { background: #f8f9fa; }
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-links ul li a:hover {
    color: var(--gold-primary);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    font-size: 1.5rem;
    transition: var(--transition-fast);
    opacity: 0.8;
}

.social-icons a:hover {
    opacity: 1;
    transform: scale(1.2);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.admin-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.5;
    transition: var(--transition-fast);
}

.admin-links:hover {
    opacity: 1;
}

.admin-links a {
    color: var(--medium-gray);
    text-decoration: none;
    transition: var(--transition-fast);
}

.admin-links a:hover {
    color: var(--gold-primary);
}

.admin-links span {
    color: var(--medium-gray);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gold-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

/* Gallery-specific override: neutralize global gold borders/shadows coming from this file
   This targets the photo gallery grid items only and is intentionally specific. */
.photo-gallery-grid .gallery-item,
.photo-gallery-grid .gallery-item img,
.photo-gallery-grid .gallery-thumb-wrapper {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    outline: none !important;
}

.photo-gallery-grid .gallery-item::after {
    display: none !important;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--medium-gray);
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.notification {
    position: fixed;
    bottom: -100px;
    right: 2rem;
    padding: 1rem 2rem;
    background: var(--glossy-black);
    border-left: 4px solid var(--gold-primary);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 4000;
    transition: bottom var(--transition-medium);
    max-width: 400px;
}

.notification.show {
    bottom: 2rem;
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-info {
    border-left-color: var(--gold-primary);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 2rem 1.5rem;
        height: 95vh;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--royal-black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}
