:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #1f2937;
    --light: #f8fafc;
    --border: #e5e7eb;
    --text: #374151;
    --text-light: #6b7280;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-alt: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease-out;
}

/* زر "حجز هذه القاعة" أسفل البطاقة وبعرض كامل */
.hall-card .book-hall-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 14px 18px; /* ارتفاع أكبر */
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

/* مظهر عند التعطيل (يتماشى مع منطق renderHallSlots) */
.hall-card .book-hall-btn.disabled,
.hall-card .book-hall-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.table .row {
    display: grid;
    grid-template-columns: 80px 150px 200px 120px 120px 1fr;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.table .row.head {
    font-weight: bold;
    background: #f5f7fa;
}

.actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.actions .btn {
    min-width: 80px;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}

.modal-overlay.show {
    display: flex
}

/* يجعل المودال يظهر فعلاً عند فتح المظلّة */
.modal-overlay.show {
    display: flex; /* يضمن الظهور */
    align-items: center;
    justify-content: center;
    z-index: 9999; /* فوق كل شيء */
}

/* في بعض القوالب المودال يبدأ شفاف/معطّل للضغط */
.modal {
    opacity: 1 !important; /* اجعلها مرئية */
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

/* لو كان عندك انتقالات تخليها مخفية افتراضياً، حط افتراض آمن */
.modal-overlay .modal {
    transition: opacity .2s ease, transform .2s ease;
}


/* Enhanced Dark mode variables */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --secondary: #fbbf24;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --info: #22d3ee;
    --dark: #f9fafb;
    --light: #111827;
    --border: #374151;
    --text: #f9fafb;
    --text-light: #d1d5db;
    --bg-gradient: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    --bg-gradient-alt: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
    scroll-behavior: smooth;
	user-select: none;
}

/* Enhanced Loading Spinner */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

[data-theme="dark"] .loading-overlay {
    background: rgba(17, 24, 39, 0.9);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Enhanced Header */
.header {
    background: var(--bg-gradient);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.12)"/></svg>');
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.logo:hover {
    transform: rotate(360deg) scale(1.1);
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Enhanced Theme Toggle */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(180deg) scale(1.1);
}

/* Enhanced Notifications */
/* ===== مركز الإشعارات (يمين) ===== */
#notificationCenter {
  position: fixed;
  top: 20px;
  right: 20px;          /* استخدم left لو كانت الواجهة LTR */
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: min(90vw, 480px);
  pointer-events: none;
}

/* ===== الكرت ===== */
.notification {
  --bg: #ffffff;
  --fg: #374151;
  --border: #e5e7eb;
  --ring: #3b82f6;
  direction: rtl;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  column-gap: 12px;
  row-gap: 6px;
  align-items: start;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,.12);
  transform: translateX(120%);
  opacity: 0;
  animation: notif-in .35s cubic-bezier(.2,.7,.2,1) forwards;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

/* الأيقونة داخل دائرة */
.notification .icon {
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
  font-weight: 900; color: #fff; font-size: 16px;
}

/* العنوان/الرسالة */
.notification .msg {
  font-size: 14px; line-height: 1.5; font-weight: 600;
}

/* زر إغلاق أنيق */
.notification .close {
  border: 0; background: transparent; cursor: pointer;
  color: #9ca3af; font-size: 18px; line-height: 1;
  padding-inline: 6px;
}
.notification .close:hover { color: #111827; }

/* شريط التقدم بالأسفل */
.notification .bar {
  grid-column: 1 / -1;
  height: 3px; border-radius: 999px;
  background: currentColor; opacity: .65;
  transform-origin: right;
  animation: notif-bar linear forwards;
}

/* ألوان الحالات */
.notification.info    { --ring:#3b82f6; }
.notification.success { --ring:#10b981; }
.notification.warning { --ring:#f59e0b; }
.notification.danger  { --ring:#ef4444; }

.notification.info .icon    { background:#3b82f6; }
.notification.success .icon { background:#10b981; }
.notification.warning .icon { background:#f59e0b; }
.notification.danger .icon  { background:#ef4444; }

/* حافة علوية رقيقة بنفس لون الحالة */
.notification::before{
  content:"";
  position:absolute; inset:0 0 auto 0; height:4px;
  background: var(--ring); opacity:.15;
}

/* دخول/خروج */
@keyframes notif-in   { to { transform: translateX(0); opacity: 1; } }
@keyframes notif-out  { to { transform: translateX(120%); opacity: 0; } }

/* تعبئة الشريط من اليمين لليسار */
@keyframes notif-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }


/* Enhanced Login Modal */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: min(420px, 90vw);
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    opacity: 0;
    animation: modalAppear 0.3s ease-out forwards;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .login-card {
    background: var(--dark);
    color: var(--text);
    border-color: var(--border);
}

@keyframes modalAppear {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light);
    color: var(--text);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: var(--primary-light);
}

/* Enhanced Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 44px; /* Better touch targets */
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(1px);
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #d1d5db;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-info:hover {
    background: #0891b2;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

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

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-gradient);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .card {
    background: var(--dark);
    border-color: var(--border);
}

/* Enhanced Controls Bar */
.controls-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

/* Enhanced Date Navigation */
.date-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.date-display {
    padding: 1rem 2rem;
    background: var(--bg-gradient);
    color: white;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    min-width: 250px;
    text-align: center;
    box-shadow: var(--shadow);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
}

.date-display::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.date-day {
    font-size: 0.9rem;
    opacity: 0.9;
}

.date-full {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Enhanced Quick Date Buttons */
.quick-dates {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.quick-date-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--light);
    color: var(--text);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    min-height: 40px;
}

.quick-date-btn:hover,
.quick-date-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Enhanced Hall Grid */
.hall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.hall-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hall-card {
    background: var(--dark);
    border-color: var(--border);
}

.hall-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.hall-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.hall-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .hall-card.selected {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.hall-info h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.hall-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.hall-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.meta-item {
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: var(--light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.meta-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

[data-theme="dark"] .meta-item {
    background: #374151;
}

.meta-value {
    font-weight: 700;
    color: var(--primary);
    display: block;
    font-size: 1.2rem;
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

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

.time-slot {
    padding: 0.75rem;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.time-slot.available {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border-color: #10b981;
}

.time-slot.available:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.time-slot.booked {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
    border-color: #ef4444;
    cursor: not-allowed;
}

.time-slot.ended {
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    color: #6b7280;
    border-color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.7;
}

.time-slot.pending {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    color: #9a3412;
    border-color: #f59e0b;
}

.time-slot.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

/* Enhanced Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: min(600px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    opacity: 0;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .modal {
    background: var(--dark);
    border-color: var(--border);
}

.modal.show {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-gradient);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

[data-theme="dark"] .modal-footer {
    background: rgba(255, 255, 255, 0.02);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Enhanced Bookings List */
.bookings-section {
    margin-top: 2rem;
}

.booking-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.booking-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05));
    transition: var(--transition);
}

.booking-item:hover::before {
    width: 100%;
}

[data-theme="dark"] .booking-item {
    background: var(--dark);
}

.booking-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.booking-item.pending {
    border-left-color: var(--warning);
}

.booking-item.approved {
    border-left-color: var(--success);
}

.booking-item.rejected {
    border-left-color: var(--danger);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.booking-info h4 {
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.booking-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.booking-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.booking-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-status.pending {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    color: #9a3412;
}

.booking-status.approved {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
}

.booking-status.rejected {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover::after {
    opacity: 1;
}

[data-theme="dark"] .stat-card {
    background: var(--dark);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
}

.stat-change {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* نبضة الرقم عند التحديث */
.stat-value.bump {
  animation: stat-bump .5s ease-out;
}
@keyframes stat-bump {
  0%   { transform: scale(1);    text-shadow: 0 0 0 rgba(59,130,246,0); }
  40%  { transform: scale(1.12); text-shadow: 0 6px 18px rgba(59,130,246,.35); }
  100% { transform: scale(1);    text-shadow: 0 0 0 rgba(59,130,246,0); }
}

/* ومضة خفيفة للبطاقة */
.stat-card.flash::after {
  opacity: 1;
  animation: stat-flash .6s ease-out;
}
@keyframes stat-flash {
  from { background: radial-gradient(circle at 50% 0%, rgba(59,130,246,.18) 0%, transparent 55%); }
  to   { background: radial-gradient(circle at 50% 0%, rgba(59,130,246,0) 0%, transparent 55%); }
}


/* Enhanced Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: var(--light);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .tabs {
    background: #374151;
}

.tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 600;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.tab.active::before {
    width: 80%;
}

.tab.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

[data-theme="dark"] .tab.active {
    background: var(--dark);
}

.tab:hover:not(.active) {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeInUp 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.alert-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: var(--success);
    color: #065f46;
}

.alert-success::before {
    background: var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-color: var(--danger);
    color: #991b1b;
}

.alert-danger::before {
    background: var(--danger);
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fed7aa 100%);
    border-color: var(--warning);
    color: #92400e;
}

.alert-warning::before {
    background: var(--warning);
}

/* Enhanced Calendar Table */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
}

[data-theme="dark"] .calendar-table {
    background: var(--dark);
}

.calendar-table th {
    background: var(--bg-gradient-alt);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    border: none;
    position: relative;
}

.calendar-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.calendar-table th:first-child {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

.calendar-table td {
    padding: 1rem 0.75rem;
    text-align: center;
    border: 1px solid #f3f4f6;
    min-height: 80px;
    vertical-align: middle;
    transition: var(--transition);
    position: relative;
}

.calendar-table td::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(59, 130, 246, 0.05);
    opacity: 0;
    transition: var(--transition);
}

.calendar-table td:hover::before {
    opacity: 1;
}

[data-theme="dark"] .calendar-table td {
    border-color: #374151;
}

.calendar-table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .calendar-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.calendar-table tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.calendar-table .time-cell {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 700;
    color: var(--dark);
    border-right: 3px solid var(--primary);
    position: relative;
}

.calendar-table .time-cell::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--primary);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--primary);
    }

    100% {
        box-shadow: 0 0 20px var(--primary);
    }
}

[data-theme="dark"] .calendar-table .time-cell {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: var(--text);
}

.calendar-table .available-cell {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
}

.calendar-table .booked-cell {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
    font-weight: 500;
}

.calendar-table .ended-cell {
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    color: #6b7280;
    opacity: 0.8;
}

.calendar-table .empty-cell {
    color: #9ca3af;
    font-style: italic;
}

/* Enhanced Ticket Styles */
.ticket {
    max-width: 500px;
    width: 100%;
    margin: 2rem auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    border: 2px dashed #e5e7eb;
    page-break-inside: avoid;
    transition: var(--transition);
}

.ticket:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .ticket {
    background: var(--dark);
    border-color: var(--border);
}

.ticket::before, .ticket::after {
    content: '';
    position: absolute;
    top: 45%;
    width: 20px;
    height: 20px;
    background: var(--light);
    border-radius: 50%;
    border: 2px solid var(--border);
}

.ticket::before {
    left: -10px;
}

.ticket::after {
    right: -10px;
}

[data-theme="dark"] .ticket::before,
[data-theme="dark"] .ticket::after {
    background: var(--light);
}

.ticket-header {
    background: var(--bg-gradient);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ticket-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.ticket-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ticket-subtitle {
    opacity: 0.9;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.ticket-id-display {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 auto;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.ticket-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

.ticket-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.ticket-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    animation: ticketPulse 2s ease-in-out infinite alternate;
}

@keyframes ticketPulse {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

[data-theme="dark"] .ticket-row {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.ticket-row.full-width {
    grid-column: 1 / -1;
}

.ticket-label {
    font-weight: 700;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ticket-value {
    font-weight: 700;
    color: var(--dark);
    font-size: 1rem;
}

[data-theme="dark"] .ticket-value {
    color: var(--text);
}

.ticket-footer {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px dashed var(--border);
    line-height: 1.6;
}

[data-theme="dark"] .ticket-footer {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.ticket-qr {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #333, #666);
    margin: 1rem auto;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: var(--shadow);
}

/* Enhanced Search Modal */
.search-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.search-card {
    background: white;
    border-radius: var(--radius-lg);
    width: min(500px, 95vw);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .search-card {
    background: var(--dark);
    border-color: var(--border);
}

.search-header {
    background: var(--bg-gradient);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.search-body {
    padding: 2rem;
}

.search-input {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.3rem;
    text-align: center;
    letter-spacing: 3px;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--light);
    color: var(--text);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.search-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.search-result.found {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #10b981;
    color: #065f46;
}

.search-result.not-found {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-color: #ef4444;
    color: #991b1b;
}

/* Enhanced Rating System */
.rating-system {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--light) 0%, #f1f5f9 100%);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

[data-theme="dark"] .rating-system {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.rating-stars {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.rating-star {
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .rating-star:hover,
    .rating-star.active {
        color: #fbbf24;
        transform: scale(1.2);
        text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    }

/* Enhanced Approval System */
.approval-panel {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #fbbf24;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

    .approval-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
        animation: approvalShimmer 2s ease-in-out infinite;
    }

@keyframes approvalShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

[data-theme="dark"] .approval-panel {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-color: #fbbf24;
}

.approval-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Enhanced Statistics Charts */
.advanced-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-chart {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

    .stat-chart:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

[data-theme="dark"] .stat-chart {
    background: var(--dark);
    border-color: var(--border);
}

.chart-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px dashed var(--border);
    position: relative;
    overflow: hidden;
}

.chart-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    animation: chartPulse 3s ease-in-out infinite;
}

@keyframes chartPulse {
    0%, 100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

[data-theme="dark"] .chart-placeholder {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

/* Enhanced User Management */
.user-management {
    margin-top: 2rem;
}

.user-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-gradient);
}

[data-theme="dark"] .user-card {
    background: var(--dark);
    border-color: var(--border);
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.user-info h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.user-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.permission-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.permission-badge {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.permission-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.role-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.role-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.role-badge.admin {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    color: #92400e;
    border-color: #fbbf24;
}

.role-badge.manager {
    background: linear-gradient(135deg, #ddd6fe 0%, #8b5cf6 100%);
    color: #5b21b6;
    border-color: #8b5cf6;
}

.role-badge.staff {
    background: linear-gradient(135deg, #e0f2fe 0%, #06b6d4 100%);
    color: #0277bd;
    border-color: #06b6d4;
}

/* Enhanced Print Actions */
.print-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.print-actions.show {
    display: flex;
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(100px);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.print-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 1.25rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    min-width: 150px;
    justify-content: center;
}

.print-btn:hover {
    background: var(--primary-light);
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.print-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Enhanced Shortcuts Help */
.shortcuts-help {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    max-width: 350px;
    transform: translateY(150%);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

[data-theme="dark"] .shortcuts-help {
    background: var(--dark);
    border-color: var(--border);
}

.shortcuts-help.show {
    transform: translateY(0);
    opacity: 1;
}

.shortcuts-help h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.shortcut-item:hover {
    background: rgba(59, 130, 246, 0.05);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: var(--radius);
}

.shortcut-item:last-child {
    border-bottom: none;
}

.shortcut-key {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.25rem 0.75rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .shortcut-key {
    background: #374151;
    border-color: var(--border);
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .hall-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .brand {
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .controls-bar {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hall-grid {
        grid-template-columns: 1fr;
    }

    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .date-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .date-display {
        min-width: 250px;
        padding: 1rem 1.5rem;
    }

    .booking-header {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .booking-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .booking-actions .btn {
            width: 100%;
        }

    .tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

        .tabs::-webkit-scrollbar {
            display: none;
        }

    .tab {
        white-space: nowrap;
        min-width: 120px;
    }

    .print-actions {
        bottom: 20px;
        right: 20px;
        gap: 0.75rem;
    }

    .print-btn {
        padding: 0.75rem 1rem;
        min-width: 130px;
        font-size: 0.8rem;
    }

    .shortcuts-help {
        bottom: 20px;
        left: 20px;
        max-width: 300px;
        padding: 1rem;
    }

    .ticket {
        margin: 1rem;
    }

    .ticket-body {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .advanced-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 1rem auto;
    }

    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .modal {
        width: 95vw;
        margin: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .booking-meta {
        grid-template-columns: 1fr;
    }

    .user-meta {
        grid-template-columns: 1fr;
    }

    .search-input {
        font-size: 1.1rem;
        letter-spacing: 2px;
        padding: 1rem;
    }

    .ticket-id-display {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        letter-spacing: 1px;
    }
}

/* Enhanced Loading States */
.loading {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Enhanced Print Styles */
@media print {
    @page {
        size: A4 portrait;
        margin: 1cm;
    }

    body * {
        visibility: hidden;
    }

    .ticket, .ticket * {
        visibility: visible;
    }

    .ticket {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 18cm;
        margin: 0;
        transform: scale(0.9);
        transform-origin: top left;
        box-shadow: none !important;
        border: 3px solid #333 !important;
        page-break-inside: avoid;
        background: white !important;
    }

    .no-print, .print-actions, .shortcuts-help {
        display: none !important;
    }

    .ticket-header {
        background: #4f46e5 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }

    .ticket-row {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Better Accessibility */
.btn:focus,
.form-input:focus,
.tab:focus,
.time-slot:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    .btn {
        border: 2px solid currentColor;
    }

    .card {
        border: 2px solid var(--border);
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.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%;
}

.h-full {
    height: 100%;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bounce-in {
    animation: bounceInAnimation 0.6s ease-out;
}

@keyframes bounceInAnimation {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Enhancements */
html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--dark);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Enhanced Interactive Elements */
.interactive {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.interactive:active {
    transform: scale(0.98);
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-indicator.online::before {
    background: var(--success);
}

.status-indicator.offline::before {
    background: var(--danger);
}

.status-indicator.away::before {
    background: var(--warning);
}

/* Enhanced Tooltips */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Advanced Grid Layouts */
.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--min-size, 200px), 1fr));
    gap: var(--gap, 1rem);
}

.masonry-grid {
    columns: var(--columns, 3);
    column-gap: var(--gap, 1rem);
}

.masonry-grid > * {
    break-inside: avoid;
    margin-bottom: var(--gap, 1rem);
}

/* Enhanced Color System */
.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-info {
    color: var(--info);
}

.text-muted {
    color: var(--text-light);
}

.bg-primary {
    background: var(--primary);
}

.bg-secondary {
    background: var(--secondary);
}

.bg-success {
    background: var(--success);
}

.bg-danger {
    background: var(--danger);
}

.bg-warning {
    background: var(--warning);
}

.bg-info {
    background: var(--info);
}

.bg-light {
    background: var(--light);
}

.bg-dark {
    background: var(--dark);
}

/* Enhanced Border System */
.border {
    border: 1px solid var(--border);
}

.border-2 {
    border: 2px solid var(--border);
}

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

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

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

.border-warning {
    border-color: var(--warning);
}

.border-info {
    border-color: var(--info);
}

.rounded {
    border-radius: var(--radius);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: 50%;
}

.rounded-none {
    border-radius: 0;
}

/* Enhanced Spacing System */
.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.px-1 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-2 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-3 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-4 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-1 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-2 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-3 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-4 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.m-1 {
    margin: 0.5rem;
}

.m-2 {
    margin: 1rem;
}

.m-3 {
    margin: 1.5rem;
}

.m-4 {
    margin: 2rem;
}

.mx-1 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.mx-2 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.mx-3 {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.mx-4 {
    margin-left: 2rem;
    margin-right: 2rem;
}

.my-1 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.my-2 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.my-3 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.my-4 {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Enhanced Typography */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.font-light {
    font-weight: 300;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.leading-tight {
    line-height: 1.25;
}

.leading-snug {
    line-height: 1.375;
}

.leading-normal {
    line-height: 1.5;
}

.leading-relaxed {
    line-height: 1.625;
}

.leading-loose {
    line-height: 2;
}

/* Modern CSS Features */
@supports (backdrop-filter: blur(10px)) {
    .glass-effect {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    [data-theme="dark"] .glass-effect {
        background: rgba(0, 0, 0, 0.1);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

@supports (display: grid) {
    .grid-auto-fit {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(var(--min-width, 250px), 1fr));
        gap: var(--gap, 1rem);
    }
}

/* Enhanced Interaction States */
.clickable {
    cursor: pointer;
    transition: var(--transition);
}

.clickable:hover {
    transform: translateY(-1px);
}

.clickable:active {
    transform: translateY(0);
}

.selectable {
    user-select: text;
}

.no-select {
    user-select: none;
}

/* Enhanced Visual Effects */
.glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.glow-success {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.glow-danger {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.glow-warning {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* Performance Critical Styles */
.contain-layout {
    contain: layout;
}

.contain-paint {
    contain: paint;
}

.contain-size {
    contain: size;
}

.contain-style {
    contain: style;
}

/* Modern CSS Grid Areas */
.grid-template-areas-mobile {
    grid-template-areas:
        "header"
        "nav"
        "main"
        "sidebar"
        "footer";
}

.grid-template-areas-desktop {
    grid-template-areas:
        "header header header"
        "nav main sidebar"
        "footer footer footer";
}

/* Enhanced CSS Custom Properties */
.dynamic-spacing {
    --spacing: clamp(1rem, 4vw, 2rem);
    padding: var(--spacing);
    gap: var(--spacing);
}

.dynamic-font {
    --font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-size: var(--font-size);
}

.dynamic-width {
    --width: clamp(300px, 50vw, 600px);
    width: var(--width);
}

/* إشعارات أعلى كل شيء */
#notificationCenter {
    position: fixed;
    top: 16px;
    inset-inline-end: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: clamp(260px, 28vw, 420px);
    z-index: 2147483647; /* فوق المودال والـ blur */
    pointer-events: none;
}

#notificationCenter .notification {
    pointer-events: auto;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    border: 1px solid rgba(0,0,0,.06);
    direction: rtl;
}

/* ===== Approval List Cards ===== */
#approvalList .approval-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

[data-theme="dark"] #approvalList .approval-card {
    background: var(--dark);
    border-color: var(--border);
}

#approvalList .approval-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

#approvalList .approval-title {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

#approvalList .approval-title .ticket-id {
    letter-spacing: .5px;
}

#approvalList .approval-title .dot {
    opacity: .4;
}

#approvalList .approval-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#approvalList .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--light);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: .9rem;
}

[data-theme="dark"] #approvalList .chip {
    background: #1f2937;
    border-color: #374151;
    color: var(--text);
}

#approvalList .chip-date {
    border-color: var(--primary);
}

#approvalList .chip-time {
    border-color: var(--info);
}

#approvalList .chip-booker {
    border-color: var(--success);
}

#approvalList .chip-dept {
    border-color: var(--warning);
}

#approvalList .approval-actions {
    display: flex;
    gap: 8px;
    align-self: center;
    flex-shrink: 0;
}

/* موبايل */
@media (max-width: 768px) {
    #approvalList .approval-card {
        flex-direction: column;
        align-items: stretch;
    }

    #approvalList .approval-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   V2 — Cool & Calm Upgrade (non‑breaking, appended overrides)
   هدفها: ألوان أبرد، مساحات أوسع، تجربة مريحة للنفس — بدون حذف أي ستايل قديم.
   يمكن تعطيلها بحذف هذا القسم فقط.
   ========================================================= */
:root {
    /* Cooler palette */
    --primary: #4f46e5; /* Indigo 600 */
    --primary-light: #818cf8; /* Indigo 400 */
    --primary-dark: #3730a3; /* Indigo 800 */
    --secondary: #06b6d4; /* Cyan 500 */
    --success: #10b981; /* Emerald 500 */
    --danger: #ef4444; /* Red 500 */
    --warning: #f59e0b; /* Amber 500 */
    --info: #22d3ee; /* Cyan 400 */
    --dark: #0f172a; /* Slate 900 (أبرد) */
    --light: #f8fafc; /* Slate 50  */
    --border: #e2e8f0; /* Slate 200 */
    --text: #334155; /* Slate 700 */
    --text-light: #64748b; /* Slate 500 */
    --bg-gradient: linear-gradient(135deg, #60a5fa 0%, #6366f1 100%); /* Blue→Indigo */
    --bg-gradient-alt: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); /* Indigo→Violet */
    /* New spacing scale for comfortable layout */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 2.5rem;
    --space-6: 3rem;
    /* Softer radii & shadows */
    --radius: 14px;
    --radius-lg: 20px;
    --shadow: 0 10px 20px rgba(2, 6, 23, 0.06);
    --shadow-lg: 0 18px 30px rgba(2, 6, 23, 0.10);
    --shadow-xl: 0 24px 45px rgba(2, 6, 23, 0.14);
    --transition: all 420ms cubic-bezier(.22,.61,.36,1);
    --transition-fast: all 220ms ease-out;
}

/* Dark mode — cooler & calmer */
[data-theme="dark"] {
    --primary: #818cf8; /* Indigo 400 */
    --primary-light: #a5b4fc; /* Indigo 300 */
    --primary-dark: #6366f1; /* Indigo 500 */
    --secondary: #06b6d4; /* Cyan 500 */
    --success: #34d399; /* Emerald 400 */
    --danger: #f87171; /* Red 400 */
    --warning: #fbbf24; /* Amber 400 */
    --info: #22d3ee; /* Cyan 400 */
    --dark: #0b1220; /* Deeper slate */
    --light: #0b1220;
    --border: #1f2a37;
    --text: #e5e7eb;
    --text-light: #cbd5e1;
    --bg-gradient: linear-gradient(135deg, #0b1220 0%, #111827 100%);
    --bg-gradient-alt: linear-gradient(135deg, #1f2937 0%, #312e81 100%);
}

/* Typography — Arabic-friendly, calm rhythm */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0;
    line-height: 1.75;
    color: var(--text);
}

/* Wider comfortable layout */
.container {
    max-width: 1400px;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
}

@media (min-width: 1536px) {
    .container {
        max-width: 1500px;
    }
}

/* Cards — airy & soft */
.card,
.hall-card,
.user-card,
.stat-card,
.stat-chart,
.booking-item {
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 1.2rem + 0.8vw, 2.25rem);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    backdrop-filter: saturate(110%);
}

/* Buttons — calmer hover, larger targets */
.btn {
    min-height: 46px;
    border-radius: 999px;
    padding: 0.85rem 1.4rem;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

/* Header — subtle glass */
.header {
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px) saturate(120%);
}

.logo {
    transition: var(--transition);
    will-change: transform;
}

/* Tabs — pill look */
.tabs {
    border-radius: 999px;
    padding: 0.35rem;
    gap: 0.25rem;
}

.tab {
    border-radius: 999px;
    padding: 0.75rem 1rem;
}

.tab.active {
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(99,102,241,.22));
    color: var(--primary);
    box-shadow: inset 0 0 0 2px rgba(99,102,241,.25);
}

/* Time slots — calmer colors & spacing */
.time-slot {
    min-height: 66px;
    border-radius: 14px;
}

.time-slot.available {
    background: linear-gradient(135deg, #eefcf7 0%, #d6f6e6 100%);
    color: #065f46;
}

.time-slot.pending {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #8a4b11;
}

.time-slot.ended {
    opacity: .85;
}

/* Calendar table — softer */
.calendar-table td,
.calendar-table th {
    padding: 1.05rem 0.85rem;
}

/* “Cool & Calm” utilities */
.soft-shadow {
    box-shadow: var(--shadow) !important;
}

.soft-shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.soft-shadow-xl {
    box-shadow: var(--shadow-xl) !important;
}

.round-xl {
    border-radius: var(--radius-lg) !important;
}

.frost-glass {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.25);
}

[data-theme="dark"] .frost-glass {
    background: rgba(17, 24, 39, 0.35);
    border-color: rgba(148,163,184,0.18);
}

/* Focus states — accessible & calm */
:where(.btn,.form-input,.tab,.time-slot):focus-visible {
    outline: 3px solid color-mix(in oklab, var(--primary) 65%, white 35%);
    outline-offset: 2px;
    transition: outline-offset 120ms ease-out;
}

/* RTL polish (Arabic) */
:root {
    --rtl-gap: 0.75rem;
}

[dir="rtl"] .actions {
    gap: var(--rtl-gap);
}

[dir="rtl"] .notification {
    border-left: none;
    border-right-width: 4px;
}

[dir="rtl"] .booking-item {
    border-left: none;
    border-right: 4px solid var(--primary);
}

/* Gentle entrance animations */
@keyframes v2FadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.v2-appear {
    animation: v2FadeUp 520ms cubic-bezier(.22,.61,.36,1);
}

/* Print — high-contrast edges, keep calm palette */
@media print {
    .card, .ticket {
        border-color: #334155 !important;
    }
}

/* ===== User Management Table — Full Dark Mode ===== */
html[data-theme="dark"] .user-management,
body[data-theme="dark"] .user-management,
[data-theme="dark"] .user-management {
    --um-bg: #0b1220; /* canvas */
    --um-panel: #0f172a; /* panel/card */
    --um-panel-2: #111827; /* hover */
    --um-header: #1f2937; /* header background */
    --um-border: #1e293b; /* borders */
    --um-text: #e5e7eb; /* text */
    --um-text-dim: #cbd5e1; /* dim text */
}

/* container card (if wrapped in .card) */
html[data-theme="dark"] .user-management .card,
body[data-theme="dark"] .user-management .card,
[data-theme="dark"] .user-management .card {
    background: var(--um-panel) !important;
    border-color: var(--um-border) !important;
    color: var(--um-text) !important;
    box-shadow: 0 8px 24px rgba(2,6,23,.35);
}

/* table header */
html[data-theme="dark"] .user-management .table .row.head,
body[data-theme="dark"] .user-management .table .row.head,
[data-theme="dark"] .user-management .table .row.head {
    background: var(--um-header) !important;
    color: var(--um-text) !important;
    border-bottom: 1px solid var(--um-border) !important;
}

/* rows */
html[data-theme="dark"] .user-management .table .row:not(.head),
body[data-theme="dark"] .user-management .table .row:not(.head),
[data-theme="dark"] .user-management .table .row:not(.head) {
    background: var(--um-panel) !important;
    color: var(--um-text) !important;
    border-bottom: 1px solid var(--um-border) !important;
}

/* row hover */
html[data-theme="dark"] .user-management .table .row:not(.head):hover,
body[data-theme="dark"] .user-management .table .row:not(.head):hover,
[data-theme="dark"] .user-management .table .row:not(.head):hover {
    background: var(--um-panel-2) !important;
}

/* cells (six columns) */
html[data-theme="dark"] .user-management .table .row > :is(:nth-child(1), :nth-child(2), :nth-child(3), :nth-child(4), :nth-child(5), :nth-child(6)),
body[data-theme="dark"] .user-management .table .row > :is(:nth-child(1), :nth-child(2), :nth-child(3), :nth-child(4), :nth-child(5), :nth-child(6)),
[data-theme="dark"] .user-management .table .row > :is(:nth-child(1), :nth-child(2), :nth-child(3), :nth-child(4), :nth-child(5), :nth-child(6)) {
    color: var(--um-text) !important;
}

/* actions column buttons */
html[data-theme="dark"] .user-management .table .row > :nth-child(6) .btn,
body[data-theme="dark"] .user-management .table .row > :nth-child(6) .btn,
[data-theme="dark"] .user-management .table .row > :nth-child(6) .btn {
    color: #fff !important;
    box-shadow: none !important;
    border: 1px solid rgba(255,255,255,0.08);
}

/* inputs above table (filters) */
html[data-theme="dark"] .user-management .form-input,
body[data-theme="dark"] .user-management .form-input,
[data-theme="dark"] .user-management .form-input {
    background: #0f172a !important;
    border-color: var(--um-border) !important;
    color: var(--um-text) !important;
}

html[data-theme="dark"] .user-management .form-input::placeholder,
body[data-theme="dark"] .user-management .form-input::placeholder,
[data-theme="dark"] .user-management .form-input::placeholder {
    color: var(--um-text-dim) !important;
    opacity: 1 !important;
}

/* table wrapper (if any) */
html[data-theme="dark"] .user-management .table,
body[data-theme="dark"] .user-management .table,
[data-theme="dark"] .user-management .table {
    background: transparent !important;
}

/* ============================
   User Management Table Styles
   ============================ */
.table.card.user-management {
    background: var(--light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

[data-theme="dark"] .table.card.user-management {
    background: var(--dark);
    border-color: var(--border);
}

/* رأس الجدول */
.table.card.user-management .row.head {
    background: var(--bg-gradient);
    color: white;
    font-weight: 700;
}

/* الصفوف */
.table.card.user-management .row {
    background: var(--light);
    color: var(--text);
    transition: var(--transition);
}

[data-theme="dark"] .table.card.user-management .row {
    background: var(--dark);
    color: var(--text);
}

.table.card.user-management .row:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow-lg);
}

/* البادجات */
.role-badge,
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* حالات الدور */
.role-badge.admin {
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    color: #92400e;
}
.role-badge.manager {
    background: linear-gradient(135deg, #ddd6fe, #8b5cf6);
    color: #4c1d95;
}
.role-badge.staff {
    background: linear-gradient(135deg, #e0f2fe, #06b6d4);
    color: #075985;
}

/* حالات الحالة */
.status-badge.active {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}
.status-badge.banned {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

/* جداول المرفوضات */
.rejected-table {
  display: grid;
  gap: 12px;
}

.rejected-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.rejected-card .title {
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
}

.rejected-card .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

[data-theme="dark"] .rejected-card {
  background: var(--dark);
  border-color: var(--border);
  color: var(--text);
}

.rejected-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: var(--card-bg, var(--light));
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  transition: var(--transition);
}

[data-theme="dark"] .rejected-card {
  background: var(--dark);
  border: 1px solid var(--border);
}

.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.req-modern-card {
  background: #f9f9f9;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  transition: 0.25s;
  cursor: pointer;
}

.req-modern-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.req-modern-card.active {
  background: #00c6ff;
  border-color: #009ac7;
  box-shadow: 0 6px 18px rgba(0, 198, 255, 0.4);
  color: #fff;
}

.req-modern-label input[type="checkbox"] {
  display: none; /* نخفي الـ checkbox */
}

.req-modern-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  text-align: center;
  font-weight: 600;
}

.req-icon {
  font-size: 28px;
  margin-bottom: .2rem;
  transition: transform 0.2s;
}

.req-modern-card.active .req-icon {
  transform: scale(1.2);
}

.menu-qty {
  width: 70px;
  padding: .4rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  text-align: center;
  font-weight: bold;
}

.req-modern-card.active .menu-qty {
  border-color: #fff;
}

/* البطاقة الحديثة الافتراضية */
.req-modern-card {
  background: var(--light); /* بدل اللون الثابت */
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  transition: 0.25s;
  cursor: pointer;
  color: var(--text);
}

/* الهوفر */
.req-modern-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  background: var(--card-bg, #f1f5f9);
}

/* مفعّلة */
.req-modern-card.active {
  background: var(--primary);
  border-color: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(0, 198, 255, 0.4);
  color: #fff;
}

/* الوضع الليلي */
[data-theme="dark"] .req-modern-card {
  background: var(--dark);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .req-modern-card:hover {
  background: #2a2a2a;
}

/* الكمية */
.menu-qty {
  width: 70px;
  padding: .4rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-align: center;
  font-weight: bold;
  background: var(--light);
  color: var(--text);
}

[data-theme="dark"] .menu-qty {
  background: #111827;
  color: var(--text);
  border-color: var(--border);
}

.login-logo {
  text-align: center;
  margin-bottom: 1rem;
}

.login-logo img {
  width: 280px; /* حجم الشعار */
  height: 280px;
  border-radius: 50%; /* يخليه دائري (اختياري) */
  box-shadow: var(--shadow);
  /* transition: var(--transition); */
}

/* .login-logo img:hover { */
  /* transform: scale(1.05) rotate(3deg); */
/* } */

/* ========== Live Users Header (Standalone) ========== */
.live-users-header{
  display:flex; align-items:center; gap:1rem;
  padding:1rem 1.25rem;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(72,118,255,.10), rgba(72,118,255,.03));
  border:1px solid rgba(72,118,255,.18);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  margin: 1rem 0 1.25rem;
}

.live-users-header:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(2,6,23,.08);
  border-color: #d1d5db;
}

/* الأيقونة */

.live-users-icon{
  width:48px; height:48px; flex:0 0 48px;
  display:grid; place-items:center;
  font-size:1.25rem;
  border-radius:12px;
  background: rgba(72,118,255,.14);
  border:1px solid rgba(72,118,255,.22);
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}

/* النصوص */
.live-users-text h2{
  margin:0 0 .25rem 0;
  font-size:1.1rem; font-weight:700;
  letter-spacing:.2px;
}

.live-users-text p{
  margin:0; font-size:.95rem; color:var(--text-light,#666);
}

.live-users-text b{
  font-variant-numeric: tabular-nums;
}

.live-users-bump{
  animation: bump .4s ease;
}
@keyframes bump{
  0%{ transform: scale(1); }
  35%{ transform: scale(1.12); }
  100%{ transform: scale(1); }
}

/* تجاوب */
@media (max-width:640px){
  .live-users-header{ padding:.85rem 1rem; }
  .live-users-icon{ width:42px; height:42px; font-size:1.1rem; }
  .live-users-text h2{ font-size:1rem; }
  .live-users-text p{ font-size:.9rem; }
}

[data-theme="dark"] .live-users-header {
  background: var(--dark);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] .live-users-icon {
  background: var(--dark);
  color: var(--text);
  border-color: var(--border);
}

#liveUsers {
  direction: ltr;                 /* نعرض الرقم من اليسار لليمين */
  unicode-bidi: isolate;          /* نعزل الرقم عن اتجاه النص المحيط */
  font-variant-numeric: tabular-nums; /* أرقام ثابتة العرض - شكل عدّاد أنظف */
  font-size:1.1rem; font-weight:650;
  font-family: "Segoe UI", Arial, Tahoma, sans-serif;
}

/* يخفي كل أزرار الحجز داخل بطاقات القاعات */
.hall-card .book-hall-btn {
  display: none !important;
}

/* ===== صف الأزرار السريعة (اليوم/غدًا/التقويم) ===== */
.quick-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* الأزرار تتمدّد تلقائيًا */
.quick-row .btn {
  flex: 1 1 120px;
  min-height: 40px;
}

/* الجوال: خلي زر التقويم بعرض كامل */
@media (max-width: 480px) {
  #openCalendar {
    flex: 1 1 100%;
    width: 100%;
    min-height: 48px;   /* هدف لمس أكبر */
    font-size: 1rem;
  }
}

/* ===== شريط التنقّل بالتاريخ (أسبوع سابق/التالي… إلخ) ===== */
.date-navigation {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;             /* يسمح بالنزول لسطر جديد */
  margin-block: .5rem;
}

/* وسط التاريخ يتمدّد للفصل بين الأزرار يمين/يسار */
.date-navigation .date-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 180px;
}

/* على الشاشات الصغيرة: نخلي الشبكة عمودين */
@media (max-width: 640px) {
  .date-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .date-navigation #prevWeek,
  .date-navigation #prevDay,
  .date-navigation #nextDay,
  .date-navigation #nextWeek {
    width: 100%;
    min-height: 44px;
  }
  .date-navigation .date-center {
    grid-column: 1 / -1;   /* التاريخ في صف مستقل بالوسط */
    order: -1;             /* يطلع فوق الأزرار */
    margin-bottom: .25rem;
  }
}

/* لمسة بسيطة لعرض التاريخ */
.date-display {
  font-weight: 800;
  font-size: 1rem;
}

/* ====== التبويبات الفرعية نفس الرئيسية ====== */
.tabs2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  background: linear-gradient(180deg, #fafbff, #f5f7ff);
  box-shadow: 0 6px 18px rgba(103, 99, 255, 0.08) inset,
              0 2px 10px rgba(0,0,0,0.03);
}

.tabs2 .tab2 {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 22px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 15px;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tabs2 .tab2:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #1f2937;
}

.tabs2 .tab2.active {
  color: #111827;
  background: radial-gradient(120% 120% at 50% 0%, #eef2ff 0%, #e0e7ff 80%);
  box-shadow: inset 0 -3px 0 rgba(99,102,241,0.35),
              0 4px 12px rgba(99,102,241,0.25);
  outline: 1px solid rgba(99,102,241,0.45);
}

/* عنوان الحقل فقط */
.field-label {
  display:block;
  margin-bottom: .35rem;
  font-weight: 700;
}

/* مجموعة الراديو أفقية ومريحة */
.radio-group{
  display:flex;
  align-items:center;
  gap: 22px;           /* المسافة بين الخيارين */
  flex-wrap:wrap;      /* لو ضاق المكان ينزلون سطر جديد معًا */
}

/* خيار الراديو نفسه */
.radio{
  display:inline-flex !important;   /* يلغي display:block العام للـ label */
  align-items:center;
  gap:8px;
  cursor:pointer;
  white-space:nowrap;
  user-select:none;
}

/* شكل دائرة الراديو */
.radio input{
  margin:0;
  accent-color: var(--primary);     /* يستعمل لونك الأساسي */
}

/* نص الخيار */
.radio span{
  font-weight:600;
  line-height:1;
}

.approval-extra{
  margin-top:8px; padding:8px 12px; border-radius:8px; border:1px solid #e5e7eb; 
  display:grid; gap:6px; font-weight:700;
}
.approval-extra.ext{ background:#f9fafb; }
.approval-extra.int{ background:#f0fdf4; border-color:#bbf7d0; }
:root[data-theme="dark"] .approval-extra.ext{ background:#0f172a; border-color:#1f2937; }
:root[data-theme="dark"] .approval-extra.int{ background:#052e1a; border-color:#14532d; }
