@font-face { font-family: "Cairo Wazin"; src: url("/assets/Cairo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cairo Wazin"; src: url("/assets/Cairo-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic Wazin"; src: url("/assets/IBMPlexSansArabic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic Wazin"; src: url("/assets/IBMPlexSansArabic-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic Wazin"; src: url("/assets/IBMPlexSansArabic-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Sans Arabic Wazin"; src: url("/assets/NotoSansArabic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans Arabic Wazin"; src: url("/assets/NotoSansArabic-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --navy-950: #061226;
  --navy-900: #0a1a33;
  --navy-800: #10294d;
  --navy-700: #173761;
  --gold-600: #b98b2e;
  --gold-500: #d5ad5a;
  --gold-100: #fff7e4;
  --cream-50: #fcfaf4;
  --cream-100: #f8f2e5;
  --cream-200: #efe3c8;
  --ink: #101827;
  --muted: #697589;
  --line: #dbe1ea;
  --surface: #f7f8fa;
  --panel: #fff;
  --green: #059669;
  --orange: #d97706;
  --red: #dc2626;
  --blue: #2563eb;
  --purple: #7c3aed;
  --teal: #0f766e;
  --cyan: #0284c7;
  --radius: 14px;
  --shadow: 0 12px 36px rgba(6, 18, 38, .09);
  font-family: "IBM Plex Sans Arabic Wazin", "Noto Sans Arabic Wazin", "Cairo Wazin", Tahoma, Arial, sans-serif;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--surface); color: var(--ink); }
body { min-height: 100vh; }
time, .reference, .day-number, .kpi-card strong { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, 46%) 1fr; }
.login-brand { position: relative; overflow: hidden; color: white; background: radial-gradient(circle at 12% 5%, rgba(213,173,90,.19), transparent 28%), linear-gradient(145deg, #061226, #10294d); }
.brand-grid { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 56px 56px; }
.brand-watermark { position: absolute; width: 48%; opacity: .025; left: -4%; bottom: -8%; filter: brightness(3); }
.calendar-scene { position: absolute; inset: 5.5% 6.5% 22%; z-index: 1; pointer-events: none; }
.calendar-board { height: 100%; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(255,255,255,.075); box-shadow: 0 30px 75px rgba(0,0,0,.22); backdrop-filter: blur(10px); }
.calendar-board-head { min-height: 78px; padding: 15px 19px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.13); }
.calendar-board-head div { display: grid; gap: 3px; }
.calendar-board-head small { color: rgba(255,255,255,.55); font-size: 9px; }
.calendar-board-head strong { font-size: 19px; font-weight: 600; }
.calendar-board-head > span { color: var(--gold-500); font-size: 10px; font-weight: 600; border: 1px solid rgba(213,173,90,.28); border-radius: 20px; padding: 6px 10px; background: rgba(213,173,90,.08); }
.calendar-weekdays, .calendar-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { min-height: 35px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(6,18,38,.22); }
.calendar-weekdays b { color: rgba(255,255,255,.52); text-align: center; font-size: 8px; font-weight: 600; }
.calendar-cells { flex: 1; grid-template-rows: repeat(5, minmax(0, 1fr)); }
.calendar-cell { position: relative; min-width: 0; padding: 7px 6px; border-left: 1px solid rgba(255,255,255,.085); border-bottom: 1px solid rgba(255,255,255,.085); background: rgba(255,255,255,.018); }
.calendar-cell:nth-child(7n) { border-left: 0; }
.calendar-cell i { display: block; color: rgba(255,255,255,.62); font-size: 9px; font-style: normal; line-height: 1; }
.calendar-cell.muted { background: rgba(4,12,25,.13); }
.calendar-cell.muted i { color: rgba(255,255,255,.2); }
.calendar-cell.booked { background: linear-gradient(145deg, rgba(213,173,90,.23), rgba(213,173,90,.08)); box-shadow: inset 0 0 0 1px rgba(213,173,90,.2), 0 0 24px rgba(213,173,90,.055); }
.calendar-cell.booked::after { content: ""; position: absolute; top: 7px; left: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-500); box-shadow: 0 0 10px rgba(213,173,90,.65); }
.calendar-cell.booked span { display: block; margin-top: 9px; color: var(--gold-500); font-size: 7px; direction: ltr; text-align: right; }
.calendar-cell.booked strong { display: block; margin-top: 2px; color: rgba(255,255,255,.94); font-size: clamp(6.5px, .6vw, 9px); font-weight: 600; line-height: 1.45; }
.calendar-cell.team { background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035)); }
.calendar-cell.followup { background: linear-gradient(145deg, rgba(213,173,90,.16), rgba(255,255,255,.035)); }
.brand-message { position: absolute; right: 7%; left: 7%; bottom: 5.5%; z-index: 2; }
.brand-kicker, .eyebrow { color: var(--gold-600); font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.brand-message h1 { font-size: clamp(24px, 2.35vw, 34px); line-height: 1.35; margin: 8px 0 5px; font-weight: 600; white-space: nowrap; }
.brand-message p { color: rgba(255,255,255,.58); max-width: 520px; line-height: 1.7; font-size: 11px; margin-bottom: 0; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-card { width: min(100%, 430px); }
.login-logo { width: 225px; margin-bottom: 30px; filter: drop-shadow(0 8px 18px rgba(6,18,38,.08)); }
.login-product-name { display: block; color: var(--navy-900); font-size: 25px; line-height: 1.35; font-weight: 900; margin-bottom: 6px; letter-spacing: -.4px; }
.login-card h2 { font-size: 28px; margin: 8px 0; color: var(--navy-950); font-weight: 600; }
.login-card > p { color: var(--muted); margin-bottom: 28px; }
.form-stack { display: grid; gap: 17px; }
label { color: #344054; font-weight: 700; font-size: 13px; }
input, select, textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); outline: none; margin-top: 7px; transition: .18s; }
input:focus, select:focus, textarea:focus { border-color: var(--gold-600); box-shadow: 0 0 0 4px rgba(185,139,46,.12); }
select[multiple] { min-height: 108px; }
.password-field { display: block; position: relative; }
.password-field input { padding-left: 44px; }
.icon-button { border: 1px solid var(--line); background: #fff; color: var(--navy-800); width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 19px; }
.icon-button.inside { position: absolute; left: 6px; top: 12px; border: 0; background: transparent; }
.primary-button, .secondary-button, .ghost-button, .danger-button { border-radius: 10px; min-height: 40px; padding: 9px 16px; border: 0; font-weight: 800; }
.primary-button { color: #fff; background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); box-shadow: 0 8px 20px rgba(16,41,77,.17); }
.primary-button:hover { transform: translateY(-1px); }
.secondary-button { color: var(--navy-800); background: #fff; border: 1px solid var(--line); }
.ghost-button { color: var(--muted); background: transparent; }
.danger-button { color: #fff; background: var(--red); }
.login-submit { min-height: 48px; margin-top: 4px; }
.login-version { display: block; margin-top: 24px; color: var(--muted); direction: ltr; text-align: center; font-size: 10px; }
.form-error { color: var(--red); font-size: 13px; font-weight: 700; margin: 0; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; background: linear-gradient(180deg, var(--cream-50), var(--cream-100)); color: var(--ink); border-left: 1px solid #eadfca; display: flex; flex-direction: column; position: fixed; inset-block: 0; right: 0; z-index: 50; transition: width .2s, transform .2s; box-shadow: -5px 0 24px rgba(74,54,22,.035); }
.sidebar.collapsed { width: 72px; }
.sidebar-brand { height: 72px; display: flex; align-items: center; gap: 11px; padding: 0 18px; border-bottom: 1px solid var(--line); overflow: hidden; }
.sidebar-brand img { width: 74px; height: 44px; object-fit: contain; padding: 1px; flex: 0 0 auto; }
.sidebar-brand strong, .sidebar-brand small { display: block; white-space: nowrap; }
.sidebar-brand strong { font-size: 17px; color: var(--navy-950); }
.sidebar-brand small { color: var(--muted); font-size: 9px; letter-spacing: 1px; margin-top: 3px; }
.sidebar-nav { padding: 20px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; overflow-y: auto; }
.nav-caption { color: #98A2B3; font-size: 10px; font-weight: 800; padding: 12px 10px 5px; white-space: nowrap; }
.nav-item { position: relative; border: 0; background: transparent; color: #667085; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; text-align: right; white-space: nowrap; }
.nav-item span { width: 22px; text-align: center; font-size: 19px; flex: 0 0 auto; }
.nav-item span svg { display: block; width: 20px; height: 20px; margin: auto; }
.nav-item b { font-size: 13px; font-weight: 700; overflow: hidden; }
.nav-item i { margin-right: auto; background: var(--gold-500); color: var(--navy-950); border-radius: 10px; padding: 1px 7px; font-style: normal; font-size: 10px; }
.nav-item:hover { background: rgba(255,255,255,.68); color: var(--navy-900); }
.nav-item.active { color: var(--navy-900); background: var(--gold-100); }
.nav-item.active::after { content: ""; position: absolute; right: -12px; width: 3px; height: 25px; background: var(--gold-500); border-radius: 3px 0 0 3px; }
.sidebar-footer { border-top: 1px solid #eadfca; padding: 13px; }
.system-version { display: block; margin-top: 10px; color: #8b7760; font-size: 9px; text-align: center; direction: ltr; white-space: nowrap; }
.sidebar-user { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; font-weight: 900; background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); color: var(--navy-950); }
.avatar-image { object-fit: cover; background: var(--cream-100); border: 2px solid #fff; box-shadow: 0 3px 12px rgba(6,18,38,.14); }
.sidebar-user strong, .sidebar-user small { display: block; white-space: nowrap; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user small { font-size: 10px; color: var(--muted); margin-top: 3px; }
.sidebar-collapse { width: 100%; color: var(--muted); font-size: 11px; margin-top: 8px; }
.sidebar.collapsed .sidebar-brand div, .sidebar.collapsed .nav-caption, .sidebar.collapsed .nav-item b, .sidebar.collapsed .nav-item i, .sidebar.collapsed .sidebar-user div, .sidebar.collapsed .sidebar-collapse, .sidebar.collapsed .system-version { display: none; }
.sidebar.collapsed .sidebar-brand { padding: 0 16px; }
.sidebar.collapsed .sidebar-brand img { width: 38px; height: 38px; object-fit: contain; }
.app-main { flex: 1; min-width: 0; margin-right: 248px; transition: margin .2s; position: relative; isolation: isolate; }
.app-main::before { content: ""; position: fixed; z-index: -1; width: min(44vw, 650px); aspect-ratio: 1; left: 5%; bottom: -18%; background: url("/assets/wazin-icon.png") center/contain no-repeat; opacity: .022; filter: grayscale(1); pointer-events: none; }
.sidebar.collapsed + .app-main { margin-right: 72px; }
.topbar { height: 78px; padding: 0 26px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); }
.topbar-title { display: flex; align-items: center; gap: 10px; }
.topbar-title h1 { font-size: 24px; line-height: 1.25; margin: 0; color: var(--navy-950); font-weight: 900; letter-spacing: -.35px; }
.topbar-title small { color: var(--gold-600); font-size: 11px; font-weight: 800; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.global-search { position: relative; width: 285px; }
.global-search span { position: absolute; right: 12px; top: 11px; color: var(--muted); }
.global-search span svg { width: 18px; height: 18px; }
.global-search input { margin: 0; height: 40px; padding-right: 35px; background: var(--surface); }
.bell-button { position: relative; }
.bell-button svg { width: 20px; height: 20px; }
.primary-button svg { width: 17px; height: 17px; margin-left: 5px; vertical-align: -3px; }
.bell-button i, .user-chip i { position: absolute; min-width: 18px; height: 18px; border-radius: 10px; background: var(--red); color: #fff; font-size: 9px; display: grid; place-items: center; font-style: normal; top: -5px; left: -5px; }
.user-chip { border: 0; background: transparent; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.user-chip .avatar { width: 38px; height: 38px; }
.user-chip strong, .user-chip small { display: block; text-align: right; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.dropdown-menu { position: fixed; left: 24px; top: 70px; width: 265px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 80; }
.dropdown-menu button { width: 100%; border: 0; padding: 10px; background: transparent; text-align: right; color: var(--navy-800); font-weight: 700; border-radius: 8px; display: flex; align-items: center; gap: 9px; }
.dropdown-menu button:hover { background: var(--cream-50); }
.dropdown-menu button svg { width: 17px; height: 17px; color: var(--gold-600); }
.dropdown-menu .preferences-button { color: var(--navy-800); border-bottom: 1px solid var(--line); }
.dropdown-menu .logout-menu-button { color: var(--red); margin-top: 3px; }
#userMenuInfo { padding: 8px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
#userMenuInfo strong { display: block; color: var(--navy-950); font-size: 13px; }
#userMenuInfo p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.bell-menu { width: 350px; max-height: 420px; overflow: auto; left: 180px; }
.mini-notification { padding: 11px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mini-notification.unread { background: var(--gold-100); }
.mini-notification strong { display: block; font-size: 12px; }
.mini-notification p { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.page-content { padding: 26px; max-width: 1800px; margin: auto; }
.dashboard-date-hero { margin-bottom: 20px; padding: 5px 2px 2px; }
.dashboard-date-hero h2 { margin: 0; color: var(--navy-950); font-size: clamp(25px, 2.5vw, 36px); font-weight: 900; line-height: 1.55; }
.dashboard-date-hero p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-header h2 { margin-bottom: 5px; color: var(--navy-950); font-size: 24px; }
.page-header p { color: var(--muted); font-size: 13px; margin: 0; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 13px; box-shadow: 0 6px 20px rgba(6,18,38,.035); }
.kpi-card::after { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--accent, var(--gold-500)); }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent, var(--gold-500)) 12%, white); color: var(--accent); font-size: 20px; }
.kpi-card small { display: block; color: var(--muted); font-size: 11px; }
.kpi-card strong { display: block; font-size: 27px; margin-top: 3px; color: var(--navy-950); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .7fr); gap: 16px; }
.stack-grid { display: grid; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(6,18,38,.035); }
.panel-head { min-height: 58px; padding: 0 17px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h3 { font-size: 14px; margin: 0; color: var(--navy-950); }
.panel-body { padding: 16px; }
.timeline-list { position: relative; }
.timeline-event { display: grid; grid-template-columns: 82px 5px 1fr; gap: 13px; align-items: stretch; min-height: 75px; }
.timeline-time { color: var(--muted); font-size: 12px; padding-top: 11px; direction: ltr; text-align: right; }
.timeline-line { position: relative; background: var(--line); width: 1px; }
.timeline-line::before { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--event-color); right: -4px; top: 15px; box-shadow: 0 0 0 4px #fff; }
.timeline-card { margin-bottom: 10px; padding: 11px 13px; border: 1px solid var(--line); border-right: 3px solid var(--event-color); border-radius: 10px; cursor: pointer; }
.timeline-card strong { display: block; font-size: 13px; }
.timeline-card small { color: var(--muted); display: block; margin-top: 4px; font-size: 11px; }
.next-event-card { color: #fff; background: linear-gradient(145deg, var(--navy-900), var(--navy-700)); border-radius: 12px; padding: 18px; position: relative; overflow: hidden; }
.next-event-card::after { content: ""; position: absolute; width: 140px; height: 140px; border: 28px solid rgba(213,173,90,.1); border-radius: 50%; left: -55px; top: -65px; }
.next-event-card .countdown { color: var(--gold-500); font-size: 12px; font-weight: 800; }
.next-event-card h3 { font-size: 17px; margin: 8px 0; }
.next-event-card p { color: rgba(255,255,255,.63); font-size: 12px; margin-bottom: 13px; }
.next-event-card button { position: relative; z-index: 2; }
.event-mini-list { display: grid; gap: 8px; }
.event-mini { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; padding: 9px 5px; border-bottom: 1px solid var(--line); cursor: pointer; }
.event-mini:last-child { border: 0; }
.event-mini .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--event-color); }
.event-mini strong { display: block; font-size: 12px; }
.event-mini small { color: var(--muted); font-size: 10px; }
.event-mini time { color: var(--muted); font-size: 11px; direction: ltr; }
.empty-state { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty-state .empty-icon { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); font-size: 24px; color: var(--gold-600); }
.empty-state h3 { color: var(--navy-950); font-size: 15px; margin-bottom: 6px; }
.empty-state p { font-size: 12px; }
.calendar-toolbar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.calendar-nav, .view-switch, .filter-row { display: flex; align-items: center; gap: 7px; }
.calendar-nav strong { min-width: 130px; text-align: center; color: var(--navy-950); }
.view-switch { background: var(--surface); padding: 4px; border-radius: 10px; }
.view-switch button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 12px; }
.view-switch button.active { background: #fff; color: var(--navy-900); box-shadow: 0 3px 10px rgba(6,18,38,.08); font-weight: 800; }
.filter-select { width: auto; min-width: 130px; margin: 0; padding: 8px 10px; font-size: 12px; }
.calendar-frame { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 620px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-weekday { padding: 12px; background: var(--navy-900); color: rgba(255,255,255,.72); text-align: center; font-size: 11px; font-weight: 800; }
.month-day { min-height: 125px; padding: 9px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.month-day.muted { background: #fafbfc; color: #adb5c2; }
.month-day.today { background: var(--gold-100); }
.day-number { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; margin-bottom: 5px; cursor: pointer; }
.today .day-number { background: var(--gold-600); color: #fff; }
.month-event { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 6px; margin-bottom: 3px; font-size: 10px; font-weight: 700; background: color-mix(in srgb, var(--event-color) 10%, white); border-right: 2px solid var(--event-color); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-events { border: 0; background: transparent; color: var(--navy-700); font-size: 10px; font-weight: 800; }
.time-grid { overflow: auto; max-height: 720px; }
.week-header { display: grid; grid-template-columns: 64px repeat(7, minmax(120px, 1fr)); position: sticky; top: 0; z-index: 4; background: white; border-bottom: 1px solid var(--line); }
.week-header > div { padding: 10px; text-align: center; border-left: 1px solid var(--line); font-size: 11px; }
.week-header strong { display: block; color: var(--navy-900); }
.week-header small { color: var(--muted); }
.week-body { position: relative; display: grid; grid-template-columns: 64px repeat(7, minmax(120px, 1fr)); min-height: 720px; }
.hour-labels { display: grid; grid-template-rows: repeat(12, 60px); }
.hour-label { border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; padding: 5px; direction: ltr; }
.day-column { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(to bottom, transparent 59px, var(--line) 60px); background-size: 100% 60px; }
.day-column.today { background-color: rgba(255,247,228,.55); }
.calendar-event-block { position: absolute; right: 4px; left: 4px; min-height: 28px; padding: 5px 7px; border-radius: 7px; background: color-mix(in srgb, var(--event-color) 12%, white); border-right: 3px solid var(--event-color); color: var(--navy-950); overflow: hidden; cursor: pointer; font-size: 10px; box-shadow: 0 2px 7px rgba(6,18,38,.08); }
.calendar-event-block strong { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.calendar-event-block small { color: var(--muted); direction: ltr; display: block; margin-top: 2px; }
.day-view-grid { display: grid; grid-template-columns: 70px 1fr; min-height: 720px; }
.day-view-column { position: relative; background-image: linear-gradient(to bottom, transparent 59px, var(--line) 60px); background-size: 100% 60px; }
.current-time-line { position: absolute; height: 2px; background: var(--gold-600); right: 0; left: 0; z-index: 3; }
.current-time-line::before { content: ""; position: absolute; right: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-600); }
.table-panel { overflow: hidden; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.data-table th { text-align: right; background: #f8fafc; color: var(--muted); padding: 12px 14px; font-size: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
.data-table tr:hover td { background: #fbfcfe; }
.reference { color: var(--navy-700); font-weight: 800; font-family: "Segoe UI", sans-serif; font-size: 11px; direction: ltr; display: inline-block; }
.event-title-cell strong { display: block; font-size: 12px; }
.event-title-cell small { display: block; color: var(--muted); margin-top: 3px; }
.type-badge, .status-badge, .priority-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.type-badge { background: color-mix(in srgb, var(--event-color) 10%, white); color: var(--event-color); }
.status-badge { background: #eef2f7; color: #475467; }
.status-confirmed { background: #ecfdf3; color: #047857; }
.status-cancelled { background: #fef2f2; color: var(--red); }
.status-postponed { background: #fff7ed; color: var(--orange); }
.status-completed_postponed { background: #fff4dc; color: #946313; }
.status-completed { background: #eff6ff; color: var(--blue); }
.priority-urgent { background: #fef2f2; color: var(--red); }
.row-actions { display: flex; gap: 5px; }
.row-actions button { width: 31px; height: 31px; font-size: 13px; }
.backdrop { position: fixed; inset: 0; background: rgba(6,18,38,.5); z-index: 90; backdrop-filter: blur(2px); }
.drawer { position: fixed; left: 0; top: 0; bottom: 0; width: min(780px, 94vw); background: #fff; z-index: 100; box-shadow: 20px 0 60px rgba(6,18,38,.25); overflow-y: auto; }
.drawer-head { position: sticky; top: 0; z-index: 3; height: 78px; background: #fff; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 0 25px; }
.drawer-head h2 { margin: 4px 0 0; font-size: 21px; color: var(--navy-950); }
.drawer-body { padding: 22px 25px 95px; }
.form-section { padding-bottom: 21px; margin-bottom: 21px; border-bottom: 1px solid var(--line); }
.form-section h3 { font-size: 13px; color: var(--navy-900); margin-bottom: 15px; }
.section-hint { color: var(--muted); font-size: 11px; margin: -7px 0 13px; }
.required-mark { color: var(--red); }
.form-section h3 span { color: var(--gold-600); font-size: 9px; background: var(--gold-100); padding: 4px 7px; border-radius: 10px; margin-right: 6px; }
.form-grid, .future-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.span-2 { grid-column: span 2; }
.type-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.type-option { border: 1px solid var(--line); background: #fff; min-height: 68px; border-radius: 10px; padding: 9px; text-align: right; color: var(--muted); font-size: 10px; }
.type-option i { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--event-color); margin-bottom: 8px; }
.type-option.active { border-color: var(--event-color); background: color-mix(in srgb, var(--event-color) 7%, white); color: var(--navy-950); font-weight: 800; }
.check-label { display: flex; align-items: center; gap: 8px; }
.check-label input, .reminder-options input { width: auto; margin: 0; }
.reminder-options { display: flex; flex-wrap: wrap; gap: 9px; }
.reminder-options label { border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; display: flex; align-items: center; gap: 7px; }
.reminder-rules { display: grid; gap: 10px; margin-bottom: 12px; }
.reminder-rule { display: grid; grid-template-columns: 78px 100px 120px minmax(180px, 1fr) minmax(150px, .8fr) 38px; gap: 9px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfc; }
.reminder-rule input, .reminder-rule select { margin-top: 5px; }
.reminder-recipients select { min-height: 75px; }
.reminder-channel { min-height: 75px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; display: flex; flex-direction: column; justify-content: center; }
.reminder-channel small, .reminder-channel span { color: var(--muted); font-size: 9px; }
.reminder-channel strong { color: var(--navy-900); font-size: 11px; margin: 3px 0; }
.field-disabled { opacity: .48; }
.future-links { opacity: .78; }
.future-links input { background: #f8fafc; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-card { padding: 20px; }
.settings-card h3 { color: var(--navy-950); margin-bottom: 4px; }
.settings-card > p { color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.settings-runtime { display: grid; gap: 9px; }
.settings-runtime div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.settings-runtime span { color: var(--muted); font-size: 12px; }
.settings-runtime strong { font-size: 12px; direction: ltr; text-align: left; }
.settings-logo-row { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.settings-logo-preview { width: 150px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
.integration-list { display: grid; gap: 10px; }
.integration-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.integration-item strong { display: block; font-size: 13px; }
.integration-item small { color: var(--muted); }
.relation-list { display: grid; gap: 9px; }
.relation-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.relation-row strong, .relation-row small { display: block; }
.relation-row small { color: var(--muted); margin-top: 3px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }
.warning-note { color: #9a5a08; background: #fff7ed; border: 1px solid #fed7aa; padding: 9px 11px; border-radius: 8px; font-size: 11px; margin: 10px 0 0; }
.calendar-input-switch { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; background: var(--surface); border-radius: 10px; }
.calendar-input-switch button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 8px 12px; font-size: 11px; font-weight: 800; }
.calendar-input-switch button.active { background: #fff; color: var(--navy-900); box-shadow: 0 3px 10px rgba(6,18,38,.08); }
.legal-client { color: var(--navy-950); font-weight: 900; }
.legal-opponent { display: block; color: #7b5a1e; font-size: 9px; font-weight: 700; margin-top: 2px; }
.legal-meta { color: var(--muted); font-size: 10px; }
.calendar-event-block .legal-client { margin-top: 3px; }
.date-conversion-preview { margin: 12px 0; padding: 11px 13px; border: 1px solid #efdcae; background: var(--gold-100); border-radius: 10px; color: var(--navy-900); font-size: 11px; line-height: 1.9; }
.dual-date { display: grid; gap: 2px; }
.dual-date .day-name { color: var(--navy-900); font-weight: 900; }
.dual-date .hijri-date { color: var(--gold-600); font-weight: 800; }
.dual-date .gregorian-date { color: var(--muted); }
.date-preferences { display: grid; gap: 12px; }
.drawer-actions { position: fixed; bottom: 0; left: 0; width: min(780px, 94vw); padding: 14px 25px; background: rgba(255,255,255,.95); border-top: 1px solid var(--line); display: flex; gap: 8px; z-index: 4; }
.modal-backdrop { z-index: 110; }
.modal { position: fixed; z-index: 120; width: min(700px, 92vw); max-height: 88vh; overflow: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 16px; box-shadow: 0 25px 80px rgba(6,18,38,.28); }
.modal-head { height: 66px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; margin: 0; }
.modal-body { padding: 20px; }
.details-hero { background: linear-gradient(145deg, var(--navy-950), var(--navy-700)); color: #fff; padding: 22px; border-radius: 14px; margin-bottom: 15px; }
.details-hero .reference { color: var(--gold-500); }
.details-hero h2 { font-size: 21px; margin: 8px 0 12px; }
.details-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.structured-date { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.structured-date > div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfc; }
.structured-date small { display: block; color: var(--muted); font-size: 9px; margin-bottom: 4px; }
.structured-date strong { display: block; color: var(--navy-950); font-size: 12px; }
.event-end-time { margin: 9px 0 0; color: var(--muted); }
.linked-events { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; }
.action-link { display: inline-flex; align-items: center; text-decoration: none; }
.detail-card { border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.detail-card.full { grid-column: span 2; }
.detail-card h3 { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.detail-card p { margin: 0; font-size: 12px; line-height: 1.8; }
.person-line { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.person-line .avatar { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }
.attachment-list { display: grid; gap: 7px; }
.attachment-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; }
.attachment-row strong { display: block; font-size: 11px; }
.attachment-row small { color: var(--muted); font-size: 9px; }
.attachment-actions { display: flex; gap: 5px; }
.drop-zone { border: 1px dashed #aeb8c8; border-radius: 9px; padding: 14px; text-align: center; color: var(--muted); font-size: 11px; margin-top: 9px; }
.drop-zone input { margin-top: 7px; }
.history-list { display: grid; gap: 9px; }
.history-item { position: relative; padding-right: 18px; }
.history-item::before { content: ""; position: absolute; right: 2px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-600); }
.history-item strong { display: block; font-size: 11px; }
.history-item small { color: var(--muted); font-size: 9px; }
.detail-actions { display: flex; gap: 7px; margin-top: 15px; flex-wrap: wrap; }
.profile-overview { display: flex; align-items: center; gap: 16px; padding: 4px 0 20px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.profile-overview .profile-avatar-large { width: 76px; height: 76px; border-radius: 20px; font-size: 24px; }
.profile-overview h3 { margin: 0 0 5px; color: var(--navy-950); font-size: 20px; }
.profile-overview p { margin: 0; color: var(--muted); font-size: 12px; }
.avatar-crop-layout { display: grid; justify-items: center; gap: 18px; }
.avatar-crop-stage { position: relative; width: min(420px, 78vw); aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #111827; touch-action: none; }
.avatar-crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.avatar-crop-stage canvas:active { cursor: grabbing; }
.avatar-crop-mask { position: absolute; inset: 9%; border: 3px solid rgba(255,255,255,.95); border-radius: 50%; box-shadow: 0 0 0 120px rgba(6,18,38,.52); pointer-events: none; }
.avatar-crop-controls { width: min(420px, 78vw); }
.avatar-crop-controls input { direction: ltr; }
.notification-list { display: grid; gap: 9px; }
.notification-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.notification-card.unread { background: var(--gold-100); border-color: #efdcae; }
.notification-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: #eef2f7; color: var(--navy-700); }
.notification-card strong { display: block; font-size: 13px; }
.notification-card p { color: var(--muted); font-size: 11px; margin: 3px 0 0; }
.notification-card time { color: var(--muted); font-size: 9px; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.role-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 16px; }
.role-card-head { display: flex; justify-content: space-between; gap: 8px; }
.role-card h3 { font-size: 14px; margin-bottom: 5px; }
.role-card p { color: var(--muted); font-size: 11px; min-height: 35px; }
.role-meta { display: flex; gap: 8px; color: var(--muted); font-size: 10px; margin: 13px 0; }
.permission-groups { display: grid; gap: 12px; }
.permission-group { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.permission-group h4 { font-size: 12px; margin: 0 0 9px; color: var(--navy-900); }
.permission-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.permission-checks label { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.permission-checks input { width: auto; margin: 0; }
.toast-region { position: fixed; left: 22px; bottom: 22px; z-index: 200; display: grid; gap: 8px; }
.toast { min-width: 280px; max-width: 420px; background: var(--navy-950); color: #fff; border-radius: 11px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 12px; border-right: 3px solid var(--gold-500); }
.toast.error { border-color: var(--red); }
.mobile-only { display: none; }
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .global-search { display: none; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 25px; }
  .sidebar { transform: translateX(100%); width: 248px; }
  .sidebar.open { transform: translateX(0); }
  .app-main, .sidebar.collapsed + .app-main { margin-right: 0; }
  .mobile-only { display: inline-grid; }
  .topbar { padding: 0 12px; }
  .topbar-title small, .user-chip div, #newEventTop { display: none; }
  .page-content { padding: 16px 12px; }
  .page-header { flex-direction: column; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-card { padding: 12px; }
  .kpi-card strong { font-size: 21px; }
  .calendar-toolbar { align-items: flex-start; }
  .filter-row { width: 100%; overflow-x: auto; }
  .month-day { min-height: 90px; padding: 5px; }
  .month-event { font-size: 0; height: 8px; width: 8px; border-radius: 50%; padding: 0; display: inline-block; }
  .type-picker { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .future-grid, .details-grid { grid-template-columns: 1fr; }
  .span-2, .detail-card.full { grid-column: span 1; }
  .role-grid { grid-template-columns: 1fr; }
  .permission-checks { grid-template-columns: 1fr; }
  .reminder-rule { grid-template-columns: 1fr 1fr; }
  .reminder-recipients, .reminder-channel { grid-column: span 2; }
  .structured-date { grid-template-columns: 1fr 1fr; }
}
