/* تعافي — نظام التصميم المشترك (النظام، الحجز الأونلاين، بوابة المراجع) */
@font-face { font-family: 'Cairo'; src: url('/shared/fonts/Cairo.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  /* لون المركز يقود كل شيء: الرماديات مشتقة منه، ويتغيّر من الإعدادات (applyBrand). */
  --brand: #1a3a6b; --brand-ink: #fff; --brand-soft: rgba(26, 58, 107, .08); --brand-line: rgba(26, 58, 107, .28);
  --brand-deep: color-mix(in srgb, var(--brand) 80%, #000);
  --bg: color-mix(in srgb, var(--brand) 4%, #f3f5f8); --surface: #fff; --surface-2: color-mix(in srgb, var(--brand) 3%, #f8fafc);
  --ink: #0f1b2d; --ink-2: #33435a; --muted: #5b6a7f;
  --line: color-mix(in srgb, var(--brand) 7%, #e2e6ec); --line-2: color-mix(in srgb, var(--brand) 10%, #cbd3dd);
  --ok: #0f7a4f; --ok-soft: #e3f4ec; --warn: #a15c00; --warn-soft: #fdf1dc; --bad: #b42318; --bad-soft: #fde8e6; --info: #1d5fbf; --info-soft: #e5eefb;
  --kids: #c2610c; --men: #1d4ed8; --women: #be185d;
  --r-sm: 6px; --r: 8px; --r-lg: 14px;
  /* «في المركز الآن» بلون لا يتقاطع مع ألوان الأقسام (أزرق الرجال وبرتقالي الأطفال) */
  --here: #0e7490;
  --sh-1: 0 1px 2px rgba(15, 27, 45, .05), 0 2px 6px -2px rgba(15, 27, 45, .06);
  --sh-2: 0 18px 40px -12px rgba(15, 27, 45, .28), 0 4px 12px -4px rgba(15, 27, 45, .10);
  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --tap: 44px;
  --ease: cubic-bezier(.16, 1, .3, 1); --t-fast: 140ms; --t: 240ms;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; caret-color: var(--brand); accent-color: var(--brand); scrollbar-color: var(--line-2) transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font); font-feature-settings: 'tnum' 1; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.3; font-weight: 800; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: 22px; } h2 { font-size: 19px; } h3 { font-size: 16px; } h4 { font-size: 14px; color: var(--ink-2); }
p { margin: 0 0 .6em; }
a { color: var(--brand); text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--brand) 35%, #cbd3dd); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .bold { font-weight: 800; }
.nowrap { white-space: nowrap; } .center { text-align: center; } .end { text-align: end; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* المبالغ ورمز الريال العماني الجديد (يُرسم من مسار البنك المركزي حتى تدعمه الخطوط) */
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rial { display: inline-block; width: 1.05em; height: .58em; background: currentColor; -webkit-mask: url('/shared/omr.svg') center / contain no-repeat; mask: url('/shared/omr.svg') center / contain no-repeat; vertical-align: -.02em; }

/* ── الأزرار ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 700 14px/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), color var(--t-fast); -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--brand) 30%, var(--line-2)); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn[aria-busy=true] { cursor: progress; opacity: .7; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--brand) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { background: color-mix(in srgb, var(--ok) 85%, #000); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--brand-soft); color: var(--ink); }
.btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn.soft:hover { background: color-mix(in srgb, var(--brand) 15%, transparent); }
.btn.sm { min-height: 34px; padding: 0 10px; font-size: 13px; }
.btn.icon { padding: 0; width: var(--tap); }
.btn.sm.icon { width: 34px; }
.btn.block { width: 100%; }
.ic { width: 18px; height: 18px; flex: none; }
.alert > .ic { width: 20px; height: 20px; margin-top: 1px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row.end { justify-content: flex-end; }

/* ── الحقول ── */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span, .field > label, .label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
input, select, textarea { width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 15px/1.4 var(--font); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); margin: 0; flex: none; }
input[type=color] { padding: 4px; width: 64px; }
input[type=range] { padding: 0; accent-color: var(--brand); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid var(--brand-soft); outline-offset: 0; }
input[readonly] { background: var(--surface-2); }
/* خانة الهاتف برمز الدولة: الرمز يسار الرقم في العربي والإنجليزي (الأرقام تُقرأ من اليسار)، والقائمة الأصلية شفافة فوقه
   فتفتح منتقي النظام نفسه على الجوال والكمبيوتر. */
.phone-in { display: flex; min-width: 0; direction: ltr; }
.phone-in .ph-cc { order: -1; position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
/* الأعلام (web/shared/flags.js): صغيرة بإطار رفيع حتى تبين الأعلام البيضاء على الخلفية البيضاء. */
.flag { display: inline-block; flex: none; width: 18px; height: 12px; border-radius: 2px; vertical-align: -1px; box-shadow: 0 0 0 1px rgb(15 27 45 / .14); }
.flag-free { box-shadow: none; }
.phone-in .ph-flag { display: inline-flex; }
.phone-in .flag { display: block; width: 22px; height: 15px; }
/* تلميح خانة الهاتف: الدولة وكم خانة مطلوبة وكم كُتب، ويخضرّ حين يكتمل الرقم. */
.ph-hint { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.ph-hint .flag { width: 15px; height: 10px; }
.ph-hint.ok { color: var(--ok, #0f7a4f); font-weight: 700; }
.dup-hint .flag { margin-inline-end: 4px; }
.phone-in .ph-cc::after { content: ''; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; opacity: .7; }
.phone-in .ph-cc select { position: absolute; inset: 0; width: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
.phone-in .ph-num { flex: 1; min-width: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-variant-numeric: tabular-nums; }
.phone-in:has(select:focus-visible) .ph-cc { border-color: var(--brand); outline: 3px solid var(--brand-soft); z-index: 1; }
.phone-in .ph-num:user-invalid { border-color: var(--bad, #b42318); }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 14px; margin: 0 0 14px; min-width: 0; }
legend { padding: 0 6px; font-weight: 800; font-size: 14px; }

/* مفتاح تشغيل */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 36px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: inset-inline-start .15s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { inset-inline-start: 21px; }
.switch input:focus-visible + i { outline: 3px solid var(--brand-line); outline-offset: 2px; }

/* اختيار مجزّأ */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button, .seg label { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: 700 13px/1 var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; position: relative; }
.seg label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg .on, .seg label:has(input:checked) { background: var(--surface); color: var(--brand); box-shadow: var(--sh-1); }

/* ── البطاقات والجداول ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh-1); min-width: 0; }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid > .card + .card { margin-top: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 12px; box-shadow: var(--sh-1); min-width: 0; }
.kpi .k { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.kpi .k .dot { width: 8px; height: 8px; }
.kpi .v { font-size: 26px; font-weight: 800; margin-top: 4px; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi.good .v { color: var(--ok); } .kpi.bad .v { color: var(--bad); }
a.kpi { color: inherit; text-decoration: none; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
a.kpi:hover { border-color: var(--brand-line); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th, .t td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t th { background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); font-weight: 800; white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background var(--t-fast) var(--ease); }
.t tbody tr:hover { background: var(--surface-2); }
.t tr.clickable { cursor: pointer; }
.t tfoot td { font-weight: 800; background: var(--surface-2); }
.t .num { text-align: end; white-space: nowrap; }
.list { display: flex; flex-direction: column; }
.list > .row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.list > .row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 2px; }

/* شارات */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; line-height: 20px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.st-booked { --st: #5b6b80; } .st-confirmed { --st: #5b4fc4; } .st-arrived { --st: var(--here); } .st-done { --st: #0f7a4f; } .st-no_show { --st: #b42318; } .st-cancelled { --st: #8a96a8; }
.badge.st { background: color-mix(in srgb, var(--st) 12%, white); color: var(--st); border-color: transparent; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--info-soft); color: #173f7a; font-size: 14px; }
.alert.brand { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand-line); }
.alert.warn { background: var(--warn-soft); color: #6b3d00; } .alert.bad { background: var(--bad-soft); color: #7a1a12; } .alert.ok { background: var(--ok-soft); color: #0a5135; }
.alert + .alert, .alert + .card, .card + .alert { margin-top: 12px; }

/* تبويبات */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 16px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 700 14px/1.2 var(--font); white-space: nowrap; cursor: pointer; text-decoration: none; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .on { color: var(--brand); border-bottom-color: var(--brand); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.toolbar input[type=search] { max-width: 340px; }
.toolbar input[type=date], .toolbar input[type=month], .toolbar select { width: auto; }

/* ── النوافذ والتنبيهات ── */
dialog.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-2); background: var(--surface); color: var(--ink); overflow: auto; }
dialog.modal.wide { width: min(920px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(15, 27, 45, .45); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.modal-head h2 { margin: 0; font-size: 17px; flex: 1; }
.modal-body { padding: 16px 18px; }
.modal-foot { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.confirm { padding: 20px; }
.confirm p { font-size: 15px; margin-bottom: 16px; white-space: pre-line; }
.confirm .actions { display: flex; gap: 8px; justify-content: flex-end; }
#toasts { position: fixed; inset-inline: 0; bottom: 18px; z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { max-width: 520px; padding: 11px 18px; border-radius: 10px; background: #0f1b2d; color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--sh-2); transition: opacity .3s var(--ease), transform .3s var(--ease); animation: toast-in .32s var(--ease); }
.toast.err { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.spinner { width: 22px; height: 22px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
dialog.modal[open] { animation: modal-in var(--t) var(--ease); }
dialog.modal[open]::backdrop { animation: fade-in var(--t) var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes fade-in { from { opacity: 0; } }
/* ردّ فعل لحظي: الصف أو البطاقة التي تغيّرت تومض بلون حالتها ثم تهدأ */
.flash { animation: flash 1.1s var(--ease); }
@keyframes flash { from { background-color: color-mix(in srgb, var(--st, var(--brand)) 16%, transparent); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* بحث بالاقتراحات */
.typeahead { position: relative; }
.typeahead .menu { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--sh-2); max-height: 280px; overflow: auto; }
.typeahead .menu button { display: flex; width: 100%; gap: 8px; justify-content: space-between; padding: 9px 12px; border: 0; background: none; text-align: start; font: 14px var(--font); cursor: pointer; color: var(--ink); }
.typeahead .menu button:hover, .typeahead .menu button.on { background: var(--brand-soft); }

/* التوقيع والرسوم */
.sigpad { width: 100%; height: 190px; border: 2px dashed var(--line-2); border-radius: var(--r); background: #fff; touch-action: none; display: block; }
.chart { width: 100%; height: auto; display: block; }
.chart text { font: 11px var(--font); fill: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(90px, 170px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.bar .track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.bar .fill { height: 100%; border-radius: 99px; background: var(--brand); }

/* شاشة الدخول والتجهيز */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px 16px; background: radial-gradient(1200px 500px at 50% -10%, var(--brand-soft), transparent), var(--bg); }
.auth .card { width: min(440px, 100%); padding: 26px 24px; }
.auth .logo { width: 64px; height: 64px; border-radius: 16px; object-fit: contain; display: block; margin: 0 auto 10px; }
.auth h1 { text-align: center; margin-bottom: 4px; }
.auth .sub { text-align: center; color: var(--muted); margin-bottom: 18px; }
.auth form { display: flex; flex-direction: column; gap: 12px; }
.lang-switch { position: fixed; top: 12px; inset-inline-end: 12px; z-index: 5; }

/* عناصر للجوال فقط أو للشاشات الكبيرة فقط */
@media (min-width: 641px) { .m-only { display: none !important; } }

@media (max-width: 640px) {
  .card { padding: 14px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .modal-body { padding: 14px; }
  .kpi .v { font-size: 19px; }
  .m-hide { display: none !important; }

  /* الجدول على الجوال قائمة: كل صف كتلة، وكل خانة تحمل اسم عمودها فوق قيمتها (data-l يُضاف تلقائيًا عند الرسم).
     data-m يحدد دور الخانة: title عنوان الصف، end في طرفه (مبلغ أو حالة)، act سطر الأزرار، hide تختفي. */
  table.t, table.t > tbody, table.t > tfoot { display: block; }
  table.t > thead { display: none; }
  table.t tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 18px; padding: 12px 14px; border-top: 1px solid var(--line); }
  table.t > tbody:first-of-type > tr:first-child { border-top: 0; }
  table.t tr::before { content: ''; order: -1; flex-basis: 100%; height: 0; margin-block: -4px; }
  table.t td { display: block; padding: 0; border: 0; text-align: start; min-width: 0; max-width: 100%; }
  table.t td:empty, table.t td[data-m=hide] { display: none; }
  table.t td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 1px; font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
  table.t td[data-m=title] { order: -3; flex: 1 1 0; font-size: 15px; }
  table.t td[data-m=end] { order: -2; margin-inline-start: auto; text-align: end; }
  table.t td[data-m=act] { flex-basis: 100%; }
  table.t td[data-m=end] .btn.sm { margin-block: -6px; }
  table.t td[data-m]::before { content: none; }
  table.t .num { text-align: start; }
  table.t td[data-m=end].num, table.t td[data-m=end] .num { text-align: end; }
  table.t > tbody > tr:hover { background: none; }
  table.t tr.clickable:active { background: var(--surface-2); }
  table.t > tfoot tr { background: var(--surface-2); border-top: 1px solid var(--line-2); }
}
@media (max-width: 420px) { .form-grid { grid-template-columns: 1fr; } }

/* ── الطباعة: يُطبع محتوى #print فقط ── */
#print { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  body.printing > *:not(#print) { display: none !important; }
  body.printing #print { display: block; }
  .no-print { display: none !important; }
}
