@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0b8770;
    --primary-dark: #075e4e;
    --primary-light: #e6f6f3;
    --secondary-color: #1a423f;
    --bg-color: #f4f7f6;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --white: #ffffff;
    --border-color: #e0e6ed;
    
    --success: #2ecc71;
    --warning: #f1c40f;
    --danger: #e74c3c;
    --success-light: #eafaf1;
    --warning-light: #fef9e7;
    --danger-light: #fdedec;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
}

input, select {
    font-family: 'Inter', sans-serif;
}

/* Utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #27ae60, var(--primary-color));
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(11, 135, 112, 0.3);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.3s;
}
.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-main);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 135, 112, 0.1);
    outline: none;
}

/* Card */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }

/* Table */
.table-responsive {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    padding: 12px;
    background: #f8f9fa;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--border-color);
}
td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}
tr:last-child td { border-bottom: none; }

/* Dashboard Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 260px;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}
.topbar {
    height: 70px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: var(--shadow-sm);
}

/* Sidebar Menu */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 32px;
    font-size: 1.2rem;
    font-weight: 700;
}
.nav-list {
    list-style: none;
    flex: 1;
}
.nav-item {
    margin: 0 16px 4px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.8);
    transition: 0.2s;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}
.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: var(--white);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-overlay.active {
    display: flex;
}
.modal-container {
    background: var(--white);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}
.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}
.modal-close:hover {
    color: var(--danger);
}
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-btn {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}
.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.page-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* --------------------------------------
   Responsive Media Queries
   -------------------------------------- */

/* Tablet & Mobile Layout */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1050;
        transition: transform 0.3s ease-in-out;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .topbar {
        padding: 0 16px;
    }
}

/* Mobile Layout */
@media (max-width: 768px) {
    /* Topbar Adjustments */
    .topbar-title-text {
        display: none; /* Hide long subtitle on tiny screens */
    }
    .topbar {
        height: 60px;
    }
    
    /* Forms & Grids */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        padding: 1rem;
    }
    
    /* Cards */
    .card {
        padding: 16px;
        margin-bottom: 16px;
    }
    .metric-card {
        padding: 1rem;
        gap: 1rem;
    }
    .metric-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    /* Modals */
    .modal-container {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    .modal-header {
        padding: 12px 16px;
    }
    .modal-body {
        padding: 16px;
    }
    
    /* Tables */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 600px; /* Ensure table doesn't squash too much */
    }
    
    /* Utility */
    .mobile-hidden {
        display: none !important;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}
.checkout-grid .left-pane {
    padding-right: 1.5rem;
    border-right: 1px solid var(--border-color);
}
.checkout-grid .right-pane {
    padding-left: 1.5rem;
}

.bookings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}
.bookings-grid .pane {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .checkout-grid .left-pane {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1.5rem;
    }
    .checkout-grid .right-pane {
        padding-left: 0;
    }
    .bookings-grid {
        grid-template-columns: 1fr;
    }
}

