/* ============ Function Hall Management Module ============ */

:root {
    --primary-dark-green: #23352B;
    --olive-green: #314438;
    --luxury-gold: #C8A348;
    --cream: #F8F5EF;
    --white: #FFFFFF;
    --light-border: #E8E0D2;
}

/* Function Hall Container */
.functionhall-container {
    min-height: 100vh;
    background: var(--cream);
    font-family: 'Inter', sans-serif;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Page Header */
.functionhall-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-content {
    flex: 1;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-dark-green);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--olive-green);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.action-btn.primary {
    background: var(--luxury-gold);
    color: var(--white);
}

.action-btn.primary:hover {
    background: #D4B358;
}

.action-btn.secondary {
    background: var(--white);
    color: var(--primary-dark-green);
    border: 1px solid var(--light-border);
}

.action-btn.secondary:hover {
    border-color: var(--luxury-gold);
}

/* KPI Cards */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.kpi-card {
    background: var(--white);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--luxury-gold);
    margin-bottom: 8px;
}

.kpi-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark-green);
    margin-bottom: 4px;
}

.kpi-sublabel {
    font-size: 12px;
    font-weight: 400;
    color: var(--olive-green);
}

/* Hall Cards Section */
.hall-cards-section {
    background: var(--white);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hall-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.hall-card {
    background: var(--cream);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hall-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.hall-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.hall-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hall-content {
    padding: 20px;
}

.hall-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark-green);
    margin-bottom: 16px;
}

.hall-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.hall-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--olive-green);
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--luxury-gold);
}

.hall-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--light-border);
}

.hall-action {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--olive-green);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.hall-action:hover {
    background: var(--white);
}

/* Event Calendar Section */
.event-calendar-section {
    background: var(--white);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.calendar-legend {
    display: flex;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--olive-green);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.event-calendar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-event {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--cream);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-event:hover {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.event-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--luxury-gold);
    min-width: 80px;
}

.event-details {
    flex: 1;
}

.event-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark-green);
    margin-bottom: 4px;
}

.event-venue {
    font-size: 12px;
    font-weight: 400;
    color: var(--olive-green);
    margin-bottom: 2px;
}

.event-guests {
    font-size: 12px;
    font-weight: 400;
    color: var(--olive-green);
}

.event-type-badge {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
    border-radius: 12px;
    text-transform: uppercase;
}

/* Events Table Section */
.events-table-section {
    background: var(--white);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

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

.events-table thead {
    background: var(--cream);
}

.events-table th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--olive-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.events-table td {
    padding: 16px;
    font-size: 13px;
    font-weight: 400;
    color: var(--primary-dark-green);
    border-bottom: 1px solid var(--light-border);
}

.events-table tbody tr:hover {
    background: var(--cream);
}

.event-name-cell {
    font-weight: 600;
    color: var(--luxury-gold);
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
    border-radius: 12px;
    text-transform: uppercase;
}

.action-menu {
    display: flex;
    gap: 8px;
}

.action-icon {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--olive-green);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.action-icon:hover {
    background: var(--cream);
}

/* Availability Section */
.availability-section {
    background: var(--white);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.availability-board {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.availability-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--cream);
    border-radius: 8px;
}

.availability-hall {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark-green);
    min-width: 150px;
}

.availability-timeline {
    display: flex;
    gap: 12px;
    flex: 1;
}

.availability-day {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--white);
}

.day-date {
    font-size: 12px;
    font-weight: 600;
}

.day-status {
    font-size: 11px;
    font-weight: 500;
}

/* Packages Section */
.packages-section {
    background: var(--white);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.package-card {
    background: var(--cream);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 20px;
}

.package-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark-green);
    margin-bottom: 12px;
}

.package-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--luxury-gold);
    margin-bottom: 8px;
}

.package-guests {
    font-size: 13px;
    font-weight: 500;
    color: var(--olive-green);
    margin-bottom: 16px;
}

.package-inclusions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inclusion-tag {
    padding: 6px 12px;
    background: var(--primary-dark-green);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--white);
}

/* Revenue Section */
.revenue-section {
    background: var(--white);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.revenue-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.revenue-card {
    background: var(--cream);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.revenue-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--olive-green);
    text-transform: uppercase;
}

.revenue-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--luxury-gold);
}

/* Event Drawer */
.event-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.event-drawer {
    width: 500px;
    max-height: 80vh;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--light-border);
    background: var(--primary-dark-green);
}

.drawer-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--white);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.drawer-content {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.event-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: var(--cream);
    border-radius: 8px;
}

.info-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--olive-green);
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark-green);
}

.drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-action-btn {
    background: var(--white);
    border: 1px solid var(--light-border);
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-dark-green);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-action-btn:hover {
    border-color: var(--luxury-gold);
    background: var(--luxury-gold);
    color: var(--white);
}

.drawer-action-btn.danger:hover {
    border-color: #C75B5B;
    background: #C75B5B;
    color: var(--white);
}

/* Hall Drawer */
.hall-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.hall-drawer {
    width: 600px;
    max-height: 90vh;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.hall-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.main-photo {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
}

.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: var(--luxury-gold);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.gallery-item {
    aspect-ratio: 16/9;
    background: var(--cream);
    border: 2px dashed var(--light-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--olive-green);
    cursor: pointer;
}

.gallery-item:hover {
    border-color: var(--luxury-gold);
}

.hall-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.hall-features {
    margin-bottom: 24px;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    padding: 8px 16px;
    background: var(--primary-dark-green);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .kpi-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .revenue-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .functionhall-container {
        padding: 16px;
    }

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

    .header-actions {
        flex-direction: column;
    }

    .kpi-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .hall-cards-grid {
        grid-template-columns: 1fr;
    }

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

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

    .availability-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .availability-timeline {
        width: 100%;
        flex-wrap: wrap;
    }

    .availability-day {
        min-width: 80px;
    }

    .calendar-legend {
        flex-wrap: wrap;
    }

    .event-drawer,
    .hall-drawer {
        width: 90%;
        max-height: 90vh;
    }

    .event-info-grid {
        grid-template-columns: 1fr;
    }
}
