/* 
 * Room Booking System - Main Stylesheet
 * Clean, modern design with CSS custom properties for theming
 */

:root {
    --primary: #3B82F6;
    --primary-dark: #1E40AF;
    --primary-light: #93C5FD;
    --secondary: #64748B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    --white: #FFFFFF;
    --black: #000000;
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    
    --transition: 150ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
}

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

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-900);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin: 0 0 1rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2,
.card-header h3,
.card-header h4 {
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    border-color: #059669;
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
    background: #DC2626;
    border-color: #DC2626;
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-group {
    display: inline-flex;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.btn-group .btn + .btn {
    margin-left: -1px;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:disabled,
.form-control[readonly] {
    background: var(--gray-100);
    cursor: not-allowed;
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    appearance: none;
}

.form-hint {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.form-error {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--danger);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-check-label {
    font-size: 0.9375rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #B45309;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(6, 182, 212, 0.1);
    color: #0E7490;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 0.875rem 1rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-50);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-striped tbody tr:nth-child(odd) {
    background: var(--gray-50);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065F46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error,
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991B1B;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400E;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1E40AF;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Pagination */
.pagination {
    margin: 1.5rem 0;
}

.pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.pagination li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.pagination li a:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.pagination li.active a {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pagination li.ellipsis {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: var(--gray-400);
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
}

.auth-box {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0;
}

.auth-logo p {
    color: var(--gray-500);
    margin: 0.5rem 0 0;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.auth-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--gray-900);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition);
}

.admin-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header h1 {
    font-size: 1.25rem;
    color: var(--white);
    margin: 0;
}

.admin-sidebar-header p {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin: 0.25rem 0 0;
}

.admin-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.admin-nav-section {
    padding: 0.5rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray-300);
    font-size: 0.9375rem;
    transition: all var(--transition);
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.admin-nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-light);
    border-right: 3px solid var(--primary);
}

.admin-nav-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.admin-sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.admin-user-info {
    flex: 1;
    min-width: 0;
}

.admin-user-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-role {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.25rem;
    margin: 0;
}

.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.admin-breadcrumb a {
    color: var(--gray-500);
}

.admin-breadcrumb a:hover {
    color: var(--primary);
}

.admin-breadcrumb span {
    color: var(--gray-400);
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-main {
    flex: 1;
    padding: 1.5rem;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
}

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-icon.red { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.stat-content h3 {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    margin: 0 0 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Calendar */
.calendar {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.calendar-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--gray-600);
    transition: all var(--transition);
}

.calendar-nav button:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.calendar-day {
    min-height: 100px;
    padding: 0.5rem;
    border-right: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day.other-month {
    background: var(--gray-50);
}

.calendar-day.other-month .calendar-date {
    color: var(--gray-400);
}

.calendar-day.today {
    background: rgba(59, 130, 246, 0.05);
}

.calendar-day.today .calendar-date {
    background: var(--primary);
    color: var(--white);
}

.calendar-date {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 50%;
    margin-bottom: 0.25rem;
}

.calendar-event {
    display: block;
    padding: 0.25rem 0.5rem;
    margin-bottom: 2px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: opacity var(--transition);
}

.calendar-event:hover {
    opacity: 0.8;
}

.calendar-event.confirmed {
    background: rgba(16, 185, 129, 0.2);
    color: #065F46;
}

.calendar-event.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #92400E;
}

.calendar-event.cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: #991B1B;
    text-decoration: line-through;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Loading */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    transition: background var(--transition);
}

.dropdown-item:hover {
    background: var(--gray-50);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.25rem 0;
}

/* Tabs */
.tabs {
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.tabs-list {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tabs-list li a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition);
}

.tabs-list li a:hover {
    color: var(--gray-700);
}

.tabs-list li.active a {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
    color: var(--white);
    background: var(--gray-800);
    border-radius: var(--radius-sm);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    margin-bottom: 4px;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Search */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    padding-left: 2.5rem;
}

.search-box svg {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

/* Client Layout */
.client-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.client-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.client-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.client-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.client-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.client-nav a {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    color: var(--gray-600);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.client-nav a:hover {
    color: var(--gray-900);
    background: var(--gray-100);
}

.client-nav a.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.client-main {
    flex: 1;
    padding: 2rem 1.5rem;
}

.client-main .container {
    max-width: 1000px;
}

/* Booking Form */
.booking-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.booking-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-400);
    position: relative;
}

.booking-step::after {
    content: '';
    position: absolute;
    right: 0;
    width: 40px;
    height: 1px;
    background: var(--gray-300);
}

.booking-step:last-child::after {
    display: none;
}

.booking-step.active {
    color: var(--primary);
}

.booking-step.completed {
    color: var(--success);
}

.booking-step-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid currentColor;
    font-weight: 600;
}

.booking-step.active .booking-step-number {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.booking-step.completed .booking-step-number {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

/* Room Card */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.room-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.room-card:hover {
    box-shadow: var(--shadow-md);
}

.room-card-image {
    height: 180px;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.room-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.room-card-body {
    padding: 1.25rem;
}

.room-card-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.room-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.room-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.room-card-price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-500);
}

/* Time Slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.time-slot {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.time-slot:hover:not(.unavailable) {
    background: var(--gray-200);
}

.time-slot.selected {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.time-slot.unavailable {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: not-allowed;
    text-decoration: line-through;
}

/* ═══════════════════════════════════════════════════════
   MOBILE — phones (≤ 767px)
═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* ── Admin shell ─────────────────────────────────── */
    .admin-header {
        padding: 0.75rem 1rem;
    }

    .admin-header h1 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
    }

    .admin-header-right .btn span {
        display: none;
    }

    .admin-main {
        padding: 1rem;
    }

    /* ── Stats grid — single column on phones ────────── */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.375rem;
    }

    /* ── Cards ───────────────────────────────────────── */
    .card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.875rem 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* ── Tables — force horizontal scroll ────────────── */
    .table-responsive {
        border-radius: var(--radius);
        border: 1px solid var(--gray-200);
    }

    .table {
        min-width: 780px;
    }

    /* ── Calendar — compact cells on mobile ─────────── */
    .calendar-day {
        min-height: 48px;
        padding: 0.25rem;
        font-size: 0.75rem;
    }

    .calendar-day-header {
        padding: 0.5rem 0.25rem;
        font-size: 0.625rem;
    }

    .calendar-header {
        padding: 0.75rem 1rem;
    }

    .calendar-title {
        font-size: 0.9375rem;
    }

    /* ── Buttons ─────────────────────────────────────── */
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.875rem;
    }

    /* ── Forms ───────────────────────────────────────── */
    .form-row,
    .form-group-row {
        flex-direction: column;
    }

    /* ── Sidebar footer user info ────────────────────── */
    .admin-user-info {
        display: none;
    }

    /* ── Dropdowns ───────────────────────────────────── */
    .dropdown-menu {
        right: 0;
        left: auto;
        min-width: 160px;
    }
}

/* ═══════════════════════════════════════════════════════
   EXTRA SMALL — very small phones (≤ 400px)
═══════════════════════════════════════════════════════ */
@media (max-width: 400px) {

    .admin-header h1 {
        max-width: 120px;
    }

    .admin-main {
        padding: 0.75rem;
    }

    .stats-grid {
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .admin-sidebar,
    .admin-header,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    body {
        background: white;
    }
}
