/* === FONT & BASE === */
body {
    /* UPDATED: Using Inter for a cleaner, modern UI font */
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb; /* bg-gray-50 */
    /* UPDATED: Softer text color for eye-friendly reading */
    color: #1f2937; /* text-gray-900 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === CARD & CONTENT === */
#main-content-area > main > div {
    background-color: white;
    /* UPDATED: Slightly larger rounding */
    border-radius: 0.75rem; /* rounded-xl */
    /* UPDATED: Softer, more modern shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* === HEADER === */
header {
    border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
    /* UPDATED: Simplified shadow */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); 
}

/* === BUTTONS (MODERN) === */
button, .button {
    transition: all 0.2s ease;
}
/* Main action buttons */
.bg-blue-600:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}
.bg-green-600:hover {
    background-color: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
}
.border-gray-300:hover {
    background-color: #f9fafb; 
    border-color: #9ca3af; 
}

/* === SIDEBAR (NEW DARK) === */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 17rem; /* w-64 */
    height: 100vh;
    /* UPDATED: Replaced gradient with a solid, modern dark color */
    background: #111827; /* bg-gray-900 */
    color: white;
    padding: 1rem; /* p-4 */
    overflow-y: auto;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}
#sidebar h1 {
    font-weight: 700;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #374151; /* bg-gray-700 */
    color: white;
}
#sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 0 0 25px rgba(0,0,0,0.3);
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem; 
    border-radius: 0.375rem; /* rounded-md */
    color: #d1d5db; /* text-gray-300 */
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent; 
}
.sidebar-link:hover {
    /* UPDATED: Hover for new dark sidebar */
    background-color: #374151; /* bg-gray-700 */
    color: white;
}
.sidebar-link.active {
    /* UPDATED: Active state for new dark sidebar */
    background-color: #2563eb; /* bg-blue-600 */
    color: white;
    font-weight: 600;
    border-left-color: #60a5fa; /* blue-400 */
}

/* === MODERN FORM FIELDS === */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
select,
textarea {
    display: block;
    width: 100%;
    border-width: 1px;
    border-color: #d1d5db; /* border-gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
    transition: all 0.2s ease;
}
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: #2563eb; /* focus:border-blue-600 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); /* focus:ring */
    outline: 2px solid transparent;
    outline-offset: 2px;
}
/* Checkbox */
input[type="checkbox"] {
    border-radius: 0.25rem;
    border-color: #d1d5db;
    color: #2563eb;
}
input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); 
    outline: 2px solid transparent;
    outline-offset: 2px;
}


/* === BEAUTIFIED SEARCH BAR === */
.search-bar-container {
    position: relative;
    display: flex;
    align-items: center;
}
.search-bar-container .search-icon {
    position: absolute;
    left: 0.85rem;
    color: #9ca3af; /* text-gray-400 */
    /* UPDATED: Ensure icon is visible */
    z-index: 10; 
}
.search-bar-container input[type="tel"] {
    padding-left: 2.5rem;
    flex-grow: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-width: 0;
    position: relative; /*
}
.search-bar-container button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    padding: 0.5rem 1rem;
    color: #4b5563; /* text-gray-600 */
    z-index: 11;
}
.search-bar-container button:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* === ACTION BUTTONS (TABLES) === */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;  /* 36px */
    height: 2.25rem; /* 36px */
    border-radius: 9999px; /* rounded-full */
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.875rem; /* text-sm */
}
.btn-edit {
    color: #2563eb; /* text-blue-600 */
    background-color: #dbeafe; /* bg-blue-100 */
}
.btn-edit:hover {
    background-color: #bfdbfe; /* bg-blue-200 */
    color: #1d4ed8; /* text-blue-700 */
    transform: scale(1.1);
}
.btn-delete {
    color: #dc2626; /* text-red-600 */
    background-color: #fee2e2; /* bg-red-100 */
}
.btn-delete:hover {
    background-color: #fecaca; /* bg-red-200 */
    color: #b91c1c; /* text-red-700 */
    transform: scale(1.1);
}
.btn-pause {
    color: #d97706; /* text-amber-600 */
    background-color: #fef3c7; /* bg-amber-100 */
}
.btn-pause:hover {
    background-color: #fde68a; /* bg-amber-200 */
    transform: scale(1.1);
}
.btn-resume {
    color: #2563eb; /* text-blue-600 */
    background-color: #dbeafe; /* bg-blue-100 */
}
.btn-resume:hover {
    background-color: #bfdbfe; /* bg-blue-200 */
    transform: scale(1.1);
}
.btn-discount, .btn-checkout {
    color: #16a34a; /* text-green-600 */
    background-color: #dcfce7; /* bg-green-100 */
}
.btn-discount:hover, .btn-checkout:hover {
    background-color: #bbf7d0; /* bg-green-200 */
    color: #15803d; /* text-green-700 */
    transform: scale(1.1);
}

/* === TABLES === */
thead.bg-gray-50 th {
    position: sticky;
    top: 0;
    background-color: #f9fafb; /* bg-gray-50 */
    border-bottom: 2px solid #e5e7eb; 
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280; /* text-gray-500 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
}
tbody tr:hover {
    /* UPDATED: Subtler hover for a cleaner look */
    background-color: #f3f4f6; /* bg-gray-100 */
}
/* Increase table cell padding for better breathing room */
td {
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
}

/* === OTHERS === */
/* ... (All other responsive styles, modal styles, etc., are unchanged) ... */
.hidden { display: none !important; }
#modal-overlay { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 50; opacity: 0; transition: opacity 0.2s ease-out; pointer-events: none; }
#modal-overlay.visible { opacity: 1; pointer-events: auto; }
#modal-container { background-color: white; border-radius: 0.75rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); max-width: 42rem; width: 90%; overflow: hidden; transform: translateY(20px) scale(0.98); opacity: 0; transition: all 0.2s ease-out; }
#modal-overlay.visible #modal-container { transform: translateY(0) scale(1); opacity: 1; }
#message-box { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 100; padding: 1rem 1.5rem; border-radius: 0.5rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); display: flex; align-items: center; transition: all 0.3s ease; transform: translateX(120%); opacity: 0; }
#message-box.show { transform: translateX(0); opacity: 1; }
.tab-active { border-bottom-color: #3b82f6; color: #2563eb; font-weight: 600; }
@media (min-width: 768px) { #sidebar { transform: translateX(0); box-shadow: none; } }
#main-content-container { margin-left: 0; width: 100%; height: 100vh; overflow-y: auto; transition: margin-left 0.3s ease-in-out; background-color: #f9fafb; }
@media (min-width: 768px) { #main-content-container { margin-left: 16rem; width: calc(100% - 16rem); } }
#mobile-menu-button { transition: background-color 0.2s; }
#mobile-menu-button:hover { background-color: #f3f4f6; }
@media (min-width: 768px) { #mobile-menu-button { display: none; } }
#mobile-menu-overlay { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.5); z-index: 39; opacity: 0; transition: opacity 0.3s ease-in-out; pointer-events: none; }
#mobile-menu-overlay.overlay-open { opacity: 1; pointer-events: auto; }
.sortable-header { cursor: pointer; user-select: none; }
.sortable-header:hover { color: #111827; }
.sortable-header .sort-icon { opacity: 0.3; transition: opacity 0.2s ease; }
.sortable-header.active .sort-icon, .sortable-header:hover .sort-icon { opacity: 1; }
.kid-tag { background-color: #e0e7ff; color: #3730a3; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.5rem; }
.pagination-controls { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; font-size: 0.875rem; color: #4b5563; }
.pagination-controls select { padding: 0.5rem; border: 1px solid #d1d5db; border-radius: 0.375rem; background-color: white; }
.pagination-controls .pagination-nav button { padding: 0.5rem 1rem; border: 1px solid #d1d5db; background-color: white; color: #374151; font-weight: 500; }
.pagination-controls .pagination-nav button:first-child { border-top-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem; }
.pagination-controls .pagination-nav button:last-child { border-top-right-radius: 0.375rem; border-bottom-right-radius: 0.375rem; border-left: 0; }
.pagination-controls .pagination-nav button:hover { background-color: #f9fafb; }
.pagination-controls .pagination-nav button:disabled { background-color: #f9fafb; color: #d1d5db; cursor: not-allowed; }
.pagination-controls .pagination-info { margin: 0 1rem; }

/* === NEW: USER DROPDOWN === */
.user-menu-wrapper {
    position: relative;
}

#user-dropdown {
    position: absolute;
    top: 120%; /* Position below the user info text */
    right: 0;
    z-index: 100;
    width: 10rem; /* 160px */
    background-color: white;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    border: 1px solid #e5e7eb; /* border-gray-200 */
    overflow: hidden;
    
    /* Hidden by default */
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
    transition: all 0.1s ease-out;
    pointer-events: none;
}

#user-dropdown.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.user-dropdown-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem; /* py-3 px-4 */
    font-size: 0.875rem; /* text-sm */
    color: #374151; /* text-gray-700 */
    transition: all 0.15s ease;
}
.user-dropdown-link:hover {
    background-color: #f9fafb; /* bg-gray-50 */
    color: #111827; /* text-gray-900 */
}

/* Loading indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    margin-top: 10px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    max-width: 300px;
}

.notification-success {
    background: #28a745;
}

.notification-error {
    background: #dc3545;
}

.notification-info {
    background: #17a2b8;
}

/* Session cards */
.session-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
}

.session-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 10px;
}

.session-header h4 {
    margin: 0;
    flex: 1;
}

.location-badge {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.session-details p {
    margin: 5px 0;
    font-size: 14px;
}

.session-actions {
    margin-top: 10px;
}

.session-actions .btn {
    margin-right: 5px;
}

/* Content sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Form styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: black;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* === RESPONSIVE HELPERS === */

/* 1. Scrollable Tabs (Hide Scrollbar but allow scrolling) */
.responsive-tabs-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    border-bottom: 1px solid #e5e7eb;
}
.responsive-tabs-container::-webkit-scrollbar { 
    display: none; /* Chrome/Safari */
}

/* 2. Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid #e5e7eb;
}

/* 3. Mobile Header Adjustments */
@media (max-width: 640px) {
    #page-title {
        font-size: 1.1rem; /* Smaller title on mobile */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
    .user-menu-wrapper #user-info {
        font-size: 0; /* Hide text, show only icon if needed, or simplify */
    }
    .user-menu-wrapper #user-info strong {
        font-size: 0.875rem;
        display: block; /* Show Name */
    }
    .user-menu-wrapper #user-info i {
        display: none; /* Hide chevron on mobile to save space */
    }
}

/* 4. Stacked Form Grids on Mobile */
.responsive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .responsive-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cols on tablet */
    }
}
@media (min-width: 1024px) {
    .responsive-grid.cols-3 {
        grid-template-columns: repeat(3, 1fr); /* 3 cols on desktop */
    }
    .responsive-grid.cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}