/* Cabana Booking Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #F5E6D3 0%, #E8D5C4 100%);
    color: #654321;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h2 {
    color: #8B4513;
    font-size: 32px;
    margin-bottom: 10px;
}

.page-header p {
    color: #A0522D;
    font-size: 18px;
}

/* Flash Messages */
.flash-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid;
    animation: slideInDown 0.5s ease;
}

.flash-success {
    background: #E8F5E8;
    color: #2E7D32;
    border-left-color: #4CAF50;
}

.flash-error {
    background: #FFEBEE;
    color: #C62828;
    border-left-color: #F44336;
}

@keyframes slideInDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Cabanas List */
.cabanas-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 2rem;
}

.cabana-row {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
}

.cabana-row:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(139, 69, 19, 0.2);
    border-color: #8B4513;
}

.cabana-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #8B4513, #D2691E, #8B4513);
}

.cabana-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F5E6D3;
}

.cabana-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cabana-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.3);
}

.cabana-details h3 {
    color: #8B4513;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 700;
}

.cabana-details p {
    color: #A0522D;
    font-size: 16px;
    margin-bottom: 15px;
}

.cabana-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-item {
    background: #F9F9F9;
    padding: 12px 18px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid #8B4513;
    min-width: 110px;
    flex: 1;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #654321;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 11px;
    color: #A0522D;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.book-cabana-btn {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.book-cabana-btn:hover {
    background: linear-gradient(135deg, #A0522D, #8B4513);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.4);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.toggle-btn {
    padding: 10px 20px;
    background: #E0E0E0;
    color: #654321;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
}

.toggle-btn:hover {
    background: #D0D0D0;
}

.toggle-btn.active:hover {
    background: linear-gradient(135deg, #A0522D, #8B4513);
}

/* Week Schedule */
.week-schedule {
    margin-top: 25px;
}

.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.week-title {
    color: #8B4513;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.week-range {
    color: #A0522D;
    font-size: 14px;
    font-weight: 500;
}

.schedule-container {
    background: #FAFAFA;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #F0F0F0;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    gap: 10px;
    align-items: stretch;
}

.schedule-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #8B4513;
    background: linear-gradient(135deg, #F5E6D3, #E8D5C4);
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    font-size: 14px;
}

.day-header {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #8B4513;
    padding: 12px 8px;
    background: #F5E6D3;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.day-header.today {
    background: #8B4513;
    color: white;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.day-bookings {
    min-height: 150px;
    background: white;
    border-radius: 10px;
    padding: 10px;
    border: 2px solid #E0E0E0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.day-bookings.today {
    border-color: #8B4513;
    background: #FFF8F5;
    box-shadow: 0 2px 10px rgba(139, 69, 19, 0.1);
}

.booking-slot {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    border-left: 4px solid #2196F3;
    cursor: pointer;
    transition: all 0.3s ease;
}

.booking-slot:hover {
    background: linear-gradient(135deg, #BBDEFB, #90CAF9);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.slot-time {
    font-weight: 700;
    color: #1565C0;
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.slot-cost {
    color: #2E7D32;
    font-weight: 600;
    font-size: 13px;
}

.slot-customer {
    color: #666;
    font-size: 11px;
    margin-top: 4px;
    font-style: italic;
}

.no-bookings-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #A0522D;
    font-style: italic;
    font-size: 12px;
    text-align: center;
}

.empty-week {
    text-align: center;
    color: #A0522D;
    font-style: italic;
    padding: 30px;
    background: #F9F9F9;
    border-radius: 10px;
    font-size: 16px;
}

/* Monthly Calendar */
.month-calendar {
    margin-top: 30px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-title {
    color: #8B4513;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-month {
    color: #A0522D;
    font-size: 14px;
    font-weight: 500;
}

.calendar-container {
    background: #FAFAFA;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #F0F0F0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #E0E0E0;
    border-radius: 10px;
    padding: 2px;
}

.calendar-day-header {
    background: #8B4513;
    color: white;
    text-align: center;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-day-header:first-child {
    border-radius: 8px 0 0 0;
}

.calendar-day-header:last-child {
    border-radius: 0 8px 0 0;
}

.calendar-day {
    background: white;
    min-height: 80px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
}

.calendar-day:hover {
    background: #F5F5F5;
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

.calendar-day.other-month {
    background: #F9F9F9;
    opacity: 0.5;
}

.calendar-day.today {
    background: #FFF8F5;
    border: 2px solid #8B4513;
    box-shadow: 0 2px 10px rgba(139, 69, 19, 0.2);
}

.calendar-day.has-bookings {
    background: linear-gradient(135deg, #E8F5E8, #F0FFF0);
    border-left: 4px solid #4CAF50;
}

.calendar-day.busy {
    background: linear-gradient(135deg, #FFF3E0, #FFECB3);
    border-left: 4px solid #FF9800;
}

.calendar-day.very-busy {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    border-left: 4px solid #F44336;
}

.day-number {
    font-size: 16px;
    font-weight: 600;
    color: #654321;
    margin-bottom: 5px;
}

.today .day-number {
    color: #8B4513;
    font-weight: 700;
}

.day-bookings-count {
    font-size: 11px;
    color: #666;
    margin-bottom: 3px;
}

.day-revenue {
    font-size: 12px;
    color: #2E7D32;
    font-weight: 600;
    margin-top: auto;
}

.booking-dots {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.booking-dot {
    width: 6px;
    height: 6px;
    background: #2196F3;
    border-radius: 50%;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-available { background: white; border: 1px solid #E0E0E0; }
.legend-light { background: linear-gradient(135deg, #E8F5E8, #F0FFF0); }
.legend-busy { background: linear-gradient(135deg, #FFF3E0, #FFECB3); }
.legend-very-busy { background: linear-gradient(135deg, #FFEBEE, #FFCDD2); }

/* 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);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F5E6D3;
}

.modal-title {
    color: #8B4513;
    font-size: 24px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #A0522D;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #F5E6D3;
    color: #8B4513;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    color: #654321;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.required::after {
    content: '*';
    color: #F44336;
    margin-left: 3px;
}

input, select, textarea {
    padding: 12px 15px;
    border: 2px solid #D2B48C;
    border-radius: 10px;
    font-size: 14px;
    background: #FEFEFE;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
    background: #FFF;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #A0522D, #8B4513);
}

.btn-secondary {
    background: #E0E0E0;
    color: #654321;
}

.btn-secondary:hover {
    background: #D0D0D0;
}

/* Loading */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1200px) {
    .schedule-grid {
        grid-template-columns: 80px repeat(7, 1fr);
        gap: 8px;
    }
    
    .stat-item {
        min-width: 100px;
        padding: 12px 15px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .cabana-row {
        padding: 20px 15px;
    }

    .cabana-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cabana-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }

    .cabana-stats {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .stat-item {
        min-width: calc(50% - 5px);
        padding: 10px;
    }

    .schedule-grid {
        grid-template-columns: 60px repeat(7, 1fr);
        gap: 5px;
    }

    .schedule-label {
        font-size: 12px;
        padding: 10px 5px;
    }

    .day-header {
        font-size: 11px;
        padding: 8px 4px;
    }

    .day-bookings {
        min-height: 120px;
        padding: 6px;
    }

    .booking-slot {
        padding: 6px 8px;
        font-size: 11px;
    }

    .modal-content {
        padding: 25px 20px;
        margin: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}