/* Hall Pro — نظام حجوزات القاعات · تصميم زجاجي بمظهرين فاتح وداكن */
:root {
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-display: 'Readex Pro', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
  --bg: #f3f2fb;
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .8);
  --glass-solid: rgba(255, 255, 255, .94);
  --glass-border: rgba(255, 255, 255, .78);
  --glass-hi: rgba(255, 255, 255, .9);
  --input: rgba(255, 255, 255, .78);
  --line: rgba(30, 27, 75, .08);
  --line-strong: rgba(30, 27, 75, .15);
  --hover: rgba(109, 93, 252, .06);
  --text: #15163a;
  --text-2: #42466f;
  --muted: #7a7ea6;
  --primary: #6d5dfc;
  --primary-2: #8b5cf6;
  --grad: linear-gradient(135deg, #6d5dfc 0%, #8b5cf6 55%, #c026d3 130%);
  --grad-hero: linear-gradient(125deg, #4338ca 0%, #6d5dfc 45%, #a855f7 80%, #ec4899 120%);
  --tint: rgba(109, 93, 252, .1);
  --tint-2: rgba(109, 93, 252, .18);
  --success: #059669; --success-t: rgba(16, 185, 129, .13);
  --warning: #d97706; --warning-t: rgba(245, 158, 11, .15);
  --danger: #e11d48; --danger-t: rgba(244, 63, 94, .12);
  --info: #0284c7; --info-t: rgba(14, 165, 233, .13);
  --shadow-sm: 0 1px 2px rgba(30, 27, 75, .05);
  --shadow: 0 10px 30px -14px rgba(49, 46, 129, .25), 0 1px 0 rgba(255, 255, 255, .6) inset;
  --shadow-lg: 0 30px 70px -24px rgba(30, 27, 75, .45);
  --blur: blur(22px) saturate(170%);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --sidebar: 262px;
  --gap: 14px;
  --aurora-a: #a78bfa; --aurora-b: #5eead4; --aurora-c: #f9a8d4; --aurora-o: .55;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a0b1a;
  --glass: rgba(24, 26, 52, .55);
  --glass-strong: rgba(28, 31, 62, .74);
  --glass-solid: rgba(21, 23, 47, .96);
  --glass-border: rgba(255, 255, 255, .09);
  --glass-hi: rgba(255, 255, 255, .06);
  --input: rgba(10, 11, 28, .5);
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .14);
  --hover: rgba(139, 125, 255, .09);
  --text: #eef0ff;
  --text-2: #c6c9ee;
  --muted: #8b90bd;
  --primary: #8f83ff;
  --tint: rgba(143, 131, 255, .14);
  --tint-2: rgba(143, 131, 255, .24);
  --success: #34d399; --success-t: rgba(52, 211, 153, .14);
  --warning: #fbbf24; --warning-t: rgba(251, 191, 36, .14);
  --danger: #fb7185; --danger-t: rgba(251, 113, 133, .14);
  --info: #38bdf8; --info-t: rgba(56, 189, 248, .14);
  --shadow: 0 14px 40px -18px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .05) inset;
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .85);
  --aurora-a: #4f46e5; --aurora-b: #0d9488; --aurora-c: #a21caf; --aurora-o: .32;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.theme-switching * { transition: background-color .3s, border-color .3s, color .3s !important; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: var(--tint-2); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); } .text-primary { color: var(--primary); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.gap-lg { gap: 18px; }
.mt { margin-top: 14px; } .mt-lg { margin-top: 22px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- الخلفية المتحركة ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--aurora-o); animation: drift 26s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 52vw; height: 52vw; background: var(--aurora-a); top: -18vw; inset-inline-end: -12vw; }
.aurora span:nth-child(2) { width: 42vw; height: 42vw; background: var(--aurora-b); bottom: -16vw; inset-inline-start: -8vw; animation-duration: 32s; }
.aurora span:nth-child(3) { width: 34vw; height: 34vw; background: var(--aurora-c); top: 34%; inset-inline-start: 32%; animation-duration: 38s; opacity: calc(var(--aurora-o) * .7); }
@keyframes drift { to { transform: translate3d(6vw, 4vw, 0) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .aurora span { animation: none; } *, *::before, *::after { animation-duration: .01ms !important; } }

/* ---------- الزجاج ---------- */
.glass, .card, .sidebar, .topbar, .bottom-nav {
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}

/* ---------- الأيقونات الزجاجية ---------- */
.gicon, .kpi-icon, .section-title > i, .nav a > i, .empty > i {
  --c1: #6366f1; --c2: #a78bfa;
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 15px; color: #fff; font-size: 17px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, .08) 48%, rgba(255, 255, 255, 0) 52%),
    radial-gradient(120% 90% at 20% 110%, rgba(255, 255, 255, .28), transparent 55%),
    linear-gradient(145deg, var(--c1), var(--c2));
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 12px 24px -12px var(--c1), inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 -4px 10px rgba(0, 0, 0, .1);
}
.gicon i { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .2)); }
.gicon.sm, .section-title > i { width: 32px; height: 32px; border-radius: 11px; font-size: 13px; }
.gicon.lg { width: 58px; height: 58px; border-radius: 19px; font-size: 23px; }
.gicon.xl { width: 76px; height: 76px; border-radius: 24px; font-size: 30px; }
.g-indigo, .tone-primary { --c1: #6366f1; --c2: #a78bfa; }
.g-violet { --c1: #8b5cf6; --c2: #e879f9; }
.g-emerald, .tone-success { --c1: #10b981; --c2: #5eead4; }
.g-amber, .tone-warning { --c1: #f59e0b; --c2: #fdba74; }
.g-rose, .tone-danger { --c1: #f43f5e; --c2: #fda4af; }
.g-sky, .tone-info { --c1: #0ea5e9; --c2: #7dd3fc; }
.g-teal { --c1: #0d9488; --c2: #67e8f9; }
.g-slate { --c1: #475569; --c2: #a5b4fc; }

/* ---------- التحميل ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 22px; justify-items: center; }
.boot-logo img { width: 78px; height: 78px; filter: drop-shadow(0 18px 30px rgba(109, 93, 252, .45)); animation: float 2.4s ease-in-out infinite; }
.boot-bar { width: 160px; height: 4px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: 99px; background: var(--grad); animation: loading 1.1s ease-in-out infinite; }
@keyframes loading { from { transform: translateX(160%); } to { transform: translateX(-260%); } }
@keyframes float { 50% { transform: translateY(-8px); } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: currentColor; display: inline-block; vertical-align: middle; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-error { color: var(--danger); font-weight: 700; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 17px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--glass-strong); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s, filter .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, .icon-btn:focus-visible { outline: 3px solid var(--tint-2); outline-offset: 2px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 26px -12px rgba(109, 93, 252, .85), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 16px 30px -12px rgba(109, 93, 252, .95), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-success { background: linear-gradient(135deg, #059669, #10b981 60%, #2dd4bf); color: #fff; box-shadow: 0 12px 24px -12px rgba(16, 185, 129, .8); }
.btn-danger { background: linear-gradient(135deg, #e11d48, #f43f5e); color: #fff; box-shadow: 0 12px 24px -12px rgba(244, 63, 94, .8); }
.btn-ghost { background: var(--glass); border-color: var(--glass-border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.btn-ghost:hover:not(:disabled) { background: var(--glass-strong); }
.btn-soft { background: var(--tint); color: var(--primary); }
.btn-soft:hover:not(:disabled) { background: var(--tint-2); }
.btn-danger-soft { background: var(--danger-t); color: var(--danger); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--text-2); transition: background .15s, color .15s; text-decoration: none; }
.icon-btn:hover { background: var(--hover); color: var(--primary); }
.icon-btn.danger:hover { background: var(--danger-t); color: var(--danger); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
[data-theme="dark"] .when-dark, [data-theme="light"] .when-light { display: inline-block; }
[data-theme="dark"] .when-light, [data-theme="light"] .when-dark { display: none; }
.kbd { font-family: var(--font); font-size: 11px; padding: 1px 7px; border-radius: 7px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--glass); }

/* ---------- الحقول ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field .hint, .hint { font-size: 12.5px; color: var(--muted); }
.req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 9px 13px; background: var(--input); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.7; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--tint-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--tint); background: var(--glass-solid); }
.input[readonly] { opacity: .75; }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-t); }
.input-group { position: relative; }
.input-group .input { padding-inline-start: 40px; }
.input-group > i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-suffix { position: relative; }
.input-suffix .input { padding-inline-end: 52px; }
.input-suffix > span { position: absolute; inset-inline-end: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 46px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.switch input:checked + .track { background: var(--grad); }
.switch input:checked + .track::after { inset-inline-start: 23px; }
.seg { display: inline-flex; background: var(--tint); border-radius: 13px; padding: 4px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--text-2); font-size: 13.5px; }
.seg button.active { background: var(--glass-solid); color: var(--primary); box-shadow: 0 4px 12px -6px rgba(30, 27, 75, .35); }

/* ---------- البطاقات ---------- */
.card { border-radius: var(--radius-lg); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.card-head p { font-size: 12.5px; color: var(--muted); }
.card-body { padding: 18px 20px; }
.section-title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-family: var(--font-display); }
.section-title > i { --c1: #6366f1; --c2: #a78bfa; }

/* ---------- الشارات ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--tint); color: var(--text-2); }
.badge.confirmed, .badge.paid { background: var(--success-t); color: var(--success); }
.badge.tentative, .badge.partial { background: var(--warning-t); color: var(--warning); }
.badge.cancelled { background: var(--line); color: var(--muted); text-decoration: line-through; }
.badge.unpaid, .badge.overdue { background: var(--danger-t); color: var(--danger); }
.badge.info { background: var(--info-t); color: var(--info); }
.badge.primary { background: var(--tint); color: var(--primary); }
.badge.ai { background: var(--grad); color: #fff; }

/* ---------- الهيكل العام ---------- */
.shell { min-height: 100vh; }
.sidebar { position: fixed; top: var(--gap); bottom: var(--gap); inset-inline-start: var(--gap); width: var(--sidebar); z-index: 40; border-radius: 26px; display: flex; flex-direction: column; transition: transform .3s cubic-bezier(.2, .8, .2, 1); background: var(--glass-strong); }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.brand-logo { width: 48px; height: 48px; border-radius: 16px; object-fit: contain; background: var(--glass-solid); border: 1px solid var(--glass-border); padding: 4px; flex: none; box-shadow: 0 10px 22px -12px rgba(109, 93, 252, .6); }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.35; }
.brand-sub { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.brand-sub b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.nav { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 14px 10px 6px; letter-spacing: .02em; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 14px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14.5px; transition: background .15s, color .15s; }
.nav a > i { width: 34px; height: 34px; border-radius: 11px; font-size: 14px; --c1: rgba(120, 120, 170, .55); --c2: rgba(160, 160, 210, .4); box-shadow: none; transition: transform .2s; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a:hover > i { transform: scale(1.06); }
.nav a.active { background: var(--tint); color: var(--primary); }
.nav a[data-route=dashboard] > i, .nav a.active[data-route=dashboard] > i { --c1: #6366f1; --c2: #a78bfa; }
.nav a[data-route=bookings] > i { --c1: #8b5cf6; --c2: #e879f9; }
.nav a[data-route=calendar] > i { --c1: #10b981; --c2: #5eead4; }
.nav a[data-route=reports] > i { --c1: #f59e0b; --c2: #fdba74; }
.nav a[data-route=settings] > i { --c1: #475569; --c2: #a5b4fc; }
.nav a[data-route=users] > i { --c1: #0ea5e9; --c2: #7dd3fc; }
.nav a[data-route=backup] > i { --c1: #0d9488; --c2: #67e8f9; }
.nav a[data-route=activity] > i { --c1: #f43f5e; --c2: #fda4af; }
.nav a.active > i { box-shadow: 0 10px 20px -10px var(--c1), inset 0 1px 1px rgba(255, 255, 255, .7); }
.nav .count { margin-inline-start: auto; font-size: 11.5px; background: var(--warning-t); color: var(--warning); padding: 0 8px; border-radius: 99px; }
.sidebar-foot { margin: 10px; padding: 10px; border-radius: 18px; background: var(--tint); display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 13px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; box-shadow: 0 8px 18px -8px rgba(109, 93, 252, .8); }
.main { margin-inline-start: calc(var(--sidebar) + var(--gap) * 2); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: var(--gap); z-index: 30; display: flex; align-items: center; gap: 10px; margin: var(--gap) var(--gap) 0 var(--gap); margin-inline-start: 0; padding: 10px 14px; border-radius: 20px; }
.topbar h1 { font-size: 18px; padding-inline-start: 4px; }
.search-box { position: relative; width: min(380px, 38vw); }
.search-box .input { background: var(--tint); border-color: transparent; }
.search-box .kbd { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); }
.search-results { position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 50; background: var(--glass-solid); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 60vh; overflow-y: auto; padding: 6px; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.search-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer; }
.search-item:hover, .search-item.focus { background: var(--hover); }
.content { padding-block: 22px 30px; padding-inline: 0 var(--gap); flex: 1; width: 100%; max-width: 1520px; }
.view-enter > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.view-enter > *:nth-child(2) { animation-delay: .05s; } .view-enter > *:nth-child(3) { animation-delay: .1s; } .view-enter > *:nth-child(4) { animation-delay: .15s; } .view-enter > *:nth-child(5) { animation-delay: .2s; } .view-enter > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .row { gap: 14px; }
.page-head h2 { font-size: 23px; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.menu-btn { display: none; }
.bottom-nav { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(8, 10, 30, .4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); z-index: 35; }

/* ---------- لوحة التحكم ---------- */
.hero { border-radius: 26px; padding: 26px 28px; color: #fff; position: relative; overflow: hidden; isolation: isolate; background: var(--grad-hero); box-shadow: 0 30px 60px -30px rgba(79, 70, 229, .8); display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; z-index: -1; filter: blur(2px); }
.hero::before { width: 320px; height: 320px; inset-inline-end: -90px; top: -150px; background: radial-gradient(circle, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 70%); }
.hero::after { width: 260px; height: 260px; inset-inline-start: 18%; bottom: -170px; background: radial-gradient(circle, rgba(94, 234, 212, .45), rgba(94, 234, 212, 0) 70%); }
.hero h2 { font-size: 27px; margin: 4px 0; }
.hero p { color: rgba(255, 255, 255, .85); font-size: 13.5px; }
.hero .btn-ghost { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .24); }
.hero .btn-light { background: #fff; color: #4338ca; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .4); }
.hero-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); font-size: 12.5px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0; }
.kpi { padding: 16px; display: flex; gap: 13px; align-items: flex-start; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.kpi::after { content: ''; position: absolute; inset-inline: 18px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--c1, var(--primary)), transparent); opacity: .6; }
.kpi .kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .kpi-value { font-family: var(--font-display); font-size: clamp(17px, 1.55vw, 22px); white-space: nowrap; font-weight: 600; margin-top: 2px; }
.kpi .kpi-sub { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--hover); }
.date-pill { width: 54px; flex: none; text-align: center; border-radius: 15px; padding: 6px 0; line-height: 1.2; background: var(--tint); color: var(--primary); border: 1px solid var(--glass-border); }
.date-pill b { display: block; font-size: 19px; font-family: var(--font-display); }
.date-pill span { font-size: 11px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--radius); font-size: 14px; line-height: 1.7; border: 1px solid var(--glass-border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.alert > i { margin-top: 4px; }
.alert.warning { background: var(--warning-t); color: var(--warning); }
.alert.danger { background: var(--danger-t); color: var(--danger); }
.alert.info { background: var(--info-t); color: var(--info); }
.alert.success { background: var(--success-t); color: var(--success); }
.alert .alert-body { color: var(--text-2); }
.alert[data-goto] { cursor: pointer; }
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.insight { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; background: var(--glass-hi); border: 1px solid var(--line); }
.insight b { font-family: var(--font-display); font-size: 17px; font-weight: 600; display: block; }
.insight span { font-size: 12.5px; color: var(--muted); }
.ai-title { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chart { width: 100%; height: 260px; }
.chart .bar-a { fill: url(#gradA); }
.chart .bar-b { fill: url(#gradB); }
.chart .axis { stroke: var(--line-strong); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 4px; margin-inline-end: 6px; vertical-align: -1px; background: var(--c); }

/* ---------- الجداول ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--glass-hi); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.num { display: table-cell; direction: rtl; text-align: start; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--hover); }
.table tbody tr.clickable { cursor: pointer; }
.table tfoot td { font-weight: 700; background: var(--glass-hi); border-bottom: 0; }
.table .actions { white-space: nowrap; text-align: end; }
.table tr.is-cancelled td { color: var(--muted); }
.booking-cards { display: none; }
.bcard { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-inline-start: 4px solid var(--success); }
.bcard.tentative { border-inline-start-color: var(--warning); }
.bcard.cancelled { border-inline-start-color: var(--line-strong); opacity: .75; }
.bcard.due { border-inline-start-color: var(--danger); }
.bcard .money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--tint); border-radius: 12px; padding: 8px; text-align: center; font-size: 13px; }
.bcard .money small { display: block; color: var(--muted); font-size: 11px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filters .input, .filters .select { min-height: 40px; width: auto; }
.filters .search { flex: 1 1 220px; }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty > i { width: 64px; height: 64px; border-radius: 22px; font-size: 26px; --c1: #8b5cf6; --c2: #c4b5fd; opacity: .9; }

/* ---------- التقويم ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cal-title { font-size: 19px; font-weight: 600; font-family: var(--font-display); }
.cal-title small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; font-family: var(--font); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px 6px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--glass-hi); }
.cal-day { min-height: 116px; padding: 7px; border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; cursor: pointer; position: relative; transition: background .15s; }
.cal-day:nth-child(7n) { border-inline-end: 0; }
.cal-day:hover { background: var(--hover); }
.cal-day.out { opacity: .35; }
.cal-day.past .cal-num { color: var(--muted); }
.cal-day.today { background: var(--tint); }
.cal-day.today .cal-num { background: var(--grad); color: #fff; box-shadow: 0 8px 16px -8px rgba(109, 93, 252, .9); }
.cal-num { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 10px; font-weight: 700; font-size: 14px; font-family: var(--font-display); }
.cal-hijri { font-size: 11px; color: var(--muted); margin-inline-start: auto; }
.cal-top { display: flex; align-items: center; gap: 4px; }
.chip { display: block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--success-t); color: var(--success); border: 1px solid transparent; }
.chip.tentative { background: var(--warning-t); color: var(--warning); border-style: dashed; border-color: var(--warning); }
.chip.due::before { content: '●'; color: var(--danger); margin-inline-end: 4px; font-size: 9px; vertical-align: 2px; }
.chip .chip-period { opacity: .75; font-weight: 500; }
.cal-free { margin-top: auto; font-size: 11px; color: var(--success); opacity: 0; transition: opacity .15s; }
.cal-day:hover .cal-free { opacity: .9; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding: 12px 18px; align-items: center; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 18px; }
.year-cell { padding: 14px; border-radius: 18px; border: 1px solid var(--glass-border); cursor: pointer; background: var(--glass-hi); text-align: start; transition: transform .15s, border-color .15s; }
.year-cell:hover { border-color: var(--primary); transform: translateY(-2px); }
.year-cell .meter { height: 6px; background: var(--tint); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.year-cell .meter i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

/* ---------- النوافذ ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 35, .38); -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow-y: auto; animation: fade .18s ease; }
.modal { width: 100%; max-width: 560px; background: var(--glass-solid); border: 1px solid var(--glass-border); border-radius: 26px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); margin-bottom: 4vh; }
.modal.md { max-width: 780px; } .modal.lg { max-width: 1080px; } .modal.sm { max-width: 440px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--glass-solid); border-radius: 26px 26px 0 0; z-index: 2; }
.modal-head h3 { font-size: 17.5px; flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--glass-solid); border-radius: 0 0 26px 26px; position: sticky; bottom: 0; z-index: 2; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* نموذج الحجز */
.booking-form { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; }
.form-section { padding: 18px; margin-bottom: 14px; border-radius: 20px; background: var(--glass-hi); border: 1px solid var(--line); }
.form-section:last-child { margin-bottom: 0; }
.line-items { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 90px 120px 120px 40px; gap: 8px; align-items: center; }
.line-head { font-size: 12px; color: var(--muted); font-weight: 700; }
.line .line-total { font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.pay-line { display: grid; grid-template-columns: 150px 120px 130px 110px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.pay-line.locked .input, .pay-line.locked .select { opacity: .7; }
.summary { position: sticky; top: 80px; align-self: start; display: flex; flex-direction: column; gap: 12px; }
.summary-box { background: var(--glass-hi); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.summary > .summary-box:first-child { background: linear-gradient(160deg, var(--tint), transparent 60%), var(--glass-hi); }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; }
.sum-row.total { border-top: 1px dashed var(--line-strong); margin-top: 6px; padding-top: 10px; font-size: 18px; font-weight: 700; font-family: var(--font-display); }
.sum-row.remaining { font-size: 16px; font-weight: 700; color: var(--danger); }
.sum-row.remaining.zero { color: var(--success); }
.avail { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; min-height: 22px; padding: 6px 12px; border-radius: 12px; width: fit-content; }
.avail.ok { color: var(--success); background: var(--success-t); } .avail.bad { color: var(--danger); background: var(--danger-t); } .avail.warn { color: var(--warning); background: var(--warning-t); }
.hijri-hint { font-size: 12.5px; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.detail-grid > div { background: var(--glass-hi); border: 1px solid var(--line); border-radius: 16px; padding: 11px 13px; }
.detail-grid small { display: block; font-size: 12px; color: var(--muted); }
.detail-grid b { font-weight: 700; }
.progress { height: 8px; background: var(--tint); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #2dd4bf); border-radius: 99px; transition: width .4s; }

/* ---------- الإعدادات ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 5px; margin-bottom: 16px; scrollbar-width: none; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-border); width: fit-content; max-width: 100%; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.tabs button { border: 0; background: transparent; padding: 9px 15px; border-radius: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--text-2); display: inline-flex; gap: 8px; align-items: center; }
.tabs button:hover { background: var(--hover); }
.tabs button.active { background: var(--grad); color: #fff; box-shadow: 0 10px 20px -10px rgba(109, 93, 252, .9); }
.list-editor { display: flex; flex-direction: column; gap: 8px; }
.list-editor .le-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.list-editor .le-row.price { grid-template-columns: minmax(0, 1fr) 140px auto; }
.logo-box { width: 136px; height: 136px; border-radius: 28px; border: 1px dashed var(--line-strong); display: grid; place-items: center; overflow: hidden; background: var(--glass-hi); }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- شاشات الدخول والتنصيب ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 30px; padding: 28px clamp(16px, 5vw, 70px); position: relative; }
.auth-tools { position: absolute; top: 18px; inset-inline-end: 18px; }
.auth-side { padding: 20px 0; display: flex; flex-direction: column; gap: 26px; }
.auth-side .brand-big { display: flex; align-items: center; gap: 14px; }
.auth-side .brand-big img { width: 62px; height: 62px; filter: drop-shadow(0 16px 26px rgba(109, 93, 252, .5)); }
.auth-side .brand-big b { font-family: var(--font-display); font-size: 26px; }
.auth-side h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.25; }
.auth-side h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side p { color: var(--text-2); font-size: 16.5px; max-width: 520px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; }
.feature { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.auth-main { display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 450px; padding: 30px; border-radius: 28px; background: var(--glass-strong); }
.auth-card .logo { width: 66px; height: 66px; border-radius: 20px; object-fit: contain; background: var(--glass-solid); border: 1px solid var(--glass-border); padding: 6px; box-shadow: 0 16px 30px -16px rgba(109, 93, 252, .7); }
.auth-card h2 { font-size: 24px; margin-top: 14px; }
.steps { display: flex; gap: 8px; margin: 14px 0 20px; }
.steps span { flex: 1; height: 6px; border-radius: 99px; background: var(--tint); }
.steps span.on { background: var(--grad); }
.checks { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 13.5px; }
.checks li { padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.checks li:last-child { border-bottom: 0; }
.checks .ok i { color: var(--success); } .checks .bad { background: var(--danger-t); } .checks .bad i { color: var(--danger); } .checks .warn i { color: var(--warning); }
pre.config { direction: ltr; text-align: left; background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 12px; font-size: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* ---------- لوحة الأوامر ---------- */
.cmdk .modal-body { padding: 0; }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cmdk-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 17px; }
.cmdk-list { max-height: 58vh; overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 10px 12px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; cursor: pointer; }
.cmdk-item.focus, .cmdk-item:hover { background: var(--hover); }
.cmdk-item .grow small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- الإشعارات ---------- */
#toasts { position: fixed; z-index: 90; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 470px); }
.toast { pointer-events: auto; display: flex; gap: 11px; align-items: flex-start; background: rgba(20, 22, 50, .88); color: #fff; padding: 13px 16px; border-radius: 16px; box-shadow: var(--shadow-lg); font-weight: 500; animation: pop .25s ease; width: 100%; line-height: 1.6; border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.toast > i { margin-top: 4px; }
.toast.success > i { color: #34d399; } .toast.error > i { color: #fb7185; } .toast.info > i { color: #93c5fd; }

/* ---------- الاستجابة للشاشات ---------- */
@media (max-width: 1180px) {
  .booking-form { grid-template-columns: 1fr; }
  .summary { position: static; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(calc(100% + 30px)); box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .main { margin-inline-start: 0; }
  .topbar { margin-inline-start: var(--gap); }
  .content { padding-inline: var(--gap); }
  .menu-btn { display: inline-grid; }
  .search-box { width: auto; flex: 1; }
  .search-box .kbd { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 760px) {
  :root { --gap: 10px; }
  .content { padding: 14px 10px 104px; }
  .topbar { padding: 8px 10px; border-radius: 18px; }
  .topbar h1 { display: none; }
  .topbar .new-btn span { display: none; }
  .topbar .new-btn { padding: 0 12px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 10px; inset-inline: 10px; z-index: 30; border-radius: 22px; padding: 6px 4px calc(6px + env(safe-area-inset-bottom) / 2); background: var(--glass-strong); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; font-weight: 600; padding: 4px 0; }
  .bottom-nav a i { font-size: 18px; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav a.fab i { width: 48px; height: 48px; border-radius: 17px; background: var(--grad); color: #fff; display: grid; place-items: center; margin-top: -22px; box-shadow: 0 12px 24px -10px rgba(109, 93, 252, .9); border: 3px solid var(--glass-solid); }
  #toasts { bottom: 96px; }
  .table-desktop { display: none; }
  .booking-cards { display: grid; gap: 10px; padding: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > [class*="col-"] { grid-column: 1 / -1; }
  .modal-backdrop { padding: 0; }
  .modal, .modal.md, .modal.lg { max-width: none; min-height: 100vh; border-radius: 0; margin: 0; }
  .modal.sm { min-height: 0; margin: auto 12px; border-radius: 24px; }
  .modal-backdrop:has(.modal.sm) { align-items: center; }
  .modal-head, .modal-foot { border-radius: 0; }
  .modal.sm .modal-head { border-radius: 24px 24px 0 0; } .modal.sm .modal-foot { border-radius: 0 0 24px 24px; }
  .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .modal-body { padding: 16px; }
  .form-section { padding: 14px; }
  .line { grid-template-columns: 1fr 1fr; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass-hi); }
  .line > :first-child { grid-column: 1 / -1; }
  .line-head { display: none; }
  .pay-line { grid-template-columns: 1fr 1fr; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass-hi); }
  .pay-line > .pay-note { grid-column: 1 / -1; }
  .cal-day { min-height: 74px; padding: 4px 3px; }
  .cal-hijri { display: none; }
  .chip { font-size: 10.5px; padding: 1px 4px; }
  .chip .chip-period { display: none; }
  .hero { padding: 20px; border-radius: 22px; }
  .hero h2 { font-size: 21px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px; flex-direction: column; gap: 8px; }
  .kpi .kpi-value { font-size: 18px; }
  .page-head h2 { font-size: 20px; }
  .tabs { width: 100%; }
  .auth { padding: 70px 14px 20px; }
  .auth-card { padding: 22px; }
  .list-editor .le-row.price { grid-template-columns: minmax(0, 1fr) 100px auto; }
  input, select, textarea { font-size: 16px !important; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, #toasts, .btn, .icon-btn, .filters, .aurora { display: none !important; }
  .main { margin: 0; }
  .card { box-shadow: none; backdrop-filter: none; }
}
