:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --background-light: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Styles */
.navbar {
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    color: var(--text-primary);
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.text-primary {
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.dropdown-menu {
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    padding: 0.25rem 0;
}

.dropdown-item {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
    color: #374151;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f3f4f6;
    color: #111827;
}

.logout-icon {
    font-size: 1rem;
    vertical-align: middle;
}

/* Main Content Wrapper */
.content-wrapper {
    width: 80%;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .content-wrapper {
        width: 95%;
    }
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-outline-secondary {
    border-color: #cbd5e1;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-outline-secondary:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--text-primary);
}

/* Card Styles */
.card {
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.card-body {
    padding: 2rem;
}

.card-footer {
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
}

/* Form Controls */
.form-control,
.form-select {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
    outline: none;
}

.form-label {
    color: #334155;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Input with Icon */
.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1.25rem;
}

.input-with-icon {
    padding-left: 2.75rem;
}

/* Toggle Switch */
.form-check-input {
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.15);
}

.form-switch .form-check-input {
    width: 2.75rem;
    height: 1.5rem;
}

.form-check-label {
    cursor: pointer;
}

/* Alert Styles */
.alert-info {
    background-color: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-icon {
    color: #3b82f6;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background-color: white;
}

.footer-link:hover {
    color: var(--primary-color) !important;
    transition: color 0.2s ease;
}

/* Text Utilities */
.text-muted {
    color: var(--text-muted) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .card-footer .btn {
        width: 100%;
    }
}

/* Shadow Utilities */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* Material Symbols Configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    overflow: hidden;
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
}

/* Filter Card */
.filter-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-card .material-symbols-outlined {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Reservations Table */
.reservations-table {
    font-size: 0.875rem;
}

.reservations-table thead {
    background-color: #1e293b;
    color: white;
}

.reservations-table thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border: none;
}

.reservations-table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
}

.reservations-table tbody tr {
    transition: background-color 0.2s ease;
}

.reservations-table tbody tr:hover {
    background-color: #f8fafc;
}

.reservations-table tfoot td {
    padding: 1rem 1.5rem;
    background-color: #f8fafc;
}

/* Date Day Text */
.date-day {
    font-size: 0.75rem;
    display: block;
    margin-top: 0.125rem;
}

/* Nights Badge */
.nights-badge {
    background-color: #f1f5f9;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}

/* Status Badges */
.status-confirmed {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
}

.status-pending {
    background-color: #fef3c7;
    color: #854d0e;
    border: 1px solid #fde68a;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
}

/* Action Button */
.btn-outline-primary .action-icon {
    font-size: 1rem;
}

/* Table Info Text */
.table-info {
    font-size: 0.75rem;
}

/* Calendar Button in Header */
.btn-primary .material-symbols-outlined {
    font-size: 1.125rem;
}

/* Spinner Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design - Reservations */
@media (max-width: 768px) {
    .reservations-table {
        font-size: 0.8125rem;
    }

    .reservations-table thead th,
    .reservations-table tbody td,
    .reservations-table tfoot td {
        padding: 0.75rem 1rem;
    }

    .date-day {
        display: none;
    }
}

@media (max-width: 992px) {
    .table-responsive {
        border-radius: 0.75rem;
    }
}

/* Table Border Radius Alignment */
.card .table-responsive {
    border-radius: 0.75rem;
    padding: 0;
    margin: 0;
}

.card .table thead th:first-child {
    border-top-left-radius: 0.75rem;
}

.card .table thead th:last-child {
    border-top-right-radius: 0.75rem;
}

/* DataTables Footer Controls */


.dataTables_length {
    padding-left: 1.5rem;
    margin-left: 0;
    text-align: left;
}

.dataTables_info {
    padding-right: 1.5rem;
    margin-right: 0;
    text-align: right;
}

.dataTables_length,
.dataTables_info,
.dataTables_paginate {
    display: flex;
    justify-content: center;
    padding-bottom: 1rem;
    margin-bottom: 0 !important;
}

.dataTables_wrapper {
    padding-bottom: 1rem;
}

/* Rounded thead corners — requires separate so border-radius works on th */
#reservationsTable {
    border-collapse: separate;
    border-spacing: 0;
}

#reservationsTable thead tr th:first-child {
    border-top-left-radius: 0.375rem;
}

#reservationsTable thead tr th:last-child {
    border-top-right-radius: 0.375rem;
}

#customersTable {
    border-collapse: separate;
    border-spacing: 0;
}

#customersTable thead tr th:first-child {
    border-top-left-radius: 0.375rem;
}

#customersTable thead tr th:last-child {
    border-top-right-radius: 0.375rem;
}

/* Grid Action Buttons */
.grid-action-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: transparent;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
}

.grid-action-btn:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
}

.grid-action-btn .material-symbols-outlined {
    font-size: 1.15rem;
    width: auto;
    height: auto;
    overflow: visible;
}

.grid-action-btn.action-warning {
    color: #e67e22;
    border-color: #f0d0a8;
}

.grid-action-btn.action-warning:hover {
    background-color: #fef5ec;
    border-color: #e67e22;
    color: #d35400;
}

.grid-action-btn.action-success {
    color: #198754;
    border-color: #a3d9b1;
}

.grid-action-btn.action-success:hover {
    background-color: #ecf7f0;
    border-color: #198754;
    color: #146c43;
}

/* Auth Pages */
.auth-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem;
}

.auth-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    color: #64748b;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card .form-floating {
    margin-bottom: 1rem;
}

.auth-card .form-control {
    height: 48px;
    border-radius: 0.625rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: #ffffff;
}

.auth-card .form-floating > label {
    font-size: 0.875rem;
    color: #64748b;
}

.auth-card .form-check-input {
    border-radius: 0.25rem;
}

.auth-card .checkbox {
    margin-bottom: 1.25rem;
}

.auth-card .checkbox label {
    font-size: 0.875rem;
    color: #475569;
}

.auth-btn {
    height: 48px;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
}

.auth-btn:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.auth-links {
    margin-top: 1.25rem;
    text-align: right;
}

.auth-links a {
    font-size: 0.8125rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ===== App Dialog - Unified dialog component ===== */

/* Base container */
.app-dialog {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

/* Header */
.app-dialog-header {
    border-bottom: none;
    padding: 2rem 2rem 0.5rem;
    position: relative;
}

/* Circular icon */
.app-dialog-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.app-dialog-icon .material-symbols-outlined {
    font-size: 1.75rem;
    width: auto;
    height: auto;
    overflow: visible;
}

/* Icon color variants by type */
.app-dialog-icon.icon-info {
    background-color: #dbeafe;
}

.app-dialog-icon.icon-info .material-symbols-outlined {
    color: var(--primary-color);
}

.app-dialog-icon.icon-success {
    background-color: #dcfce7;
}

.app-dialog-icon.icon-success .material-symbols-outlined {
    color: #198754;
}

.app-dialog-icon.icon-warning {
    background-color: #fef3c7;
}

.app-dialog-icon.icon-warning .material-symbols-outlined {
    color: #d97706;
}

.app-dialog-icon.icon-error {
    background-color: #fee2e2;
}

.app-dialog-icon.icon-error .material-symbols-outlined {
    color: #dc3545;
}

/* Title */
.app-dialog-header .modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Message */
.app-dialog-message {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Body */
.app-dialog-body {
    padding: 1rem 2rem 1.5rem;
}

/* Content projection area */
.app-dialog-content {
    margin-top: 1rem;
}

/* Footer with two buttons (confirm mode) */
.app-dialog-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    display: flex;
    gap: 0.75rem;
}

.app-dialog-btn-primary {
    flex: 2;
    height: 44px;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.app-dialog-btn-secondary {
    flex: 1;
    height: 44px;
    border-radius: 0.625rem;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Footer with single button (alert mode) */
.app-dialog-footer-single {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.app-dialog-footer-single .btn {
    height: 44px;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.app-dialog-footer-single .app-dialog-btn-primary {
    width: auto;
    flex: 0 0 auto;
    min-width: 140px;
}

/* Data modal variant (e.g. bookings list) */
.app-dialog-data {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.app-dialog-data-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    position: relative;
}

.app-dialog-data-header .modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-dialog-data-header .modal-title .material-symbols-outlined {
    width: auto;
    height: auto;
    overflow: visible;
    color: var(--primary-color);
}

.app-dialog-data-body {
    padding: 1.5rem 2rem;
}

.app-dialog-data-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: flex-end;
}

.app-dialog-data-footer .btn {
    height: 40px;
    border-radius: 0.625rem;
    font-weight: 500;
    font-size: 0.875rem;
    min-width: 100px;
}