/* General Body Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a; /* slate-900 */
    color: #e2e8f0; /* slate-200 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #334155; /* slate-700 */
}

.page-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.025em;
}

.page-header p {
    margin-top: 0.5rem;
    color: #94a3b8; /* slate-400 */
    font-size: 1.125rem;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    color: #f97316; /* orange-500 */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #ea580c; /* orange-600 */
}

/* Main Content Layout */
.content-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .content-layout {
        grid-template-columns: 400px 1fr;
        align-items: start;
    }
}

/* Booking Form Card */
.form-card {
    background-color: #1e293b; /* slate-800 */
    border: 1px solid #334155; /* slate-700 */
    border-radius: 0.75rem;
    padding: 1.5rem;
    position: sticky;
    top: 1.5rem;
}

.form-card h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

/* Form Elements */
.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1; /* slate-300 */
    margin-bottom: 0.5rem;
    display: block;
}

.form-control,
.form-select {
    width: 100%;
    background-color: #334155; /* slate-700 */
    border: 1px solid #475569; /* slate-600 */
    color: #e2e8f0; /* slate-200 */
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control::placeholder {
    color: #94a3b8; /* slate-400 */
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #f97316; /* orange-500 */
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
    background-color: #1e293b;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #f97316; /* orange-500 */
    color: #ffffff;
    width: 100%;
}

.btn-primary:hover {
    background-color: #ea580c; /* orange-600 */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.2);
}

.btn-info {
    background-color: #38bdf8; /* sky-400 */
    color: #ffffff;
}

.btn-info:hover {
    background-color: #0ea5e9; /* sky-500 */
}


/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background-color: #166534; /* green-800 */
    color: #dcfce7; /* green-100 */
    border: 1px solid #22c55e; /* green-500 */
}

.alert-danger {
    background-color: #991b1b; /* red-800 */
    color: #fee2e2; /* red-100 */
    border: 1px solid #ef4444; /* red-500 */
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Availability Section */
.availability-card {
    background-color: #1e293b; /* slate-800 */
    border: 1px solid #334155; /* slate-700 */
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.availability-card h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: #334155; /* slate-700 */
    color: #e2e8f0; /* slate-200 */
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid #475569;
}

.table thead th:first-child {
    border-top-left-radius: 0.5rem;
}
.table thead th:last-child {
    border-top-right-radius: 0.5rem;
}

.table tbody td {
    background-color: #0f172a; /* slate-900 */
    padding: 0.75rem 1rem;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #1e293b;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 0.5rem;
}
.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
}

.table .fw-medium {
    font-weight: 500;
    color: #cbd5e1; /* slate-300 */
}

/* Status Tags */
.status-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    min-width: 90px;
}

.status-available {
    background-color: #16a34a; /* green-600 */
}

.status-booked {
    background-color: #dc2626; /* red-600 */
}

/* === Responsive Design === */
@media (max-width: 1023px) {
    /* Menghapus 'sticky' pada form di ukuran tablet ke bawah */
    .form-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.875rem; /* ~30px */
    }

    .page-header p {
        font-size: 1rem;
    }
    
    .form-card, .availability-card {
        padding: 1rem;
    }

    /* Mengecilkan teks tabel agar muat */
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    .status-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
        min-width: 75px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 1rem 0.5rem;
    }

    .page-header h1 {
        font-size: 1.5rem; /* ~24px */
    }
    
    /* Mengecilkan teks dan padding tabel lebih lanjut */
    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .table .fw-medium {
        font-weight: normal; /* Mengurangi ketebalan font waktu untuk hemat ruang */
    }
    
    .status-tag {
        min-width: auto;
        padding: 0.2rem 0.4rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

.action-buttons {
    text-align: right;
    white-space: nowrap;
}
.action-buttons .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    color: white;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    vertical-align: middle;
    margin-left: 0.5rem;
}
.action-buttons .btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.action-buttons .btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}
.action-buttons .btn-edit {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
}
.action-buttons .btn-delete {
    background: linear-gradient(135deg, #EF4444, #F87171);
}
.action-buttons .btn-action svg {
    width: 18px;
    height: 18px;
}

/* === ADMIN TABLE RESPONSIVE STYLES === */
@media screen and (max-width: 767px) {
    .table-responsive-custom {
        border: none;
        box-shadow: none;
    }
    .table-responsive-custom .table thead {
        display: none; /* Sembunyikan header tabel */
    }
    .table-responsive-custom .table tr {
        display: block;
        margin-bottom: 1.5rem;
        border-radius: 8px;
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 1rem;
    }
    .table-responsive-custom .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.75rem 0.5rem;
        border: none;
        border-bottom: 1px solid var(--border-color-light);
    }
    .table-responsive-custom .table tr td:last-child {
        border-bottom: none;
    }
    .table-responsive-custom .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-light);
        text-align: left;
        margin-right: 1rem;
    }
    .table-responsive-custom .table .action-buttons {
        text-align: right;
    }
}

.back-link-standalone {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}
.back-link-standalone:hover {
    color: #fff;
}

.image-header {
    background-image: url('header.png');
    background-size: contain; /* Diubah dari 'cover' ke 'contain' */
    background-position: center;
    background-repeat: no-repeat; /* Mencegah gambar berulang jika terlalu kecil */
    min-height: 250px;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Responsive adjustments for the image header */
@media (max-width: 767px) {
    .image-header {
        min-height: 200px;
    }
}

@media (max-width: 576px) {
    .image-header {
        min-height: 150px;
    }
}

/* Toggle Switch di Admin Panel */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #EF4444; /* Merah untuk status OFF */
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #22C55E; /* Hijau untuk status ON */
}
input:checked + .slider:before {
    transform: translateX(26px);
}

/* Halaman Pemberitahuan Tutup */
.closure-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    z-index: 1000;
}
.closure-card {
    background-color: var(--background-light);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    color: var(--text-light);
}
.closure-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem auto;
    background-color: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.closure-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}
.closure-card h2 {
    color: #fff;
    margin-bottom: 0.5rem;
}
.closure-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Tombol WhatsApp Mengambang */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.25);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
}
@media (max-width: 767px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}