/* Lumax Media HR — Design System
   الهوية مستوحاة من دليل الموظفين: نيلي (Indigo) كلون أساسي، ذهبي/برونزي للإطار القانوني، وخط IBM Plex Sans Arabic. */
:root {
  --brand-50: #fdf6ea; --brand-100: #f9e9cc; --brand-200: #f0d09b; --brand-300: #e2b169;
  --brand-500: #c07d1c; --brand-600: #a8690f; --brand-700: #8a560c; --brand-900: #4a2f08;
  --accent: #a16207; --accent-bg: #fdf6e3;
  --ink: #12131a; --ink-2: #3a3d4a; --muted: #6b6f80; --faint: #7d8193;
  --line: #e8e9ef; --line-2: #f1f2f6; --bg: #fafafb; --surface: #ffffff; --surface-2: #fafbfe;
  --ok: #0f9960; --ok-bg: #e7f7ef; --warn: #b7791f; --warn-bg: #fff6e0; --bad: #d63b3b; --bad-bg: #fdecec;
  --info: #2563eb; --info-bg: #e8f0fe; --gray-bg: #f0f1f5; --orange: #d9620f; --orange-bg: #fff0e3;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(18, 19, 26, .05);
  --shadow: 0 1px 3px rgba(18, 19, 26, .06), 0 4px 16px rgba(18, 19, 26, .04);
  --shadow-lg: 0 20px 50px rgba(18, 19, 26, .18);
  --sidebar-w: 264px; --topbar-h: 64px;
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

/* ═════════ النمط C «طبقات» — الرموز (W9.1) ═════════
   تُفعَّل بـ <html data-ui="c"> (إعداد ui.c في لوحة الإدارة، مفعّل افتراضياً). الأسماء الجديدة للمكوّنات (components.css)،
   والأسماء القديمة (--brand-600، --surface…) تُعاد تعيينها كي تأخذ كل الشاشات الحالية الهوية نفسها بتباين مُصلح (≥ 4.5:1). */
html[data-ui="c"] {
  --font-c: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  /* الألوان — الفاتح */
  --bg: #f5f4f0; --surface: #ffffff; --sunk: #f1efea; --line: #e8e5de; --line2: #f0eee9; --ink: #12131a; --ink2: #3a3d4a; --muted: #6b6f80;
  --brand: #9a6410; --brand-ink: #8a560c; --brand-tint: #fdf6ea; --brand-line: #f0d09b; --on-brand: #ffffff;
  --hero: linear-gradient(135deg, #9a6410 0%, #7a4c0b 100%); --hero-ink: #ffffff; --hero-mut: #fbeedd;
  --ok: #067647; --ok-bg: #ecfdf3; --warn: #93600a; --warn-bg: #fff6e0; --bad: #b42318; --bad-bg: #fef3f2;
  --info: #175cd3; --info-bg: #e8f0fe; --pur: #6941c6; --pur-bg: #f4ebff; --orange: #b54708; --orange-bg: #fff0e3; --urgent: #b54708;
  --sh: 0 1px 2px rgba(18, 19, 26, .05), 0 10px 30px -14px rgba(18, 19, 26, .18);
  --sh-lg: 0 30px 80px -20px rgba(0, 0, 0, .45); --sh-brand: 0 12px 30px -10px rgba(154, 100, 16, .6); --scrim: rgba(18, 19, 26, .3);
  /* سلّم الخط — 6 أحجام فقط */
  --fs-1: 34px; --fs-2: 26px; --fs-3: 20px; --fs-4: 17px; --fs-5: 15px; --fs-6: 13px;
  /* المسافات (4pt) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-7: 32px;
  /* الزوايا والأحجام */
  --r-tile: 16px; --r-card: 24px; --r-sheet: 30px; --r-pill: 999px; --btn-h: 52px; --btn-h-sm: 44px; --tap: 44px; --row-h: 48px;
  --dock-w: 92px; --dock-gap: 20px; --tabbar-h: 88px;
  /* الحركة */
  --ease: cubic-bezier(.2, .8, .2, 1); --t-sheet: 280ms; --t-stack: 180ms; --t-fast: 160ms;
  /* الأسماء القديمة ← درجات C (يأخذها كل ما في app.css) */
  --brand-50: #fdf6ea; --brand-100: #f9e9cc; --brand-200: #f0d09b; --brand-300: #e2b169; --brand-500: #9a6410; --brand-600: #9a6410; --brand-700: #8a560c;
  --accent: #8a560c; --accent-bg: #fdf6ea; --ink-2: #3a3d4a; --faint: #6b6f80; --line-2: #f0eee9; --surface-2: #faf9f6; --gray-bg: #f1efea;
  --radius: 16px; --radius-sm: 12px; --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(18, 19, 26, .05); --shadow: var(--sh); --shadow-lg: 0 30px 80px -20px rgba(18, 19, 26, .35);
  --font: var(--font-c);
}
/* الواجهة الإنجليزية: Readex Pro بمقاييس موزونة للحروف اللاتينية (fonts.css ← 'Readex Pro EN') فيبقى النص الإنجليزي في منتصف
   أزراره؛ الحروف العربية تأتي من 'Readex Pro' ذي المقاييس الموزونة للعربية. */
html[data-ui="c"][lang="en"] { --font-c: 'Readex Pro EN', 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif; }
/* الداكن — قيم مضبوطة يدوياً (لا يحوّلها dark-css.js) */
html.dark[data-ui="c"] {
  --bg: #161718; --surface: #222326; --sunk: #1c1d1f; --line: #2f3136; --line2: #2a2c30; --ink: #d9e1f1; --ink2: #b5bdd0; --muted: #8c93a6;
  --brand: #b28f5f; --brand-ink: #c9a878; --brand-tint: #2b251c; --brand-line: #5a482b; --on-brand: #1a1b1c;
  --hero: #2b251c; --hero-ink: #f0e6d6; --hero-mut: #c2b49c;
  --ok: #4aa58a; --ok-bg: #1d2825; --warn: #c9a26a; --warn-bg: #272216; --bad: #e88d95; --bad-bg: #2f2527;
  --info: #76a2ff; --info-bg: #222833; --pur: #b9a2f0; --pur-bg: #28233a; --orange: #e0a37a; --orange-bg: #2c241e; --urgent: #e0a37a;
  --sh: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6); --sh-lg: 0 30px 80px -20px rgba(0, 0, 0, .7); --sh-brand: 0 12px 30px -10px rgba(0, 0, 0, .6); --scrim: rgba(0, 0, 0, .55);
  --brand-50: #2b251c; --brand-100: #342b1c; --brand-200: #5a482b; --brand-300: #71552d; --brand-500: #b28f5f; --brand-600: #b28f5f; --brand-700: #c9a878;
  --accent: #c9a878; --accent-bg: #2b251c; --ink-2: #b5bdd0; --faint: #8c93a6; --line-2: #2a2c30; --surface-2: #1c1d1f; --gray-bg: #1c1d1f;
  --shadow: var(--sh); --shadow-lg: var(--sh-lg);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14.5px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.num { white-space: nowrap; }
/* الأرقام في الجداول تُحاذى مع العناوين (يمين في العربية، يسار في الإنجليزية) */
[dir=rtl] .table .num { text-align: right; }
[dir=ltr] .table .num { text-align: left; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; font-weight: 500; text-align: -webkit-match-parent; text-align: match-parent; }
[hidden] { display: none !important; }
::selection { background: var(--brand-200); }

/* ── Layout ── */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: #fff; color: var(--ink-2); position: fixed; inset-block: 0; inset-inline-start: 0;
  display: flex; flex-direction: column; z-index: 40; transition: transform .25s ease; border-inline-end: 1px solid var(--line);
}
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line-2); }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 500; margin-bottom: 2px; text-decoration: none; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.nav a.active svg { color: var(--brand-600); }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.nav .count { margin-inline-start: auto; background: var(--warn-bg); color: var(--warn); border: 1px solid #f5dfa6; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; min-width: 20px; text-align: center; line-height: 18px; }

.main { flex: 1; margin-inline-start: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 30; }
.topbar h1 { font-size: 18px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-tile { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex-shrink: 0; }
.title-tile svg { width: 19px; height: 19px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; position: relative; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); border-color: #d7d9e5; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: -4px; inset-inline-end: -4px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.menu-toggle { display: none; }
#main:focus { outline: none; }
.content { padding: 26px 28px; max-width: 1480px; width: 100%; margin: 0 auto; }
.backdrop { display: none; }

/* ── Page header ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; letter-spacing: -.2px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Cards & grid ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 15.5px; display: flex; align-items: center; gap: 10px; }
.card-head h3 .hic { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex-shrink: 0; }
.card-head h3 .hic svg { width: 16px; height: 16px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mb-1 { margin-bottom: 6px; } .mb-3 { margin-bottom: 18px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .bold { font-weight: 700; }
.ok-text { color: var(--ok); } .bad-text { color: var(--bad); } .warn-text { color: var(--warn); }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }

/* Stat cards — بطاقة بيضاء بحد علوي ملوّن وأيقونة في الزاوية (على نمط لوحات SaaS) */
.stat { padding: 18px 20px 20px; display: flex; gap: 14px; align-items: flex-start; border-top: 3px solid var(--line); }
.stat > div:not(.ic) { flex: 1; min-width: 0; }
.stat .ic { order: 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.stat .ic svg { width: 20px; height: 20px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .value { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 8px; font-family: var(--mono); letter-spacing: -.5px; color: var(--ink); }
.stat .value small { font-size: 14px; color: var(--muted); font-weight: 500; font-family: var(--font); letter-spacing: 0; }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
a.stat { color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
a.stat:hover { box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.tone-brand { border-top-color: var(--brand-500); } .tone-brand .ic { background: var(--brand-50); color: var(--brand-600); }
.tone-ok { border-top-color: #16a34a; } .tone-ok .ic { background: var(--ok-bg); color: var(--ok); }
.tone-warn { border-top-color: #e5a50a; } .tone-warn .ic { background: var(--warn-bg); color: var(--warn); }
.tone-bad { border-top-color: #e04848; } .tone-bad .ic { background: var(--bad-bg); color: var(--bad); }
.tone-info { border-top-color: #3b82f6; } .tone-info .ic { background: var(--info-bg); color: var(--info); }
.tone-gray { border-top-color: #a0a4b8; } .tone-gray .ic { background: var(--gray-bg); color: var(--ink-2); }
/* شريط ملخص: بطاقة واحدة مقسّمة لخلايا */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.strip > * { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-inline-start: 1px solid var(--line); color: inherit; text-decoration: none !important; }
.strip > *:first-child { border-inline-start: 0; }
.strip > a:hover { background: #fff; }
.strip .ic { order: 2; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; margin-inline-start: auto; }
.strip .ic svg { width: 21px; height: 21px; }
.strip .label { font-size: 12.5px; color: var(--muted); }
.strip .value { font-size: 21px; font-weight: 700; font-family: var(--mono); margin-top: 2px; }
.strip .value small { font-size: 13px; color: var(--muted); font-family: var(--font); font-weight: 500; }
.strip .tone-brand, .strip .tone-ok, .strip .tone-warn, .strip .tone-bad, .strip .tone-info, .strip .tone-gray { border-top: 0; }
.tone-ok .value.colored { color: var(--ok); } .tone-warn .value.colored { color: var(--warn); } .tone-bad .value.colored { color: var(--bad); } .tone-info .value.colored { color: var(--info); } .tone-brand .value.colored { color: var(--brand-600); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); border-color: #d2d4e2; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible, .icon-btn:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 1px; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 1px 2px rgba(168,105,15,.3); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #bf2f2f; border-color: #bf2f2f; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #0c7f4f; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--gray-bg); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn.loading::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-block { width: 100%; }

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .req { color: var(--bad); }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #d9dbe6; border-radius: 9px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.input-sm { height: 34px; font-size: 13px; }
input[type=date].input, input[type=time].input, input[type=month].input { direction: ltr; text-align: end; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-600); margin-top: 2px; flex-shrink: 0; }
.check small { display: block; color: var(--muted); font-weight: 400; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd1dd; border-radius: 22px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; inset-inline-start: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand-600); }
.switch input:checked + span::before { transform: translateX(-18px); }
[dir=ltr] .switch input:checked + span::before { transform: translateX(18px); }

/* ── Toolbar / filters ── */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.toolbar .search .input { padding-inline-start: 36px; height: 36px; }
.toolbar select.input { width: auto; min-width: 140px; height: 36px; }
.toolbar input[type=date].input { width: auto; height: 36px; }

/* ── Tabs / segmented ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; display: flex; align-items: center; gap: 7px; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--brand-600); border-bottom-color: var(--brand-600); }
.tabs .count { background: var(--warn-bg); color: var(--warn); font-size: 11px; border-radius: 99px; padding: 0 7px; font-weight: 700; }
.seg { display: inline-flex; background: var(--gray-bg); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: start; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #fffcf6; }
.table tr.clickable { cursor: pointer; }
.table .actions { text-align: end; white-space: nowrap; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person > div > b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person > div > span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.table td .avatar:not(.lg) { width: 42px; height: 42px; font-size: 15px; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-bg); color: var(--ink-2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.b-new { background: #eef2ff; color: #4338ca; }
.b-in_progress { background: var(--info-bg); color: var(--info); }
.b-in_review { background: var(--warn-bg); color: var(--warn); }
.b-changes_requested { background: var(--orange-bg); color: var(--orange); }
.b-completed, .b-approved, .b-issued, .b-ok { background: var(--ok-bg); color: var(--ok); }
.b-postponed, .b-cancelled, .b-draft, .b-gray { background: var(--gray-bg); color: #5c6070; }
.b-pending, .b-warn { background: var(--warn-bg); color: var(--warn); }
.b-rejected, .b-bad { background: var(--bad-bg); color: var(--bad); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-brand { background: var(--brand-50); color: var(--brand-600); }
.b-legal { background: var(--accent-bg); color: var(--accent); }
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.prio i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.prio-low i { background: #a0a4b8; } .prio-medium i { background: var(--info); } .prio-high i { background: var(--orange); } .prio-urgent i { background: var(--bad); }
.prio-urgent { color: var(--bad); }

/* ── Alerts ── */
.alert { display: flex; gap: 12px; padding: 13px 16px; border-radius: 10px; border: 1px solid; font-size: 13.5px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.alert b { display: block; margin-bottom: 2px; }
.alert-info { background: var(--info-bg); border-color: #c9dafb; color: #1e40af; }
.alert-warn { background: var(--warn-bg); border-color: #f5dfa6; color: #7c5410; }
.alert-bad { background: var(--bad-bg); border-color: #f7c5c5; color: #9b2222; }
.alert-ok { background: var(--ok-bg); border-color: #b9e8d0; color: #0b6b44; }
.alert-legal { background: var(--accent-bg); border-color: #efdcae; color: #6b4206; border-inline-start: 3px solid var(--accent); }
.alert ul { margin: 4px 0 0; padding-inline-start: 18px; }

/* ── Attendance hero ── */
.hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #fff 0%, #fff 55%, var(--brand-50) 100%); color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--brand-500); }
.hero::after { content: ''; position: absolute; inset-inline-end: -70px; top: -90px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(176,122,42,.12), transparent 70%); }
.hero .card-body { position: relative; z-index: 1; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 22px 24px; }
.hero h2 { font-size: 20px; }
.hero .muted { color: var(--muted); }
.clock { font-family: var(--mono); font-size: 36px; font-weight: 600; letter-spacing: 1px; direction: ltr; color: var(--brand-900); }
.hero .btn-light { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.hero .btn-light:hover { background: var(--brand-700); }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--ok-bg); color: #0b6b44; border: 1px solid #b9e8d0; }
.pill.neutral { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.pill .led { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.pill.off { background: var(--bad-bg); color: #9b2222; border-color: #f7c5c5; }
.pill.off .led { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2); }

/* ── Lists ── */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.list .meta { font-size: 12.5px; color: var(--muted); }
.list a.title { color: var(--ink); }
.list-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--gray-bg); color: var(--ink-2); }
.list-ic svg { width: 17px; height: 17px; }
.unread { background: #f8f8ff; }
.unread .title::after { content: ''; display: inline-block; width: 7px; height: 7px; background: var(--brand-500); border-radius: 50%; margin-inline-start: 8px; vertical-align: middle; }

/* ── Progress / meter ── */
.meter { height: 8px; background: var(--gray-bg); border-radius: 8px; overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; }
.meter .used { background: var(--brand-500); } .meter .future { background: var(--brand-200); } .meter .late { background: var(--orange); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-inline-end: 5px; vertical-align: middle; }
.balance-num { font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: -1px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.kv dd.mono { text-align: start; unicode-bidi: plaintext; }

/* Bars (mini chart) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; height: 100%; min-width: 0; }
.bars .b i { width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: var(--brand-500); display: block; }
.bars .b i.late { background: var(--orange); border-radius: 0; }
.bars .b span { font-size: 10.5px; color: var(--faint); font-family: var(--mono); }

/* ── Task detail ── */
.task-desc { white-space: pre-wrap; line-height: 1.8; color: var(--ink-2); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .bubble { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px 12px 12px 12px; padding: 10px 14px; white-space: pre-wrap; margin-top: 4px; }
.timeline .admin .bubble { background: var(--brand-50); border-color: var(--brand-100); }
.timeline .sys { color: var(--muted); font-size: 12.5px; align-items: center; }
.timeline .sys svg { width: 14px; height: 14px; }
.file-list { display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.file .ext { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; font-family: var(--mono); text-transform: uppercase; flex-shrink: 0; }
.ext-img { background: #e9f7ef; color: #13804f; } .ext-vid { background: #fdecec; color: #c02c2c; } .ext-pdf { background: #fff0e3; color: #c35a0b; }
.ext-ai { background: #fff4e0; color: #9a5b00; } .ext-psd { background: #e5f1ff; color: #1d5fbf; } .ext-doc { background: #eef0ff; color: #4c46c4; } .ext-other { background: var(--gray-bg); color: var(--ink-2); }
.file .info { flex: 1; min-width: 0; }
.file .info b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.file .info span { font-size: 12px; color: var(--muted); }
.dropzone { display: block; border: 2px dashed #d3d5e3; border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; background: var(--surface-2); }
.dropzone:hover, .dropzone.over { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.dropzone svg { display: block; width: 28px; height: 28px; margin: 0 auto 6px; }
.progress { height: 6px; background: var(--gray-bg); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--brand-500); width: 0; transition: width .2s; }

/* Kanban-like status columns */
.task-card { display: block; padding: 15px 18px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none !important; transition: background .1s; }
.task-card:hover { background: #fffcf6; }
.task-card:last-child { border-bottom: 0; }
.task-card .t { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.task-card .m { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.task-card .m span { display: inline-flex; align-items: center; gap: 4px; }
.task-card .m svg { width: 14px; height: 14px; }
.overdue { color: var(--bad) !important; font-weight: 600; }

/* لوحة المهام حسب التصنيف (خانات) */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); border-top: 3px solid var(--c, #94a3b8); border-radius: var(--radius) var(--radius) 0 0; background: #fff; }
.kcol-head b { flex: 1; font-size: 14px; }
.kcol-head .n { font-family: var(--mono); font-size: 12px; background: var(--gray-bg); border-radius: 99px; padding: 0 8px; color: var(--muted); }
.kcol-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.kcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; color: inherit; text-decoration: none !important; transition: box-shadow .15s, border-color .15s; }
.kcard:hover { box-shadow: var(--shadow); border-color: var(--brand-200); }
.kcard .t { font-weight: 600; font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.kcard .m { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.kcard .m svg { width: 13px; height: 13px; vertical-align: -2px; }
.kempty { text-align: center; color: var(--faint); font-size: 12.5px; padding: 18px 0; }
.cat-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 25%, #fff); }

/* ── Modal ── */
.modal-root { position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(18, 19, 35, .48); backdrop-filter: blur(2px); overflow-y: auto; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; animation: pop .18s ease; display: flex; flex-direction: column; max-height: none; }
.modal.lg { max-width: 820px; } .modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { flex: 1; font-size: 16.5px; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); flex-wrap: wrap; }
.confirm-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px; }
.confirm-ic svg { width: 22px; height: 22px; }

/* ── Toasts ── */
.toasts { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 500; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 11px; align-items: flex-start; background: #1b1c29; color: #f1f2fb; padding: 13px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); animation: slide .2s ease; font-size: 13.5px; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.toast.ok svg { color: #4ade80; } .toast.bad svg { color: #f87171; } .toast.warn svg { color: #fbbf24; } .toast.info svg { color: #a3a8fb; }
.toast b { display: block; }
.toast .x { margin-inline-start: auto; background: none; border: 0; color: #9a9cb5; cursor: pointer; padding: 0 0 0 4px; font-size: 18px; line-height: 1; }
.toast.hide { animation: fadeout .25s ease forwards; }

/* ── Dropdown (notifications) ── */
.dropdown { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 380px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; animation: pop .15s ease; }
.dropdown .list { max-height: 420px; overflow-y: auto; }
.dropdown .list li { padding: 12px 16px; cursor: pointer; }
.dropdown .list li:hover { background: var(--surface-2); }
.dropdown-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.dropdown-foot { padding: 10px; text-align: center; border-top: 1px solid var(--line-2); }

/* ── States ── */
.state { text-align: center; padding: 48px 20px; color: var(--muted); }
.state .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--gray-bg); display: grid; place-items: center; margin: 0 auto 14px; color: var(--faint); }
.state .ic svg { width: 26px; height: 26px; }
.state h4 { color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.state.error .ic { background: var(--bad-bg); color: var(--bad); }
.state .btn { margin-top: 14px; }
.skeleton { background: linear-gradient(90deg, #eceef4 0%, #f6f7fb 50%, #eceef4 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
.sk-card { height: 104px; }
.loader { display: flex; justify-content: center; padding: 40px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--brand-100); border-top-color: var(--brand-500); border-radius: 50%; animation: spin .8s linear infinite; }

/* ── Salary slip ── */
.slip { max-width: 760px; margin: 0 auto; }
.slip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.slip table { width: 100%; border-collapse: collapse; }
.slip td { padding: 10px 26px; border-bottom: 1px solid var(--line-2); }
.slip td:last-child { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slip .total td { font-weight: 700; font-size: 17px; background: var(--brand-50); color: var(--brand-900); border-bottom: 0; }
.slip .sect td { background: var(--surface-2); font-weight: 700; font-size: 12px; color: var(--muted); }

/* ── Login ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 45%, #fbefe0 0%, #fdf8f1 30%, #fff 60%); }
.login-box { width: 100%; max-width: 440px; text-align: center; }
.login-logo { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--brand-600); }
.login-box h1 { font-size: 28px; letter-spacing: -.5px; font-weight: 800; }
.login-box > p { color: var(--muted); margin-top: 6px; }
.login form { margin-top: 36px; text-align: start; display: flex; flex-direction: column; gap: 18px; }
.login label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 3px; color: var(--brand-600); margin-bottom: 8px; text-transform: uppercase; }
.login .input { height: 52px; border-radius: 12px; background: rgba(240,234,227,.7); border-color: #e2dbd2; font-size: 15px; }
.login .input:focus { background: #fff; }
.login .btn-signin { height: 58px; border-radius: 99px; border: 0; background: var(--brand-600); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; box-shadow: 0 2px 6px rgba(168,105,15,.22); }
.login .btn-signin:hover { background: var(--brand-700); }
.login .btn-signin.loading { opacity: .7; pointer-events: none; }
.login .lang-switch { position: fixed; top: 18px; inset-inline-end: 18px; }

/* ── Misc ── */
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--gray-bg); border-radius: 7px; padding: 3px 9px; font-size: 12.5px; font-family: var(--mono); }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0; font-size: 15px; line-height: 1; }
.code { font-family: var(--mono); background: var(--gray-bg); padding: 2px 7px; border-radius: 6px; font-size: 12.5px; direction: ltr; display: inline-block; }
.pw-box { font-family: var(--mono); font-size: 20px; text-align: center; background: var(--brand-50); border: 1px dashed var(--brand-300); padding: 16px; border-radius: 12px; direction: ltr; letter-spacing: 1px; user-select: all; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 16px); }
.settings-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
.settings-nav a:hover { background: var(--gray-bg); }
.settings-section { scroll-margin-top: calc(var(--topbar-h) + 16px); }
@media print {
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes slide { from { opacity: 0; transform: translateY(12px); } }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > *:nth-child(3) { border-inline-start: 0; }
  .strip > *:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(100%); box-shadow: var(--shadow-lg); }
  [dir=ltr] .sidebar { transform: translateX(-100%); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(18,19,35,.45); z-index: 35; }
  .main { margin-inline-start: 0; }
  .menu-toggle { display: grid; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .topbar { padding: 0 14px; }
  .g-2, .g-3, .g-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .strip > * { border-inline-start: 0 !important; border-top: 1px solid var(--line); }
  .strip > *:first-child { border-top: 0; }
  .title-tile { display: none; }
  .page-head h2 { font-size: 19px; }
  .stat .value { font-size: 22px; }
  .clock { font-size: 30px; }
  .hero .card-body { padding: 20px; }
  .modal-root { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94vh; overflow-y: auto; }
  .modal-foot { border-radius: 0; position: sticky; bottom: 0; }
  .modal-foot .btn { flex: 1; }
  .toolbar .search { max-width: none; min-width: 100%; }
  .toolbar select.input, .toolbar input[type=date].input { flex: 1; }
  .table th, .table td { padding: 10px 12px; }
  .hide-sm { display: none !important; }
  .toasts { inset-inline: 12px; bottom: 12px; max-width: none; }
}

/* ── التقويم ── */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ev { display: block; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 85%, #000); border-inline-start: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; }
.ev.pending { background: repeating-linear-gradient(-45deg, #fff, #fff 4px, color-mix(in srgb, var(--c) 10%, #fff) 4px, color-mix(in srgb, var(--c) 10%, #fff) 8px); }
.ev.draft { opacity: .5; border-inline-start-style: dashed; }

/* قوائم الاختيار: سهم مخصّص أنيق بدلاً من سهم المتصفح */
select.input {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a9db0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 16px 16px;
}
[dir=rtl] select.input { background-position: left 12px center; padding-left: 36px; padding-right: 12px; }
[dir=ltr] select.input { background-position: right 12px center; padding-right: 36px; padding-left: 12px; }
select.input:hover { border-color: #c9ccdb; }
select.input:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a8690f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

/* ── منتقي التاريخ والوقت ── */
.picker { position: relative; display: inline-block; width: 100%; min-width: 150px; }
.toolbar .picker { width: auto; }
.picker-native { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; caret-color: transparent; }
.picker-face { display: flex !important; align-items: center; gap: 9px; cursor: pointer; user-select: none; white-space: nowrap; overflow: hidden; }
.picker.sm .picker-face { height: 34px; font-size: 13px; }
.toolbar .picker-face { height: 36px; }
.picker-ic { display: grid; place-items: center; color: var(--brand-600); flex-shrink: 0; }
.picker-ic svg { width: 17px; height: 17px; }
.picker-text { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.picker-text.ph { color: var(--faint); font-weight: 400; }
.picker:hover .picker-face { border-color: #c9ccdb; }
.picker.open .picker-face, .picker-native:focus-visible + .picker-face { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.picker-face.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.dp-pop { position: absolute; z-index: 9600; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 48px rgba(18,19,35,.16), 0 2px 6px rgba(18,19,35,.06); padding: 12px; animation: pop .14s ease; width: 300px; max-width: calc(100vw - 16px); }
.dp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dp-title { flex: 1; border: 0; background: none; font-weight: 700; font-size: 14.5px; padding: 7px; border-radius: 8px; cursor: pointer; color: var(--ink); text-align: center; }
.dp-title:hover { background: var(--brand-50); color: var(--brand-700); }
.dp-title.static { cursor: default; }
.dp-title.static:hover { background: none; color: var(--ink); }
.dp-nav { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.dp-nav:hover { border-color: var(--brand-300); color: var(--brand-600); }
.dp-nav svg { width: 16px; height: 16px; }
[dir=rtl] .dp-nav svg { transform: scaleX(-1); }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.dp-week span { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.dp-week .fri { color: var(--bad); }
.dp-d { height: 36px; border: 0; background: none; border-radius: 9px; font-weight: 500; font-size: 13.5px; cursor: pointer; color: var(--ink); font-variant-numeric: tabular-nums; }
.dp-d:hover:not(:disabled) { background: var(--brand-50); color: var(--brand-700); }
.dp-d.fri { color: #c55; }
.dp-d.today { box-shadow: inset 0 0 0 1.5px var(--brand-300); font-weight: 700; }
.dp-d.sel { background: var(--brand-600); color: #fff; font-weight: 700; box-shadow: 0 3px 10px rgba(168,105,15,.3); }
.dp-d:disabled { color: #cfd1db; cursor: not-allowed; }
.dp-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dp-m { height: 44px; border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.dp-m:hover { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-700); }
.dp-m.sel { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.dp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.dp-link { border: 0; background: none; color: var(--brand-600); font-weight: 700; font-size: 13px; cursor: pointer; padding: 5px 8px; border-radius: 7px; }
.dp-link:hover { background: var(--brand-50); }
.dp-link.muted { color: var(--muted); }
.dp-link:disabled { opacity: .4; cursor: not-allowed; }
.tp-pop { width: 290px; }
.tp-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 10px; direction: ltr; }
.tp-chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 4px 0; font-size: 12px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tp-chip:hover, .tp-chip.sel { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.tp-cols { display: flex; align-items: stretch; gap: 6px; }
.tp-col { position: relative; flex: 1; height: 190px; overflow-y: auto; scroll-padding: 6px; display: flex; flex-direction: column; gap: 3px; padding: 2px; scrollbar-width: thin; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); }
.tp-col button { flex-shrink: 0; height: 34px; border: 0; background: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tp-col button:hover { background: #fff; color: var(--brand-700); }
.tp-col button.sel { background: var(--brand-600); color: #fff; }
.tp-sep { display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--muted); }
.tp-preview { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .5px; direction: ltr; }

/* عناصر فرعية في القائمة الجانبية (الشركات) */
.nav a.sub { padding-block: 6px; padding-inline-start: 40px; font-size: 13px; color: var(--muted); }
.nav a.sub.active { color: var(--brand-700); }

/* الشعار */
.login-logo { width: 84px; height: 84px; object-fit: contain; }
.slip-logo { height: 54px; width: auto; display: block; margin-bottom: 4px; }

/* تشخيص شبكة المكتب */
.net-diag { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; background: var(--surface-2); }
.net-diag.ok { border-color: #b9e8d0; background: var(--ok-bg); }
.net-diag.off { border-color: #f5dfa6; background: var(--warn-bg); }
.net-diag .table td { padding: 7px 10px; background: #fff; }

/* ── لوحة عمل التصاميم (Artboard) ── */
.ab { direction: ltr; display: grid; grid-template-columns: minmax(0, 1fr) 280px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; margin-bottom: 16px; }
/* الوصف دائماً على يمين لوحة العمل */
.ab-side { border-inline-start: 0 !important; border-left: 1px solid var(--line); }
[dir=rtl] .ab-side { direction: rtl; }
.ab:fullscreen { border-radius: 0; height: 100vh; }
.ab-host { min-width: 0; }
.ab-canvas { position: relative; height: 520px; overflow: hidden; cursor: grab; touch-action: none; user-select: none; outline: none;
  background-color: #f0f0f3; background-image: radial-gradient(circle, #d4d5dc 1px, transparent 1.2px); background-size: var(--grid, 24px) var(--grid, 24px); }
.ab:fullscreen .ab-canvas { height: 100vh; }
.ab-canvas.grabbing { cursor: grabbing; }
.ab-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.ab-frame { position: absolute; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 18px 50px rgba(0,0,0,.10); }
.ab-frame img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ab-name { position: absolute; left: 0; bottom: 100%; padding-bottom: 14px; display: flex; gap: 14px; align-items: baseline; white-space: nowrap; font: 600 30px/1 var(--font); color: #5b5d6b; }
.ab-name em { font-style: normal; font-weight: 500; font-size: 24px; color: #9a9db0; }
.ab-broken { display: grid; place-items: center; height: 100%; font-size: 80px; color: var(--faint); }
.ab-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.ab-loading svg { width: 28px; height: 28px; animation: spin 1s linear infinite; }
.ab-tools { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; background: #1f2029; color: #fff; border-radius: 12px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.ab-tools button { border: 0; background: none; color: #fff; min-width: 34px; height: 32px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 15px; display: grid; place-items: center; padding: 0 8px; }
.ab-tools button:hover { background: rgba(255,255,255,.12); }
.ab-tools button svg { width: 16px; height: 16px; }
.ab-pct { font-size: 12.5px !important; font-variant-numeric: tabular-nums; min-width: 58px !important; }
.ab-sep { width: 1px; height: 20px; background: rgba(255,255,255,.2); margin: 0 4px; }
.ab-hint { position: absolute; top: 10px; left: 12px; font-size: 11.5px; color: #8a8c9a; background: rgba(255,255,255,.75); padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.ab-side { border-inline-start: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 520px; background: #fff; }
.ab:fullscreen .ab-side { max-height: 100vh; }
.ab-title { font-size: 16px; }
.ab-label { font-size: 11.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brand-600); }
.ab-desc { white-space: pre-wrap; line-height: 1.75; font-size: 14px; color: var(--ink-2); flex: 1; }
.ab-meta { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); padding-top: 10px; }
.ab-files summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.ab-files summary svg { width: 14px; height: 14px; }
.ab-files a { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); direction: ltr; }
.ab-files a span { color: var(--muted); flex-shrink: 0; }
/* نافذة رفع التصاميم */
.modal.xl { max-width: 1040px; }
.du { direction: ltr; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
[dir=rtl] .du-side, [dir=rtl] .du-main { direction: rtl; }
.du-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; max-height: 360px; overflow-y: auto; }
.du-item { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f0f0f3; }
.du-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.du-item span { display: block; font-size: 11px; padding: 5px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; direction: ltr; }
.du-item button { position: absolute; top: 5px; inset-inline-end: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.du-side .field label { text-transform: none; }
@media (max-width: 900px) {
  .ab, [dir=rtl] .ab { grid-template-columns: minmax(0, 1fr); }
  .ab-side { border-left: 0 !important; border-top: 1px solid var(--line); max-height: none; }
  .ab-canvas { height: 420px; }
  .du { grid-template-columns: minmax(0, 1fr); }
  .ab-hint { display: none; }
}

/* ── العارض الكامل للتصاميم (داخل النظام وصفحة المشاركة) ── */
.dv-layer { position: fixed; inset: 0; z-index: 150; background: #fff; animation: fade .15s ease; }
.dv-layer.static { position: fixed; }
.dv-page { margin: 0; overflow: hidden; background: #f0f0f3; }
.dv { display: flex; flex-direction: column; height: 100%; height: 100dvh; font-family: var(--font); }
.dv-top { height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 0 16px; background: #1e1f26; color: #fff; }
.dv-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dv-brand img { width: 30px; height: 30px; }
.dv-brand b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.dv-brand span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #a6a8b8; }
.dv-brand span i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.dv-actions { display: flex; align-items: center; gap: 8px; }
.dv-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; font: 600 13px var(--font); cursor: pointer; }
.dv-btn svg { width: 16px; height: 16px; }
.dv-btn:hover { background: rgba(255,255,255,.12); }
.dv-btn.on { background: #fff; color: #1e1f26; }
.dv-btn.primary { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.dv-btn.primary:hover { background: var(--brand-600); }
.dv-btn.sm { height: 30px; padding: 0 12px; }
.dv-btn:disabled { opacity: .6; }
.dv-icon { width: 34px; height: 34px; border-radius: 9px; border: 0; background: none; color: #c8cad6; cursor: pointer; display: grid; place-items: center; }
.dv-icon:hover { background: rgba(255,255,255,.1); color: #fff; }
.dv-icon svg { width: 18px; height: 18px; }
.dv-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.dv-canvas { min-width: 0; min-height: 0; position: relative; }
.dv-canvas .ab-canvas { height: 100%; border-radius: 0; }
.dv-side { border-left: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; min-height: 0; }
.dv-tabs { display: flex; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.dv-tabs button { flex: 1; border: 0; background: none; padding: 13px; font: 600 13px var(--font); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.dv-tabs button.active { color: var(--ink); border-bottom-color: var(--brand-500); }
.dv-tabs em { font-style: normal; font-size: 11px; background: var(--brand-50); color: var(--brand-700); border-radius: 99px; padding: 0 7px; min-width: 18px; }
.dv-panel { flex: 1; overflow-y: auto; padding: 18px; }
.dv-k { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand-600); margin: 14px 0 6px; }
.dv-k:first-child { margin-top: 0; }
.dv-v { font-size: 14px; font-weight: 600; }
.dv-desc { white-space: pre-wrap; line-height: 1.75; font-size: 14px; color: var(--ink-2); }
.dv-muted, .dv-empty { color: var(--faint); font-size: 13px; }
.dv-empty { text-align: center; padding: 30px 0; }
.dv-meta { font-size: 12px; color: var(--muted); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.dv-files a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.dv-files a:hover { border-color: var(--brand-200); background: var(--brand-50); }
.dv-files a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-files a em { font-style: normal; color: var(--muted); flex-shrink: 0; }
.dv-ctools { display: flex; justify-content: flex-end; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.dv-ctools label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.dv-c { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dv-c:hover { border-color: var(--line); box-shadow: var(--shadow-sm); }
.dv-c.active { border-color: var(--brand-400, var(--brand-300)); box-shadow: 0 0 0 3px var(--brand-100); }
.dv-c.resolved { opacity: .55; }
.dv-c-head { display: flex; align-items: center; gap: 10px; }
.dv-c-head b { display: block; font-size: 13px; }
.dv-c-head span { font-size: 11.5px; color: var(--muted); }
.dv-c-head div { flex: 1; min-width: 0; }
.dv-av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-500); color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; flex-shrink: 0; }
.dv-av.guest { background: #6366f1; }
.dv-num { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.dv-c-body { margin-top: 8px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; color: var(--ink-2); }
.dv-c-actions { display: flex; gap: 12px; margin-top: 8px; }
.dv-c-actions button { border: 0; background: none; padding: 0; font: 600 12px var(--font); color: var(--brand-600); cursor: pointer; }
.dv-c-actions button[data-remove] { color: var(--muted); }
.dv-tip { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.dv-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); background: #fff; font-family: var(--font); }
.dv-loading img { width: 40px; height: 40px; }
.dv-loading b { color: var(--ink); font-size: 16px; }
/* علامات التعليق العائمة */
.ab-pins { position: absolute; inset: 0; pointer-events: none; }
.ab-pin { position: absolute; pointer-events: auto; width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(0, -100%) scale(var(--inv, 1)); transform-origin: 0 100%; }
.ab-pin span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50% 50% 50% 0; background: var(--brand-500); color: #fff; font: 700 13px var(--font); border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.ab-pin.guest span { background: #6366f1; }
.ab-pin.resolved span { background: #9a9db0; }
.ab-pin.active span { transform: scale(1.18); box-shadow: 0 0 0 4px rgba(192,125,28,.35), 0 4px 12px rgba(0,0,0,.25); }
.ab-canvas.commenting { cursor: crosshair; }
.ab-canvas.commenting.grabbing { cursor: grabbing; }
.ab-canvas.tall { height: 100%; }
.ab-pop { user-select: text; -webkit-user-select: text; position: absolute; z-index: 5; width: 280px; background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.22); display: flex; flex-direction: column; gap: 8px; font-family: var(--font); cursor: default; }
.dv-in { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 13.5px var(--font); resize: vertical; outline: none; }
.dv-in:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.ab-pop-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.dv-link { border: 0; background: none; color: var(--muted); font: 600 12.5px var(--font); cursor: pointer; }
/* نافذة المشاركة */
@media (max-width: 900px) {
  .dv-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 42%; }
  .dv-side { border-left: 0; border-top: 1px solid var(--line); }
  .dv-btn span { display: none; }
  .dv-btn { padding: 0 10px; }
}

/* بطاقات الملفات غير المصوّرة على لوحة العمل */
.ab-filecard { background: linear-gradient(160deg, #fff, #f6f4f0); }
.ab-fc { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 60px; text-align: center; }
.ab-fc-ext { width: 260px; height: 300px; border-radius: 28px; background: var(--brand-500); color: #fff; display: grid; place-items: center; font: 800 76px var(--mono); letter-spacing: 2px; box-shadow: 0 24px 60px rgba(168,105,15,.3); }
.ab-fc-name { font: 600 40px/1.3 var(--font); color: var(--ink); word-break: break-all; max-width: 100%; }
.ab-fc-size { font: 500 30px var(--font); color: var(--muted); }
.ab-fc-dl { pointer-events: auto; font: 700 30px var(--font); color: #fff; background: #1e1f26; padding: 18px 44px; border-radius: 18px; text-decoration: none !important; }
.du-file { aspect-ratio: 1; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); font: 800 22px var(--mono); }
.artboard-check { border: 1px dashed var(--brand-200); background: var(--brand-50); border-radius: 10px; padding: 10px 12px; }
.artboard-off .list-ic { background: var(--brand-50); color: var(--brand-600); }
/* قائمة لوحات الشركة */
.abl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.abl-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; text-align: start; padding: 0; font: inherit; color: inherit; }
.abl-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand-200); }
.abl-cover { aspect-ratio: 16 / 10; background-color: #f0f0f3; background-image: radial-gradient(circle, #d4d5dc 1px, transparent 1.2px); background-size: 14px 14px; display: grid; place-items: center; overflow: hidden; }
.abl-cover img { max-width: 78%; max-height: 82%; object-fit: contain; box-shadow: 0 6px 20px rgba(0,0,0,.12); background: #fff; }
.abl-cover .abl-noimg { color: var(--faint); }
.abl-cover .abl-noimg svg { width: 34px; height: 34px; }
.abl-body { padding: 12px 14px 14px; }
.abl-body b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abl-body p { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.abl-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.abl-meta span { display: inline-flex; align-items: center; gap: 4px; }
.abl-meta svg { width: 13px; height: 13px; }

/* صفحات PDF داخل اللوحة */
.ab-pdf { width: 100%; background: #e9e9ee; }
.ab-pdf canvas, .ab-pdf img { display: block; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* منشورات اللوحة: بوست / كاروسيل + وصف بجانبه */
.ab-group { position: absolute; border-radius: 28px; background: rgba(255,255,255,.55); border: 2px solid rgba(18,19,35,.07); }
.ab-group.carousel { background: linear-gradient(180deg, rgba(168,105,15,.07), rgba(168,105,15,.02)); border-color: rgba(168,105,15,.22); }
.ab-glabel { position: absolute; top: 30px; left: 56px; right: 56px; display: flex; align-items: center; gap: 16px; font-family: var(--font); font-size: 30px; color: #1c1d2e; direction: ltr; }
.ab-gtag { font-size: 20px; font-weight: 800; letter-spacing: .14em; padding: 6px 14px; border-radius: 999px; background: #1c1d2e; color: #fff; }
.ab-group.carousel .ab-gtag { background: #a8690f; }
.ab-gact { margin-inline-start: auto; display: flex; gap: 10px; }
.ab-gact button { font: 600 20px var(--font); padding: 8px 18px; border-radius: 12px; border: 1px solid rgba(18,19,35,.15); background: #fff; cursor: pointer; }
.ab-gact button:hover { background: #f4f4f7; }
.ab-slide-no { position: absolute; z-index: 2; top: 14px; right: 14px; font: 700 22px var(--font); color: #fff; background: rgba(18,19,35,.72); padding: 4px 14px; border-radius: 999px; direction: ltr; }
.ab-pdesc { position: absolute; overflow: auto; background: #fff; border-radius: 22px; padding: 32px 34px; box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 18px 50px rgba(0,0,0,.08); font-family: var(--font); cursor: auto; user-select: text; -webkit-user-select: text; }
.ab-pdesc-k { font-size: 22px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #a8690f; margin-bottom: 16px; direction: ltr; }
.ab-pdesc-t { font-size: 34px; line-height: 1.75; color: #1c1d2e; white-space: pre-wrap; }
.ab-pdesc-t i { color: #9a9aa8; }
.du-carousel { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.du-carousel input { margin-top: 3px; accent-color: #a8690f; }
.du-carousel b { display: block; font-size: 14px; }
.du-carousel small { display: block; color: var(--muted, #6b6b7b); font-size: 12px; margin-top: 2px; }
.du-item { position: relative; }
.du-no { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 1; font-style: normal; font-weight: 700; font-size: 12px; background: #a8690f; color: #fff; border-radius: 999px; min-width: 22px; text-align: center; padding: 1px 6px; }
.ab-gsub { font-size: 24px; color: #6b6b7b; }
.ab-gact button.danger { color: #c0392b; }
.ab-fdel { position: absolute; z-index: 3; top: 12px; left: 12px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(18,19,35,.72); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.ab-frame:hover .ab-fdel { opacity: 1; }
.ab-fdel:hover { background: #c0392b; }

/* كاروسيل: شريط متصل احترافي */
.ab-dots { display: inline-flex; gap: 10px; margin-inline-start: 8px; }
.ab-dots i { width: 14px; height: 14px; border-radius: 999px; background: rgba(168,105,15,.35); }
.ab-dots i:first-child { background: #a8690f; width: 34px; }
.ab-group.carousel .ab-slide-no { display: none; }

/* بطاقة المنشور: خلفية ملوّنة بحواف دائرية + أزرار أسفل البوست والكابشن */
.ab-group { border-radius: 40px; background: linear-gradient(180deg, #fbf8f3 0%, #f5eee3 100%); border: 2px solid rgba(168,105,15,.16); box-shadow: 0 2px 8px rgba(60,40,10,.05), 0 24px 70px rgba(60,40,10,.08); }
.ab-group.carousel { background: linear-gradient(180deg, #f8efe1 0%, #efe1c9 100%); border-color: rgba(168,105,15,.28); }
.ab-gact { position: absolute; left: 56px; right: 56px; bottom: 44px; display: flex; gap: 16px; align-items: center; direction: ltr; margin: 0; }
.ab-gact button { display: inline-flex; align-items: center; gap: 12px; height: 76px; padding: 0 34px; font: 700 26px var(--font); color: #1c1d2e; background: #fff; border: 2px solid rgba(18,19,35,.10); border-radius: 22px; box-shadow: 0 2px 6px rgba(0,0,0,.06); cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; }
.ab-gact button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.10); background: #fff; }
.ab-gact button svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ab-gact button.pri { background: #a8690f; border-color: #a8690f; color: #fff; }
.ab-gact button.pri:hover { background: #95600e; }
.ab-gact button.ico { width: 76px; padding: 0; justify-content: center; }
.ab-gact button.danger { margin-left: auto; color: #b42318; border-color: rgba(180,35,24,.25); background: #fff5f4; }
.ab-gact button.danger:hover { background: #b42318; color: #fff; }

/* عمود الكابشن + الأزرار تحته */
.ab-pcol { position: absolute; display: flex; flex-direction: column; gap: 28px; }
.ab-pcol .ab-pdesc { position: static; flex: 0 1 auto; min-height: 0; overflow: auto; padding: 44px 48px; border-radius: 28px; }
.ab-pcol .ab-pdesc-k { font-size: 26px; margin-bottom: 22px; }
.ab-pcol .ab-pdesc-t { font-size: 46px; line-height: 1.7; font-weight: 500; }
.ab-pcol .ab-gact { position: static; flex: none; flex-wrap: wrap; gap: 16px; }
.ab-pcol .ab-gact button.danger { margin-left: 0; }

/* تصاميم بحواف دائرية */
.ab-frame:not(.ab-slide) { border-radius: 28px; }
.ab-frame:not(.ab-slide) > img { border-radius: 28px; }
.ab-canvas .ab-frame { cursor: zoom-in; }
.ab-canvas.grabbing .ab-frame, .ab-canvas.commenting .ab-frame { cursor: inherit; }

/* العرض العائم */
.ab-lb { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; background: rgba(12,12,20,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: fade .16s ease; font-family: var(--font); user-select: none; }
.ab-lb.out { opacity: 0; transition: opacity .15s; }
.ab-lb-top { display: flex; align-items: center; gap: 12px; padding: 16px 20px; color: #fff; }
.ab-lb-tag { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; background: #a8690f; padding: 5px 10px; border-radius: 999px; }
.ab-lb-count { font-weight: 700; font-size: 15px; opacity: .9; }
.ab-lb-x { margin-left: auto; width: 42px; height: 42px; border-radius: 999px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.ab-lb-x:hover { background: rgba(255,255,255,.22); }
.ab-lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 8px 24px 20px; }
.ab-lb-stage img { max-width: min(92vw, 1100px); max-height: 100%; object-fit: contain; border-radius: 22px; box-shadow: 0 30px 90px rgba(0,0,0,.5); background: #fff; }
.ab-lb-stage img.in { animation: lbIn .22s cubic-bezier(.2,.8,.2,1); }
@keyframes lbIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.ab-lb-nav { flex: none; width: 56px; height: 56px; border-radius: 999px; border: 0; background: #fff; color: #1c1d2e; font-size: 34px; line-height: 50px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .12s; }
.ab-lb-nav:hover { transform: scale(1.08); }
.ab-lb-thumbs { display: flex; gap: 10px; justify-content: center; overflow-x: auto; padding: 0 20px 20px; }
.ab-lb-thumbs button { flex: none; width: 58px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; opacity: .55; transition: opacity .12s, border-color .12s; }
.ab-lb-thumbs button.on { opacity: 1; border-color: #e0a64a; }
.ab-lb-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 700px) { .ab-lb-stage { gap: 8px; padding: 4px 8px 12px; } .ab-lb-nav { width: 42px; height: 42px; font-size: 26px; line-height: 38px; } }

/* صورة قيد التحميل داخل اللوحة */
.ab-frame img.ab-loading-img { opacity: 0; }
.ab-frame:has(img.ab-loading-img) { background: #eee; }
/* الظهور التدريجي والوميض للكمبيوتر فقط: على الهاتف يُنشئ المتصفح لكل صورة متحركة طبقة رسم بمقاسها الكامل في اللوحة
   (1280×1600 × دقة الشاشة ≈ 70MB للصورة)، وعشرات الصور المخزَّنة تظهر معاً فتنهار الصفحة (شاشة فارغة) */
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .ab-frame img { transition: opacity .25s; }
  .ab-frame:has(img.ab-loading-img) { background: linear-gradient(110deg, #eee 30%, #f6f6f6 50%, #eee 70%) 0 0 / 300% 100%; animation: abShimmer 1.2s linear infinite; }
}
@keyframes abShimmer { to { background-position: -150% 0; } }
/* الهاتف: لوحة أخف — ذاكرة الرسم محدودة وكل حركة سحب/زوم تعيد رسم اللوحة كلها */
@media (pointer: coarse), (max-width: 899px) {
  /* عنصر قابل للتمرير = سطح رسم مستقل بمقاسه الكامل لكل وصف منشور؛ واللمس داخل اللوحة للتنقل لا للتمرير */
  .ab-pdesc, .ab-pcol .ab-pdesc { overflow: hidden; }
  /* الظلال الضبابية أغلى ما يُعاد رسمه مع كل حركة */
  .ab-frame, .ab-pdesc, .ab-section { box-shadow: none; }
  .ab-world.far .ab-pdesc > *, .ab-world.far .ab-name, .ab-world.far .ab-slide-no{ visibility: hidden; }
}
/* بطاقة الفيديو داخل اللوحة على الهاتف + العارض المستقل */
.ab-vcard { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; background: #111; color: #fff; font-family: var(--font); }
.ab-vplay { width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 110px; padding-left: 16px; }
.ab-vcard b { font-size: 64px; }
.ab-vcard b + span { font-size: 40px; opacity: .7; }
.ab-lb-video .ab-lb-stage { padding: 8px 12px 20px; }
.ab-lb-video video { max-width: 100%; max-height: 100%; border-radius: 16px; background: #000; }
.ab-lb-video .ab-lb-count { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.du-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.du-carousel.guide input { accent-color: #0f3d2e; }
@media (max-width: 700px) { .du-kinds { grid-template-columns: 1fr; } }

/* دليل الهوية: مكان وتصميم خاص على يسار اللوحة */
.ab-group.guide { background: linear-gradient(160deg, #0f3d2e 0%, #0a2a20 100%); border: 2px solid rgba(224,166,74,.45); box-shadow: 0 4px 14px rgba(0,0,0,.12), 0 40px 100px rgba(10,42,32,.30); }
.ab-group.guide .ab-glabel { color: #f3e3c3; }
.ab-group.guide .ab-gtag { background: #e0a64a; color: #0a2a20; }
.ab-group.guide .ab-glabel b { font-weight: 600; opacity: .9; }
.ab-group.guide ~ .ab-frame .ab-name, .ab-frame.in-guide .ab-name { color: #f3e3c3; }

/* تلميح وضع التعليق */
.ab-chint { display: none; position: absolute; z-index: 6; top: 14px; left: 50%; transform: translateX(-50%); background: #a8690f; color: #fff; font: 600 13px var(--font); padding: 8px 16px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.18); pointer-events: none; white-space: nowrap; }
.ab-canvas.commenting .ab-chint { display: block; }
.ab-canvas.commenting .ab-frame { cursor: crosshair; }

/* حالة الملف بالنسبة للوحات */
.file .info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fchip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font: 600 12px var(--font); padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; background: none; cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fchip svg { width: 14px; height: 14px; flex: none; }
.fchip span { overflow: hidden; text-overflow: ellipsis; }
.fchip b { font-weight: 700; }
button.fchip { cursor: pointer; }
.fchip.on { background: #e8f5ee; color: #17663f; border-color: #bfe3cf; }
.fchip.dup { background: #fdf3e2; color: #8a5508; border-color: #f0d9ad; }
.fchip.off { background: #f2f3f6; color: #5d6070; border-color: #e3e5ea; }
button.fchip:hover { filter: brightness(.97); text-decoration: underline; }
.files-sum { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.files-sum .grow { flex: 1; }
.file .info .fchip b, .file .info .fchip span { display: inline; }
.file .info .fchip { margin-top: 2px; }

/* ── متابعة المهام حسب الحالة ── */
.st-new { --st: #64748b; --st-bg: #f1f5f9; }
.st-in_progress { --st: #2563eb; --st-bg: #eff4ff; }
.st-changes_requested { --st: #dc2626; --st-bg: #fef2f2; }
.st-in_review { --st: #d97706; --st-bg: #fff8eb; }
.st-completed { --st: #16a34a; --st-bg: #effaf3; }
.st-postponed { --st: #9ca3af; --st-bg: #f5f5f6; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--st); display: inline-block; }

.sboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; align-items: start; }
.scol { background: var(--st-bg); border: 1px solid color-mix(in srgb, var(--st) 18%, transparent); border-radius: 16px; min-width: 0; }
.scol-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--st); border-bottom: 1px solid color-mix(in srgb, var(--st) 15%, transparent); }
.scol-head svg { width: 16px; height: 16px; }
.scol-head b { color: #1c1d2e; font-size: 14px; }
.scol-head .n { margin-inline-start: auto; background: var(--st); color: #fff; font-weight: 700; font-size: 12px; min-width: 24px; text-align: center; padding: 2px 8px; border-radius: 999px; }
.scol-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; max-height: 70vh; overflow-y: auto; }

.scard { display: block; background: #fff; border-radius: 12px; padding: 12px 14px; border: 1px solid #e8e9ee; border-inline-start: 4px solid var(--st); color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: box-shadow .12s, transform .12s; }
.scard:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.scard .t { font-weight: 700; font-size: 14px; line-height: 1.5; display: flex; gap: 6px; align-items: flex-start; }
.scard .m { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12px; color: var(--muted, #6b6b7b); }
.scard .m span { display: inline-flex; align-items: center; gap: 4px; }
.scard .m svg { width: 13px; height: 13px; }
.scard .m .overdue { color: #dc2626; font-weight: 700; }
.scard.is-overdue { background: #fffafa; }
.scard.st-completed .t { color: #4b5563; }
.scard.st-postponed { opacity: .7; }

/* شريط الحالة في البطاقات الأخرى (القائمة ولوحة التصنيفات) */
.task-card[class*="st-"], .kcard[class*="st-"] { border-inline-start: 4px solid var(--st); }
.task-card.st-completed .t, .kcard.st-completed .t { color: #4b5563; }
.sgroup { margin-bottom: 4px; }
.sgroup-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--st-bg); color: var(--st); border-top: 1px solid #eceef2; position: sticky; top: var(--topbar-h); z-index: 2; }
.sgroup-head svg { width: 16px; height: 16px; }
.sgroup-head b { color: #1c1d2e; }
.sgroup-head .n { background: var(--st); color: #fff; font-weight: 700; font-size: 12px; padding: 1px 8px; border-radius: 999px; }
@media (max-width: 700px) { .sboard { grid-template-columns: 1fr; } }

/* PDF قيد التحميل */
.ab-pdf-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: linear-gradient(110deg, #f1f1f4 30%, #f8f8fa 50%, #f1f1f4 70%) 0 0 / 300% 100%; animation: abShimmer 1.4s linear infinite; color: #6b6b7b; font-family: var(--font); }
.ab-pdf-wait svg { width: 40px; height: 40px; animation: spin 1.2s linear infinite; }
.ab-pdf-wait b { font-size: 44px; color: #1c1d2e; }
.ab-pdf-wait span { font-size: 30px; }
.ab-pdf canvas.pending, .ab-pdf img.pending { background: linear-gradient(110deg, #f1f1f4 30%, #f8f8fa 50%, #f1f1f4 70%) 0 0 / 300% 100%; animation: abShimmer 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═════════ تجربة تطبيق على الجوال ═════════ */
.tabbar { display: none; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pageInO { from { opacity: 0; } }
@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { background: #f4f5f8; overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
  /* الشريط العلوي: زجاجي بعنوان كبير */
  .topbar { height: auto; min-height: 56px; padding: calc(env(safe-area-inset-top) + 8px) 16px 10px; background: rgba(255,255,255,.98); border-bottom: 1px solid rgba(18,19,35,.06); }
  .topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
  .topbar .menu-toggle{ display: none; }
  .topbar .icon-btn { width: 40px; height: 40px; border-radius: 12px; }
  .content { padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  /* حركة دخول الصفحة بالشفافية فقط: الإزاحة (transform) تجعل #main مرجعاً للعناصر الثابتة داخله، فكان زر «بدء الدوام» العائم وشريط الأفعال
     يُرسمان أسفل المحتوى طوال الحركة ثم يقفزان لمكانهما */
  .content.page-in { animation: pageInO .22s ease-out; }
  /* البطاقات */
  .card { border-radius: 18px; border-color: rgba(18,19,35,.06); box-shadow: 0 1px 2px rgba(18,19,35,.04), 0 6px 20px rgba(18,19,35,.04); }
  .card-head { padding: 14px 16px; }
  .card-body { padding: 14px 16px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 14px; }
  .page-head p { display: none; }
  .page-head h2 { font-size: 22px; font-weight: 800; }
  .page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .page-head .actions > .btn { flex: 1; }
  .page-head .actions .seg { flex: 1 1 100%; display: flex; }
  .page-head .actions .seg button { flex: 1; justify-content: center; }
  /* لمسات اللمس */
  .btn, .input, select.input { min-height: 44px; border-radius: 12px; font-size: 15px; }
  .btn-sm { min-height: 36px; }
  .btn:active, .task-card:active, .scard:active, .kcard:active, .tabbar a:active, .tabbar button:active { transform: scale(.97); }
  .btn, .task-card, .scard, .kcard { transition: transform .12s ease; }
  /* التبويبات أفقية قابلة للتمرير */
  .tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; }
  /* شريط التنقل السفلي */
  .tabbar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 40; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.98); border-top: 1px solid rgba(18,19,35,.08); }
  .tabbar a, .tabbar button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px; border: 0; background: none; color: #8b8d98; font: 600 10.5px var(--font); text-decoration: none; border-radius: 14px; cursor: pointer; transition: color .15s, transform .12s; }
  .tabbar svg { width: 24px; height: 24px; padding: 3px 14px; box-sizing: content-box; border-radius: 999px; transition: background .2s; }
  .tabbar .active { color: var(--brand-700); }
  .tabbar .active svg { background: var(--brand-100); }
  .tabbar .tcount { position: absolute; top: 2px; inset-inline-end: calc(50% - 24px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font: 700 10.5px/18px var(--font); font-style: normal; text-align: center; border: 2px solid #fff; }
  /* القائمة الجانبية كدرج كامل الارتفاع */
  .sidebar { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); width: min(86vw, 320px); }
  .shell.nav-open .backdrop { backdrop-filter: blur(2px); }
  /* النوافذ المنبثقة كورقة من الأسفل */
  .modal { padding-bottom: env(safe-area-inset-bottom); }
  .modal::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 999px; background: #d6d8de; margin: 8px auto 0; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* القوائم والجداول */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .task-card { border-radius: 14px; margin: 8px 10px; border: 1px solid #eceef2; }
  .sboard { gap: 10px; }
  .scol-body { max-height: none; }
  .file { flex-wrap: wrap; }
  .file .info { flex: 1 1 calc(100% - 60px); }
}
@media (max-width: 760px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g-4 .stat .value { font-size: 22px; }
  .g-4 .card-body, .g-4 .stat { padding: 14px; }
}
@media (max-width: 760px) {
  .page-head h2.dup-title { display: none; }
  .page-head .actions .seg button { white-space: nowrap; font-size: 13px; padding-inline: 6px; }
  .page-head:has(> div:first-child > h2.dup-title:only-child) > div:first-child { display: none; }
}
@media (max-width: 760px) {
  .sidebar { z-index: 50; }
  .shell.nav-open .backdrop { z-index: 45; }
}

/* ═════════ تصميم الجوال — الإصدار الثاني ═════════ */
.back-btn { display: none; }
@media (max-width: 760px) {
  /* منع أي تمرير أفقي للصفحة */
  html, body { overflow-x: clip; max-width: 100vw; }
  .shell, .main, .content { max-width: 100vw; min-width: 0; }
  .card-head, .row, .toolbar, .actions { flex-wrap: wrap; min-width: 0; }
  .card-head > *, .row > * { min-width: 0; }
  .grid, .stack, .g-main > * { min-width: 0; }
  img, video, canvas, table { max-width: 100%; }
  .table-wrap { overflow-x: auto; }

  /* ألوان وخلفية أكثر حداثة */
  body { background: #f2f2f7; }
  .content { padding: 12px 12px calc(110px + env(safe-area-inset-bottom)); }

  /* الشريط العلوي */
  .topbar { gap: 8px; padding: calc(env(safe-area-inset-top) + 6px) 12px 8px; min-height: 52px; background: rgba(242,242,247,.78); border-bottom-color: transparent; transition: border-color .2s; }
  .topbar h1 { font-size: 17px; font-weight: 700; text-align: start; }
  .shell.is-detail .back-btn { display: grid; }
  .back-btn { width: 38px; height: 38px; border-radius: 999px; background: #fff; border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); color: var(--brand-700); }
  .back-btn svg { width: 20px; height: 20px; stroke-width: 2.4; }
  [dir=ltr] .back-btn svg { transform: scaleX(-1); }
  .topbar .icon-btn[data-bell] { width: 38px; height: 38px; border-radius: 999px; background: #fff; border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

  /* البطاقات: بدون حدود، زوايا كبيرة، ظل ناعم */
  .card { border: 0; border-radius: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px rgba(0,0,0,.04); }
  .card-head { border-bottom: 1px solid #f0f0f4; gap: 8px 10px; }
  .card-head h3 { font-size: 16px; font-weight: 800; flex: 1 1 auto; }
  .card-head .btn { flex: 1 1 auto; }
  .stack { gap: 12px; }
  .grid { gap: 12px; }

  /* الأزرار بشكل كبسولة */
  .btn { border-radius: 999px; font-weight: 700; padding-inline: 18px; }
  .btn-primary { box-shadow: 0 1px 3px color-mix(in srgb, var(--brand-600) 25%, transparent); }
  .input, select.input, textarea.input { border-radius: 14px; background-color: #fff; }
  .seg { border-radius: 999px; padding: 3px; background: #e9e9ef; border: 0; }
  .seg button { border-radius: 999px; }
  .tabs { gap: 6px; border-bottom: 0; padding-bottom: 2px; }
  .tabs a { border-radius: 999px; padding: 8px 14px; background: #fff; border: 0; font-weight: 700; font-size: 13.5px; }
  .tabs a.active { background: var(--ink, #1c1d2e); color: #fff; }
  .tabs a.active::after { display: none; }

  /* شريط التنقل العائم */
  .tabbar { inset-inline: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 26px; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.86); box-shadow: 0 10px 30px rgba(18,19,35,.14), 0 2px 6px rgba(18,19,35,.06); }
  .tabbar a, .tabbar button { padding: 6px 2px; border-radius: 20px; font-size: 10.5px; }
  .tabbar svg { padding: 4px 16px; }
  .tabbar .active { color: #fff; }
  .tabbar .active svg { background: var(--brand-600); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-600) 45%, transparent); }
  .tabbar .active span { color: var(--brand-700); font-weight: 800; }
  .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* صفحة المهمة */
  .task-desc { font-size: 14.5px; line-height: 1.9; }
  .ab-host .ab-canvas { height: 320px; border-radius: 16px; }
  .ab { flex-direction: column; }
  .ab-side { width: auto; border-inline-start: 0; border-top: 1px solid #f0f0f4; }
  .file { border-radius: 16px; }

  /* القوائم */
  .timeline li { padding-inline: 0; }
  .empty { padding: 28px 16px; }
}
@media (max-width: 760px) {
  /* أي تخطيط بأعمدة ثابتة يتحول لعمود واحد */
  .settings-grid, .content .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .settings-nav { display: flex !important; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px !important; position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 5; border-radius: 999px !important; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav a { flex: none; white-space: nowrap; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; }
  .content [style*="min-width:2"], .content [style*="min-width:1"] { min-width: 0 !important; }
  .content [style*="max-width:2"] { max-width: none !important; }
  .content input[style*="width:1"] { width: 100% !important; }
  /* الجداول: تمرير أفقي داخل البطاقة بدلاً من تشويه النص */
  .table-wrap { overflow-x: auto; }
  .table-wrap > .table { min-width: 520px; }
  .table:not(.table-wrap > .table) { display: block; overflow-x: auto; max-width: 100%; }
  .table td, .table th { white-space: nowrap; }
  .table td.wrap, .table td .small { white-space: normal; }
}

/* الجداول كبطاقات على الجوال */
@media (max-width: 760px) {
  .table-wrap > .table.stackable, .table.stackable { min-width: 0; display: block; }
  .table.stackable thead { display: none; }
  .table.stackable tbody { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
  .table.stackable tr { display: flex; flex-direction: column; background: #fff; border: 1px solid #eef0f4; border-radius: 16px; padding: 6px 4px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
  .table.stackable tr:hover { background: #fff; }
  .table.stackable td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px !important; border: 0 !important; white-space: normal; text-align: start; min-height: 0; }
  .table.stackable td::before { content: attr(data-label); flex: none; max-width: 45%; font-size: 12px; font-weight: 600; color: var(--muted); }
  .table.stackable td[data-label=""]::before { display: none; }
  .table.stackable td[data-label=""] { justify-content: flex-end; }
  .table.stackable td:first-child { font-size: 15px; font-weight: 700; border-bottom: 1px solid #f2f3f6 !important; padding-bottom: 10px !important; margin-bottom: 2px; }
  .table.stackable td:first-child::before { display: none; }
  .table.stackable td > * { max-width: 100%; }
  .table.stackable td .small { text-align: end; }
  .table-wrap:has(> .table.stackable) { overflow: visible; background: #f7f7fa; }
}
@media (max-width: 760px) {
  [dir=rtl] .table.stackable td { direction: rtl; }
  [dir=ltr] .table.stackable td { direction: ltr; }
  .table.stackable td.num { font-variant-numeric: tabular-nums; unicode-bidi: plaintext; }
}
@media (max-width: 760px) {
  .hero .card-body { flex-direction: column; align-items: stretch; gap: 16px; }
  .hero .card-body > * { min-width: 0; width: 100%; flex: none !important; }
  .hero .badge, .hero .chip { white-space: nowrap; }
  .hero .clock { text-align: center; }
  .hero h2, .hero h3 { font-size: 22px; line-height: 1.4; }
}
@media (max-width: 760px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .strip > * { border-top: 1px solid var(--line) !important; border-inline-start: 0 !important; }
  .strip > *:nth-child(-n+2) { border-top: 0 !important; }
  .strip > *:nth-child(even) { border-inline-start: 1px solid var(--line) !important; }
}

/* شريط علوي بالشعار في المنتصف (الجوال) */
@media (max-width: 760px) {
  .topbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-areas: "start brand end" "title title title"; align-items: center; row-gap: 6px; padding: calc(env(safe-area-inset-top) + 8px) 14px 12px; background: rgba(255,255,255,.88); border-bottom: 1px solid rgba(18,19,35,.07); box-shadow: 0 6px 20px rgba(18,19,35,.04); }
  .topbar .back-btn { grid-area: start; justify-self: start; }
  .topbar .tb-end { grid-area: end; justify-self: end; }
  .topbar .title-tile, .topbar .menu-toggle{ display: none !important; }
  .topbar h1 { grid-area: title; font-size: 24px; font-weight: 800; padding-top: 2px; letter-spacing: -.01em; }
}
@media (max-width: 760px) {
  .shell.is-detail .topbar h1 { font-size: 19px; line-height: 1.4; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ═════════ نظام التصميم — الإصدار الثالث (سطح المكتب والجوال) ═════════ */
:root {
  --bg: #f5f6fa;
  --radius: 16px; --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(18,19,26,.04), 0 2px 8px rgba(18,19,26,.03);
  --shadow: 0 2px 6px rgba(18,19,26,.04), 0 12px 32px rgba(18,19,26,.06);
  --gold-grad: linear-gradient(135deg, #d6a04a 0%, #b47515 45%, #8a560c 100%);
}
body { background: radial-gradient(1200px 600px at 100% -10%, #fbf3e6 0%, transparent 55%), radial-gradient(900px 500px at -10% 0%, #eef1fb 0%, transparent 50%), var(--bg); background-attachment: fixed; }

/* البطاقات */
.card { border: 1px solid rgba(18,19,26,.05); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: rgba(255,255,255,.96); }
.card-head { padding: 18px 22px; border-bottom-color: #f1f2f6; }
.card-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.1px; }
.card-head h3 .hic { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); box-shadow: inset 0 0 0 1px rgba(168,105,15,.12); }

/* عنوان الصفحة */
.page-head { margin-bottom: 24px; }
.page-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.page-head p { font-size: 14px; }

/* الأزرار */
.btn { border-radius: 12px; height: 40px; font-weight: 600; transition: background .15s, border-color .15s, box-shadow .2s, transform .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(18,19,26,.06); }
.btn-primary { background: var(--gold-grad); border-color: transparent; box-shadow: 0 1px 3px rgba(168,105,15,.2), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-primary:hover { background: var(--gold-grad); filter: brightness(1.06); box-shadow: 0 2px 6px rgba(168,105,15,.24), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-sm { height: 32px; border-radius: 10px; }
.btn-lg { height: 48px; border-radius: 14px; }

/* الحقول */
.input { border-radius: 12px; border-color: #e3e5ec; background-color: #fff; transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: #d3d6e0; }
.input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(192,125,28,.14); }

/* بطاقات الإحصاء */
.stat { border-top: 0; padding: 20px 22px; position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.card:has(> .stat):hover, .stat.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat .ic { width: 46px; height: 46px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.stat .ic svg { width: 22px; height: 22px; }
.stat .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat .value { font-size: 32px; font-weight: 700; letter-spacing: -1px; margin-top: 10px; }
.stat::after { content: ''; position: absolute; inset-inline-start: -40px; bottom: -60px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(192,125,28,.07), transparent 70%); pointer-events: none; }

/* الشارات */
.badge { height: 26px; padding: 0 11px; font-weight: 700; letter-spacing: .1px; }

/* الجداول */
.table th { background: #fafbfd; color: #7a7e90; font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: .2px; border-bottom: 1px solid #eef0f4; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fcfaf6; }
.table td { border-bottom-color: #f3f4f7; }

/* القوائم والنشاطات */
.list li { padding: 14px 22px; transition: background .12s; }
.list li:hover { background: #fcfbf8; }
.list-ic { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #f4f5f9, #eceef4); }

/* المخطط */
.bars .b i { background: linear-gradient(180deg, #d6a04a, #a8690f); border-radius: 8px 8px 3px 3px; box-shadow: 0 4px 10px rgba(168,105,15,.18); }
.bars .b i.late { background: linear-gradient(180deg, #f08a3c, #d9620f); }

/* الشريط الجانبي */
.sidebar { background: linear-gradient(180deg, #ffffff 0%, #fdfbf7 100%); border-inline-end-color: #eceef3; }
.sidebar .brand { padding: 20px 18px; }
.nav a { padding: 10px 12px; border-radius: 12px; transition: background .15s, color .15s; }
.nav a.active { background: linear-gradient(90deg, var(--brand-50), #fff7ea); color: var(--brand-700); box-shadow: inset 0 0 0 1px rgba(168,105,15,.12); }
.nav a.active::before { content: ''; position: absolute; inset-inline-start: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold-grad); }
[dir=rtl] .nav a.active::before { border-radius: 4px 0 0 4px; }

/* الشريط العلوي على سطح المكتب: زجاجي */
.topbar { background: rgba(255,255,255,.97); border-bottom-color: rgba(18,19,26,.06); }
.title-tile { border-radius: 12px; background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); }

/* صفحة الدخول */
.login { background: radial-gradient(700px 500px at 85% 10%, #f6dfb6 0%, transparent 60%), radial-gradient(600px 500px at 10% 90%, #e7ecfb 0%, transparent 60%), linear-gradient(180deg, #fffaf2, #f7f8fc); }
.login-box { background: rgba(255,255,255,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.9); border-radius: 28px; box-shadow: 0 30px 80px rgba(60,40,10,.12), 0 2px 8px rgba(0,0,0,.04); padding: 40px 36px; }
.btn-signin { background: var(--gold-grad) !important; box-shadow: 0 2px 6px rgba(168,105,15,.22); border-radius: 14px !important; }

/* ── الجوال: شريط علوي احترافي أعرض ── */
@media (max-width: 760px) {
  .topbar { grid-template-columns: 46px minmax(0, 1fr) 46px; row-gap: 12px; padding: calc(env(safe-area-inset-top) + 14px) 16px 16px;
    background: linear-gradient(180deg, rgba(255,250,242,.94) 0%, rgba(255,255,255,.9) 100%); border-bottom: 0;
    box-shadow: 0 1px 0 rgba(168,105,15,.10), 0 10px 30px rgba(60,40,10,.06); }
  .topbar::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(192,125,28,.55), transparent); }
  .back-btn, .topbar .icon-btn[data-bell] { width: 42px; height: 42px; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(18,19,26,.08), inset 0 0 0 1px rgba(18,19,26,.05); }
  .topbar h1 { font-size: 26px; padding-top: 4px; }
  .shell.is-detail .topbar h1 { font-size: 20px; }
  .stat .value { font-size: 26px; }
  .page-head h2 { font-size: 22px; }
}
.nav a.active::before { inset-inline-start: 4px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px !important; }
.nav a.active { padding-inline-start: 16px; }

/* ═════════ رأس التطبيق على الجوال — تصميم داكن فاخر ═════════ */
.tb-avatar { display: none; }
@media (max-width: 760px) {
  .topbar {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-areas: "start brand end" "title title title";
    align-items: center; row-gap: 14px; padding: calc(env(safe-area-inset-top) + 12px) 16px 20px;
    background:
      radial-gradient(420px 160px at 85% -20%, rgba(214,160,74,.38), transparent 70%),
      radial-gradient(300px 140px at 0% 120%, rgba(214,160,74,.16), transparent 70%),
      linear-gradient(160deg, #1d1e27 0%, #15161d 100%);
    color: #fff; border: 0; border-radius: 0 0 26px 26px;
    box-shadow: 0 14px 34px rgba(15,16,22,.22);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .topbar::after { content: ''; position: absolute; inset-inline: 22%; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #d6a04a, transparent); opacity: .8; }
  /* الوسط: الشعار والاسم في المنتصف تماماً */
  /* الجانبان: الصورة الشخصية أو زر الرجوع / التنبيهات */
  .tb-avatar { grid-area: start; display: grid; place-items: center; justify-self: start; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 14px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); cursor: pointer; }
  .tb-avatar .avatar { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }
  .shell.is-detail .tb-avatar { display: none; }
  .back-btn, .topbar .icon-btn[data-bell] { width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.08); color: #fff; border: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
  .back-btn svg, .topbar .icon-btn[data-bell] svg { color: #fff; }
  .topbar .icon-btn .dot { border-color: #1a1b23; }
  /* العنوان بالأبيض داخل الرأس */
  .topbar h1 { grid-area: title; color: #fff; font-size: 25px; font-weight: 800; letter-spacing: -.2px; padding: 0 2px; }
  .shell.is-detail .topbar h1 { font-size: 19px; color: #fff; }
  .content { padding-top: 18px; }
  /* إزالة العنوان المكرر داخل الصفحة إن كان مطابقاً */
  .page-head h2.dup-title { display: none; }
}
@media (max-width: 760px) { .hide-mobile-back { display: none !important; } }

/* ── الشعار الرسمي ── */
.brand-wordmark { height: 40px; width: auto; display: block; }
.login-wordmark { width: 210px !important; height: auto !important; margin: 0 auto 6px; display: block; }
.dv-brand img { height: 26px; width: auto; }
@media (max-width: 760px) {
  .tb-wordmark { height: 34px; width: auto; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,.25)); }
}

/* ═════════ رأس الجوال — فاتح بالشعار الذهبي ═════════ */
@media (max-width: 760px) {
  .topbar {
    background:
      radial-gradient(380px 150px at 50% -40%, rgba(214,160,74,.18), transparent 70%),
      linear-gradient(180deg, #ffffff 0%, #fffbf5 100%);
    color: var(--ink); border-radius: 0 0 24px 24px;
    box-shadow: 0 1px 0 rgba(168,105,15,.10), 0 10px 28px rgba(60,40,10,.07);
    padding: calc(env(safe-area-inset-top) + 12px) 16px 18px;
  }
  .topbar::after { inset-inline: 25%; height: 2px; opacity: .55; }
  .tb-wordmark { height: 38px; filter: none; }
  .tb-avatar { background: #fff; box-shadow: 0 2px 8px rgba(18,19,26,.07), inset 0 0 0 1px rgba(18,19,26,.06); }
  .back-btn, .topbar .icon-btn[data-bell] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(18,19,26,.07), inset 0 0 0 1px rgba(18,19,26,.06); }
  .back-btn svg { color: var(--brand-700); }
  .topbar .icon-btn[data-bell] svg { color: var(--ink-2); }
  .topbar .icon-btn .dot { border-color: #fff; }
  .topbar h1, .shell.is-detail .topbar h1 { color: var(--ink); }
}

/* ── مبدّل اللغة ── */
.lang-switch { position: relative; display: inline-flex; align-items: center; padding: 3px; gap: 2px; border-radius: 999px; background: #f1f2f6; box-shadow: inset 0 0 0 1px rgba(18,19,26,.06); flex-shrink: 0; direction: ltr; }
.lang-switch button { min-width: 36px; height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 12.5px var(--font); letter-spacing: .3px; cursor: pointer; transition: background .18s, color .18s, box-shadow .18s; }
.lang-switch button:hover:not(.on) { color: var(--ink); }
.lang-switch button.on { background: #fff; color: var(--brand-700); box-shadow: 0 1px 2px rgba(18,19,26,.08), 0 3px 10px rgba(168,105,15,.14); }
.lang-switch button[data-lang-set="ar"] { font-size: 14px; }
.lang-switch.side { margin-inline-start: auto; }
@media (max-width: 760px) {
  .lang-switch.top { display: none; }
}
.login .lang-switch { background: rgba(255,255,255,.75); backdrop-filter: blur(10px); }
/* مبدّل اللغة في القائمة الجانبية: مخفي على سطح المكتب (موجود في الشريط العلوي) */
@media (min-width: 761px) { .lang-switch.side { display: none; } }

/* ═════════ عارض التصاميم على الجوال ═════════ */
.dv-feed, .dv-sheet-bg, .dv-sheet-n { display: none; }
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  .dv.mobile .dv-top { height: auto; padding: calc(env(safe-area-inset-top) + 10px) 12px 10px; background: #fff; color: var(--ink); border-bottom: 1px solid #eef0f4; box-shadow: 0 4px 16px rgba(18,19,26,.05); gap: 8px; }
  .dv.mobile .dv-brand { min-width: 0; flex: 1; gap: 10px; }
  .dv.mobile .dv-brand img { height: 30px; }
  .dv.mobile .dv-brand b { color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .dv.mobile .dv-brand span { color: var(--muted); font-size: 12px; }
  .dv.mobile .dv-actions { gap: 6px; flex-shrink: 0; }
  .dv.mobile .dv-btn, .dv.mobile .dv-icon { height: 38px; min-width: 38px; padding: 0 10px; border-radius: 12px; background: #f3f4f7; color: var(--ink); border: 0; position: relative; }
  .dv.mobile .dv-btn.primary { background: var(--gold-grad); color: #fff; }
  .dv.mobile .dv-btn.on { background: var(--brand-600); color: #fff; }
  .dv.mobile [data-view-toggle] span { display: inline; font-size: 12.5px; font-weight: 700; }
  .dv.mobile .dv-sheet-n { display: grid; place-items: center; position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font: 700 10.5px var(--font); font-style: normal; border: 2px solid #fff; }
  .dv.mobile .dv-sheet-n:empty, .dv.mobile .dv-sheet-n[data-count2]:is(:empty) { display: none; }

  .dv.mobile .dv-body { display: block; position: relative; background: #f2f2f7; }
  .dv.mobile.view-feed .dv-canvas { position: absolute; inset: 0; visibility: hidden; }
  .dv.mobile.view-board .dv-canvas { position: absolute; inset: 0; }
  .dv.mobile.view-board .dv-feed { display: none; }

  /* Feed */
  .dv.mobile.view-feed .dv-feed { display: block; position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 12px calc(30px + env(safe-area-inset-bottom)); }
  .fd-intro { background: #fff; border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
  .fd-desc { font-size: 14px; line-height: 1.8; white-space: pre-wrap; color: var(--ink-2); }
  .fd-card { background: #fff; border-radius: 22px; overflow: hidden; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 28px rgba(18,19,26,.06); }
  .fd-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; direction: ltr; }
  .fd-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: #1c1d2e; padding: 4px 10px; border-radius: 999px; }
  .fd-card.carousel .fd-tag { background: var(--gold-grad); }
  .fd-card.guideline { background: linear-gradient(160deg, #0f3d2e, #0a2a20); }
  .fd-card.guideline .fd-tag { background: #e0a64a; color: #0a2a20; }
  .fd-head b { font-size: 14px; color: var(--ink); }
  .fd-count { margin-left: auto; font: 700 12px var(--font); color: #fff; background: rgba(18,19,26,.7); padding: 3px 10px; border-radius: 999px; }
  .fd-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; direction: ltr; background: #f6f6f8; }
  .fd-track::-webkit-scrollbar { display: none; }
  .fd-slide { flex: 0 0 100%; scroll-snap-align: center; }
  .fd-slide img { display: block; width: 100%; height: auto; object-fit: cover; background: linear-gradient(110deg, #eee 30%, #f6f6f6 50%, #eee 70%) 0 0 / 300% 100%; animation: abShimmer 1.4s linear infinite; }
  .fd-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 34px 20px; text-align: center; min-height: 260px; }
  .fd-card.guideline .fd-track { background: transparent; }
  .fd-card.guideline .fd-file b, .fd-card.guideline .fd-file span { color: #f3e3c3; }
  .fd-ext { width: 84px; height: 100px; border-radius: 18px; display: grid; place-items: center; background: var(--gold-grad); color: #fff; font: 800 22px var(--mono); box-shadow: 0 12px 30px rgba(168,105,15,.3); }
  .fd-file b { font-size: 14px; word-break: break-all; }
  .fd-file span { font-size: 12.5px; color: var(--muted); }
  .fd-file-acts { display: flex; gap: 8px; margin-top: 6px; }
  .fd-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 2px; }
  .fd-dots i { width: 7px; height: 7px; border-radius: 999px; background: #d9dbe3; transition: width .2s, background .2s; }
  .fd-dots i.on { width: 20px; background: var(--brand-600); }
  .fd-cap { padding: 12px 16px 16px; font-size: 14.5px; line-height: 1.85; white-space: pre-wrap; color: var(--ink); }

  /* ورقة المعلومات والتعليقات */
  .dv.mobile .dv-side { position: fixed; inset-inline: 0; bottom: 0; height: 78vh; z-index: 160; border: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.2); transform: translateY(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
  .dv.mobile .dv-side::before { content: ''; display: block; width: 42px; height: 5px; border-radius: 999px; background: #d6d8de; margin: 10px auto 2px; flex: none; }
  .dv.mobile.sheet-open .dv-side { transform: none; }
  .dv.mobile.sheet-open .dv-sheet-bg { display: block; position: fixed; inset: 0; z-index: 155; background: rgba(18,19,26,.35); backdrop-filter: blur(2px); }
}
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  .fd-dots { direction: ltr; }
  /* رأس العارض: الشعار والعنوان والإغلاق في صف، والأزرار في صف قابل للتمرير */
  .dv.mobile .dv-top { flex-wrap: wrap; row-gap: 10px; }
  .dv.mobile .dv-brand { order: 1; flex: 1 1 calc(100% - 52px); }
  .dv.mobile .dv-actions { order: 3; flex: 1 1 100%; display: flex; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .dv.mobile .dv-actions::-webkit-scrollbar { display: none; }
  .dv.mobile .dv-actions > * { flex: none; }
  .dv.mobile .dv-btn span { display: inline; font-size: 12.5px; font-weight: 700; }
  .dv.mobile [data-close] { order: 2; position: absolute; top: calc(env(safe-area-inset-top) + 10px); inset-inline-end: 12px; }
}
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) { .dv.mobile .dv-top { position: relative; } .dv.mobile .dv-brand { padding-inline-end: 48px; } }
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) { .fd-file-acts a.dv-btn { background: #fff; color: var(--ink); } .fd-file-acts a.dv-btn svg { color: var(--ink); } }
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) { .ab-chint { white-space: normal; width: calc(100% - 24px); text-align: center; font-size: 12px; border-radius: 14px; } .dv.mobile .ab-hint { display: none; } }

/* ── العارض على الجوال: تحسينات v2 ── */
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  .dv.mobile .dv-actions { overflow: visible; gap: 8px; align-items: center; }
  .dv-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: #eef0f4; flex: none; }
  .dv-seg button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 12.5px var(--font); cursor: pointer; }
  .dv-seg button svg { width: 15px; height: 15px; }
  .dv-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
  .dv.mobile.view-feed [data-mode] { display: none; }
  .dv.mobile [data-share] span { display: none; }
  .dv.mobile .dv-actions [data-share] { margin-inline-start: auto; }
  .dv-more { position: relative; }
  .dv-more [data-more] { font-size: 20px; line-height: 1; letter-spacing: 1px; }
  .dv-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; min-width: 190px; background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 18px 50px rgba(18,19,26,.18), 0 0 0 1px rgba(18,19,26,.05); }
  .dv-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 11px; background: none; color: var(--ink); font: 600 14px var(--font); cursor: pointer; text-align: start; }
  .dv-menu-item svg { width: 18px; height: 18px; color: var(--muted); }
  .dv-menu-item span { display: inline !important; }
  .dv-menu-item:hover, .dv-menu-item:active { background: #f4f5f8; }
  .dv-menu-item[data-delete], .dv-menu-item[data-delete] svg { color: var(--bad); }
  .dv.mobile .dv-actions { flex-wrap: nowrap; }
  .fd-slide img { cursor: zoom-in; }
  .fd-cap { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: 6px; }
  .fd-cap.open { display: block; -webkit-line-clamp: unset; }
  .fd-more { display: block; margin: 0 16px 14px; padding: 0; border: 0; background: none; color: var(--brand-700); font: 700 13px var(--font); cursor: pointer; }
  .fd-card { margin-inline: -4px; }
  .fd-head { padding: 12px 16px; }
}
@media (max-width: 760px) {
  .ab-lb-stage { position: relative; padding: 4px 12px 12px; }
  .ab-lb-stage img { max-width: 100%; }
  .ab-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; font-size: 24px; line-height: 36px; background: rgba(255,255,255,.88); }
  .ab-lb-nav.prev { left: 18px; }
  .ab-lb-nav.next { right: 18px; }
  .ab-lb-nav:hover { transform: translateY(-50%) scale(1.06); }
  .ab-lb-top { padding-top: calc(env(safe-area-inset-top) + 12px); }
  .ab-lb-thumbs { padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
}
@media (max-width: 760px) { .sidebar .brand { justify-content: space-between; } .lang-switch.side { order: -1; margin-inline-start: 0; } }

/* بطاقة قابلة للطي (سجل النشاطات) */

/* من أسند المهمة */
.scard .m .by { color: var(--brand-700); font-weight: 600; }
.emp-tasks .card-head { flex-wrap: wrap; }

/* منع التكبير على الجوال: لا تكبير بالنقر المزدوج، وحقول بحجم 16px حتى لا يكبّر iOS عند الكتابة */
html { touch-action: manipulation; }
@media (max-width: 760px) {
  input, select, textarea, .input { font-size: 16px !important; }
  .tabbar svg { padding: 4px 12px; }
  .tabbar a, .tabbar button { font-size: 10px; }
}
/* حذف دليل الهوية */
.ab-gdel { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 26px; border-radius: 18px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #ffb4ab; font: 700 24px var(--font); cursor: pointer; }
.ab-gdel svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ab-gdel:hover { background: #b42318; color: #fff; border-color: #b42318; }
.fd-del { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #ffb4ab; cursor: pointer; }
.fd-del svg { width: 17px; height: 17px; }

/* مهمة مقفلة على الموظف */
.lock-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 16px; border-radius: 16px; background: linear-gradient(135deg, #fff8eb, #fdf1da); border: 1px solid #f1d9a8; color: #7a4b09; }
.lock-banner svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.lock-banner b { display: block; font-size: 15px; }
.lock-banner span { font-size: 13px; }
.draft-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; border-radius: 16px; background: #f4f3ff; border: 1px dashed #bdb4fe; color: #3e1c96; }
.draft-banner > div { flex: 1; min-width: 220px; } .draft-banner svg { width: 22px; height: 22px; flex: none; }
.draft-banner b { display: block; font-size: 15px; } .draft-banner span { font-size: 13px; }
.task-locked [data-edit], .task-locked [data-delete], .task-locked [data-artboard-toggle], .task-locked [data-design-link],
.task-locked [data-design-up], .task-locked [data-dz], .task-locked [data-del-file], .task-locked [data-del-dups],
.task-locked [data-design-edit], .task-locked [data-design-del], .task-locked [data-design-unlink] { display: none !important; }
.task-locked:not(.task-locked-personal) [data-status-select] { pointer-events: none; opacity: .6; }
.task-locked .artboard-off { display: none; }

/* أقسام مطوية على الجوال */
.m-toggle { display: none; }
@media (max-width: 760px) {
  .card[data-mcol] > .m-toggle { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 28px); margin: 12px 14px; height: 46px; padding: 0 16px; border: 1px solid #ebe3d4; border-radius: 14px; background: #fffaf2; color: var(--brand-700); font: 700 14px var(--font); cursor: pointer; }
  .card[data-mcol] > .m-toggle svg { width: 18px; height: 18px; transform: rotate(90deg); transition: transform .2s; }
  .card[data-mcol]:not(.m-collapsed) > .m-toggle svg { transform: rotate(-90deg); }
  .card.m-collapsed > :not(.card-head):not(.m-toggle) { display: none !important; }
  .card.m-collapsed > .card-head { border-bottom: 0; }
}

/* ═════════ التقويم: يوم / أسبوع / شهر + تقويم العمل والنشر ═════════ */
.cal-seg { display: inline-flex; padding: 4px; gap: 3px; border-radius: 999px; background: #eceef3; }
.cal-seg button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 13.5px var(--font); cursor: pointer; transition: background .15s, color .15s; }
.cal-seg button svg { width: 16px; height: 16px; }
.cal-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(168,105,15,.10); }
.ev .ev-t { opacity: .75; font-weight: 700; }

/* الأسبوع */
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }

/* بطاقة حدث */
.plat { font-size: 10.5px; font-weight: 800; color: #fff; background: var(--p); padding: 2px 8px; border-radius: 999px; }

/* اليوم */
.dv-day { border-top: 1px solid var(--line); }
.dd-label{ flex: none; width: 70px; font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 4px; }

/* ألوان الحدث */
.ev-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-colors label { cursor: pointer; }
.ev-colors input { position: absolute; opacity: 0; pointer-events: none; }
.ev-colors i { display: block; width: 30px; height: 30px; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.ev-colors input:checked + i { box-shadow: 0 0 0 2px var(--ink); }

@media (max-width: 760px) {
  .wk { grid-template-columns: 1fr; }
  .dd-label{ width: 50px; }
}

/* ═════════ الطباعة: تخطيط نظيف دائماً (لا يتأثر بتصميم الجوال) ═════════ */
@media print {
  @page { size: A4; margin: 12mm; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html, body { background: #fff !important; overflow: visible !important; max-width: none !important; }
  .sidebar, .topbar, .tabbar, .backdrop, .no-print, .toasts, .m-toggle, .lock-banner, .modal-root, .dv-layer, .ab-lb { display: none !important; }
  .shell, .main, .content { display: block !important; margin: 0 !important; padding: 0 !important; max-width: none !important; opacity: 1 !important; transform: none !important; }
  .grid, .g-main { display: block !important; }
  .card { box-shadow: none !important; border: 1px solid #e5e5ea !important; break-inside: avoid; background: #fff !important; }
  .slip { max-width: 100% !important; margin: 0 !important; }
  .table.stackable thead { display: table-header-group !important; }
  .table.stackable, .table.stackable tbody, .table.stackable tr, .table.stackable td { display: revert !important; }
  .table.stackable td::before { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ═════════ حساب الشريك: مشاهدة فقط ═════════ */
.read-only .page-head .actions > *:not(.badge):not([data-print]):not(.ro-ok), .read-only [data-new], .read-only [data-edit], .read-only [data-delete], .read-only [data-del-file],
.read-only [data-del-dups], .read-only [data-design-up], .read-only [data-design-link], .read-only [data-design-edit], .read-only [data-design-del], .read-only [data-design-unlink],
.read-only [data-artboard-toggle], .read-only [data-dz], .read-only .dropzone, .read-only form[data-comment], .read-only [data-add], .read-only [data-addtime],
.read-only [data-meta-setup], .read-only [data-meta-sync], .read-only [data-add-post], .read-only [data-edit-set], .read-only .ab-gact, .read-only .ab-fdel, .read-only .ab-gdel, .read-only .fd-del,
.read-only [data-more], .read-only [data-pay], .read-only [data-unpay], .read-only [data-reset], .read-only [data-setpw], .read-only [data-issue], .read-only [data-recalc],
.read-only .data-new-task, .read-only [data-new-task], .read-only [data-lang-set] ~ .x { display: none !important; }
.read-only [data-status-select], .read-only .settings-grid input, .read-only .settings-grid select, .read-only .settings-grid textarea, .read-only .settings-grid button { pointer-events: none; opacity: .65; }
.read-only .topbar h1 { line-height: 1.7; overflow: visible; }
/* ═════════ المحاسبة ═════════ */
.acct-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.acct-kpi { background: #fff; border-radius: 20px; padding: 18px 20px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.acct-kpi span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.acct-kpi span svg { width: 18px; height: 18px; padding: 6px; box-sizing: content-box; border-radius: 10px; }
.acct-kpi b { display: block; font-size: 28px; font-weight: 800; margin-top: 10px; letter-spacing: -.5px; }
.acct-kpi small { color: var(--muted); font-size: 12px; }
.acct-kpi.income span svg { background: #e7f7ef; color: #0f9960; }
.acct-kpi.expense span svg { background: #fdecec; color: #d63b3b; }
.acct-kpi.profit { background: linear-gradient(135deg, #fffaf1, #fdf0d9); border-color: #f0d9ad; }
.acct-kpi.profit span svg { background: var(--gold-grad); color: #fff; }
.acct-kpi.profit b { color: var(--brand-700); }
.acct-kpi.profit.neg b { color: #d63b3b; }
.acct-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.acct-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-inline-start: 8px; }
.acct-legend i.income, .acct-bar.income i { background: linear-gradient(180deg, #34c47c, #0f9960); }
.acct-legend i.expense, .acct-bar.expense i { background: linear-gradient(180deg, #f0796f, #d63b3b); }
.acct-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.acct-cats .row { justify-content: space-between; font-size: 13.5px; }
.acct-bar { height: 8px; border-radius: 999px; background: #f0f1f5; margin-top: 6px; overflow: hidden; }
.acct-bar i { display: block; height: 100%; border-radius: 999px; }
.acct-type { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acct-type label { cursor: pointer; }
.acct-type input { position: absolute; opacity: 0; pointer-events: none; }
.acct-type span { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 14px; border: 2px solid var(--line); font-weight: 800; color: var(--muted); }
.acct-type span svg { width: 18px; height: 18px; }
.acct-type .income input:checked + span { border-color: #0f9960; background: #e7f7ef; color: #0f9960; }
.acct-type .expense input:checked + span { border-color: #d63b3b; background: #fdecec; color: #d63b3b; }
.ok-text { color: #0f9960; } .bad-text { color: #d63b3b; }
@media (max-width: 760px) { .acct-kpis { grid-template-columns: 1fr; } .acct-kpi b { font-size: 24px; } }

.acct-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.acct-kpi.balance { background: linear-gradient(135deg, #f2f6ff, #e6eeff); border-color: #c9d8fb; }
.acct-kpi.balance span svg { background: #2563eb; color: #fff; }
.acct-kpi.balance b { color: #1d4ed8; }
.acct-kpi.balance.neg b { color: #d63b3b; }
.acct-type { grid-template-columns: repeat(3, 1fr); }
.acct-type .capital input:checked + span { border-color: #2563eb; background: #eef3ff; color: #1d4ed8; }
@media (max-width: 1100px) { .acct-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .acct-kpis { grid-template-columns: 1fr; } }

/* استرداد رأس المال / نقطة التعادل */

.acct-kpi.capital { background: linear-gradient(135deg, #f2f6ff, #e6eeff); border-color: #c9d8fb; }
.acct-kpi.capital span svg { background: #2563eb; color: #fff; }
.acct-kpi.capital b { color: #1d4ed8; }
.acct-bar.capital i { background: linear-gradient(180deg, #6b9bf3, #2563eb); }

/* حماية المحتوى لحساب الشريك */
.protected body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protected img, .protected video, .protected canvas { -webkit-user-drag: none; pointer-events: auto; }
.protected a[download], .protected [data-download], .protected .btn-download { display: none !important; }
.protected .watermark { position: fixed; inset: 0; z-index: 99999; pointer-events: none; background-repeat: repeat; }
.protected.shield body > *:not(.watermark) { filter: blur(24px) !important; }
@media print { .protected body { display: none !important; } }
/* الشريك يرى قائمة المهام فقط — بدون فتح التفاصيل */
.read-only a[href^="#/tasks/"], .read-only a[href^="#/designs"] { pointer-events: none; cursor: default; }
/* الرواتب للشريك: مشاهدة الرواتب والبنود الثابتة فقط */
.read-only [data-add-item], .read-only [data-rm], .read-only [data-save], .read-only [data-paid], .read-only [data-revert], .read-only [data-generate],
.read-only [data-issue-all], .read-only [data-rm-comp], .read-only [data-add-comp], .read-only [data-edit-sal] { display: none !important; }
.read-only [data-vis], .read-only [data-notes], .read-only [data-items] input, .read-only [data-items] select { pointer-events: none; }

.read-only a[href^="#/salaries/report/"] { display: none !important; }

/* العقود والمطبوعات */
.ct-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ct-tpls { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 16px; }
.ct-tpl { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #eee); border-radius: 12px; color: inherit; font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s; }
.ct-tpl svg { width: 16px; height: 16px; color: #c08a2b; flex: none; }
.ct-tpl:hover { background: rgba(192,138,43,.1); border-color: rgba(192,138,43,.4); }
.ct-editor { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
.ct-body { min-height: 70vh; height: auto !important; font-size: 14px; line-height: 2; resize: vertical; padding: 16px !important; }
@media (max-width: 1200px) { .ct-editor { grid-template-columns: 1fr; } .ct-body { min-height: 55vh; } }

textarea.input.ct-body { min-height: 78vh !important; max-height: none !important; }

/* تقييم الأداء */
.rate-pick { display: flex; gap: 6px; direction: ltr; justify-content: center; }
.rate-pick label { cursor: pointer; } .rate-pick input { position: absolute; opacity: 0; pointer-events: none; }
.rate-pick span { font-size: 34px; color: #d9dbe6; transition: color .12s, transform .12s; display: block; }
.rate-pick label.on span { color: #c08a2b; } .rate-pick label:hover span { transform: scale(1.12); }

/* العملاء والعروض */
.pcard { display: block; background: var(--surface, #fff); border: 1px solid var(--line, #eee); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; color: inherit; transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: rgba(192,138,43,.5); box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.pcard svg { width: 13px; height: 13px; vertical-align: -2px; }
.rep { display: flex; flex-direction: column; gap: 8px; }

/* ───── الشريط الجانبي v4 — أوضح وأكثر إحكامًا (عناصر بعرض كامل، أقسام واضحة، مؤشر نشط على الحافة) ───── */
.sidebar { background: #fff !important; border-inline-end: 1px solid #eceef2; }
.sidebar .brand { padding: 18px 24px !important; border-bottom: 1px solid #eef0f3; min-height: 84px; }
.nav { padding: 6px 0 14px !important; }
.nav a { margin: 0 !important; border-radius: 0 !important; padding: 12px 24px !important; gap: 14px !important; font-size: 15.5px; font-weight: 500 !important; color: #2b303b !important; box-shadow: none !important; background: none; line-height: 1.35; }
.nav a svg { width: 21px !important; height: 21px !important; color: #4b5563 !important; stroke-width: 1.8; }
.nav a:hover { background: #f8f6f2 !important; color: #111827 !important; }
.nav a.active { background: #fdf3e3 !important; color: #a8690f !important; font-weight: 700 !important; padding-inline-start: 24px !important; }
.nav a.active svg { color: #b97a1a !important; }
.nav a.active::before { content: '' !important; position: absolute; inset-inline-start: 0 !important; top: 0 !important; bottom: 0 !important; width: 3px !important; border-radius: 0 !important; background: #c08a2b !important; }
.nav .count { font-size: 12px; line-height: 22px; min-width: 24px; background: #fdf3e3; border-color: #f2d9ad; color: #8a5a10; }
.stage-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.stage-chips a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line, #e5e7eb); background: #fff; color: var(--ink-2, #374151); font-size: 13px; font-weight: 600; }
.stage-chips a b { color: #a8690f; margin-inline-start: 4px; }
.stage-chips a.on { background: #fdf3e3; border-color: #f2d9ad; color: #8a5a10; }

/* الشريط الجانبي بمقياس 80٪ على الشاشات الكبيرة — نفس التصميم أصغر، ومساحة العمل كما هي */
@media (min-width: 761px) {
  /* بين 761 و960 الشريط مخفي (زر القائمة) فلا مسافة له */
  /* zoom على العنصر الثابت نفسه يسبب تقطيعًا وآثارًا غريبة عند التمرير — نصغّر المحتوى داخله فقط */
  .sidebar { width: calc(var(--sidebar-w) * 0.78); }
  .sidebar > * { zoom: 0.78; }
  .main { margin-inline-start: calc(var(--sidebar-w) * 0.78) !important; }
}
@media (min-width: 761px) and (max-width: 960px) { .main { margin-inline-start: 0 !important; } }
.tcard { display: flex !important; flex-direction: column; gap: 10px; padding: 16px 18px; color: inherit; border-top: 3px solid var(--line, #e5e7eb); transition: box-shadow .15s, border-color .15s; }
.tcard:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.tcard h3 { font-size: 15.5px; font-weight: 800; margin: 0; line-height: 1.5; }
.tcard.st-new { border-top-color: #98a2b3; } .tcard.st-in_progress { border-top-color: #2e90fa; } .tcard.st-in_review { border-top-color: #f79009; } .tcard.st-completed { border-top-color: #12b76a; } .tcard.st-postponed { border-top-color: #d0d5dd; }
.tcard.is-overdue { border-top-color: #d92d20; }
.tcard-foot { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted, #6b7280); margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2, #f0f0f3); }
.tcard-foot svg { width: 14px; height: 14px; vertical-align: -2px; }
.tcard-foot .overdue { color: #d92d20; font-weight: 700; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.folder { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; background: #fff; cursor: pointer; color: inherit; transition: border-color .15s, box-shadow .15s; }
.folder:hover { border-color: var(--c); box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.folder-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); flex: none; }
.folder-ic svg { width: 24px; height: 24px; }
.folder b { font-size: 15px; }
.folder-crumb { display: flex; gap: 8px; align-items: center; padding: 12px 18px 0; font-size: 14px; }
.folder-crumb svg { width: 15px; height: 15px; vertical-align: -2px; }

/* الأدوار والصلاحيات */
.rc-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--rc) 14%, transparent); color: var(--rc); flex: none; }
.rc-ic svg { width: 19px; height: 19px; }
.rc-n { font-size: 20px; font-weight: 800; color: var(--rc); min-width: 24px; text-align: center; }
.rc-owner { --rc: #a8690f; } .rc-partner { --rc: #175cd3; } .rc-team_lead { --rc: #7a2e0e; } .rc-supervisor { --rc: #6941c6; } .rc-employee { --rc: #067647; } .rc-intern { --rc: #c4320a; }
.rm-role { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--rc); background: color-mix(in srgb, var(--rc) 10%, transparent); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.rm-role svg { width: 14px; height: 14px; }
.lv-legend { gap: 14px; margin: 0 0 14px; font-size: 12.5px; color: var(--muted, #667085); }
.lv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lv-pill { font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.lv0 { --lv: #667085; --lvb: #f2f4f7; } .lv1 { --lv: #175cd3; --lvb: #eff8ff; } .lv2 { --lv: #b54708; --lvb: #fffaeb; } .lv3 { --lv: #067647; --lvb: #ecfdf3; }
.lv-pill { color: var(--lv); background: var(--lvb); }
.lv-seg { display: inline-flex; background: var(--gray-bg, #f2f4f7); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: nowrap; }
.lv-seg button { border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted, #667085); cursor: pointer; white-space: nowrap; }
.lv-seg button:hover { color: var(--ink, #101828); }
.lv-seg button.on { background: var(--lvb, #fff); color: var(--lv, var(--ink)); box-shadow: 0 1px 2px rgba(16,24,40,.08), inset 0 0 0 1px color-mix(in srgb, var(--lv, #98a2b3) 30%, transparent); }
.lv-seg button.def.on { background: #fff; color: var(--ink, #101828); }
.rm-notes { display: grid; gap: 8px; font-size: 12.5px; color: var(--muted, #667085); }
.rm-notes > div { display: flex; gap: 8px; align-items: flex-start; } .rm-notes svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #a8690f; }
.people-list li { display: flex; align-items: center; gap: 12px; }
.people-list li.off { opacity: .55; }
.people-list .pl-act { margin-inline-start: 8px; }
.pp-head { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--gray-bg, #f9fafb); }
.pp-group { margin: 14px 2px 4px; font-size: 11.5px; font-weight: 800; color: #a8690f; }
.perm-person { display: grid; gap: 4px; }
.pp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; }
.pp-row > div:first-child { flex: 1; min-width: 0; }
.pp-row.custom { background: rgba(192,138,43,.08); border-color: rgba(192,138,43,.35); }
@media (max-width: 760px) { .pp-row { flex-direction: column; align-items: stretch; } .lv-seg { overflow-x: auto; } .people-list li { flex-wrap: wrap; } }
.choice { display: flex; gap: 6px; align-items: center; } .choice .input { flex: 1; }
.input.locked { pointer-events: none; background: var(--gray-bg, #f2f4f7); color: var(--ink-2, #344054); }
select.input.locked { background-image: none; }
.sum-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sum-chip { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: var(--lv); background: var(--lvb); }
.pp-head .rc-ic { width: 40px; height: 40px; }
.pp-head select { min-width: 140px; }
.pp-preview { margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px solid rgba(192,138,43,.3); background: rgba(192,138,43,.05); }
.pp-preview svg { width: 15px; height: 15px; vertical-align: -3px; color: #a8690f; }
.alert-inline { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(192,138,43,.08); color: var(--ink-2, #344054); }
.alert-inline svg { width: 16px; height: 16px; color: #a8690f; flex: none; }
@media (max-width: 760px) { .pp-head { flex-wrap: wrap; } }
/* الأدوار — بطاقات */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.role-card2 { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line, #eaecf0); position: relative; overflow: hidden; transition: .15s; }
.role-card2::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--rc); }
.role-card2:hover { box-shadow: 0 8px 24px rgba(16,24,40,.07); border-color: color-mix(in srgb, var(--rc) 35%, var(--line, #eaecf0)); }
.rc2-top { display: flex; align-items: flex-start; gap: 12px; }
.rc2-top b { font-size: 15.5px; }
.rc2-lock { color: var(--rc); opacity: .6; } .rc2-lock svg { width: 18px; height: 18px; }
.rc2-stats { display: flex; gap: 8px; }
.rc2-stats div { flex: 1; text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--lvb); color: var(--lv); }
.rc2-stats b { display: block; font-size: 18px; line-height: 1.2; } .rc2-stats span { font-size: 11px; font-weight: 600; }
.role-card2 .sum-chips { margin-top: 0; flex: 1; align-content: flex-start; }
.rc2-people { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line, #eaecf0); color: inherit; }
.rc2-people svg { width: 16px; height: 16px; margin-inline-start: auto; color: var(--muted, #98a2b3); }
.av-stack { display: inline-flex; }
.av-stack > * { width: 28px !important; height: 28px !important; font-size: 11px !important; border: 2px solid var(--surface, #fff); margin-inline-start: -8px; }
.av-stack > *:first-child { margin-inline-start: 0; }
.pp-row { transition: background .12s; } .pp-row:hover { background: var(--gray-bg, #f9fafb); }
.pp-row.custom:hover { background: rgba(192,138,43,.12); }
/* عارض PDF للمشاهدة فقط */
.pdf-view { position: fixed; inset: 0; z-index: 600; display: flex; flex-direction: column; background: #e9eaee; }
.pdf-view-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line, #eaecf0); }
.pdf-view iframe { flex: 1; width: 100%; border: 0; background: #e9eaee; }
/* مراحل العميل — شريط قابل للنقر */
.pcard[draggable] { cursor: grab; } .pcard.dragging { opacity: .45; }
.rc2-top .grow { flex: 1; min-width: 0; }
.rc2-top > .icon-btn, .rc2-top > .rc2-lock { margin-inline-start: auto; flex: none; }
@media (max-width: 760px) {
  .lv-seg { display: flex; width: 100%; overflow-x: auto; }
  .lv-seg button { flex: 1 0 auto; padding: 7px 8px; }
  .role-grid { grid-template-columns: 1fr; }
  .rc2-stats div { padding: 6px 2px; }
  .pp-head select { width: 100% !important; }
}
/* رسالة تأكيد تغيير المرحلة */
.st-lead, .st-postponed { --stc: #667085; --stb: #f2f4f7; } .st-contacted { --stc: #175cd3; --stb: #eff8ff; } .st-proposal { --stc: #a8690f; --stb: #fdf3e3; }
.st-negotiation { --stc: #b54708; --stb: #fffaeb; } .st-won { --stc: #067647; --stb: #ecfdf3; } .st-lost { --stc: #b42318; --stb: #fef3f2; }
.pv-card svg { width: 15px; height: 15px; vertical-align: -3px; color: #a8690f; }
.pv-bar { height: 8px; border-radius: 99px; background: #f3ede2; margin-top: 10px; overflow: hidden; }
.pv-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c08a2b, #e0b76a); border-radius: 99px; transition: width .4s; }
/* بوابة العميل */
.cp-shell { position: fixed; inset: 0; display: flex; flex-direction: column; background: #f6f5f2; font-family: var(--font); direction: rtl; }
.cp-board { flex: 1; min-height: 0; position: relative; }
.cp-dv { position: absolute; inset: 0; }
.cp-dv .dv { height: 100%; }
.cp-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #667085; text-align: center; padding: 20px; }
.cp-empty img { width: 40px; opacity: .8; } .cp-empty b { color: #101828; font-size: 17px; }
.cp-dv:not(.with-side) .dv-side, .cp-dv:not(.with-side) [data-sheet] { display: none !important; }
.cp-dv:not(.with-side) .dv-body { grid-template-columns: minmax(0, 1fr) !important; }
.cp-dv .dv-files, .cp-dv .dv-meta { display: none; }
/* محادثة العميل */
.cp-sub { background: #fff; border-bottom: 1px solid #eceef3; }
.cp-board { overflow-y: auto; }
.cp-page { max-width: 860px; margin: 0 auto; padding: 24px 18px 40px; }
.cp-page h2 { margin: 0 0 6px; font-size: 22px; }
.cp-list { display: grid; gap: 10px; margin-top: 14px; }
.cp-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid #eceef3; }
.cp-item.unread { border-color: #f2d9ad; background: #fffaf2; }
.cp-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #fdf3e3; color: #a8690f; flex: none; }
.cp-ic svg { width: 19px; height: 19px; }
@media (max-width: 760px) { .cp-item { flex-wrap: wrap; } }

/* صفحة العميل المحتمل على الهاتف: أزرار مدمجة */
.pdf-view-wait { position: absolute; inset: 56px 0 0; display: grid; place-items: center; color: #667085; font-weight: 600; background: #e9eaee; z-index: 1; }
.pdf-view { position: fixed; }
/* تقويم العميل */
/* بوابة العميل: تقويم النشر */
.cp-page:has(.cc-wrap) { max-width: 1180px; }
.cc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cc-head h2 { margin: 0; font-size: 24px; } .cc-head p { margin: 4px 0 0; color: #667085; font-size: 14px; }
.cc-nav { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #eceef3; border-radius: 14px; padding: 4px; }
.cc-nav button { width: 36px; height: 36px; border-radius: 10px; border: 0; background: #f9fafb; display: grid; place-items: center; cursor: pointer; color: #344054; }
.cc-nav button svg { width: 18px; height: 18px; }
.cc-nav b { min-width: 140px; text-align: center; font-size: 15px; }
.cc-stats { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 16px; }
.cc-stat { flex: 1 0 120px; background: #fff; border: 1px solid #eceef3; border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.cc-stat b { font-size: 22px; color: #101828; } .cc-stat span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #667085; }
.cc-stat span i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.cc-stat.lead { background: linear-gradient(135deg, #1d1a16, #4a3714); border: 0; } .cc-stat.lead b { color: #fff; } .cc-stat.lead span { color: #e9c98f; }
.cc-stat.ok { background: #ecfdf3; border-color: #d1fadf; } .cc-stat.ok b { color: #067647; }
.cc-note { background: #fff; border: 1px dashed #d0d5dd; border-radius: 12px; padding: 12px; text-align: center; color: #667085; margin-bottom: 12px; }
.cc-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cc-cal { background: #fff; border: 1px solid #eceef3; border-radius: 18px; padding: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.cc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cc-h { text-align: center; font-size: 12px; font-weight: 700; color: #6b6f80; padding: 6px 0; } .cc-h .s { display: none; }
.cc-day { min-height: 104px; background: #fcfcfd; border: 1px solid #f0f1f4; border-radius: 12px; padding: 7px; display: flex; flex-direction: column; gap: 4px; text-align: start; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.cc-day:hover { border-color: #e4c48e; }
.cc-day.off { background: transparent; border-color: transparent; cursor: default; }
.cc-day.has { background: #fff; }
.cc-day.past { opacity: .6; }
.cc-day.today .cc-n { background: #c08a2b; color: #fff; }
.cc-day.sel { border-color: #c08a2b; box-shadow: 0 0 0 3px rgba(192,138,43,.18); opacity: 1; }
.cc-n { align-self: flex-start; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #344054; }
.cc-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-ev { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 7px; border-radius: 7px; color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); border-inline-start: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-ok { font-style: normal; width: 13px; height: 13px; border-radius: 50%; background: #12b76a; color: #fff; font-size: 9px; display: inline-grid; place-items: center; flex: none; }
.cc-dots { display: none; gap: 3px; justify-content: center; flex-wrap: wrap; } .cc-dots i { width: 6px; height: 6px; border-radius: 50%; }
.cc-side { position: sticky; top: calc(var(--topbar-h) + 12px); background: #fff; border: 1px solid #eceef3; border-radius: 18px; padding: 16px; min-height: 160px; }
.cc-side h3 { margin: 0 0 12px; font-size: 16px; }
.cc-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: #fafafa; margin-bottom: 8px; }
.cc-item > i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.cc-item b { display: block; font-size: 14px; } .cc-item small { color: #667085; font-size: 12px; }
.cc-badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #ecfdf3; color: #067647; white-space: nowrap; }
.cc-badge.wait { background: #f2f4f7; color: #667085; }
@media (max-width: 900px) { .cc-body { grid-template-columns: 1fr; } .cc-side { position: static; } }
@media (max-width: 640px) {
  .cc-head h2 { font-size: 20px; } .cc-nav { width: 100%; justify-content: space-between; } .cc-nav b { min-width: 0; }
  .cc-cal { padding: 8px; border-radius: 14px; } .cc-grid { gap: 4px; }
  .cc-h .l { display: none; } .cc-h .s { display: inline; }
  .cc-day { min-height: 52px; padding: 4px; align-items: center; border-radius: 10px; }
  .cc-n { align-self: center; font-size: 12px; min-width: 22px; height: 22px; }
  .cc-evs { display: none; } .cc-dots { display: flex; }
  .cc-stat { flex: 1 0 96px; padding: 10px 12px; } .cc-stat b { font-size: 19px; }
}

/* خطة العمل والنشر (صفحة الشركة) */
.plan-card { padding: 0; overflow: hidden; margin-bottom: 20px !important; }
[data-plan-card] { display: block; margin-bottom: 4px; }
.pl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 20px 24px; border-bottom: 1px solid #f0f1f4; }
.pl-title { display: flex; align-items: center; gap: 12px; }
.pl-title > i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #fbefd9, #f6e1b8); color: #a8690f; }
.pl-title > i svg { width: 20px; height: 20px; }
.pl-title h3 { margin: 0 0 2px; font-size: 17px; } .pl-title small { color: #6b6f80; font-size: 12px; }
.pl-contract { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: #ecfdf3; color: #067647; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid #d1fadf; }
.pl-contract svg { width: 15px; height: 15px; } .pl-contract em { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #fff; }
.pl-contract.draft { background: #fffaeb; color: #b54708; border-color: #fedf89; }
.pl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pl-stat { display: flex; gap: 14px; align-items: center; padding: 20px 24px; border-inline-start: 1px solid #f0f1f4; }
.pl-stat:first-child { border-inline-start: 0; }
.pl-stat > i { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #f9fafb; color: #667085; }
.pl-stat > i svg { width: 17px; height: 17px; }
.pl-stat > div { flex: 1; min-width: 0; } .pl-stat span { display: block; font-size: 12px; color: #6b6f80; }
.pl-stat span { margin-bottom: 4px; } .pl-stat b { font-size: 15px; line-height: 1.5; color: #101828; } .pl-stat small { display: block; font-size: 12px; color: #667085; }
.pl-bar { height: 6px; border-radius: 999px; background: #f2f4f7; margin-top: 8px; overflow: hidden; } .pl-bar s { display: block; height: 100%; background: linear-gradient(90deg, #12b76a, #32d583); text-decoration: none; }
@media (max-width: 700px) { .pl-stat { border-inline-start: 0; border-top: 1px solid #f0f1f4; } }
.pl-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pl-days label span { display: block; font-size: 12px; color: #667085; margin-bottom: 3px; }
.pl-work { display: grid; grid-template-columns: 2fr 1fr 1.2fr auto; gap: 6px; }
.pl-preview { background: #f6fef9; border: 1px solid #d1fadf; border-radius: 10px; padding: 10px 12px; min-height: 20px; }
@media (max-width: 700px) { .pl-days { grid-template-columns: repeat(2, 1fr); } .pl-work { grid-template-columns: 1fr 1fr; } }

/* بوابة العميل: الرئيسية */
.ov-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.ov-card { background: #fff; border: 1px solid #eceef3; border-radius: 14px; padding: 18px; }
.ov-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; } .ov-card h3 svg { width: 18px; color: #a8690f; }
.ov-plan { margin: 0 0 8px; line-height: 1.9; color: #344054; }
.ov-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #f2f4f7; }
.ov-row span { color: #667085; font-size: 13px; }
@media (max-width: 760px) { .ov-grid { grid-template-columns: 1fr; } }

.pl-preview { padding: 14px 16px; }
.pl-preview svg { width: 14px; height: 14px; }
.pl-preview .pv-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl-preview .pv-ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #12b76a; color: #fff; flex: none; }
.pl-preview .pv-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.pl-preview .pv-tags span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid #d1fadf; color: #344054; }
.pl-preview .pv-tags em { font-style: normal; font-weight: 700; color: #067647; }
.pl-preview p { margin: 8px 0 0; font-size: 13px; color: #475467; line-height: 1.8; }

/* التقويم: الشركات + تأكيد الجدولة */
.ev.done { opacity: 1; box-shadow: inset 0 0 0 1px #12b76a; }

@media (max-width: 640px) {
  .cc-h .s { font-size: 10px; }
  .cp-page { padding: 16px 12px 32px; }
}

/* بوابة العميل على الهاتف: شكل تطبيق — شريط تنقل سفلي عائم مثل لوحة الإدارة والموظفين */
.cp-tabbar, .cp-sheet { display: none; }
@media (max-width: 760px) {
  .cp-board { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .cp-dv { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .cp-tabbar { display: flex; }
  .cp-sheet:not([hidden]) { display: flex; position: fixed; inset: 0; z-index: 60; background: rgba(16,24,40,.35); align-items: flex-end; animation: cpFade .15s; }
}
@keyframes cpFade { from { opacity: 0; } } @keyframes cpUp { from { transform: translateY(40px); opacity: .6; } }

@media (max-width: 760px) { .cp-board { scrollbar-width: none; } .cp-board::-webkit-scrollbar { display: none; } }

/* تقويم العميل: يوم / أسبوع / شهر */
.cc-views { display: inline-flex; background: #fff; border: 1px solid #eceef3; border-radius: 12px; padding: 4px; gap: 2px; }
.cc-views button { border: 0; background: none; padding: 7px 16px; border-radius: 9px; font: 600 13.5px var(--font); color: #667085; cursor: pointer; }
.cc-views button.on { background: #1d1a16; color: #fff; }
.cc-wrap > .cc-nav { margin-bottom: 14px; justify-content: space-between; }
.cc-nav [data-today] { width: auto; padding: 0 12px; font: 600 13px var(--font); }
.cc-nav b { flex: 1; }
.cc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cc-wd { background: #fff; border: 1px solid #eceef3; border-radius: 14px; overflow: hidden; min-height: 220px; }
.cc-wd.today { border-color: #c08a2b; box-shadow: 0 0 0 3px rgba(192,138,43,.15); }
.cc-wd.past { opacity: .65; }
.cc-wh { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 0; border-bottom: 1px solid #f0f1f4; background: #fcfcfd; font: inherit; cursor: pointer; }
.cc-wh span { font-size: 12px; color: #6b6f80; font-weight: 600; } .cc-wh b { font-size: 18px; color: #101828; }
.cc-wd.today .cc-wh b { color: #a8690f; }
.cc-wl { padding: 8px; display: grid; gap: 6px; }
.cc-wl .cc-item { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px; margin: 0; border-inline-start: 3px solid var(--c); border-radius: 10px; }
.cc-wl .cc-item > i { display: none; } .cc-wl .cc-item b { font-size: 13px; }
.cc-none { display: block; text-align: center; color: #d0d5dd; padding: 10px 0; }
.cc-dayv { background: #fff; border: 1px solid #eceef3; border-radius: 18px; padding: 16px; display: grid; gap: 4px; }
.cc-sh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; } .cc-sh h3 { margin: 0; }
.cc-open { border: 1px solid #eceef3; background: #fff; border-radius: 9px; padding: 5px 10px; font: 600 12px var(--font); color: #a8690f; cursor: pointer; }
@media (max-width: 900px) {
  .cc-week { grid-template-columns: 1fr; }
  .cc-wd { min-height: 0; display: grid; grid-template-columns: 64px 1fr; }
  .cc-wh { border-bottom: 0; border-inline-end: 1px solid #f0f1f4; justify-content: center; }
}
@media (max-width: 640px) { .cc-views { width: 100%; } .cc-views button { flex: 1; } .cc-head { gap: 10px; } }

/* رأس بوابة العميل على الهاتف — مثل تطبيق الإدارة والموظفين */
 .cp-title { display: none; }
@media (max-width: 760px) {
  .cp-shell { background: #f4f3f0; }
  .cp-title { display: block; grid-column: 1 / -1; margin: 6px 0 0; font-size: 22px; font-weight: 800; color: #101828; text-align: start; }
  .cp-page > .cc-wrap > .cc-head h2, .cp-page > h2:first-child { display: none; }
  .cc-head p { margin-top: 0; }
}
@media (max-width: 900px) {
  .cc-wl .cc-item { flex-direction: row; align-items: center; justify-content: space-between; padding: 8px 10px; }
  .cc-wl .cc-item small { display: none; }
  .cc-wl .cc-item .cc-badge { font-size: 10.5px; padding: 2px 7px; }
  .cc-wh b { font-size: 17px; }
}
@media (max-width: 640px) { .cc-nav b { font-size: 13.5px; } }
/* بطاقات أرقام التقويم على الهاتف: صفّان بدل التمرير الأفقي */
@media (max-width: 640px) {
  .cc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: visible; }
  .cc-stat { padding: 10px 12px; min-width: 0; }
  .cc-stat.lead { grid-column: span 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .cc-stat.lead b { font-size: 26px; order: 2; }
  .cc-stat span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* شريط التنقل السفلي العائم: زجاج ضبابي في كل الواجهات (الإدارة، الموظفون، العميل) */
@media (max-width: 760px) {
  .tabbar { background: rgba(255,255,255,.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .tabbar { background: rgba(255,255,255,.97); } }
}

/* بوابة العميل: رأس الهاتف = نفس رأس الإدارة والموظفين (صورة الحساب، الشعار، الإشعارات، عنوان الصفحة) */
@media (max-width: 760px) {
  .cp-bcount { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #d92d20; color: #fff; font: 700 10.5px/18px var(--font); font-style: normal; text-align: center; border: 2px solid #fff; }
}

.ct-pdf-in { display: flex; align-items: center; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.ct-pdf-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fef3f2; color: #b42318; flex: none; }
.ct-pdf-ic svg { width: 20px; height: 20px; }
.ct-pdf-in b { display: block; } .ct-pdf-in small { color: #667085; font-size: 12.5px; }

/* عارض العقد (PDF) في بوابة العميل — مشاهدة فقط */
.pdfv { position: fixed; inset: 0; z-index: 200; background: #e9e8e4; display: flex; flex-direction: column; direction: rtl; -webkit-user-select: none; user-select: none; }
.pdfv-bar { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: #fff; border-bottom: 1px solid #eceef3; }
.pdfv-bar b { font-size: 16px; }
.pdfv-note { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #667085; background: #f2f4f7; padding: 3px 10px; border-radius: 999px; margin-inline-end: auto; }
.pdfv-note svg { width: 14px; height: 14px; }
.pdfv-x { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #eceef3; background: #fff; display: grid; place-items: center; cursor: pointer; }
.pdfv-x svg { width: 18px; height: 18px; }
.pdfv-pages { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; -webkit-overflow-scrolling: touch; }
.pdfv-pages canvas, .pdfv-pages img { background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.12); border-radius: 4px; max-width: 100%; height: auto; pointer-events: none; }
@media print { .pdfv, .cp-shell { display: none !important; } body::after { content: 'الطباعة غير متاحة'; } }

/* الدفعات والإيصالات (صفحة الشركة) */
.pay-card { padding: 0; overflow: hidden; }
.ps { padding: 18px 24px 16px; border-bottom: 1px solid #f0f1f4; }
.ps-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ps-c { border: 1px solid #f0f1f4; background: #fcfcfd; border-radius: 14px; padding: 12px 16px; }
.ps-c span { display: block; font-size: 12px; color: #6b6f80; margin-bottom: 2px; } .ps-c b { font-size: 19px; color: #101828; } .ps-c b small, .pr-amt small { font-size: 11px; font-weight: 600; color: #6b6f80; }
.ps-c.ok { background: #f6fef9; border-color: #d1fadf; } .ps-c.ok b { color: #067647; }
.ps-c.bad { background: #fffbfa; border-color: #fecdca; } .ps-c.bad b { color: #b42318; }
.ps-bar { height: 8px; border-radius: 99px; background: #f2f4f7; margin-top: 14px; overflow: hidden; } .ps-bar s { display: block; height: 100%; background: linear-gradient(90deg, #12b76a, #32d583); }
.ps-cap { font-size: 11.5px; color: #667085; margin-top: 6px; }
.pg { padding: 6px 24px 14px; }
.pg + .pg { border-top: 1px solid #f0f1f4; }
.pg-h { display: flex; align-items: center; gap: 8px; padding: 12px 0 6px; font-weight: 700; font-size: 14px; color: #344054; }
.pg-h svg { width: 16px; height: 16px; color: #a8690f; } .pg-h small { font-weight: 500; color: #6b6f80; font-size: 12px; }
.pg-m { border: 1px solid #f0f1f4; border-radius: 14px; overflow: hidden; margin-top: 8px; }
.pg-mh { padding: 8px 14px; background: #fafafa; font-size: 12px; font-weight: 700; color: #667085; border-bottom: 1px solid #f0f1f4; }
.pr { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid #f5f5f7; }
.pg-mh + .pr, .pg-m > .pr:first-child { border-top: 0; }
.pr.paid { background: #fcfefd; }
.pr-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f2f4f7; color: #667085; }
.pr-ic svg { width: 16px; height: 16px; }
.pr-ic.b-ok { background: #ecfdf3; color: #067647; } .pr-ic.b-bad { background: #fef3f2; color: #b42318; } .pr-ic.b-warn { background: #fffaeb; color: #b54708; }
.pr-main { min-width: 0; } .pr-main b { display: block; font-size: 14px; } .pr-main small { display: block; font-size: 12px; color: #667085; margin-top: 2px; }
.pr-amt { font-weight: 800; font-size: 15px; white-space: nowrap; }
.pr-act { display: flex; align-items: center; gap: 6px; }
.pr-recv { background: #fff; border-color: #e4c48e; color: #a8690f; }
.pr-recv:hover { background: #fdf6ea; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
@media (max-width: 760px) {
  .ps, .pg { padding-inline: 14px; }
  .pr { grid-template-columns: 34px minmax(0, 1fr) auto; row-gap: 8px; }
  .pr .badge { grid-column: 3; grid-row: 1; }
  .pr-amt { grid-column: 2; } .pr-act { grid-column: 2 / -1; justify-content: flex-end; }
}

/* عناصر النشر داخل المهمة — بطاقات مجمّعة حسب الأسبوع */
.ti-top { display: flex; align-items: center; gap: 14px; padding: 4px 18px 14px; }
.ti-ring { --p: 0; width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(closest-side, #fff 76%, transparent 78% 100%), conic-gradient(#12b76a calc(var(--p) * 1%), #f2f4f7 0); }
.ti-ring b { font-size: 13px; }
.ti-cnt { display: flex; flex-wrap: wrap; gap: 6px; }
.ti-c { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #f9fafb; border: 1px solid #eaecf0; font-size: 12px; color: #475467; }
.ti-c i { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; } .ti-c b { color: #101828; }
.ti-c.st-design i { background: #7a5af8; } .ti-c.st-review i { background: #f79009; } .ti-c.st-approved i { background: #2e90fa; } .ti-c.st-scheduled i, .ti-c.st-published i { background: #12b76a; }
.ti-week { padding: 0 18px 16px; }
.ti-wh { display: flex; align-items: baseline; gap: 8px; padding: 10px 0 8px; border-top: 1px dashed #eaecf0; }
.ti-wh b { font-size: 13.5px; } .ti-wh span { font-size: 12px; color: #667085; } .ti-wh em { margin-inline-start: auto; font-style: normal; font-size: 11.5px; color: #6b6f80; }
.ti-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ti-media { position: relative; display: grid; place-items: center; align-content: center; gap: 6px; aspect-ratio: 4 / 3; margin: -12px -12px 2px; border-bottom: 1px solid #eaecf0; background: color-mix(in srgb, var(--c) 6%, #f9fafb); overflow: hidden; }
.ti-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.ti-media small { font-size: 11.5px; color: #6b6f80; }
.ti-media .ti-ic { width: 44px; height: 44px; } .ti-media .ti-ic svg { width: 20px; height: 20px; }
.ti-media.has { cursor: zoom-in; } .ti-media.has:hover img { transform: scale(1.04); }
.ti-zoom { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(16,24,40,.55); color: #fff; opacity: 0; transition: opacity .2s; }
.ti-zoom svg { width: 15px; height: 15px; } .ti-media.has:hover .ti-zoom, .ti-media.has:focus-visible .ti-zoom { opacity: 1; }
.ti-tile { position: relative; display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid #eaecf0; box-shadow: 0 1px 2px rgba(16,24,40,.04); overflow: hidden; }
.ti-tile::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.ti-tile.st-scheduled, .ti-tile.st-published { background: #f6fef9; border-color: #d1fadf; }
.ti-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); flex: none; }
.ti-ic svg { width: 16px; height: 16px; }
.ti-plat { display: flex; flex-wrap: wrap; gap: 4px; } .ti-plat span { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #f2f4f7; color: #475467; }
/* نموذج المهمة: العناصر */
.tf-ih { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tf-ih label { margin: 0; } .tf-ih small { font-weight: 400; margin-inline-start: 6px; }
.tf-items { display: grid; gap: 8px; }
.tf-item { display: grid; gap: 8px; padding: 10px; border: 1px solid #eaecf0; border-radius: 12px; background: #fcfcfd; }
.tf-r1 { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(140px, 1.4fr) minmax(150px, 1fr) auto auto; gap: 8px; align-items: end; }
.tf-date { display: grid; gap: 2px; font-size: 11px; color: #667085; margin: 0; }
.tf-r2 { display: grid; gap: 8px; } .tf-r2:empty { display: none; }
.tf-plat, .tf-wd { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-plat label, .tf-wd label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 9px; border: 1px solid #eaecf0; border-radius: 999px; background: #fff; cursor: pointer; margin: 0; }
.tf-sl { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; margin: 0; } .tf-sl .input { width: 80px; }
.tf-bulk { display: grid; gap: 10px; padding: 12px; margin-bottom: 10px; border: 1px dashed #d0d5dd; border-radius: 12px; background: #fffcf5; }
.tf-bg { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 8px; } .tf-bg label { display: grid; gap: 2px; font-size: 11px; color: #667085; margin: 0; }
@media (max-width: 640px) { .tf-r1 { grid-template-columns: 1fr 1fr; } .tf-r1 .tf-date { grid-column: 1 / -1; } .tf-bg { grid-template-columns: 1fr 1fr; } }
.ti-st { appearance: none; -webkit-appearance: none; width: 100%; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid #eaecf0; background: #f2f4f7; font: 700 12.5px var(--font); color: #475467; cursor: pointer; text-align: center; text-align-last: center; }
.ti-st.st-design { background: #f4f3ff; border-color: #d9d6fe; color: #5925dc; } .ti-st.st-review { background: #fffaeb; border-color: #fedf89; color: #b54708; }
.ti-st.st-approved { background: #eff8ff; border-color: #b2ddff; color: #175cd3; } .ti-st.st-scheduled, .ti-st.st-published { background: #12b76a; border-color: #12b76a; color: #fff; }
@media (max-width: 640px) { .ti-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .ti-tile { padding: 10px; } .ti-media { margin: -10px -10px 2px; } .ti-week, .ti-top { padding-inline: 12px; } }

.cc-badge.appr { background: #eff8ff; color: #175cd3; }
/* مسافات بطاقتي الخطة والدفعات في صفحة الشركة */
[data-pay-card] { display: block; }
.pay-card { margin-bottom: 20px !important; }

/* ═════════ بوابة العميل — تحديث التصميم ═════════ */
.cp-shell { background: #f6f5f2; }
@media (min-width: 761px) {
  .cp-page { padding: 32px 24px 56px; }
}
.cp-page > h2:first-child { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 4px; }
.cp-page > h2:first-child + p, .cp-page > h2:first-child + .small { color: #667085; margin: 0 0 14px; }
.cp-list { gap: 12px; margin-top: 18px; }
.cp-item { padding: 16px 18px; border-radius: 16px; border-color: #edeef2; box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: box-shadow .15s, border-color .15s; }
.cp-item:hover { border-color: #e6d3ad; box-shadow: 0 6px 18px rgba(60,40,10,.06); }
.cp-item b { font-size: 15px; }
.cp-ic { width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(135deg, #fdf3e3, #f9e6c4); }
.cp-item .btn-primary { box-shadow: none; }
.cp-empty { min-height: 0; }
.cp-empty img { width: 40px; }
.ov-card { border-radius: 18px; }
.cc-stat.lead { background: linear-gradient(135deg, #fff, #fdf6ea); border: 1px solid #f0e3c8; }
.cc-stat.lead b { color: #1d1a16; } .cc-stat.lead span { color: #8a6a2f; }
/* العارض */
.pdfv-bar { gap: 12px; }
.pdfv-x { order: -1; }
.pdfv-note { margin-inline-start: auto; margin-inline-end: 0; }
.pdfv-doc { width: min(900px, 100%); border: 0; background: #fff; border-radius: 6px; box-shadow: 0 4px 18px rgba(0,0,0,.12); pointer-events: none; min-height: 600px; }

/* ═════════ بوابة العميل بتخطيط لوحة الإدارة (قائمة جانبية + شريط علوي) ═════════ */
body.dv-page.cp-body { overflow: visible; overflow-x: clip; height: auto; overscroll-behavior-y: auto; }
.cp-app.cp-shell { position: static; inset: auto; display: flex; flex-direction: row; min-height: 100vh; background: var(--bg, #f6f5f2); font-family: var(--font); }
.cp-app .main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.cp-app .content.cp-board { flex: 1; position: relative; padding: 0; overflow: visible; }
.cp-app .cp-page { max-width: 1180px; margin: 0; padding: 28px 32px 56px; }
.cp-app .cp-page > h2:first-child { display: none; }
.cp-app .cp-sub { background: #fff; border-bottom: 1px solid var(--line, #eceef3); }
.cp-app .cp-dv { position: relative; inset: auto; height: calc(100vh - var(--topbar-h, 64px) - 58px); }
.cp-app .topbar .tb-avatar{ display: none; }
.cp-app .topbar .cp-title { flex: 1; margin: 0; }
.cp-app .nav a .count { margin-inline-start: auto; }
@media (max-width: 760px) {
  .cp-app.cp-shell { display: block; }
  .cp-app .sidebar { display: none; }
  .cp-app .topbar { display: grid; }
  .cp-app .topbar .tb-avatar { display: grid; }
  .cp-app .topbar .title-tile { display: none !important; }
  .cp-app .cp-page { padding: 16px 12px 110px; }
  .cp-app .cp-dv { height: calc(100vh - 220px); }
}
.cp-app .topbar .cp-title { display: block; font-size: 18px; font-weight: 700; }
.cp-app .topbar .icon-btn[data-bell] { position: relative; }
.cp-app .cp-bcount { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #d92d20; color: #fff; font: 700 10.5px/18px var(--font); font-style: normal; text-align: center; border: 2px solid #fff; }
@media (max-width: 760px) { .cp-app .topbar .cp-title { font-size: 24px; font-weight: 800; } }
.cc-stats { align-items: flex-start; } .cc-stat { align-content: start; height: auto; }
/* بوابة العميل: مسافات المحتوى */
.cp-app .cp-page { max-width: 1240px; margin: 0 auto; padding: 32px 36px 64px; }
.cp-app .cp-page > * + * { margin-top: 16px; }
.cp-app .ov-grid { gap: 16px; }
.cp-app .ov-card { padding: 22px; }
@media (max-width: 760px) {
  .cp-app .cp-page { padding: 18px 16px 120px; }
  .cp-app .cp-page > * + * { margin-top: 14px; }
   .cp-app .ov-grid { gap: 10px; margin: 14px 0; } .cp-app .ov-card { padding: 16px; }
  .cp-app .cp-item { padding: 14px; }
}
/* بطاقة «بوابة العميل» في القائمة الجانبية */

/* دفعات العميل */
.cpay { margin: 0; }
.cpay-next { display: flex; align-items: center; gap: 12px; margin: 16px 24px 4px; padding: 14px 16px; border-radius: 14px; background: #fffaeb; border: 1px solid #fedf89; }
.cpay-next.late { background: #fef3f2; border-color: #fecdca; } .cpay-next.done { background: #ecfdf3; border-color: #d1fadf; }
.cpay-next small { display: block; font-size: 11.5px; color: #6b6f80; } .cpay-next b { display: block; font-size: 15px; } .cpay-next span:not(.pr-ic) { font-size: 12.5px; color: #667085; }
@media (max-width: 760px) { .cpay-next { margin: 14px 14px 4px; } }

/* الشريط الجانبي أكبر بـ 125% لكل الواجهات ما عدا الإدارة (الموظفون، الشركاء، العملاء) */
@media (min-width: 761px) {
  .shell:not([data-role=admin]) .sidebar { width: calc(var(--sidebar-w) * 0.975); }
  .shell:not([data-role=admin]) .sidebar > * { zoom: 0.975; }
  .shell:not([data-role=admin]) .main { margin-inline-start: calc(var(--sidebar-w) * 0.975) !important; }
}
/* الآيباد عمودياً (761–960): الشريط مخفي خلف زر القائمة، فلا مسافة فارغة مكانه */
@media (min-width: 761px) and (max-width: 960px) { .shell:not([data-role=admin]) .main { margin-inline-start: 0 !important; } }
/* عدّاد الإشعارات على الجرس */
.icon-btn[data-bell] .dot, .icon-btn[data-bell] .tcount { position: absolute; top: -7px; inset-inline-end: -7px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #d92d20; color: #fff; border: 2px solid #fff;
  font: 700 11px/1 var(--font); letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: visible; z-index: 2; }
.icon-btn[data-bell] .dot[hidden], .icon-btn[data-bell] .tcount[hidden] { display: none; }
.icon-btn[data-bell] { overflow: visible; }

/* محادثة الاستفسارات */
.ch-card { padding: 0; overflow: hidden; }
.ch { display: flex; flex-direction: column; }
.ch-thread { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; max-height: 58vh; min-height: 260px; overflow-y: auto; background: #fbfaf7; }
.ch-empty { margin: auto; display: grid; justify-items: center; gap: 8px; color: #6b6f80; font-size: 13px; text-align: center; } .ch-empty svg { width: 30px; height: 30px; color: #d0d5dd; }
.ch-day { text-align: center; margin: 6px 0; } .ch-day span { font-size: 11.5px; color: #6b6f80; background: #fff; border: 1px solid #f0f1f4; padding: 3px 12px; border-radius: 999px; }
.ch-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; }
.ch-msg.in { align-self: flex-start; } .ch-msg.out { align-self: flex-end; flex-direction: row-reverse; }
.ch-bw { min-width: 0; }
.ch-b { border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid #eef0f4; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.ch-msg.in .ch-b { border-end-start-radius: 6px; } .ch-msg.out .ch-b { background: #fdf3e3; border-color: #f4e2bf; border-end-end-radius: 6px; }
.ch-t { padding: 10px 14px; white-space: pre-wrap; line-height: 1.75; font-size: 14px; color: #1d2939; word-break: break-word; }
.ch-m { font-size: 11px; color: #6b6f80; margin-top: 4px; padding: 0 6px; } .ch-msg.out .ch-m { text-align: end; }
.ch-aud { font-style: normal; color: #067647; } .ch-aud.adm { color: #a8690f; }
.ch-send { border-top: 1px solid #f0f1f4; padding: 12px 16px 14px; background: #fff; display: grid; gap: 10px; }
.ch-to { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: #667085; }
.ch-to label { cursor: pointer; } .ch-to input { display: none; }
.ch-to b { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid #eaecf0; font-weight: 600; color: #475467; background: #fff; }
.ch-to b svg { width: 14px; height: 14px; }
.ch-to input:checked + b { background: #fdf3e3; border-color: #f2d9ad; color: #8a5a0b; }
.ch-prev { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: #f9fafb; border: 1px dashed #d0d5dd; }
.ch-prev img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; } .ch-prev span { flex: 1; font-size: 12.5px; color: #475467; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-row { display: flex; align-items: flex-end; gap: 8px; }
.ch-att { width: 42px; height: 42px; flex: none; border-radius: 12px; border: 1px solid #eaecf0; display: grid; place-items: center; cursor: pointer; color: #667085; background: #fff; }
.ch-att:hover { color: #a8690f; border-color: #e4c48e; } .ch-att svg { width: 19px; height: 19px; }
.ch-in { flex: 1; min-height: 42px; max-height: 160px; resize: none; border-radius: 12px; padding: 10px 12px; line-height: 1.6; }
.ch-go { height: 42px; border-radius: 12px; }
.ch-lb { position: fixed; inset: 0; z-index: 300; background: rgba(10,10,12,.88); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.ch-lb img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.ch-lb-x { position: absolute; top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; cursor: pointer; } .ch-lb-x svg { width: 20px; height: 20px; }
@media (max-width: 760px) { .ch-msg { max-width: 90%; } .ch-thread { padding: 14px 12px; max-height: 60vh; } .ch-go span { display: none; } }
.ch-in.input { min-height: 42px; height: 42px; }

/* لوحة العمل: عمود البوست (الوصف وتاريخ النشر والأزرار) */
.ab-pcol .ab-pdesc { padding: 40px 44px; border-radius: 30px; box-shadow: 0 2px 6px rgba(0,0,0,.05), 0 24px 60px rgba(60,40,10,.10); }
.ab-pdesc-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.ab-pcol .ab-pdesc-h .ab-pdesc-k { margin: 0; font-size: 24px; padding: 10px 22px; border-radius: 999px; background: #fdf3e3; letter-spacing: .1em; }
.ab-pdesc-no { font-size: 26px; font-weight: 800; color: #d0c4ac; direction: ltr; }
.ab-date { display: flex; align-items: center; gap: 20px; width: 100%; padding: 22px 26px; margin-bottom: 30px; border-radius: 22px; background: #f6fef9; border: 2px solid #d1fadf; text-align: start; font: inherit; direction: ltr; }
.ab-date svg { width: 44px; height: 44px; fill: none; stroke: #067647; stroke-width: 1.8; flex: none; }
.ab-date small { display: block; font-size: 20px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #12b76a; }
.ab-date b { font-size: 34px; color: #054f31; }
.ab-date.empty { background: #fafafa; border: 2px dashed #d0d5dd; cursor: pointer; }
.ab-date.empty svg { stroke: #98a2b3; } .ab-date.empty small { color: #6b6f80; } .ab-date.empty b { color: #667085; font-weight: 600; }
.ab-date.empty:hover { border-color: #c08a2b; background: #fdf8ef; }
.ab-pdesc-l { font-size: 20px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #6b6f80; margin-bottom: 12px; direction: ltr; }
.ab-pcol .ab-pdesc-t { font-size: 40px; }
.ab-pcol .ab-gact { align-items: center; gap: 14px; flex-wrap: nowrap; padding: 14px; border-radius: 26px; background: rgba(255,255,255,.75); box-shadow: 0 10px 30px rgba(60,40,10,.08); }
.ab-gsp { flex: 1; }
.ab-pcol .ab-gact button.danger.ico { background: #fef3f2; border-color: #fecdca; }

.co-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.co-stats > div { background: #f9fafb; border: 1px solid #f0f1f4; border-radius: 12px; padding: 10px; text-align: center; }
.co-stats b { display: block; font-size: 20px; color: #101828; } .co-stats span { display: block; font-size: 11.5px; color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-stats .bad { background: #fef3f2; border-color: #fecdca; } .co-stats .bad b { color: #b42318; }
.co-stats .ok { background: #f6fef9; border-color: #d1fadf; } .co-stats .ok b { color: #067647; }

/* ═════════ العناصر العائمة: لا يمر التمرير إلى الخلفية ═════════ */
/* القفل على html وحده: إن أخذ body أيضاً overflow:hidden صار صندوق تمرير، فيقفز الشريط العلوي الملتصق إلى أعلى الصفحة ويختفي خلف النافذة على الآيفون */
html.scroll-lock { overflow: hidden !important; overscroll-behavior: none; }
.modal-root { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal, .modal-body, .pdfv-pages, .pdf-view iframe, .sidebar .nav, .dv-side, .ab-lb, .dv-feed { overscroll-behavior: contain; }
/* عارض الإيصال/العقد: لا تنكمش الصفحات لتناسب ارتفاع الشاشة (كان يقص أسفل الإيصال ويمنع التمرير) */
.pdfv-pages > * { flex-shrink: 0; }

/* حساب الشريك: إخفاء ما تبقى من أدوات التعديل (الخادم يرفض أي تعديل أصلاً) */
.read-only [data-abl-new], .read-only [data-add-member], .read-only [data-rate], .read-only [data-ist-save] { display: none !important; }
.read-only .switch, .read-only [data-ist], .read-only [data-lt-active] { pointer-events: none; opacity: .7; }
.modal-root.ro .modal-body :disabled { opacity: .85; cursor: default; }
[dir=rtl] div.num, [dir=rtl] b.num, [dir=rtl] .value.num { text-align: right; }

/* شروط الدفع */
.pt { display: grid; gap: 14px; }
.pt-hint { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; background: #f9fafb; color: #475467; font-size: 13px; line-height: 1.7; }
.pt-hint svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: #a8690f; }
.pt-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pt-presets span { font-size: 12px; color: #6b6f80; font-weight: 600; }
.pt-presets button { border: 1px solid #eaecf0; background: #fff; border-radius: 999px; padding: 6px 14px; font: 600 12.5px var(--font); color: #344054; cursor: pointer; }
.pt-presets button:hover { border-color: #e4c48e; background: #fdf8ef; color: #8a5a0b; }
.pt-rows { display: grid; gap: 10px; }
.pt-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.3fr) 110px 34px; align-items: end; gap: 12px; padding: 14px; border: 1px solid #eef0f4; border-radius: 14px; background: #fff; }
.pt-n { align-self: center; font-weight: 800; font-size: 13.5px; color: #8a5a0b; background: #fdf3e3; border-radius: 10px; padding: 8px 10px; text-align: center; }
.pt-f span { display: block; font-size: 11.5px; color: #667085; margin-bottom: 5px; font-weight: 600; }
.pt-in { display: flex; align-items: center; border: 1px solid #e4e7ec; border-radius: 10px; overflow: hidden; background: #fff; }
.pt-in:focus-within { border-color: #c08a2b; box-shadow: 0 0 0 3px rgba(192,138,43,.15); }
.pt-in input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; padding: 9px 12px; font: 600 15px var(--font); background: transparent; }
.pt-in em { font-style: normal; padding: 0 12px; color: #6b6f80; font-size: 12.5px; background: #f9fafb; align-self: stretch; display: grid; place-items: center; border-inline-start: 1px solid #f0f1f4; }
.pt-amt { align-self: center; text-align: end; } .pt-amt b { display: block; font-size: 15px; color: #101828; } .pt-amt small { font-size: 11.5px; color: #6b6f80; }
.pt-row .icon-btn { align-self: center; }
.pt-add { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: 1.5px dashed #d0d5dd; border-radius: 12px; background: #fcfcfd; font: 600 13px var(--font); color: #475467; cursor: pointer; }
.pt-add:hover { border-color: #c08a2b; color: #8a5a0b; } .pt-add svg { width: 16px; height: 16px; }
.pt-sum { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #667085; }
.pt-sum .ok, .pt-sum .bad { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; } .pt-sum svg { width: 15px; height: 15px; }
.pt-sum .ok { color: #067647; } .pt-sum .bad { color: #b42318; }
@media (max-width: 640px) { .pt-row { grid-template-columns: 1fr 1fr; } .pt-n { grid-column: 1 / -1; text-align: start; } .pt-amt { text-align: start; } }

/* آخر النشاطات — خط زمني مضغوط */
.act-tl { position: relative; padding: 6px 0; }
.act-tl::before { content: ''; position: absolute; top: 14px; bottom: 14px; inset-inline-start: 31px; width: 2px; background: #f0f1f4; }
.act-r { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 18px; }
.act-r:hover { background: #fafafa; }
.act-d { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #fff; border: 1px solid #eef0f4; color: #a8690f; z-index: 1; }
.act-d svg { width: 13px; height: 13px; }
.act-t { font-size: 13px; font-weight: 500; color: #344054; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-m { font-size: 11.5px; color: #6b6f80; white-space: nowrap; }
.act-r.x { display: none; } .act-tl.open .act-r.x { display: grid; }
.act-more { display: flex; justify-content: center; width: calc(100% - 36px); margin: 6px 18px 4px; padding: 7px; border: 1px dashed #e4e7ec; border-radius: 10px; background: none; font: 600 12px var(--font); color: #667085; cursor: pointer; }
.act-more span + span, .act-tl.open .act-more span:first-child { display: none; } .act-tl.open .act-more span + span { display: inline; }
@media (max-width: 640px) { .act-r { grid-template-columns: 26px minmax(0, 1fr); } .act-m { grid-column: 2; margin-top: -4px; } }

.pt-in select { border: 0; outline: 0; background: #f9fafb; font: 600 12.5px var(--font); color: #344054; padding: 0 10px; align-self: stretch; border-inline-end: 1px solid #f0f1f4; max-width: 55%; cursor: pointer; }
.pt-in input[data-days] { min-width: 50px; }

.pt-due { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.pt-sel { height: 40px; border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; font: 600 13px var(--font); color: #344054; padding: 0 10px; cursor: pointer; min-width: 0; }
.pt-sel:focus { outline: 0; border-color: #c08a2b; box-shadow: 0 0 0 3px rgba(192,138,43,.15); }
.pt-row { grid-template-columns: 100px minmax(0, .8fr) minmax(0, 1.8fr) 120px 34px; }
@media (max-width: 640px) { .pt-row { grid-template-columns: 1fr; } .pt-due { grid-template-columns: 1fr 1fr; } }

/* ═════════ المحادثات ═════════ */
.hb { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - var(--topbar-h, 64px) - 56px); min-height: 520px; background: #fff; border: 1px solid #eceef3; border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.hb-side { display: flex; flex-direction: column; border-inline-end: 1px solid #f0f1f4; min-height: 0; background: #fcfcfd; }
.hb-sh { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; } .hb-sh b { font-size: 17px; }
.hb-tabs { display: flex; gap: 4px; padding: 0 12px 10px; }
.hb-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px; border: 0; border-radius: 10px; background: none; font: 600 13px var(--font); color: #667085; cursor: pointer; }
.hb-tabs button.on { background: #fdf3e3; color: #8a5a0b; } .hb-tabs em { font-style: normal; font-size: 10.5px; background: #d92d20; color: #fff; border-radius: 999px; padding: 0 6px; } .hb-tabs em:empty { display: none; }
.hb-search { padding: 0 12px 10px; } .hb-search .input { height: 38px; border-radius: 11px; }
.hb-list { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.hb-it { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.hb-it:hover { background: #f5f5f7; } .hb-it.on { background: #fdf3e3; }
.hb-it .avatar, .hb-av { width: 42px; height: 42px; flex: none; border-radius: 13px; }
.hb-av { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; } .hb-av.grp { background: #eef2ff; color: #4f46e5; } .hb-av.grp svg { width: 20px; height: 20px; }
.hb-tx { flex: 1; min-width: 0; }
.hb-r1, .hb-r2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hb-r1 b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hb-r1 span { font-size: 11px; color: #6b6f80; flex: none; }
.hb-r2 span { font-size: 12.5px; color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-r2 em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #c08a2b; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.hb-it.unread .hb-r1 b { font-weight: 800; } .hb-it.unread .hb-r2 span { color: #101828; font-weight: 600; }
.hb-tag { font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: #ecfdf3; color: #067647; margin-inline-end: 5px; font-weight: 700; } .hb-tag.g { background: #eef2ff; color: #4f46e5; }
.hb-empty, .hb-welcome { display: grid; justify-items: center; align-content: center; gap: 8px; color: #6b6f80; text-align: center; padding: 30px; height: 100%; }
.hb-empty svg, .hb-welcome svg { width: 36px; height: 36px; color: #d0d5dd; } .hb-welcome b { color: #344054; font-size: 16px; }
.hb-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.hb-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #f0f1f4; }
.hb-ht { flex: 1; min-width: 0; } .hb-ht b { display: block; font-size: 15.5px; } .hb-ht small { display: block; font-size: 12px; color: #6b6f80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-back { display: none; }
.hb-main .ch { flex: 1; min-height: 0; } .hb-main .ch-thread { flex: 1; max-height: none; min-height: 0; }
.hb-new .hb-seg { display: flex; gap: 6px; margin-bottom: 12px; } .hb-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 11px; border: 1px solid #eaecf0; background: #fff; font: 600 13px var(--font); cursor: pointer; } .hb-seg button.on { background: #fdf3e3; border-color: #f2d9ad; color: #8a5a0b; } .hb-seg svg { width: 16px; height: 16px; }
.hb-new [data-ps] { margin: 10px 0; }
.hb-people { display: grid; gap: 4px; max-height: 46vh; overflow-y: auto; }
.hb-p { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; cursor: pointer; border: 1px solid transparent; }
.hb-p:hover { background: #f9fafb; } .hb-p:has(input:checked) { background: #fdf8ef; border-color: #f2d9ad; }
.hb-p b { display: block; font-size: 14px; } .hb-p small { color: #6b6f80; font-size: 12px; }
@media (max-width: 860px) {
  .hb { grid-template-columns: 1fr; height: calc(100vh - 230px); border-radius: 16px; }
  .hb.has-cur .hb-side { display: none; } .hb:not(.has-cur) .hb-main { display: none; }
  .hb-back { display: grid; }
}

/* ═════════ المحادثات v2 ═════════ */
@media (min-width: 861px) { .hb { grid-template-columns: 360px minmax(0, 1fr); height: calc(100dvh - var(--topbar-h, 64px) - 56px); } }
@media (min-width: 861px) and (max-width: 1180px) { .hb { grid-template-columns: 300px minmax(0, 1fr); } }
.hb-sh .btn span { margin-inline-start: 2px; }
.hb-search { position: relative; display: flex; align-items: center; gap: 8px; margin: 0 12px 10px; padding: 0 12px; height: 40px; border-radius: 12px; background: #f2f4f7; }
.hb-search svg { width: 16px; height: 16px; color: #6b6f80; flex: none; }
.hb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 13.5px var(--font); }
.hb-search.in-modal { margin: 0 0 10px; }
.hb-sk { height: 62px; margin: 6px 4px; border-radius: 12px; background: linear-gradient(90deg, #f2f4f7 25%, #f9fafb 50%, #f2f4f7 75%); background-size: 200% 100%; animation: hbsk 1.2s infinite; }
@keyframes hbsk { to { background-position: -200% 0; } }
.hb-avw .avatar { width: 42px; height: 42px; border-radius: 13px; } .hb-avw.sm .avatar, .hb-av.sm { width: 38px; height: 38px; border-radius: 12px; }
.hb-it { transition: background .12s; }
.hb-wi { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, #fdf3e3, #f9e6c4); color: #a8690f; } .hb-wi svg { width: 30px; height: 30px; color: #a8690f; }
.hb-welcome span:not(.hb-wi) { max-width: 320px; font-size: 13.5px; line-height: 1.8; }
.hb-loading { margin: auto; display: flex; gap: 6px; } .hb-loading span { width: 8px; height: 8px; border-radius: 50%; background: #d0d5dd; animation: hbdot 1s infinite; } .hb-loading span:nth-child(2) { animation-delay: .15s; } .hb-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes hbdot { 50% { transform: translateY(-5px); background: #c08a2b; } }
.hb-head { gap: 12px; padding: 12px 16px; background: #fff; }
.hb-acts { display: flex; align-items: center; gap: 6px; }
.hb-main { position: relative; background: #f7f6f3; }
.hb-main.drop::after { content: 'أفلت الصورة هنا'; position: absolute; inset: 70px 12px 90px; border: 2px dashed #c08a2b; border-radius: 16px; background: rgba(253,243,227,.85); display: grid; place-items: center; font-weight: 700; color: #8a5a0b; z-index: 5; }
.hm-list { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 2px; background-image: radial-gradient(#ece7dc 1px, transparent 1px); background-size: 18px 18px; }
.hm-day, .hm-new { text-align: center; margin: 12px 0 8px; } .hm-day span { font-size: 11.5px; color: #667085; background: #fff; border: 1px solid #eceef3; padding: 3px 12px; border-radius: 999px; }
.hm-new { display: flex; align-items: center; gap: 10px; color: #c08a2b; font-size: 11.5px; font-weight: 700; } .hm-new::before, .hm-new::after { content: ''; flex: 1; height: 1px; background: #f2d9ad; }
.hm { display: flex; align-items: flex-end; gap: 8px; max-width: 76%; margin-top: 8px; }
.hm.grp { margin-top: 2px; }
.hm.in { align-self: flex-start; } .hm.out { align-self: flex-end; flex-direction: row-reverse; }
.hm-av { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #e4e7ec; color: #344054; display: grid; place-items: center; font-size: 12px; font-weight: 800; } .hm-av.sp { visibility: hidden; }
.hm-bw { position: relative; min-width: 0; display: flex; flex-direction: column; } .hm.out .hm-bw { align-items: flex-end; }
.hm-name { font-size: 11.5px; font-weight: 700; color: #a8690f; margin: 0 8px 3px; }
.hm-b { position: relative; border-radius: 18px; background: #fff; box-shadow: 0 1px 1.5px rgba(16,24,40,.08); overflow: hidden; min-width: 70px; }
.hm.in .hm-b { border-end-start-radius: 6px; } .hm.out .hm-b { background: #fdf0d9; border-end-end-radius: 6px; }
.hm.grp.in .hm-b { border-start-start-radius: 6px; } .hm.grp.out .hm-b { border-start-end-radius: 6px; }
.hm-t { padding: 8px 12px 2px; white-space: pre-wrap; word-break: break-word; line-height: 1.7; font-size: 14px; color: #1d2939; }
.hm-img { display: block; padding: 3px; border: 0; background: none; cursor: zoom-in; } .hm-img img { display: block; max-width: min(300px, 60vw); max-height: 320px; border-radius: 15px; object-fit: cover; }
.hm-meta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 10px 6px; font-size: 10.5px; color: #6b6f80; direction: ltr; }
.hm-tick { font-style: normal; color: #6b6f80; letter-spacing: -2px; } .hm-tick.seen { color: #2e90fa; }
.hm.pending { opacity: .6; } .hm.failed .hm-b { box-shadow: 0 0 0 1px #fda29b; }
.hm-jump { position: absolute; bottom: 92px; inset-inline-start: 18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15); display: grid; place-items: center; cursor: pointer; z-index: 3; } .hm-jump svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.hc { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #f0f1f4; display: grid; gap: 8px; }
.hc-prev { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; background: #f9fafb; border: 1px dashed #d0d5dd; } .hc-prev img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; } .hc-prev span { flex: 1; font-size: 12.5px; color: #475467; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hc-row { display: flex; align-items: flex-end; gap: 8px; }
.hc-att { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #667085; } .hc-att:hover { background: #f2f4f7; color: #a8690f; } .hc-att svg { width: 20px; height: 20px; }
.hc textarea { flex: 1; min-height: 42px; max-height: 140px; resize: none; border: 1px solid #e4e7ec; border-radius: 22px; padding: 10px 16px; font: 500 14px/1.6 var(--font); outline: 0; background: #f9fafb; }
.hc textarea:focus { border-color: #e4c48e; background: #fff; }
.hc-go { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: linear-gradient(135deg, #c08a2b, #a8690f); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 12px rgba(168,105,15,.3); } .hc-go svg { width: 19px; height: 19px; transform: scaleX(-1); }
.hb-empty.in { margin: auto; }
.hb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } .hb-chips span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #fdf3e3; color: #8a5a0b; font-weight: 600; }
.hb-p { position: relative; } .hb-p input { position: absolute; opacity: 0; pointer-events: none; }
.hb-ck { margin-inline-start: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #d0d5dd; display: grid; place-items: center; color: transparent; } .hb-ck svg { width: 13px; height: 13px; }
.hb-p:has(input:checked) .hb-ck { background: #c08a2b; border-color: #c08a2b; color: #fff; }
@media (max-width: 860px) {
  .hb { height: calc(100dvh - 200px - env(safe-area-inset-bottom)); border-radius: 18px; }
  .hb-acts .btn span { display: none; }
  .hm { max-width: 88%; }
  .hm-jump { bottom: 84px; }
}
@media (max-width: 860px) {
  .hb { height: calc(100dvh - 268px - env(safe-area-inset-bottom)); min-height: 380px; margin-bottom: 4px; }
  .hb-head { padding: 10px 12px; } .hm-list { padding: 12px 10px 8px; } .hc { padding: 8px 10px 10px; }
}

@media (max-width: 860px) {
  body.hb-thread .tabbar { display: none !important; }
  body.hb-thread .hb { height: calc(100dvh - 175px - env(safe-area-inset-bottom)); }
  body.hb-thread .content { padding-bottom: 12px !important; }
}

.hb-by { font-weight: 700; color: #475467; }
.hm-t a { color: #175cd3; text-decoration: underline; word-break: break-all; }
.hm-img img { max-width: min(260px, 58vw); max-height: 280px; }
.hm-b:has(.hm-img):not(:has(.hm-t)) .hm-meta { position: absolute; bottom: 6px; inset-inline-end: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; }
.hm-b:has(.hm-img):not(:has(.hm-t)) .hm-tick { color: #fff; } .hm-b:has(.hm-img):not(:has(.hm-t)) .hm-tick.seen { color: #9ed0ff; }
.hm-new span { padding: 0 6px; }
.hb-it { margin-bottom: 2px; }
.hb-r2 span { line-height: 1.6; }
.hb-head .hb-ht small { margin-top: 1px; }

.hm-list, .hb-list, .hb-people { scrollbar-width: thin; scrollbar-color: #d6d3cc transparent; }
.hm-list::-webkit-scrollbar, .hb-list::-webkit-scrollbar { width: 6px; } .hm-list::-webkit-scrollbar-thumb, .hb-list::-webkit-scrollbar-thumb { background: #d6d3cc; border-radius: 6px; }
.hm.out .hm-name { text-align: end; }

@media (max-width: 860px), (hover: none) { .hm.sel .hm-b { box-shadow: 0 0 0 2px #e4c48e; }
  .hm-img img { max-height: 230px; }
}

.hb-avs { position: relative; flex: none; } .hb-on, .hb-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #12b76a; border: 2px solid #fff; }
.hb-on { position: absolute; bottom: -1px; inset-inline-end: -1px; }
.hb-dot { width: 8px; height: 8px; border: 0; margin-inline-end: 5px; vertical-align: 1px; }
.hb-typing { font-style: normal; color: #12b76a; font-weight: 700; }
.hb-tag.adm { background: #fdf3e3; color: #a8690f; }
.hb-ht b .hb-tag { font-size: 10.5px; vertical-align: 2px; }
.hm-typing { display: flex; align-items: center; gap: 4px; padding: 6px 18px 4px; } .hm-typing[hidden] { display: none; }
.hm-typing span { width: 6px; height: 6px; border-radius: 50%; background: #b8b2a6; animation: hbdot 1s infinite; } .hm-typing span:nth-child(2) { animation-delay: .15s; } .hm-typing span:nth-child(3) { animation-delay: .3s; }
.hm-typing em { font-style: normal; font-size: 12px; color: #667085; margin-inline-start: 6px; }

/* بوابة العميل: محادثتا الإدارة والفريق */
.cm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border-bottom: 1px solid #f0f1f4; background: #fcfcfd; }
.cm-tabs button { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid #eaecf0; background: #fff; font: inherit; text-align: start; cursor: pointer; }
.cm-tabs button.on { border-color: #e4c48e; background: #fdf8ef; box-shadow: 0 0 0 3px rgba(192,138,43,.12); }
.cm-ic { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #f2f4f7; color: #475467; flex: none; } .cm-tabs button.on .cm-ic { background: #fdf3e3; color: #a8690f; } .cm-ic svg { width: 19px; height: 19px; }
.cm-tx { min-width: 0; } .cm-tx b { display: block; font-size: 14.5px; } .cm-tx small { display: block; font-size: 11.5px; color: #6b6f80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-tabs em { position: absolute; top: 8px; inset-inline-end: 10px; font-style: normal; min-width: 20px; height: 20px; border-radius: 999px; background: #d92d20; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.cm .ch-thread { min-height: 320px; }
@media (max-width: 640px) { .cm-tabs { padding: 10px; } .cm-tabs button { padding: 8px; gap: 8px; } .cm-ic { width: 34px; height: 34px; } }

@media (max-width: 1280px) { .hb-acts .btn span { display: none; } .hb-acts .btn { padding-inline: 10px; } }
.hb-ht small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* صور الأشخاص والشركات */
.avatar.has-img { background: #f2f4f7; padding: 0; overflow: hidden; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-edit { position: relative; display: inline-flex; cursor: pointer; border: 0; background: none; padding: 0; }
.ph-edit::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.ph-edit .ph-cam { position: absolute; bottom: -4px; inset-inline-end: -4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); display: grid; place-items: center; color: #a8690f; }
.ph-edit .ph-cam svg { width: 14px; height: 14px; }
/* أصول الشركة */
.as-sw { position: relative; display: grid; gap: 2px; padding: 0 0 10px; border: 1px solid #eceef3; border-radius: 14px; background: #fff; font: inherit; text-align: start; cursor: copy; overflow: hidden; }
.as-sw i { height: 64px; display: block; margin-bottom: 6px; } .as-sw b, .as-sw span { padding: 0 10px; } .as-sw b { font-size: 13px; } .as-sw span { font-size: 12px; color: #667085; font-family: ui-monospace, monospace; }
.as-files { display: grid; gap: 8px; }
.as-del { width: 28px; height: 28px; border-radius: 8px; border: 0; background: #fef3f2; color: #b42318; display: grid; place-items: center; cursor: pointer; flex: none; } .as-del svg { width: 14px; height: 14px; }
.as-sw .as-del { position: absolute; top: 6px; inset-inline-end: 6px; opacity: 0; } .as-sw:hover .as-del { opacity: 1; }
.as-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .as-kinds input { display: none; }
.as-kinds span { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border: 1px solid #eaecf0; border-radius: 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: #475467; } .as-kinds svg { width: 15px; height: 15px; }
.as-kinds input:checked + span { background: #fdf3e3; border-color: #f2d9ad; color: #8a5a0b; }
.as-pick { display: flex; gap: 8px; } .as-pick input[type=color] { width: 54px; height: 42px; border: 1px solid #eaecf0; border-radius: 10px; padding: 3px; background: #fff; }
@media (max-width: 640px) { .as-kinds { grid-template-columns: 1fr 1fr; } .as-sw .as-del { opacity: 1; } }
.co-logo { width: 44px; height: 44px; border-radius: 13px; flex: none; }
.ch-avw .avatar, .hm-avw .avatar { width: 30px; height: 30px; font-size: 11px; border-radius: 50%; flex: none; }
.hm-avw { flex: none; }

/* ── المحادثات: تحسينات (محادثة الشركة الموحّدة، زر أيقونة، الوسوم) ── */
.hb-sh [data-new] { width: 38px; height: 38px; padding: 0; border-radius: 12px; display: grid; place-items: center; } .hb-sh [data-new] svg { width: 18px; height: 18px; }
.hb-r2 span { padding-block: 2px; line-height: 20px; min-width: 0; }
.hb-tag { display: inline-flex; align-items: center; line-height: 18px; padding: 0 8px; margin-inline-end: 6px; }
.hb-by { margin-inline-end: 4px; font-weight: 600; color: #475467; }
.hb-sw { display: flex; gap: 6px; padding: 8px 16px; border-bottom: 1px solid #f0f1f4; background: #fcfcfd; }
.hb-sw button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid #eaecf0; background: #fff; color: #475467; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.hb-sw button svg { width: 15px; height: 15px; }
.hb-sw button.on { background: #fdf3e3; border-color: #e4c48e; color: #8a5a0b; }
.hb-sw button em { font-style: normal; min-width: 18px; height: 18px; border-radius: 999px; background: #d92d20; color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 5px; }
.hb-welcome .hb-wi { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, #fdf3e3, #f8e7c8); }
.hb-welcome .hb-wi svg { color: #a8690f; width: 32px; height: 32px; }
.lmx-av { background: #fff !important; border: 1px solid #f2e3c6; display: grid; place-items: center; } .lmx-av img { width: 62%; height: 62%; object-fit: contain; }
.cm-ic.lmx { background: #fff !important; border: 1px solid #f2e3c6; } .cm-ic.lmx > img { width: 60%; height: 60%; }
.cm-sub { position: absolute; bottom: -4px; inset-inline-start: -4px; width: 18px; height: 18px; border-radius: 6px; background: #fff; border: 1px solid #eaecf0; display: grid; place-items: center; color: #a8690f; } .cm-sub svg { width: 11px !important; height: 11px !important; }

/* ── أصول الشركة: Brand Kit ── */
.bk { padding: 0; overflow: hidden; }
.bk-top { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #f0f1f4; background: linear-gradient(180deg, #fffaf2, #fff); }
.bk-top .bk-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #1d1d1f; color: #e4c48e; flex: none; } .bk-top .bk-ic svg { width: 20px; height: 20px; }
.bk-top h3 { margin: 0; font-size: 16px; } .bk-top small { display: block; color: #6b6f80; font-size: 12px; margin-top: 2px; }
.bk-top .grow { flex: 1; }
.bk-strip { display: flex; height: 10px; } .bk-strip i { flex: 1; }
.bk-nav { display: flex; gap: 6px; padding: 12px 20px 0; overflow-x: auto; scrollbar-width: none; }
.bk-nav button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #eaecf0; background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: #475467; cursor: pointer; }
.bk-nav button svg { width: 14px; height: 14px; } .bk-nav button em { font-style: normal; color: #6b6f80; font-weight: 500; }
.bk-nav button.on { background: #1d1d1f; border-color: #1d1d1f; color: #fff; } .bk-nav button.on em { color: #e4c48e; }
.bk-body { padding: 16px 20px 20px; display: grid; gap: 22px; }
.bk-sec h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; color: #344054; text-transform: none; }
.bk-sec h4 svg { width: 15px; height: 15px; color: #a8690f; } .bk-sec h4 em { font-style: normal; font-size: 11px; color: #6b6f80; font-weight: 500; }
.bk-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.bk-sw { position: relative; border: 1px solid #eceef3; border-radius: 16px; overflow: hidden; background: #fff; color: #101828; cursor: copy; text-align: start; font: inherit; padding: 0; transition: transform .15s, box-shadow .15s; }
.bk-sw:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(16,24,40,.35); }
.bk-sw > i { display: block; height: 92px; }
.bk-sw > div { padding: 10px 12px 12px; } .bk-sw b { display: block; font-size: 13px; } .bk-sw code { display: block; font-size: 12px; color: #475467; margin-top: 2px; } .bk-sw small { display: block; font-size: 11px; color: #667085; font-family: ui-monospace, monospace; }
.bk-sw .bk-copy { position: absolute; top: 8px; inset-inline-start: 8px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.9); color: #344054; opacity: 0; transition: .15s; }
.bk-sw:hover .bk-copy { opacity: 1; }
.bk-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bk-logo { border: 1px solid #eceef3; border-radius: 16px; overflow: hidden; background: #fff; }
.bk-stage { position: relative; display: grid; place-items: center; height: 150px; background: repeating-conic-gradient(#f4f4f5 0 25%, #fff 0 50%) 0 0 / 18px 18px; transition: background .2s; }
.bk-stage.dark { background: #1d1d1f; } .bk-stage img { max-width: 78%; max-height: 110px; object-fit: contain; }
.bk-stage .bk-bg { position: absolute; bottom: 8px; inset-inline-start: 8px; width: 26px; height: 26px; border-radius: 8px; border: 1px solid #eaecf0; background: linear-gradient(135deg, #fff 50%, #1d1d1f 50%); cursor: pointer; }
.bk-meta { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid #f0f1f4; }
.bk-meta > div { flex: 1; min-width: 0; } .bk-meta b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bk-meta small { color: #6b6f80; font-size: 11.5px; }
.bk-act { width: 30px; height: 30px; border-radius: 9px; border: 1px solid #eaecf0; background: #fff; color: #475467; display: grid; place-items: center; cursor: pointer; flex: none; } .bk-act svg { width: 14px; height: 14px; }
.bk-act.del { color: #b42318; border-color: #fee4e2; background: #fef3f2; }
.bk-sw .bk-act.del { position: absolute; top: 8px; inset-inline-end: 8px; opacity: 0; } .bk-sw:hover .bk-act.del { opacity: 1; }
.bk-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.bk-font { border: 1px solid #eceef3; border-radius: 16px; background: #fff; overflow: hidden; }
.bk-spec { padding: 16px 16px 12px; background: #fafaf9; border-bottom: 1px solid #f0f1f4; }
.bk-spec .aa { font-size: 40px; line-height: 1.1; font-weight: 700; color: #1d1d1f; } .bk-spec p { margin: 6px 0 0; font-size: 15px; color: #475467; }
.bk-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.bk-file { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #eceef3; border-radius: 14px; background: #fff; transition: border-color .15s; } .bk-file:hover { border-color: #e4c48e; }
.bk-file > img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid #f0f1f4; }
.bk-ext { width: 46px; height: 46px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 800; letter-spacing: .3px; color: #fff; background: #667085; }
.bk-ext.pdf { background: #d92d20; } .bk-ext.ai { background: #e67e22; } .bk-ext.psd { background: #1570ef; } .bk-ext.zip, .bk-ext.rar { background: #7a5af8; } .bk-ext.ttf, .bk-ext.otf{ background: #1d1d1f; } .bk-ext.svg { background: #12b76a; }
.bk-empty { display: grid; justify-items: center; gap: 8px; padding: 36px 20px; text-align: center; color: #6b6f80; font-size: 13px; }
.bk-empty .bk-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #fdf3e3; color: #a8690f; } .bk-empty b { color: #344054; font-size: 15px; }
@media (max-width: 640px) { .bk-top, .bk-body { padding-inline: 14px; } .bk-nav { padding-inline: 14px; } .bk-colors { grid-template-columns: 1fr 1fr; } .bk-sw .bk-act.del { opacity: 1; } .bk-top .btn span { display: none; } }
/* الإعدادات: الصور والشعارات */
.ph-tabs { display: flex; gap: 6px; } .ph-tabs button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #eaecf0; background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: #475467; cursor: pointer; } .ph-tabs button em { font-style: normal; color: #6b6f80; font-weight: 500; } .ph-tabs button.on { background: #1d1d1f; color: #fff; border-color: #1d1d1f; } .ph-tabs button.on em { color: #e4c48e; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ph-it { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border: 1px solid #eceef3; border-radius: 14px; background: #fff; font: inherit; cursor: pointer; text-align: center; min-width: 0; transition: border-color .15s; } .ph-it:hover { border-color: #e4c48e; }
.ph-it b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ph-it small { font-size: 11.5px; color: #6b6f80; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-it .ph-edit { pointer-events: none; }
.hb-gph { cursor: pointer; position: relative; } .hb-gph:hover { opacity: .85; }
@media (max-width: 640px) { #s-photos .card-head { flex-wrap: wrap; } .ph-grid { grid-template-columns: repeat(2, 1fr); } }
.hb-sh .hb-newb { width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 11px; display: grid; place-items: center; box-shadow: 0 4px 10px -4px rgba(168,105,15,.45); }
.hb-sh .hb-newb svg { width: 18px; height: 18px; stroke-width: 2.2; margin: 0; }
.hb-sh .hb-newb:active { transform: scale(.94); }

/* ── المحادثات على الهاتف ── */
@media (max-width: 860px) {
  .hb { grid-template-columns: 1fr; border: 0; box-shadow: none; background: transparent; border-radius: 0; height: auto; min-height: 0; overflow: visible; }
  .hb:not(.has-cur) .hb-main { display: none; }
  .hb.has-cur .hb-side { display: none; }
  .hb-side { border: 0; background: transparent; }
  .hb-sh { padding: 0 2px 10px; } .hb-sh b { font-size: 15px; color: #475467; font-weight: 700; }
  .hb-tabs { margin: 0 0 10px; padding: 4px; background: #fff; border: 1px solid #eceef3; border-radius: 14px; }
  .hb-search { margin: 0 0 12px; background: #fff; border: 1px solid #eceef3; }
  .hb-list { padding: 0; overflow: visible; display: grid; gap: 8px; }
  .hb-it { background: #fff; border: 1px solid #eceef3; border-radius: 16px; padding: 12px; margin: 0; }
  .hb-it.on { background: #fff; }
  .hb-it.unread { border-color: #f2d9ad; background: #fffaf2; }
  .hb-empty { background: #fff; border: 1px dashed #e4e7ec; border-radius: 16px; padding: 36px 20px; height: auto; }
  .hb.has-cur { height: calc(100dvh - 175px - env(safe-area-inset-bottom)); min-height: 380px; background: #fff; border: 1px solid #eceef3; border-radius: 18px; overflow: hidden; }
  .hb.has-cur .hb-main { height: 100%; }
  .hb-sw { padding: 8px 12px; } .hb-sw button { flex: 1; justify-content: center; }
}
@media (max-width: 860px) {
  .hb-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-content: start; }
  .hb-tabs { grid-column: 1 / -1; grid-row: 1; }
  .hb-side .hb-policy { grid-column: 1 / -1; grid-row: 1; margin: 0 0 10px; }
  .hb-search { grid-column: 1; grid-row: 2; height: 42px; }
  .hb-sh { grid-column: 2; grid-row: 2; padding: 0; margin-bottom: 12px; } .hb-sh b { display: none; }
  .hb-sh .hb-newb { width: 42px; height: 42px; border-radius: 13px; }
  .hb-list { grid-column: 1 / -1; }
}

/* ── الإعدادات: قائمة مجمّعة وقسم واحد في كل مرة ── */
.sg { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.sn { position: sticky; top: calc(var(--topbar-h, 64px) + 16px); background: #fff; border: 1px solid #eceef3; border-radius: 18px; padding: 10px; display: grid; gap: 4px; max-height: calc(100vh - var(--topbar-h, 64px) - 40px); overflow-y: auto; scrollbar-width: thin; }
.sn-g + .sn-g { margin-top: 6px; padding-top: 8px; border-top: 1px solid #f2f4f7; }
.sn-gt { font-size: 11px; font-weight: 700; color: #6b6f80; padding: 4px 10px 6px; letter-spacing: .2px; }
.sn a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; text-decoration: none; color: #344054; transition: background .12s; }
.sn a:hover { background: #f9fafb; }
.sn-ic { width: 34px; height: 34px; border-radius: 10px; background: #f2f4f7; color: #667085; display: grid; place-items: center; flex: none; transition: .12s; } .sn-ic svg { width: 16px; height: 16px; }
.sn-tx { min-width: 0; } .sn-tx b { display: block; font-size: 13.5px; font-weight: 600; } .sn-tx small { display: block; font-size: 11.5px; color: #6b6f80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn a.on { background: #fdf6ea; } .sn a.on .sn-ic { background: #c08a2b; color: #fff; } .sn a.on b { color: #8a5a0b; }
.sg .settings-section { margin: 0; border-radius: 18px; }
.sg .settings-section[hidden] { display: none !important; }
.sg > div:last-child { min-width: 0; display: grid; gap: 16px; }
@media (max-width: 900px) {
  .sg { grid-template-columns: minmax(0, 1fr) !important; gap: 12px; }
  .sn { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 5; display: flex !important; flex-direction: row; gap: 6px; overflow-x: auto; overflow-y: hidden; max-height: none; padding: 6px !important; border-radius: 16px !important; scrollbar-width: none; box-shadow: 0 6px 16px -10px rgba(16,24,40,.2); }
  .sn::-webkit-scrollbar { display: none; }
  .sn-g { display: contents; } .sn-gt { display: none; }
  .sn a { flex: none; padding: 6px 12px 6px 8px; border-radius: 12px !important; gap: 8px; }
  .sn-ic { width: 28px; height: 28px; border-radius: 8px; } .sn-ic svg { width: 14px; height: 14px; }
  .sn-tx small { display: none; } .sn-tx b { font-size: 13px; white-space: nowrap; }
  .sg .settings-section .card-head { flex-wrap: wrap; gap: 8px; }
  .sg .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
.hb-nm { display: flex; align-items: center; gap: 6px; min-width: 0; } .hb-nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-lbl { flex: none; display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 10.5px; font-weight: 700; line-height: 18px; padding: 0 7px; border-radius: 6px; background: #f2f4f7; color: #475467; } .hb-lbl svg { width: 11px; height: 11px; }
/* نافذة تفعيل الإشعارات */
.np { position: fixed; inset: auto 0 0 0; z-index: 9999; display: grid; justify-items: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); pointer-events: none; }
.np-card { pointer-events: auto; width: min(420px, 100%); background: #fff; border: 1px solid #f2e3c6; border-radius: 20px; padding: 18px; box-shadow: 0 20px 50px -18px rgba(16,24,40,.35); display: grid; gap: 6px; transform: translateY(120%); transition: transform .3s cubic-bezier(.2,.8,.2,1); text-align: start; }
.np.in .np-card { transform: none; }
/* QA: نافذة الإشعارات (z 9999) كانت تغطي أزرار الأوراق والنوافذ المفتوحة (مثل «رفض الطلب») — تختفي ما دامت ورقة/نافذة مفتوحة */
body:has(.c-layer.on) .np, body:has(.modal-root) .np, body:has(.c-modal-root) .np { display: none; }
.np-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #fdf3e3, #f8e7c8); color: #a8690f; margin-bottom: 4px; } .np-ic svg { width: 22px; height: 22px; }
.np-card > b { font-size: 16px; } .np-card p { margin: 0; color: #667085; font-size: 13.5px; line-height: 1.8; }
.np-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
@media (min-width: 861px) { .np { inset: auto auto 24px 24px; padding: 0; justify-items: start; } }
/* الإعدادات: القائمة تتحرك مع الصفحة (لا تمرير داخلي) وأكثر إحكاماً */
@media (min-width: 901px) {
  .sn { position: static; max-height: none; overflow: visible; gap: 2px; padding: 8px; }
  .sn a { padding: 6px 8px; } .sn-ic { width: 30px; height: 30px; border-radius: 9px; } .sn-ic svg { width: 15px; height: 15px; }
  .sn-tx b { font-size: 13px; } .sn-tx small { font-size: 11px; }
  .sn-g + .sn-g { margin-top: 4px; padding-top: 6px; } .sn-gt { padding: 2px 8px 4px; }
}
/* الإعدادات: القائمة ثابتة بجانب المحتوى وتُمرَّر من داخلها */
@media (min-width: 901px) {
  .sn { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100dvh - var(--topbar-h) - 32px); overflow-y: auto; overscroll-behavior: auto; scrollbar-width: thin; scrollbar-color: #e4c48e transparent; }
}
@media (min-width: 901px) {
  .sn { max-height: calc(100dvh - var(--topbar-h) - 32px); overflow-y: auto; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
  .sn::-webkit-scrollbar { width: 6px; } .sn::-webkit-scrollbar-thumb { background: #ead7b3; border-radius: 99px; } .sn::-webkit-scrollbar-track { background: transparent; margin: 12px; }
}
/* الخط الزمني للأنشطة: يصل بين الأيقونات فقط ولا يمتد لزر «عرض الكل» */
.act-tl::before { display: none; }
.act-r::after { content: ''; position: absolute; inset-inline-start: 31px; top: calc(50% + 13px); height: calc(100% - 26px); width: 2px; background: #f0f1f4; }
.act-r:last-child::after, .act-r:has(+ .act-more)::after, .act-tl:not(.open) .act-r:has(+ .act-r.x)::after { display: none; }
/* شريط تمرير قائمة الإعدادات: مخفي إلا عند المرور */
@media (min-width: 901px) {
  .sn { scrollbar-width: thin; scrollbar-color: transparent transparent; }
  .sn:hover { scrollbar-color: #e4e7ec transparent; }
  .sn::-webkit-scrollbar-thumb { background: transparent; } .sn:hover::-webkit-scrollbar-thumb { background: #e4e7ec; }
}
.sn a:focus { outline: none; } .sn a:focus-visible { outline: 2px solid #e4c48e; outline-offset: -2px; }
/* الهاتف: المحادثة المفتوحة تملأ الجزء المرئي من الشاشة وتتقلص مع لوحة المفاتيح (مثل واتساب) */
@media (max-width: 860px) {
  body.hb-thread .hb.has-cur { position: fixed; inset-inline: 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); min-height: 0; z-index: 60; margin: 0; border: 0; border-radius: 0; padding-top: env(safe-area-inset-top); background: #fff; }
  body.hb-thread .hb.has-cur .hc { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  body.hb-thread .topbar, body.hb-thread .m-head { visibility: hidden; }
}
@media (max-width: 860px) { body.hb-thread .content { animation: none !important; transform: none !important; } }
/* نافذة مراجعة الطلبات */
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid #f0f1f4; }
.rv { display: grid; }
.rv-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px dashed #eceef3; align-items: start; }
.rv-row:last-child { border-bottom: 0; } .rv-row > span { color: #667085; font-size: 13px; } .rv-row > div { font-size: 13.5px; min-width: 0; }
@media (max-width: 640px) { .rv-row { grid-template-columns: 1fr; gap: 2px; } }
/* زر محادثة جديدة: لون واحد سادة بلا تدرّج أو ظل أو إطار */
.hb-sh .hb-newb, .hb-sh .hb-newb:hover, .hb-sh .hb-newb:focus { background: #b07a24 !important; background-image: none !important; border: 0 !important; box-shadow: none !important; color: #fff; outline: none; }
.hb-sh .hb-newb::before, .hb-sh .hb-newb::after { display: none !important; }
.hb-sh .hb-newb:hover { background: #9c6a1c !important; }
/* الشريط السفلي أقرب لأسفل الشاشة */
@media (max-width: 760px) { .tabbar, .cp-tabbar { bottom: max(6px, calc(env(safe-area-inset-bottom) - 14px)) !important; } }
/* زر التنازل عن الراتب: بنفس شكل «فتح» وأيقونة ذهبية، أهدأ من زر الإصدار */
.btn.waive-btn { background: #fff; border: 1px solid var(--line, #eaecf0); color: #475467; gap: 6px; margin-inline-end: 6px; box-shadow: none; }
.btn.waive-btn svg { width: 15px; height: 15px; color: #b07a24; }
.btn.waive-btn:hover { background: #fdf6ea; border-color: #f2d9ad; color: #8a5a0b; }
/* أزرار الجداول (روابط وأزرار) على نفس الخط */
td.actions .btn, td.actions a.btn { vertical-align: middle; display: inline-flex; align-items: center; margin-block: 0; }
.badge.waived-badge { display: inline-flex; align-items: center; gap: 5px; } .badge.waived-badge svg { width: 13px; height: 13px; flex: none; color: #b07a24; }

/* ── الاجتماعات ── */
.mt-filter { margin: 4px 0 14px; } .mt-filter .seg em { font-style: normal; color: #6b6f80; font-weight: 500; margin-inline-start: 2px; }
.mt-group { margin-bottom: 18px; } .mt-gh { font-size: 12.5px; font-weight: 700; color: #667085; margin: 0 4px 8px; }
.mt-card { display: flex; gap: 14px; background: #fff; border: 1px solid #eceef3; border-radius: 18px; padding: 14px; margin-bottom: 10px; position: relative; overflow: hidden; }
.mt-card::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: #c08a2b; } .mt-card.team::before { background: #6172f3; }
.mt-date { flex: none; width: 64px; border-radius: 14px; background: #fdf6ea; display: grid; justify-items: center; align-content: center; padding: 8px 4px; text-align: center; }
.mt-card.team .mt-date { background: #eef2ff; }
.mt-date b { font-size: 24px; line-height: 1; color: #1d1d1f; } .mt-date span { font-size: 12px; font-weight: 700; color: #8a5a0b; } .mt-card.team .mt-date span { color: #4f46e5; } .mt-date small { font-size: 10.5px; color: #6b6f80; margin-top: 2px; }
.mt-date.sm { width: 46px; padding: 6px 2px; border-radius: 12px; } .mt-date.sm b { font-size: 18px; }
.mt-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.mt-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px 3px 4px; border-radius: 999px; }
.mt-kind.client { background: #fdf6ea; color: #8a5a0b; } .mt-kind.team { background: #eef2ff; color: #4f46e5; padding-inline-start: 8px; } .mt-kind svg { width: 13px; height: 13px; }
.mt-kind .avatar { width: 20px; height: 20px; font-size: 9px; border-radius: 6px; }
.mt-soon { font-size: 11px; font-weight: 700; color: #067647; background: #ecfdf3; padding: 2px 8px; border-radius: 999px; }
.mt-main h3 { margin: 0; font-size: 15.5px; }
.mt-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: #475467; } .mt-meta > span { display: inline-flex; align-items: center; gap: 5px; } .mt-meta svg { width: 14px; height: 14px; color: #6b6f80; }
.mt-notes { margin: 2px 0 0; font-size: 12.5px; color: #667085; line-height: 1.8; white-space: pre-line; }
.mt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.mt-people { display: flex; align-items: center; } .mt-people > span { margin-inline-start: -6px; } .mt-people > span:first-child { margin-inline-start: 0; }
.mt-people .avatar { width: 28px; height: 28px; font-size: 10.5px; border: 2px solid #fff; border-radius: 50%; } .mt-people em { font-style: normal; font-size: 11px; color: #667085; margin-inline-start: 4px; } .mt-people small { color: #6b6f80; font-size: 11.5px; margin-inline-start: 8px; }
.mt-acts { display: flex; gap: 6px; } .mt-acts .btn svg { width: 15px; height: 15px; } .mt-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ov-mt { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .ov-mt li { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #f0f1f4; border-radius: 14px; }
.ov-mt li b { display: block; font-size: 13.5px; } .ov-mt li small { color: #667085; font-size: 12px; }
@media (max-width: 640px) { .mt-card { padding: 12px; gap: 10px; } .mt-date { width: 54px; }  .mt-row2 { grid-template-columns: 1fr 1fr; } }
.mt-date span { font-size: 11px; line-height: 1.3; max-width: 100%; }

/* ── المحادثة: ايموجي، صوت، تفاعلات (مثل واتساب) ── */
.hc, .ch-send { position: relative; }
.hc-in { position: relative; flex: 1; min-width: 0; display: flex; }
.hc-in textarea { flex: 1; padding-inline-end: 42px !important; }
.hc-emo { position: absolute; inset-inline-end: 6px; bottom: 50%; transform: translateY(50%); width: 32px; height: 32px; border: 0; background: none; color: #6b6f80; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.hc-emo:hover, .hc-emo.on { color: #a8690f; background: #fdf6ea; } .hc-emo svg { width: 21px; height: 21px; }
.hc-mic { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #b07a24; color: #fff; display: grid; place-items: center; cursor: pointer; }
.hc-mic svg { width: 20px; height: 20px; }
.hc .hc-go, .ch-send .ch-go { display: none; } .hc.has-text .hc-go, .ch-send.has-text .ch-go { display: grid; } .ch-send.has-text .ch-go { display: inline-flex; }
.hc.has-text .hc-mic, .ch-send.has-text .hc-mic { display: none; }
.ch-row { align-items: flex-end; }
/* تسجيل صوتي */
.vrec { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: #fff; border-radius: inherit; }
.vrec-dot { width: 10px; height: 10px; border-radius: 50%; background: #d92d20; animation: vrecp 1s infinite; } @keyframes vrecp { 50% { opacity: .25; } }
.vrec span[data-vt] { font-variant-numeric: tabular-nums; font-weight: 700; color: #1d1d1f; } .vrec-hint { flex: 1; color: #6b6f80; font-size: 13px; }
.vrec-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fef3f2; color: #b42318; display: grid; place-items: center; cursor: pointer; } .vrec-x svg { width: 18px; height: 18px; }
.vrec-go { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #b07a24; color: #fff; display: grid; place-items: center; cursor: pointer; } .vrec-go svg { width: 19px; height: 19px; }
/* لوحة الايموجي */
.emo { position: absolute; inset-inline: 8px; bottom: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid #eceef3; border-radius: 18px; box-shadow: 0 18px 40px -18px rgba(16,24,40,.35); overflow: hidden; }
.emo-tabs { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid #f0f1f4; overflow-x: auto; scrollbar-width: none; }
.emo-tabs button { flex: none; display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 6px 10px; border-radius: 10px; font: inherit; font-size: 12px; color: #667085; cursor: pointer; } .emo-tabs button.on { background: #fdf6ea; color: #8a5a0b; font-weight: 700; }
.emo-grid > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); max-height: 210px; overflow-y: auto; padding: 6px; }
.emo-grid button { border: 0; background: none; font-size: 24px; line-height: 1; padding: 6px 0; border-radius: 10px; cursor: pointer; } .emo-grid button:hover { background: #f2f4f7; }
/* الرسائل الصوتية */
.vn { display: flex; align-items: center; gap: 10px; min-width: 200px; max-width: 260px; padding: 2px 0; }
.vn-play { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #b07a24; color: #fff; display: grid; place-items: center; cursor: pointer; } .vn-play svg { width: 16px; height: 16px; }
.hm.out .vn-play, .ch-msg.out .vn-play { background: #8a5a0b; }
.vn-bar { flex: 1; height: 4px; border-radius: 99px; background: rgba(16,24,40,.12); position: relative; cursor: pointer; } .vn-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: inherit; background: #b07a24; }
.vn-t { font-size: 11.5px; color: #667085; font-variant-numeric: tabular-nums; min-width: 30px; }
.vn audio { display: none; }
.hm-vid { max-width: 260px; border-radius: 12px; display: block; }
/* التفاعلات */
.hm-bw, .ch-bw { position: relative; }
.rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -8px; padding-inline: 8px; position: relative; z-index: 1; }
.hm.out .rx, .ch-msg.out .rx { justify-content: flex-end; }
.rx-c { display: inline-flex; align-items: center; gap: 3px; border: 1px solid #eceef3; background: #fff; border-radius: 999px; padding: 1px 7px; font-size: 14px; line-height: 20px; cursor: pointer; box-shadow: 0 2px 6px -2px rgba(16,24,40,.15); }
.rx-c em { font-style: normal; font-size: 11px; color: #667085; font-weight: 700; } .rx-c.mine { border-color: #e4c48e; background: #fdf6ea; }
.rx-bar { position: fixed; z-index: 9000; display: flex; gap: 2px; padding: 5px 6px; background: #fff; border-radius: 999px; box-shadow: 0 12px 34px -10px rgba(16,24,40,.35); border: 1px solid #eceef3; animation: rxin .14s ease-out; }
@keyframes rxin { from { transform: scale(.85); opacity: 0; } }
.rx-bar button { border: 0; background: none; font-size: 26px; line-height: 1; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; transition: transform .12s; } .rx-bar button:hover { transform: scale(1.18); background: #f9fafb; }
.hm-rxo { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: -34px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: #fff; color: #6b6f80; box-shadow: 0 2px 8px -2px rgba(16,24,40,.2); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.hm.out .hm-rxo, .ch-msg.out .hm-rxo { inset-inline-end: auto; inset-inline-start: -34px; }
.hm-rxo svg { width: 16px; height: 16px; } .hm:hover .hm-rxo, .ch-msg:hover .hm-rxo { opacity: 1; }
@media (hover: none) { .hm-rxo { display: none; } .hm-b, .ch-b { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
/* الهاتف: خانة الكتابة ملتصقة بلوحة المفاتيح بلا فراغ، والصفحة لا تتحرك */
@media (max-width: 860px) {
  body.hb-thread { overflow: hidden; overscroll-behavior: none; }
  body.kb-open.hb-thread .hb.has-cur .hc { padding-bottom: 8px; }
  body.hb-thread .hb.has-cur .hc { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
}
/* طلبات الاجتماع + صفحة اجتماعات العميل */
.mt-reqbox { margin-bottom: 16px; border-color: #f2d9ad; }
.mt-req { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #f2f4f7; } .mt-req:last-child { border-bottom: 0; }
.mt-req p { margin: 2px 0; font-size: 13.5px; color: #344054; line-height: 1.7; } .mt-req small { color: #6b6f80; font-size: 12px; display: block; } .mt-req b { font-size: 13.5px; }
.mt-req-ic { width: 36px; height: 36px; border-radius: 11px; background: #fdf6ea; color: #a8690f; display: grid; place-items: center; flex: none; } .mt-req-ic svg { width: 17px; height: 17px; }
.mt-cp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; } .mt-cp-head h2 { margin: 0 0 2px; }
.mt-reqs { background: #fff; border: 1px solid #eceef3; border-radius: 16px; margin-bottom: 14px; overflow: hidden; }
.mt-sec { font-size: 14px; margin: 18px 2px 10px; color: #344054; } .mt-sec em { font-style: normal; color: #6b6f80; font-weight: 500; font-size: 12px; }
.mt-card.old { opacity: .72; } .mt-card.old::before { background: #d0d5dd; }
.cp-modal { position: fixed; inset: 0; z-index: 9500; background: rgba(16,24,40,.45); display: grid; place-items: center; padding: 16px; }
.cp-modal-card { width: min(520px, 100%); max-height: 90dvh; overflow-y: auto; background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 30px 60px -20px rgba(16,24,40,.4); }
.cp-modal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } .cp-modal-h b { font-size: 16px; }
.mt-l { display: grid; gap: 6px; } .mt-l > span { font-size: 13px; font-weight: 600; color: #344054; }
.mt-modes { display: flex; gap: 8px; } .mt-modes input { display: none; } .mt-modes span { display: block; padding: 9px 14px; border: 1px solid #eaecf0; border-radius: 11px; font-size: 13px; font-weight: 600; color: #475467; cursor: pointer; }
.mt-modes input:checked + span { background: #fdf6ea; border-color: #e4c48e; color: #8a5a0b; }
@media (max-width: 640px) { .mt-cp-head { flex-direction: column; } .mt-cp-head .btn { width: 100%; justify-content: center; } .mt-req { flex-wrap: wrap; } .mt-req .mt-acts { width: 100%; justify-content: flex-end; } .cp-modal { align-items: end; padding: 0; } .cp-modal-card { border-radius: 20px 20px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); } }
/* نافذة الاجتماع */
.mf { display: grid; gap: 14px; }
.mf-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mf-kinds button { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px solid #eaecf0; border-radius: 16px; background: #fff; font: inherit; text-align: start; cursor: pointer; transition: .15s; }
.mf-kinds button > span { width: 40px; height: 40px; border-radius: 12px; background: #f2f4f7; color: #667085; display: grid; place-items: center; flex: none; } .mf-kinds button > span svg { width: 19px; height: 19px; }
.mf-kinds b { display: block; font-size: 14px; } .mf-kinds small { color: #6b6f80; font-size: 11.5px; }
.mf-kinds i { position: absolute; top: 8px; inset-inline-end: 8px; width: 20px; height: 20px; border-radius: 50%; background: #b07a24; color: #fff; display: none; place-items: center; } .mf-kinds i svg { width: 12px; height: 12px; }
.mf-kinds button.on { border-color: #e4c48e; background: #fffaf2; } .mf-kinds button.on > span { background: #b07a24; color: #fff; } .mf-kinds button.on i { display: grid; }
.mf-sec { display: grid; gap: 8px; padding: 12px; border: 1px solid #f0f1f4; border-radius: 16px; background: #fcfcfd; }
.mf-h { display: flex; align-items: center; gap: 7px; } .mf-h svg { width: 15px; height: 15px; color: #a8690f; } .mf-h b { font-size: 13px; color: #344054; flex: 1; }
.mf-grid { display: grid; gap: 8px; } .mf-when { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.mf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mf-chips button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid #eaecf0; border-radius: 10px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: #475467; cursor: pointer; }
.mf-chips button svg { width: 14px; height: 14px; } .mf-chips button.on { background: #b07a24; border-color: #b07a24; color: #fff; }
.mf-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; max-height: 190px; overflow-y: auto; }
.mf-p { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid #eaecf0; border-radius: 12px; background: #fff; cursor: pointer; }
.mf-p input { position: absolute; opacity: 0; pointer-events: none; } .mf-p .avatar { width: 30px; height: 30px; font-size: 11px; flex: none; }
.mf-p span { min-width: 0; flex: 1; } .mf-p b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mf-p small { display: block; font-size: 11px; color: #6b6f80; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-p i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #d0d5dd; display: grid; place-items: center; color: transparent; flex: none; } .mf-p i svg { width: 12px; height: 12px; }
.mf-p:has(input:checked) { border-color: #e4c48e; background: #fffaf2; } .mf-p:has(input:checked) i { background: #b07a24; border-color: #b07a24; color: #fff; }
.mf-all { border: 0; background: none; color: #a8690f; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
@media (max-width: 640px) { .mf-kinds small { display: none; } .mf-people { grid-template-columns: 1fr; } }
/* بطاقة المتابعات المستحقة + حماية عامة: أي أيقونة بلا مقاس داخل نص لا تتمدد */
.card-body b > svg, .card-body span > svg, .badge > svg, .small > svg { width: 1.1em; height: 1.1em; vertical-align: -0.15em; }

/* ── فقاعات الرسائل بأسلوب واتساب ── */
.hm-list { background-color: #f3eee6; background-image: radial-gradient(rgba(176,122,36,.10) 1px, transparent 1px); background-size: 16px 16px; gap: 1px; }
.hm { max-width: min(78%, 560px); margin-top: 6px; }
.hm.grp { margin-top: 2px; }
.hm-b { border-radius: 14px; box-shadow: 0 1px .5px rgba(11,20,26,.13); overflow: visible; min-width: 64px; }
.hm.in .hm-b { background: #fff; } .hm.out .hm-b { background: #f8e2b8; }
.hm.in:not(.grp) .hm-b { border-start-start-radius: 4px; } .hm.out:not(.grp) .hm-b { border-start-end-radius: 4px; }
.hm.in .hm-b, .hm.out .hm-b { border-end-start-radius: 14px; border-end-end-radius: 14px; }
/* الذيل */
.hm:not(.grp) .hm-b::before { content: ''; position: absolute; top: 0; width: 10px; height: 12px; }
.hm.in:not(.grp) .hm-b::before { inset-inline-start: -7px; background: #fff; clip-path: polygon(100% 0, 0 0, 100% 100%); }
.hm.out:not(.grp) .hm-b::before { inset-inline-end: -7px; background: #f8e2b8; clip-path: polygon(0 0, 100% 0, 0 100%); }
[dir=rtl] .hm.in:not(.grp) .hm-b::before { clip-path: polygon(0 0, 100% 0, 0 100%); }
[dir=rtl] .hm.out:not(.grp) .hm-b::before { clip-path: polygon(100% 0, 0 0, 100% 100%); }
.hm-t { padding: 6px 10px 0; font-size: 14.5px; line-height: 1.6; color: #111b21; }
.hm-meta { padding: 0 9px 4px; margin-top: -2px; font-size: 10.5px; color: #8696a0; }
.hm.out .hm-meta { color: #8a7553; }
.hm-tick.seen { color: #53bdeb; }
.hm-name { color: #a8690f; margin: 6px 10px 0; font-size: 12px; }
.hm-bw > .hm-name { margin: 0 4px 2px; }
.hm-img { padding: 3px; } .hm-img img { border-radius: 11px; max-width: min(280px, 64vw); max-height: 340px; }
.hm-b.voice { padding: 6px 8px 0; min-width: 230px; }
.hm-day span { background: #fff; color: #54656f; box-shadow: 0 1px .5px rgba(11,20,26,.13); border: 0; font-size: 11.5px; }
.hm-new span { background: #fff; padding: 2px 10px; border-radius: 999px; }
@media (max-width: 860px) { .hm { max-width: 84%; } .hm-t { font-size: 15px; } .hm-list { padding: 10px 10px 6px; } }
/* قائمة المحادثات: لا تخرج المعاينة عن البطاقة */
.hb-list > * { min-width: 0; } .hb-it { overflow: hidden; } .hb-tx { flex: 1; min-width: 0; } .hb-r2 span { min-width: 0; flex: 1; }
.hm.in:not(.grp), .hm.in.grp { margin-inline-start: 6px; } .hm.out { margin-inline-end: 6px; }
/* الرد على رسالة / تعديل / قائمة الرسالة */
.hm-q { display: block; width: calc(100% - 8px); margin: 4px 4px 0; padding: 5px 9px; border: 0; border-inline-start: 3px solid #b07a24; border-radius: 8px; background: rgba(176,122,36,.09); text-align: start; font: inherit; cursor: pointer; min-width: 140px; }
.hm.out .hm-q, .ch-msg.out .hm-q { background: rgba(255,255,255,.55); }
.hm-q b { display: block; font-size: 11.5px; color: #a8690f; } .hm-q span { display: block; font-size: 12.5px; color: #54656f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.hm-ed { font-style: normal; font-size: 10px; color: #8696a0; margin-inline-end: 4px; }
.hc-ctx { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #fdf6ea; border-inline-start: 3px solid #b07a24; }
.hc-ctx-ic { color: #a8690f; display: grid; } .hc-ctx-ic svg { width: 17px; height: 17px; }
.hc-ctx b { display: block; font-size: 12px; color: #8a5a0b; } .hc-ctx span { display: block; font-size: 12.5px; color: #667085; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-ctx .grow { min-width: 0; }
.rx-pop { position: fixed; z-index: 9000; display: grid; gap: 6px; animation: rxin .14s ease-out; }
.rx-pop .rx-bar { position: static; animation: none; }
.rx-acts { background: #fff; border-radius: 16px; box-shadow: 0 12px 34px -10px rgba(16,24,40,.35); border: 1px solid #eceef3; overflow: hidden; min-width: 190px; justify-self: center; }
.rx-acts button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; background: none; font: inherit; font-size: 14px; color: #1d2939; cursor: pointer; text-align: start; }
.rx-acts button + button { border-top: 1px solid #f2f4f7; } .rx-acts button:hover { background: #f9fafb; }
.rx-acts button svg { width: 17px; height: 17px; color: #667085; } .rx-acts button.danger, .rx-acts button.danger svg { color: #d92d20; }
.rx-focus .hm-b, .rx-focus .ch-b { box-shadow: 0 0 0 2px #e4c48e; }
.hm.flash .hm-b, .ch-msg.flash .ch-b { animation: msgflash 1.4s ease; } @keyframes msgflash { 30% { box-shadow: 0 0 0 3px #e4c48e; background-color: #fff3dc; } }
.pr-desc { margin: 2px 0 0; font-size: 12.5px; color: #667085; white-space: pre-line; line-height: 1.6; }
/* خارج شبكة المكتب */
.off-net { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: #fffaf2; border: 1px solid #f2d9ad; margin-bottom: 16px; }
.off-ic { width: 44px; height: 44px; border-radius: 14px; background: #b07a24; color: #fff; display: grid; place-items: center; flex: none; } .off-ic svg { width: 22px; height: 22px; }
.off-net b { font-size: 16px; } .off-net p { margin: 4px 0 0; color: #667085; font-size: 13.5px; line-height: 1.8; }
/* «تقويمي» للاطلاع خارج المكتب: قائمة أيام */
.cal-agenda { display: flex; flex-direction: column; gap: 10px; }
.cal-agenda .card.ag-day { display: flex; flex-direction: column; padding: 12px 14px; }
.ag-day.today { border-color: var(--brand-200); }
.ag-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 8px; }
.ag-h b { font-size: 14px; } .ag-h small { color: var(--faint); font-size: 12px; }
.ag-list { display: flex; flex-direction: column; gap: 6px; }
.ag-ev { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border-inline-start: 3px solid var(--c); color: var(--ink-2); text-decoration: none !important; min-width: 0; }
.ag-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #fff; color: var(--c); flex: none; } .ag-ic svg { width: 16px; height: 16px; }
.ag-tx { display: flex; flex-direction: column; min-width: 0; } .ag-tx b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ag-tx small { color: var(--muted); font-size: 12px; }

/* ── الوضع الداكن ──
   ألوان داكنة حقيقية في dark.css (مُولَّد تلقائياً من هذا الملف بواسطة src/dark-css.js) — بلا فلتر، فالصور والإيموجي بألوانها الأصلية */
html.dark { background-color: #181b1f; color-scheme: dark; }
html.dark body { background-color: #f4f4f6; }
html.dark .brand-wordmark, html.dark .tb-wordmark { filter: brightness(1.08); }
html.dark ::selection { background: #cfe3ff; }
/* زر التبديل */
.theme-btn .tm-sun { display: none; } html.dark .theme-btn .tm-moon { display: none; } html.dark .theme-btn .tm-sun { display: block; }
.theme-btn svg { width: 20px; height: 20px; }
.tb-end { display: flex; align-items: center; gap: 6px; }
.login-theme { position: fixed; top: calc(env(safe-area-inset-top) + 16px); inset-inline-start: 16px; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.8); border: 1px solid #eceef3; display: grid; place-items: center; z-index: 5; }
/* ملف الشركة: غلاف + شعار */
.co-back { display: inline-block; margin-bottom: 10px; }
.co-prof { position: relative; background: #fff; border: 1px solid #eceef3; border-radius: 20px; overflow: hidden; margin-bottom: 16px; }
/* غلاف الشركة بنسبة غلاف فيسبوك (820×312) في كل الشاشات */
.co-cover { position: relative; width: 100%; aspect-ratio: 820 / 312; background-size: cover; background-position: center; background-color: var(--cc, #a8690f);
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--cc, #a8690f) 85%, #fff), color-mix(in srgb, var(--cc, #a8690f) 70%, #000)); }
.co-cover[style*="background-image:url"] { background-color: #eee; }
.co-prof-body { display: flex; align-items: flex-end; gap: 16px; padding: 0 20px 16px; flex-wrap: wrap; }
.co-logo-wrap { margin-top: -48px; flex: none; position: relative; z-index: 1; }
.avatar.co-big { width: 104px; height: 104px; border-radius: 26px; font-size: 30px; border: 4px solid #fff; box-shadow: 0 8px 22px -10px rgba(16,24,40,.35); background-color: #fff; }
.avatar.co-big.has-img img { object-fit: contain; background: #fff; }
.co-info { flex: 1; min-width: 200px; padding-top: 10px; } .co-info h2 { margin: 0; font-size: 22px; }
.co-acts { margin-inline-start: auto; padding-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.co-logo-wrap .ph-cam { bottom: 4px; inset-inline-end: 4px; }
@media (max-width: 640px) { .avatar.co-big { width: 84px; height: 84px; border-radius: 22px; } .co-logo-wrap { margin-top: -40px; } .co-prof-body { padding: 0 14px 14px; gap: 10px; } .co-acts { margin: 0; width: 100%; } .co-acts .btn { flex: 1; justify-content: center; } }
.co-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* ما يظهر للعميل */
.cvis { display: grid; gap: 10px; }
.cvis-g { border: 1px solid #eceef3; border-radius: 14px; padding: 6px 12px; background: #fcfcfd; }
.cvis-g > b { display: block; font-size: 12px; color: #a8690f; padding: 6px 0 4px; }
.cvis-o { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed #eceef3; cursor: pointer; font-size: 13.5px; }
.cvis-g > b + .cvis-o { border-top: 0; }
input.sw { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; border-radius: 999px; background: #d0d5dd; position: relative; cursor: pointer; transition: background .2s; margin: 0; }
input.sw::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: inset-inline-start .2s; }
input.sw:checked { background: #b07a24; } input.sw:checked::after { inset-inline-start: 19px; }
.rc2-sees { margin: 2px 0 10px; padding: 0; list-style: none; display: grid; gap: 4px; }
.rc2-sees li { position: relative; padding-inline-start: 16px; font-size: 12.5px; color: #475467; line-height: 1.6; }
.rc2-sees li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: #a8690f; font-weight: 700; font-size: 11px; }
/* الوظيفة: معلومات تلقائية */
.job-auto { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #fcfcfd; border: 1px dashed #e4e7ec; }
.ja-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; } .ja-row > span { color: #667085; min-width: 110px; } .ja-row small { color: #6b6f80; font-size: 11.5px; }
.ja-cats { display: flex; flex-wrap: wrap; gap: 4px; } .ja-cats i { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #fdf6ea; color: #8a5a0b; }
/* العمل عن بعد */ .rw-g { display: inline-flex; align-items: center; gap: 4px; } .rw-g svg { width: 12px; height: 12px; }
.lb-cell { display: grid; gap: 1px; line-height: 1.4; } .lb-cell small { color: #6b6f80; font-size: 11px; }
/* نموذج الشركة */
.cf { display: grid; gap: 12px; }
.cf-sec { border: 1px solid #eceef3; border-radius: 16px; padding: 12px 14px; background: #fcfcfd; }
.cf-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: #344054; margin-bottom: 10px; flex-wrap: wrap; } .cf-sub { font-weight: 500; font-size: 11.5px; color: #6b6f80; }
.cf-more > summary { cursor: pointer; list-style: none; margin: 0; } .cf-more > summary::before { content: '▸'; color: #a8690f; } .cf-more[open] > summary::before { content: '▾'; }
.cf-color { width: 64px; height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: #fff; }
.cf-socs { display: grid; gap: 8px; }
.cf-soc { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 8px; align-items: center; } .cf-soc-l { font-size: 13px; font-weight: 600; color: #475467; }
.cf-add { position: relative; margin-top: 8px; } .cf-menu { position: absolute; top: calc(100% + 4px); inset-inline-start: 0; z-index: 5; background: #fff; border: 1px solid #eceef3; border-radius: 12px; box-shadow: 0 12px 30px -12px rgba(16,24,40,.3); padding: 4px; display: grid; min-width: 180px; }
.cf-menu button { border: 0; background: none; text-align: start; padding: 8px 12px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; } .cf-menu button:hover { background: #fdf6ea; }
.cf-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.cf-tm { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid #eaecf0; border-radius: 12px; background: #fff; cursor: pointer; }
.cf-tm input { accent-color: #b07a24; } .cf-tm .avatar { width: 28px; height: 28px; font-size: 10.5px; } .cf-tm span { min-width: 0; } .cf-tm b { display: block; font-size: 12.5px; } .cf-tm small { display: block; font-size: 11px; color: #6b6f80; }
.cf-tm:has(input:checked) { border-color: #e4c48e; background: #fffaf2; }
@media (max-width: 640px) { .cf-soc { grid-template-columns: 1fr auto; } .cf-soc-l { grid-column: 1 / -1; } }
/* حسابات الشركة */
.ca-list { display: grid; gap: 10px; }
.ca { border: 1px solid #eceef3; border-radius: 16px; padding: 12px; background: #fff; } .ca.off { opacity: .6; }
.ca-top { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; } .ca-top .grow { min-width: 180px; }
.ca-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ca-all { margin-top: 10px; font-size: 12.5px; color: #067647; background: #ecfdf3; border-radius: 10px; padding: 7px 10px; }
.ca-vis { margin-top: 10px; } .ca-vis > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #a8690f; list-style: none; } .ca-vis > summary::before { content: '▸ '; } .ca-vis[open] > summary::before { content: '▾ '; }
/* خطة النشر: التخصيص الشهري */
.pm { position: relative; border: 1px solid #eceef3; border-radius: 16px; padding: 12px; background: #fcfcfd; }
.pm-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pm-nav { display: flex; gap: 4px; flex-wrap: wrap; } .pm-nav button { border: 1px solid #eaecf0; background: #fff; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; } .pm-nav button.on { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }
.pm-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pm-wd { font-size: 11px; color: #6b6f80; text-align: center; padding: 2px 0; }
.pm-d { min-height: 64px; border: 1px solid #eceef3; border-radius: 10px; background: #fff; padding: 4px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: start; font: inherit; cursor: pointer; }
.pm-d > span { font-size: 11px; color: #667085; font-weight: 700; } .pm-d.out { opacity: .35; cursor: default; } .pm-d.custom { border-color: #e4c48e; background: #fffaf2; }
.pm-d i { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-radius: 6px; padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-d:hover:not(.out) { border-color: #e4c48e; }
.pm-pop { position: absolute; inset-inline: 12px; bottom: 12px; z-index: 5; background: #fff; border: 1px solid #eceef3; border-radius: 14px; box-shadow: 0 16px 40px -16px rgba(16,24,40,.35); padding: 12px; display: grid; gap: 10px; }
.pm-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; } .pm-types label { display: flex; align-items: center; gap: 6px; } .pm-types input { width: 54px; } .pm-types span { font-weight: 700; color: var(--c); font-size: 13px; }
.pm-acts { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) { .pm-d { min-height: 46px; } .pm-d i { font-size: 9px; padding: 0 2px; } }

/* العمل عن بعد — تصميم محسّن */
.rw-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.rw-st { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid #eceef3; border-radius: 16px; }
.rw-st b { display: block; font-size: 22px; line-height: 1.1; } .rw-st small { color: var(--muted, #667085); font-size: 12px; }
.rw-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; } .rw-ic svg { width: 19px; height: 19px; }
.rw-ic.ok { background: #e8f7ef; color: #12805c; } .rw-ic.info { background: #eaf2ff; color: #2f6fdb; } .rw-ic.brand { background: var(--brand-50, #fbf5e9); color: var(--brand-700, #9a6b1f); } .rw-ic.gray { background: #f2f4f7; color: #475467; }
@media (max-width: 900px) { .rw-stats { grid-template-columns: 1fr 1fr; } }

/* قائمة الطلبات — بطاقات */
.rq-list { display: grid; gap: 10px; padding: 12px; }
.rq { display: grid; grid-template-columns: minmax(170px, 1.3fr) repeat(auto-fit, minmax(110px, 1fr)); align-items: center; gap: 14px; padding: 12px 14px; background: #fff; border: 1px solid #eceef3; border-inline-start: 4px solid #d0d5dd; border-radius: 14px; cursor: default; transition: box-shadow .15s, transform .15s; }
.rq[data-open] { cursor: pointer; } .rq:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .07); }
.rq.pending { border-inline-start-color: #f5a524; } .rq.approved { border-inline-start-color: #2fb37a; } .rq.rejected { border-inline-start-color: #e5484d; }
.rq-type b { display: block; margin-bottom: 3px; } .rq-f { display: grid; gap: 2px; min-width: 0; } .rq-l { color: #6b6f80; font-size: 11px; }
.rq-when { display: flex; align-items: center; gap: 10px; } .rq-days { display: grid; place-items: center; min-width: 48px; padding: 4px 6px; border-radius: 10px; background: var(--brand-50, #fbf5e9); color: var(--brand-700, #9a6b1f); }
.rq-days b { font-size: 17px; line-height: 1.1; } .rq-days small { font-size: 10.5px; }
.rq-st { display: grid; gap: 4px; justify-items: start; } .rq-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 900px) { .rq { grid-template-columns: 1fr 1fr; } .rq-who, .rq-act { grid-column: 1 / -1; } .rq-act { justify-content: flex-start; } }
.rq-dates { display: grid; gap: 2px; line-height: 1.4; }
@media (max-width: 900px) { .rq-act { grid-column: auto; justify-content: flex-end; } .rq-who { grid-column: 1 / -1; } }

/* جداول البنود والدفعات في محرر المطبوعات */
.it-field > label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.it-ed { display: grid; gap: 6px; padding: 10px; border: 1px dashed #e4d3b0; border-radius: 14px; background: #fffcf6; }
.it-h, .it-row { display: grid; gap: 6px; align-items: center; }
.it-h.items, .it-row.items { grid-template-columns: 1.3fr 1.5fr 64px 96px 34px; }
.it-h.schedule, .it-row.schedule { grid-template-columns: 1.4fr 1fr 110px 34px; }
.it-h span { font-size: 11px; color: #6b6f80; padding-inline: 4px; } .it-row .input { padding: 7px 9px; font-size: 13px; }
@media (max-width: 700px) { .it-h { display: none; } .it-row.items, .it-row.schedule { grid-template-columns: 1fr 1fr; } }

/* الأقسام (للعرض) */
.org-ro { display: grid; gap: 10px; } .org-d { display: grid; grid-template-columns: 160px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border, #eceef3); border-radius: 12px; }
.org-d > div { display: flex; flex-wrap: wrap; gap: 6px; } @media (max-width: 700px) { .org-d { grid-template-columns: 1fr; } }
/* الصور: بطاقات الشركات (غلاف + شعار + أعضاء) */
.ph-grid.ph-co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ph-co { border: 1px solid var(--border, #eceef3); border-radius: 16px; overflow: hidden; background: var(--surface, #fff); }
.ph-cv { position: relative; display: block; width: 100%; aspect-ratio: 820 / 312; border: 0; padding: 0; cursor: pointer; background: linear-gradient(135deg, #f3e6cc, #e2c48c); }
.ph-cv img { width: 100%; height: 100%; object-fit: cover; display: block; } .ph-cv > span:first-child { font-size: 12px; color: #6b4a12; }
.ph-cv .ph-cam { position: absolute; bottom: 8px; inset-inline-start: 8px; }
.ph-co-b { display: flex; align-items: center; gap: 10px; padding: 0 14px; margin-top: -26px; position: relative; }
.ph-co-b b { margin-top: 26px; } .ph-logo { border: 0; background: none; padding: 0; cursor: pointer; position: relative; }
.ph-logo .avatar { box-shadow: 0 0 0 3px var(--surface, #fff); }
.ph-mem { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 14px 14px; }
.ph-m { display: grid; justify-items: center; gap: 4px; border: 0; background: none; padding: 0; cursor: pointer; max-width: 72px; } .ph-m small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 72px; }
.ph-m .ph-edit { position: relative; } .ph-m .ph-cam { transform: scale(.8); }
.pm-wk { margin: 10px 0; padding: 12px; border: 1px dashed var(--border, #e4d3b0); border-radius: 14px; }
[data-ahide] { position: relative; } [data-ahide].as-hid { color: #b42318 !important; } [data-ahide] s { position: absolute; inset: 50% 20%; height: 1.5px; background: currentColor; transform: rotate(-35deg); }
.fl-more:not(.open) > .fl-x { display: none; } .fl-more .act-more { width: 100%; margin: 4px 0 0; }
.fl-more.open .act-more span:first-child { display: none; } .fl-more.open .act-more span + span { display: inline; }
/* نموذج الشركة — تحسينات */
.cf { gap: 14px; } .cf-sec { background: var(--surface, #fff); padding: 14px 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.cf-h { font-size: 14px; } .cf-ic { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--brand-50, #fbf5e9); color: var(--brand-700, #9a6b1f); flex: none; } .cf-ic svg { width: 15px; height: 15px; }
.cf-sw { display: flex; flex-wrap: wrap; gap: 8px; } .cf-sw input { position: absolute; opacity: 0; pointer-events: none; }
.cf-sw label { cursor: pointer; } .cf-sw i { display: block; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); transition: transform .12s; }
.cf-sw input:checked + i { outline: 2px solid var(--brand-600, #b07a24); outline-offset: 2px; transform: scale(1.08); }
.cf-soc { padding: 6px; border: 1px solid var(--border, #eceef3); border-radius: 12px; }
.cf-add { display: flex; justify-content: center; } .cf-menu { inset-inline-start: 50%; transform: translateX(50%); }

/* الموافقة على التصاميم واللوحة الرئيسية */
.ab-px, .fd-px { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(16, 24, 40, .12); }
.fd-px { margin: 8px 14px 12px; }
.mb-empty { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: #f6f7f9; text-align: center; }
.mb-empty [data-x] { position: absolute; top: 14px; right: 14px; }
/* خطة النشر: القادم في النشر */
.pl-uph { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px 0; font-size: 13px; }
.pl-uprow { display: flex; gap: 10px; overflow-x: auto; padding: 10px 20px 18px; }
.pl-up { flex: 0 0 auto; min-width: 104px; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line, #e8e9ef); border-top: 3px solid var(--c); border-radius: 14px; background: var(--surface, #fff); text-align: center; }
.pl-up span { font-size: 11px; color: var(--muted, #6b6f80); } .pl-up b { font-size: 15px; } .pl-up em { font-style: normal; font-weight: 700; font-size: 12.5px; color: var(--c); }
/* رصيد مغادرات الأسبوع */
/* الفاتورة: مصدرها دفعات مرتبطة أو بنود يدوية */
.inv-src .seg { margin-bottom: 8px; }
.inv-pays { display: grid; gap: 6px; padding: 10px; border: 1px dashed #e4d3b0; border-radius: 14px; background: #fffcf6; }
.inv-pay { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #eceef3; border-radius: 10px; background: #fff; cursor: pointer; }
.inv-pay:has(input:checked) { border-color: #e4c48e; background: #fffaf2; } .inv-pay input { accent-color: #b07a24; }
.inv-pay span { flex: 1; display: grid; } .inv-pay small { color: #6b6f80; font-size: 11.5px; } .inv-pay em { font-style: normal; font-weight: 700; white-space: nowrap; }
.it-field.it-locked .it-ed { opacity: .75; } .it-field.it-locked [data-it-add], .it-field.it-locked [data-it-del] { display: none; }
.ct-deleted td { color: #6b6f80 !important; background: #f6f7f9; } .ct-deleted td b { color: #6b6f80; text-decoration: line-through; } .ct-deleted { cursor: default; }
/* الهاتف: أزرار الدفعة تلتف ولا تُقص */
@media (max-width: 760px) {
  .pr-act { grid-column: 1 / -1 !important; flex-wrap: wrap; justify-content: flex-start !important; }
  .pr-act .btn { flex: 1 1 auto; justify-content: center; }
  .pr-act .icon-btn, .pr-act .badge { flex: 0 0 auto; }
}
/* عارض الصور: فوق كل عناصر البوابة، وزر إغلاق واضح على الهاتف، والسحب للإغلاق */
.ab-lb { z-index: 9800 !important; touch-action: none; }
.ab-lb-stage img { transition: transform .18s ease, opacity .18s ease; }
@media (max-width: 760px) { .ab-lb-x { width: 48px; height: 48px; font-size: 32px; background: rgba(255,255,255,.2); } }
.mb-empty [data-x] { position: absolute; top: 18px; inset-inline-start: 18px; right: auto; display: inline-flex; align-items: center; gap: 6px; }
/* صورة المحادثة: تُعرض كاملة داخل الشاشة */
.ch-lb { z-index: 9800 !important; touch-action: none; }
.ch-lb img { max-width: calc(100vw - 40px) !important; max-height: calc(100vh - 100px) !important; max-height: calc(100dvh - 100px) !important; width: auto; height: auto; object-fit: contain; transition: transform .18s ease, opacity .18s ease; }
/* شريط شهر النشر في اللوحة الرئيسية */
.ab-section { position: absolute; height: 96px; display: flex; align-items: center; padding: 0 36px; border-radius: 22px; background: linear-gradient(135deg, #1b1f27, #2b2f38); box-shadow: 0 10px 30px rgba(16,24,40,.12); }
.ab-section span { color: #fff; font: 800 44px/1 'IBM Plex Sans', var(--font); letter-spacing: .32em; }
.ab-section::after { content: ''; position: absolute; inset-inline-end: 36px; width: 120px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, #d6a04a, #8a560c); }
.fd-section { margin: 18px 14px 8px; padding: 12px 16px; border-radius: 14px; background: #1b1f27; color: #fff; font: 800 15px var(--font); letter-spacing: .24em; direction: ltr; }
.sig-opts { display: grid; gap: 8px; padding: 10px 12px; border: 1px dashed #e4d3b0; border-radius: 12px; background: #fffcf6; }
/* التواقيع والختم */
/* اختيار من ملفات الشركة في نافذة رفع التصاميم */
.fp-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .fp-bar .search { flex: 1; }
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; padding: 2px; }
.fp-it { position: relative; display: grid; gap: 6px; padding: 6px; border: 2px solid transparent; border-radius: 14px; background: var(--surface-2, #fafbfe); cursor: pointer; text-align: start; transition: border-color .12s, transform .12s; }
.fp-it:hover { transform: translateY(-1px); } .fp-it.on { border-color: #b07a24; background: #fffaf2; }
.fp-it img, .fp-pdf { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #eef0f4; display: grid; place-items: center; font-weight: 800; color: #b42318; }
.fp-it small { font-size: 11px; color: var(--muted, #6b6f80); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-chk { position: absolute; top: 10px; inset-inline-end: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.9); border: 1.5px solid #d0d5dd; color: transparent; }
.fp-it.on .fp-chk { background: #b07a24; border-color: #b07a24; color: #fff; } .fp-chk svg { width: 14px; height: 14px; }
.fp-bar .search { position: relative; } .fp-bar .search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.fp-bar .search .input { padding-inline-start: 36px; height: 38px; width: 100%; }
/* «أو اختر من ملفات الشركة» تحت منطقة الرفع */
.du-pick-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.du-pick { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 1px solid var(--line, #e8e9ef); border-radius: 10px; background: var(--surface, #fff); color: var(--ink-2, #3a3d4a); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.du-pick:hover { border-color: #c9a35e; color: #8a560c; background: #fffaf2; } .du-pick svg { width: 16px; height: 16px; color: #b07a24; flex: none; }
.du-ex { outline: 2px solid rgba(176,122,36,.35); outline-offset: -2px; }
.du-src { position: absolute; top: 5px; inset-inline-start: 5px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: #b07a24; color: #fff; font-style: normal; }
.du-src svg { width: 13px; height: 13px; }
.du-or { font-size: 12px; color: var(--faint, #9a9db0); }
.ab-pdf-native { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
/* بطاقة اللوحة: الهدف واضح فوراً */
.abl-body .abl-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 17px; font-weight: 800; line-height: 1.35; }
.abl-kind { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px; background: var(--brand-50, #fdf6ea); color: var(--brand-700, #8a560c); font-size: 12px; font-weight: 700; }
.abl-kind svg { width: 13px; height: 13px; }
.ab-gpx { margin: 0 0 0 auto; padding: 0; border: 0; } .ab-glabel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* حالة ظهور المنشور للعميل — شريط واحد واضح (يُقاس بـ em: كبير داخل اللوحة، عادي في عرض الهاتف) */
.ab-px { font-size: 24px; margin-top: 26px; padding-top: 22px; border-top: 2px dashed rgba(16,24,40,.1); display: block; }
.fd-px { font-size: 13.5px; margin: 10px 14px 14px; padding-top: 10px; display: block; }
.ab-gpx { font-size: 20px; margin: 0 0 0 auto; padding: 0; border: 0; min-width: 0; flex: 1 1 520px; }
.vis { display: flex; align-items: center; gap: .7em; padding: .65em .8em; border-radius: .9em; border: 1px solid; direction: ltr; text-align: left; }
.vis-ic { flex: none; width: 2.1em; height: 2.1em; border-radius: .65em; display: grid; place-items: center; }
.vis-ic svg { width: 1.15em; height: 1.15em; }
.vis-tx { flex: 1; min-width: 0; display: grid; gap: .1em; }
.vis-tx b { font-size: 1em; font-weight: 800; line-height: 1.25; }
.vis-tx small { font-size: .74em; opacity: .75; line-height: 1.3; }
.vis-btn { flex: none; display: inline-flex; align-items: center; gap: .4em; height: 2.3em; padding: 0 1.1em; border-radius: .7em; border: 1px solid rgba(16,24,40,.18); background: #fff; color: #344054; font: 700 .82em var(--font); cursor: pointer; white-space: nowrap; }
.vis-btn:hover { background: #f4f4f7; } .vis-btn svg { width: 1.1em; height: 1.1em; }
.vis-btn.pri { background: #1b1f27; border-color: #1b1f27; color: #fff; } .vis-btn.pri:hover { background: #2b303b; }
.vis-btn.approve { background: linear-gradient(135deg, #12a46b, #0b7d50); border: 0; color: #fff; height: 2.5em; padding: 0 1.3em; box-shadow: 0 .3em .8em rgba(18,164,107,.28); }
.vis-ok { background: #ecfdf3; border-color: #abefc6; color: #067647; } .vis-ok .vis-ic { background: #d1fadf; color: #067647; }
.vis-wait { background: #fffaeb; border-color: #fedf89; color: #93370d; } .vis-wait .vis-ic { background: #fef0c7; color: #b54708; }
.vis-off { background: #f8f9fb; border-color: #e4e7ec; color: #475467; } .vis-off .vis-ic { background: #eef0f4; color: #667085; }
/* داخل اللوحة: الشريط بطاقة مستقلة بين الكابشن والأزرار */
.ab-pcol .ab-px { flex: none; font-size: 30px; margin: 0; padding: 0; border: 0; }
.ab-pcol .vis { border-radius: 26px; padding: 22px 26px; box-shadow: 0 10px 30px rgba(60,40,10,.06); }
.ab-pcol .vis-btn { border-radius: 16px; }
/* دليل الهوية: حالة الظهور مضغوطة في نفس سطر العنوان (لا تغطي اسم الملف) */
.ab-glabel { flex-wrap: nowrap; }
.ab-gpx { flex: 0 1 auto; margin-inline-start: auto; font-size: 22px; }
.ab-gpx .vis { padding: .35em .5em .35em .45em; gap: .55em; white-space: nowrap; }
.ab-gpx .vis-tx small { display: none; }
.ab-gpx .vis-ic { width: 1.8em; height: 1.8em; }
.ab-gpx + [data-gdel], .ab-gpx ~ .ab-gdel { margin-inline-start: 12px; }
/* زر استبدال دليل الهوية بجانب الحذف */
.ab-grep { color: #f3e3c3; }
.ab-grep:hover { background: #2d6cdf; color: #fff; border-color: #2d6cdf; }
.ab-grep + .ab-gdel { margin-inline-start: 10px; }

/* ── المحادثات: تجربة مثل واتساب ── */
.hm-float { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 4; pointer-events: none; transition: opacity .25s; }
.hm-float span { display: inline-block; font-size: 11.5px; background: #fff; color: #54656f; box-shadow: 0 1px .5px rgba(11,20,26,.13); padding: 3px 12px; border-radius: 999px; }
.hm-tools { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: -66px; display: flex; gap: 4px; }
.hm.out .hm-tools { inset-inline-end: auto; inset-inline-start: -66px; }
.hm-tools .hm-rxo { position: static; transform: none; inset: auto; }
.hm-deleted { display: flex; align-items: center; gap: 6px; color: #8696a0; font-style: italic; }
.hm-deleted svg { width: 14px; height: 14px; }
.hm.del .hm-b { background: #fff !important; opacity: .85; }
.hm-tick.wait svg { width: 12px; height: 12px; vertical-align: -2px; }
.hm-fail { display: inline-flex; align-items: center; gap: 4px; color: #d92d20; font-style: normal; font-size: 11px; cursor: pointer; }
.hm-fail svg { width: 12px; height: 12px; }
.hm.failed { opacity: 1; }
.hm-doc { display: flex; align-items: center; gap: 10px; margin: 4px; padding: 10px 12px; min-width: 220px; max-width: 320px; border-radius: 10px; background: rgba(0,0,0,.05); color: inherit; text-decoration: none; }
.hm-doc-ic { position: relative; width: 38px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 6px; background: #e8505b; color: #fff; }
.hm-doc-ic svg { width: 20px; height: 20px; }
.hm-doc-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hm-doc-tx b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-doc-tx small { font-size: 11px; color: #667781; }
.hm-doc-dl { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(0,0,0,.12); color: #667781; flex: none; }
.hm-doc-dl svg { width: 16px; height: 16px; }
.hm-vid { display: block; max-width: min(320px, 100%); max-height: 360px; border-radius: 10px; margin: 3px; background: #000; }
.hm-bw { transition: none; }
.hm.sw-ready .hm-bw::before { content: '↩'; position: absolute; inset-inline-end: calc(100% + 10px); top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.15); color: #667085; }
.hm-jump em { position: absolute; top: -6px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #25d366; color: #fff; font: 700 11px/20px var(--font); font-style: normal; }
.hm-jump svg { width: 20px; height: 20px; transform: none; }
.hb-find { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: #fff; border-bottom: 1px solid #f0f1f4; }
.hb-find > svg { width: 16px; height: 16px; color: #6b6f80; flex: none; }
.hb-find input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; }
.hb-find [data-fc] { font-size: 12px; color: #667085; white-space: nowrap; }
.hc-prev { flex-wrap: wrap; align-items: stretch; }
.hc-pi { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; background: #fff; border: 1px solid #eaecf0; max-width: 240px; }
.hc-pi img, .hc-pd { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.hc-pd { display: grid; place-items: center; align-content: center; background: #f2f4f7; color: #475467; }
.hc-pd svg { width: 18px; height: 18px; } .hc-pd small { font-size: 9px; font-weight: 700; }
.hc-pi > span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.cg { cursor: default; padding: 60px 64px; }
.cg-top { position: absolute; top: calc(12px + env(safe-area-inset-top)); inset-inline: 14px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; }
.cg-top [data-cg-n] { margin-inline-end: auto; }
.cg-b { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cg-b svg, .cg-nav svg { width: 20px; height: 20px; }
.cg-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cg-nav.prev { inset-inline-start: 12px; } .cg-nav.next { inset-inline-end: 12px; }
@media (hover: none) { .hm-tools { display: none; } .cg-nav { display: none; } .cg { padding: 60px 8px 20px; } }
/* شارة الشركة المميزة */
.co-star { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 9px; border-radius: 999px; background: #fff4d6; color: #a8690f; font-size: 11.5px; font-weight: 700; }
.co-star svg { width: 12px; height: 12px; fill: currentColor; }
.co-sec-h { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; font-size: 15px; }
.co-sec-h svg { width: 18px; height: 18px; color: #a8690f; } .co-sec-h span { color: #667085; font-size: 13px; }
.co-fav + .co-sec-h { margin-top: 26px; padding-top: 18px; border-top: 1px solid #eceef3; }
.co-fav > .card { box-shadow: 0 0 0 2px #e4c48e; }
.co-favb svg { width: 16px; height: 16px; } .co-favb.on { color: #a8690f; } .co-favb.on svg { fill: currentColor; }
/* ملفات النظام: صور الموظفين والشعارات والأغلفة */
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.sys-it { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid #eceef3; border-radius: 14px; background: #fff; color: inherit; text-decoration: none; min-width: 0; }
.sys-it:hover { border-color: #d0d5dd; }
.sys-img { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #f2f4f7; display: grid; place-items: center; }
.sys-img img { width: 100%; height: 100%; object-fit: cover; }
.sys-it b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sys-it small { font-size: 11.5px; color: #667085; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-pdf-open { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #f2f4f7; color: #1c1d2e; text-decoration: none; }
.ab-pdf-open b { font-size: 90px; color: #d92d20; } .ab-pdf-open span { font-size: 36px; padding: 0 40px; text-align: center; } .ab-pdf-open em { font-style: normal; font-size: 34px; padding: 14px 40px; border-radius: 999px; background: #1c1d2e; color: #fff; }
/* فيديو داخل اللوحة والقائمة */
.ab-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.fd-video { display: block; width: 100%; max-height: 80vh; background: #000; }
/* الأعمال: اختيار اللوحة */
.cp-bg { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
@media (max-width: 760px) { .cp-bg { grid-template-columns: 1fr 1fr; } }

/* ملف الموظف للشريك */
.pe-head { display: flex; align-items: center; gap: 18px; padding: 22px 24px; }
.pe-head h2 { margin: 0; font-size: 22px; }
.pe-av .avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.pe-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pe-tile { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.pe-tile .pe-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fbf3e4; color: #a8690f; flex-shrink: 0; }
.pe-tile .pe-ic svg { width: 17px; height: 17px; }
.pe-tile small { display: block; color: var(--muted); font-size: 12px; }
.pe-tile b { display: block; margin-top: 3px; font-size: 14px; line-height: 1.6; }
@media (max-width: 640px) { .pe-head { padding: 18px; gap: 14px; } .pe-av .avatar.lg { width: 58px; height: 58px; } }

/* أوقات الدوام */
.wh { display: inline-flex; flex-direction: column; gap: 4px; }
.wh > span { display: flex; gap: 10px; align-items: baseline; }
.wh b { font-weight: 600; min-width: 96px; }
.wh bdi { font-family: var(--mono, ui-monospace, monospace); font-size: 13px; color: var(--ink-2); }

/* ═════════ المبيعات ═════════ */
.mt-kind.sales { background: #f4ebff; color: #6941c6; padding-inline-start: 8px; }
.mt-card.sales { border-inline-start-color: #7f56d9; }
.sl-list { display: grid; gap: 10px; }
.sl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.sl-wa { color: #067647; }
.sl-sec { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 22px 0 10px; }
.sl-sec svg { width: 17px; height: 17px; color: #a8690f; }
.sl-sec em { font-style: normal; font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.sl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.sl-head b { display: block; } .sl-head small { color: var(--muted); font-size: 12.5px; }
.sl-script { background: #fbf6ec; border: 1px solid #efdfc2; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.sl-script summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.sl-script summary svg { width: 15px; height: 15px; }
.sl-script p { white-space: pre-line; margin: 8px 0 0; line-height: 1.8; }
.sl-outs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sl-outs.sm { grid-template-columns: repeat(3, 1fr); }
.sl-outs label { position: relative; }
.sl-outs input { position: absolute; opacity: 0; pointer-events: none; }
.sl-outs span { display: block; text-align: center; padding: 10px 8px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; cursor: pointer; transition: all .15s; }
.sl-outs input:checked + span { border-color: #c08a2b; background: #fbf3e4; color: #8a560c; font-weight: 700; }
.sl-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sl-log li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.sl-log li small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.sl-log li p { margin: 6px 0 0; color: var(--ink-2); }
.sl-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.sl-kpis > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.sl-kpis span { display: block; font-size: 12px; color: var(--muted); }
.sl-kpis b { display: block; font-size: 22px; margin-top: 2px; }
.sl-kpis small { display: block; font-size: 11.5px; color: var(--muted); }
.sl-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sl-mini li { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.card-head h3 .avatar { width: 28px; height: 28px; font-size: 11px; margin-inline-end: 8px; }
@media (max-width: 1100px) { .sl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .sl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* جدول دوام محدد (أيام المكتب والعمل عن بعد) */
.wp-days { display: grid; gap: 6px; margin-top: 10px; }
.wp-day { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; }
.wp-day b { font-size: 13.5px; min-width: 70px; }
.wp-day .seg { display: inline-flex; gap: 4px; }
.wp-day .seg label { position: relative; }
.wp-day .seg input { position: absolute; opacity: 0; pointer-events: none; }
.wp-day .seg span { display: block; padding: 5px 12px; border-radius: 9px; font-size: 12.5px; cursor: pointer; border: 1px solid transparent; }
.wp-day .seg input:checked + span { background: #fbf3e4; border-color: #e4c48c; color: #8a560c; font-weight: 700; }
.wp-day .seg input[value=remote]:checked + span { background: #eef4ff; border-color: #b2ccff; color: #1d4ed8; }
.wp-day .seg input[value=off]:checked + span { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.mt-kind.partner { background: #e8f0fe; color: #1d4ed8; padding-inline-start: 8px; }
.mt-card.partner { border-inline-start-color: #3b82f6; }
.mf-p[hidden] { display: none !important; }
.sl-reps { flex-wrap: wrap; }
td .avatar { width: 28px; height: 28px; font-size: 11px; vertical-align: middle; }
/* المبيعات — نظرة عامة وملف المندوب */
.sl-kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sl-k { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.sl-k small { display: block; font-size: 12.5px; color: var(--muted); }
.sl-k b { display: block; font-size: 26px; line-height: 1.3; }
.sl-k em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.sl-k.ok .hic { background: #ecfdf3; color: #067647; } .sl-k.bad .hic { background: #fef3f2; color: #b42318; } .sl-k.warn .hic { background: #fffaeb; color: #b54708; } .sl-k.brand { background: linear-gradient(135deg, #fffaf0, #fff); border-color: #efdfc2; }
.sl-chart { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 8px; }
.sl-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.sl-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.sl-bars i { width: 42%; max-width: 14px; background: #e4c48c; border-radius: 5px 5px 2px 2px; min-height: 2px; }
.sl-bars i.a { background: #12b76a; }
.sl-col small { font-size: 10.5px; color: var(--muted); }
.sl-target { position: absolute; inset-inline: 0; border-top: 1px dashed #c08a2b; font-size: 10.5px; color: #a8690f; padding-inline-start: 4px; pointer-events: none; }
.sl-ob { margin-bottom: 10px; } .sl-ob .row { justify-content: space-between; font-size: 13px; } .sl-ob b small { color: var(--muted); font-weight: 500; }
.sl-obar { height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 4px; } .sl-obar i { display: block; height: 100%; border-radius: 999px; }
.sl-feed { list-style: none; margin: 0; padding: 0; } .sl-feed li { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.sl-feed li:last-child { border-bottom: 0; } .sl-feed li > i { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.sl-feed small { color: var(--muted); } .sl-fmeta { display: block; margin-top: 2px; } .sl-feed p { margin: 6px 0 0; color: var(--ink-2); }
li.clickable { cursor: pointer; } li.clickable:hover { background: var(--surface-2); }
.sl-stchips { display: flex; flex-wrap: wrap; gap: 8px; } .sl-stchips a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.card-head .seg { flex-wrap: wrap; } .card-head .seg em { font-style: normal; font-size: 11px; color: var(--muted); }
@media (max-width: 1100px) { .sl-kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sl-kgrid { grid-template-columns: 1fr 1fr; } .sl-k b { font-size: 20px; } }
.sl-k > .hic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex-shrink: 0; }
.sl-k > .hic svg { width: 19px; height: 19px; }
.sl-kgrid { margin-bottom: 0; }
/* المبيعات — رأس الصفحة والتبويبات والإعدادات */
.sl-hero-t { display: flex; align-items: center; gap: 14px; }
.sl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 999px; background: #fbf3e4; border: 1px solid #efdfc2; color: #8a560c; font-size: 13px; font-weight: 600; }
.sl-chip button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 0; background: rgba(168,105,15,.12); color: inherit; cursor: pointer; padding: 0; }
.sl-chip button svg { width: 12px; height: 12px; }
.sl-chip-add { display: flex; gap: 8px; } .sl-chip-add .input { max-width: 320px; }
.sl-tpl { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sl-tpl-b { display: grid; grid-template-columns: 1fr 280px; gap: 14px; padding: 12px; }
.sl-vars { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.sl-vars button { border: 1px dashed #e4c48c; background: #fffaf0; color: #8a560c; border-radius: 8px; padding: 3px 8px; font-size: 12px; cursor: pointer; font-family: inherit; }
.sl-wa-prev { background: #efeae2; border-radius: 12px; padding: 10px; } .sl-wa-prev small { display: block; color: #667085; font-size: 11px; margin-bottom: 6px; }
.sl-bubble { background: #d9fdd3; color: #111b21; border-radius: 10px 10px 2px 10px; padding: 8px 10px; font-size: 13px; line-height: 1.7; box-shadow: 0 1px 1px rgba(0,0,0,.08); min-height: 40px; }
.sl-bubble mark { background: #fff3c4; color: inherit; border-radius: 4px; padding: 0 3px; }
@media (max-width: 960px) { .sl-tpl-b { grid-template-columns: 1fr; } }
/* خطة الراتب والهدف */
.sl-plan-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.sl-plan-h .hic { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex-shrink: 0; } .sl-plan-h .hic svg { width: 18px; height: 18px; }
.sl-plan-h > div { flex: 1; } .sl-plan-h h3 { margin: 0; font-size: 15px; } .sl-plan-h p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.sl-plan.won { border-color: #abefc6; background: linear-gradient(180deg, #f6fef9, #fff 60%); } .sl-plan.won .sl-plan-h .hic { background: #ecfdf3; color: #067647; }
.sl-plan-b { display: flex; gap: 16px; align-items: center; padding: 0 18px 16px; }
.sl-ring { --p: 0; width: 104px; height: 104px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: conic-gradient(#c08a2b calc(var(--p) * 1%), var(--surface-2) 0); }
.sl-plan.won .sl-ring { background: conic-gradient(#12b76a calc(var(--p) * 1%), var(--surface-2) 0); }
.sl-ring > div { width: 82px; height: 82px; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; text-align: center; }
.sl-ring b { font-size: 24px; line-height: 1; } .sl-ring b small { font-size: 13px; color: var(--muted); } .sl-ring span { font-size: 11px; color: var(--muted); }
.sl-plan-g { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sl-plan-g > div { padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; } .sl-plan-g small { display: block; font-size: 11.5px; color: var(--muted); } .sl-plan-g b { font-size: 14px; }
.sl-plan-g em { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); }
.sl-plan-g .hit { border-color: #abefc6; background: #f6fef9; } .sl-plan-g .tot { background: #fffaf0; border-color: #efdfc2; } .sl-plan-g .tot b { color: #8a560c; }
.sl-plan-w { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 14px; } .sl-plan-w span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px; border-radius: 999px; background: #ecfdf3; color: #067647; } .sl-plan-w svg { width: 12px; height: 12px; }
.sl-plan-prev { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .sl-plan-b { flex-direction: column; align-items: stretch; } .sl-ring { margin-inline: auto; } }
.sl-tile { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.sl-tile small { font-size: 12.5px; color: var(--muted); font-weight: 600; } .sl-tile span { font-size: 11.5px; color: var(--muted); }
.sl-tile > div { display: flex; align-items: center; gap: 8px; } .sl-tile .input { font-size: 20px; font-weight: 700; background: #fff; } .sl-tile em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.sl-scr { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; } .sl-scr-t { font-size: 14px; padding: 6px 2px; }
.sl-tpl-b { grid-template-columns: 1fr 300px; }
/* شريط الفترة */
.sl-rangebar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.sl-range { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sl-range input { border: 0; background: transparent; font: inherit; font-size: 13.5px; padding: 6px 4px; color: var(--ink); width: auto; min-width: 0; }
.sl-range input:focus { outline: none; } .sl-range-sep { color: var(--muted); font-size: 13px; }
 .sl-range .picker { border: 0 !important; box-shadow: none !important; background: transparent !important; }
/* «لا تتصل»: اختيار من الأرقام */
.sl-search { position: relative; } .sl-search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); } .sl-search .input { padding-inline-start: 36px; }
.sl-pick { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.sl-pick-i { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.sl-pick-i:last-child { border-bottom: 0; } .sl-pick-i > div { flex: 1; min-width: 0; } .sl-pick-i b { display: block; font-size: 13.5px; } .sl-pick-i small { color: var(--muted); font-size: 12px; }
.sl-pick-i.on { background: #fef3f2; }
/* نافذة الرفع */
.sl-drop { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed #e4c48c; border-radius: 16px; background: #fffaf0; cursor: pointer; text-align: center; transition: .15s; }
.sl-drop:hover, .sl-drop.over { background: #fdf3e1; border-color: #c08a2b; }
.sl-drop.has { border-style: solid; border-color: #12b76a; background: #f6fef9; }
.sl-drop-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: #a8690f; box-shadow: 0 6px 16px -10px rgba(168,105,15,.6); }
.sl-drop.has .sl-drop-ic { color: #067647; } .sl-drop-ic svg { width: 24px; height: 24px; }
.sl-drop b { font-size: 14.5px; } .sl-drop small { color: var(--muted); font-size: 12px; }
.sl-cols { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sl-colchip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); } .sl-colchip.req { background: #fbf3e4; border-color: #efdfc2; color: #8a560c; font-weight: 700; }
.sl-cols .btn { margin-inline-start: auto; }
.sl-range .picker { flex: 0 0 auto; }
.sl-range .picker-face { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 6px 6px !important; min-height: 0; font-size: 13.5px; }
.sl-range .picker { width: 232px !important; } .sl-range .picker-face { width: 100%; }
@media (max-width: 640px) { .sl-rangebar { flex-direction: column; align-items: stretch; } .sl-range { justify-content: space-between; } .sl-range .picker { width: auto !important; flex: 1; } }
.list li.clickable > svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.sl-sec-h { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; } .sl-sec-h h3 { margin: 0; font-size: 18px; }
.sl-sec-h .hic { width: 36px; height: 36px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; } .sl-sec-h .hic svg { width: 18px; height: 18px; }
/* شريط الفترة — نسخة مدمجة */
.sl-rangebar { margin-bottom: 16px !important; }
.sl-range { padding: 4px; gap: 0; border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.sl-range label { display: flex; align-items: center; gap: 2px; padding-inline-start: 10px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.sl-range label:hover { background: var(--surface-2); }
.sl-range label small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.sl-range .picker { width: auto !important; }
.sl-range .picker-face { padding: 7px 8px !important; font-weight: 600; white-space: nowrap; }
.sl-range .picker-ic svg { width: 15px; height: 15px; }
.sl-range-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.sl-extra { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; }
.sl-extra span, .sl-extra a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); text-decoration: none; } .sl-extra a:hover { color: var(--brand-600); }
.sl-extra svg { width: 13px; height: 13px; color: var(--muted); }
.sl-use { display: flex; align-items: center; gap: 8px; } .sl-use .sl-obar { flex: 1; margin: 0; height: 8px; } .sl-use b { font-size: 13px; min-width: 38px; }
.sl-impf { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: #fffaf0; border: 1px solid #efdfc2; color: #8a560c; font-size: 13.5px; font-weight: 600; }
.sl-impf svg { width: 16px; height: 16px; } .sl-impf span { flex: 1; }
.sl-cl { display: grid; gap: 4px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.sl-cl > div { display: flex; gap: 10px; align-items: baseline; } .sl-cl-k { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); min-width: 92px; flex-shrink: 0; }
.sl-cl-k svg { width: 13px; height: 13px; } .sl-cl-v { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 0; word-break: break-all; }
.sl-cl-v a { color: var(--ink); text-decoration: none; } .sl-cl-v a:hover { color: var(--brand-600); text-decoration: underline; }
.sl-acts-row { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.sl-acts-row .sl-del { color: var(--bad); padding-inline: 10px; }
/* بطاقة رقم المبيعات — تصميم جديد */
.sl-list { gap: 12px; }
.sl-card2 { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; display: grid; gap: 10px; }
.sl-card2:hover { border-color: #e4c48c; box-shadow: 0 8px 24px -16px rgba(168,105,15,.45); }
.sl-card2.late { border-inline-start: 4px solid var(--bad); }
.sl-c-h { display: flex; align-items: center; gap: 12px; }
.sl-c-av { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #8a560c; background: linear-gradient(135deg, #fdf3e1, #f6e2bd); flex-shrink: 0; }
.sl-c-t { flex: 1; min-width: 0; } .sl-c-t b { display: block; font-size: 15.5px; line-height: 1.4; } .sl-c-t small { display: block; font-size: 12.5px; color: var(--muted); }
.sl-c-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sl-c-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); } .sl-c-meta:empty { display: none; }
.sl-c-meta span { display: inline-flex; align-items: center; gap: 5px; } .sl-c-meta svg { width: 13px; height: 13px; } .sl-c-meta .late { color: var(--bad); font-weight: 700; }
.sl-cl { margin: 0; padding: 10px 12px; border-radius: 12px; gap: 6px; }
.sl-chip2 { display: inline-flex; padding: 2px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12px; font-family: var(--mono, monospace); color: var(--ink) !important; text-decoration: none !important; }
.sl-chip2:hover { border-color: #abefc6; background: #ecfdf3; }
.sl-c-note { display: flex; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 10px; background: #fffaf0; font-size: 12.5px; color: var(--ink-2); }
.sl-c-note svg { width: 14px; height: 14px; color: #c08a2b; flex-shrink: 0; margin-top: 2px; } .sl-c-note span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sl-c-f { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--line); }
.sl-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; font-family: inherit; }
.sl-btn svg { width: 15px; height: 15px; } .sl-btn:hover { border-color: #e4c48c; color: #8a560c; }
.sl-btn.call { background: #ecfdf3; border-color: #abefc6; color: #067647; font-family: var(--mono, monospace); }
.sl-btn.wa { color: #067647; }
.sl-btn.res { margin-inline-start: auto; background: linear-gradient(135deg, #c08a2b, #dcae5c); border-color: transparent; color: #fff; }
.sl-btn.res:hover { color: #fff; filter: brightness(1.05); }
@media (max-width: 640px) { .sl-c-h { flex-wrap: wrap; } .sl-c-badges { width: 100%; justify-content: flex-start; } .sl-btn span { display: none; } .sl-btn.res span, .sl-btn.call bdi { display: inline; } .sl-btn.res { flex: 1; justify-content: center; } }
.p-rep { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #f4ebff; color: #6941c6; }
.p-rep svg { width: 12px; height: 12px; }
/* المبيعات: مسافات موحّدة بين الأقسام (لا عناصر ملتصقة) */
[data-body] > * + *, [data-sales-sec] > * + *{ margin-top: 16px; }
[data-body] > .sl-rangebar, [data-sales-sec] > .sl-rangebar { margin-bottom: 0 !important; }
.sl-kgrid + .grid, .sl-kgrid + .card, .grid + .card, .card + .grid, .sl-rangebar + .sl-kgrid { margin-top: 16px; }
.grid.g-main > .card, .grid.g-main > .stack { min-width: 0; }
.stack > .card + .card { margin-top: 0; }
.sl-sec-h { margin: 22px 0 14px; }
.sl-list > .card { margin: 0; }
.pp-fixed { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 12px 14px; margin: 12px 0; border-radius: 12px; background: #f6fef9; border: 1px solid #abefc6; font-size: 13px; }
.pp-fixed b { width: 100%; font-size: 12.5px; color: #067647; }
.pp-fixed span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid #d1fadf; }
.pp-fixed svg { width: 13px; height: 13px; color: #12b76a; }
/* شريط الفترة: مسافة ثابتة فوقه وتحته أينما ظهر */
.sl-rangebar, [data-body] > .sl-rangebar, [data-sales-sec] > .sl-rangebar { margin: 16px 0 !important; }
.sl-rangebar:first-child { margin-top: 0 !important; }
.sl-rangebar + * { margin-top: 0 !important; }
/* بطاقات مسؤولي المبيعات أعلى الصفحة: مسافة واضحة عن التبويبات */
 .alert + .tabs { margin-top: 0; }
 .page-head + .alert { margin-top: 4px; }
.sl-err { outline: 2px solid var(--bad) !important; outline-offset: 3px; border-radius: 12px; animation: slshake .3s; }
@keyframes slshake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.req { color: var(--bad); }
/* صفحة الدخول: زر اللغة وزر الوضع الداكن على جهتين (direction:ltr كان يقلب جهة زر اللغة فيتداخلان) */
.login .lang-switch { inset-inline-end: auto; inset-inline-start: auto; left: 16px; right: auto; top: calc(env(safe-area-inset-top) + 16px); }
.login-theme { inset-inline-start: auto; inset-inline-end: auto; right: 16px; left: auto; }
/* شريط الفترة على الهاتف: التاريخان تحت بعض بعرض كامل */
@media (max-width: 640px) {
  .sl-rangebar { flex-direction: column; align-items: stretch; }
  .sl-rangebar .seg { justify-content: center; }
  .sl-range { flex-direction: column; align-items: stretch; width: 100%; }
  .sl-range label { justify-content: space-between; }
  .sl-range .picker { width: auto !important; flex: 1; min-width: 0; }
  .sl-range-sep { width: 100%; height: 1px; margin: 2px 0; }
}
@media (max-width: 640px) { .sl-plan-h { flex-wrap: wrap; } .sl-plan-h > .btn { width: 100%; justify-content: center; } .sl-plan-g { grid-template-columns: 1fr 1fr; } .sl-kgrid .sl-k { padding: 12px; } }
/* أهداف الشهر */
.sl-goals { display: grid; gap: 10px; padding: 0 18px 14px; }
.sl-goalbar .row { justify-content: space-between; font-size: 13px; } .sl-goalbar b small { color: var(--muted); font-weight: 500; }
.sl-goalbar .sl-obar i { background: linear-gradient(90deg, #c08a2b, #e0b464); } .sl-goalbar.done .sl-obar i { background: #12b76a; } .sl-goalbar.done b { color: #067647; }
/* بطاقة معلومات المنشأة (المبيعات) */
.sl-info { display: flex; flex-direction: column; }
.sl-info-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: start; }
.sl-info-row:last-child { border-bottom: 0; }
.sl-info-l { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.sl-info-l svg { width: 15px; height: 15px; }
.sl-info-v { display: flex; flex-direction: column; gap: 6px; min-width: 0; word-break: break-word; }
.sl-info-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .sl-info-row { grid-template-columns: 1fr; gap: 4px; } }
/* الهاتف: ظلال إطارات اللوحة الضخمة تستهلك ذاكرة Safari */
@media (pointer: coarse), (max-width: 899px) { .ab-frame { box-shadow: none; } }

/* نافذة الدفعات والفواتير: اسم الدفعة والتاريخ على سطر واحد، والأزرار بمحاذاة واحدة */
.pm-table th, .pm-table td { vertical-align: middle; }
.pm-table td:nth-child(2), .pm-table td:nth-child(3), .pm-table td:nth-child(4) { white-space: nowrap; }
.pm-table td:first-child { min-width: 220px; }
.pm-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.pay-acts-grid { display: grid; grid-template-columns: 118px 118px 32px; justify-content: end; }
.pay-acts-grid > .btn { width: 100%; justify-content: center; padding-inline: 6px; }
.pay-acts-grid > .icon-only { padding: 0; }
.pm-table td.actions { width: 1%; }
.pm-acts:not(.pay-acts-grid) { flex-wrap: nowrap; width: max-content; margin-inline-start: auto; }
.pm-acts:not(.pay-acts-grid) > .btn { flex: none; }
.fin-stats .value { white-space: nowrap; font-size: 22px; font-family: var(--font); letter-spacing: 0; }
.login .code-form { display: grid; gap: 14px; }
.login .code-input { height: 58px; text-align: center; font-size: 24px; font-weight: 600; letter-spacing: 6px; }
.login .code-input::placeholder { letter-spacing: 6px; opacity: .35; }
.login .code-trust { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; flex-direction: row-reverse; }
.login .code-trust input { appearance: none; -webkit-appearance: none; position: relative; width: 38px; height: 22px; margin: 0; flex: none; border-radius: 99px; background: var(--line); cursor: pointer; transition: background .15s; }
.login .code-trust input::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; }
.login .code-trust input:checked { background: var(--brand-600); }
.login .code-trust input:checked::after { inset-inline-start: 18px; }
.login .code-trust input:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.login .code-trust span { flex: 1; text-align: start; }
.login #err2:empty { display: none; }
[dir=ltr] .cp-shell { direction: ltr; }

/* صفحة الدخول: هادئة وواضحة */
.login { background: #f7f6f3; }
.login-box { max-width: 400px; padding: 36px 32px; border-radius: 20px; background: #fff; border: 1px solid #ebe8e2; box-shadow: 0 8px 28px rgba(40,30,10,.06); backdrop-filter: none; -webkit-backdrop-filter: none; }
.login-wordmark { width: 168px !important; margin-bottom: 10px; }
.login-box > p { font-size: 14px; margin-top: 0; }
.login form { margin-top: 26px; gap: 16px; }
.login label { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: 6px; }
.login .input { height: 46px; border-radius: 10px; background: #fff; border-color: #dcd8d0; font-size: 14.5px; }
.login .input:focus { background: #fff; border-color: var(--brand-600); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-600) 18%, transparent); }
.login .btn-signin { height: 46px; margin-top: 4px; background: var(--brand-600) !important; border-radius: 10px !important; box-shadow: none; font-size: 15px; }
.login .btn-signin:hover { background: var(--brand-700) !important; }
.login #err:empty { display: none; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-inline-end: 44px; }
[dir=rtl] .pw-wrap .input { padding-left: 44px; padding-right: 12px; }
.pw-eye { position: absolute; top: 0; bottom: 0; left: 4px; width: 38px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
[dir=ltr] .pw-eye { left: auto; right: 4px; }
.pw-eye:hover, .pw-eye.on { color: var(--brand-600); }
.login .code-input { height: 52px; }
@media (max-width: 480px) { .login-box { padding: 28px 20px; } }
.login { background-image: none !important; }
.ab-pubbtn { flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; height: 88px; border-radius: 20px; border: 2px dashed rgba(22,163,74,.55); background: transparent; color: #16a34a; font: 700 32px var(--font); cursor: pointer; }
.ab-pubbtn svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ab-pubbtn.on { border: 2px solid #16a34a; background: #16a34a; color: #fff; }
div.ab-pubbtn { cursor: default; }
/* الآيباد عمودياً: القائمة بعرض مريح في المنتصف بدل ملء الشاشة */
@media (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
  .dv.mobile.view-feed .dv-feed > * { max-width: 600px; margin-inline: auto; }
}
.wp-day { flex-wrap: wrap; }
.wp-dh { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.wp-dh[hidden] { display: none; }
.wp-dh .input { width: 112px; height: 34px; padding: 0 8px; font-size: 13px; }
.wp-dh span { color: var(--muted); }

/* الإعدادات: أنواع المهام وعناصرها */
.ty-box { padding: 12px; border: 1px solid #eaecf0; border-radius: 12px; background: #fcfcfd; }
.ty-it { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .ty-it .input { flex: 1; min-width: 160px; } .ty-it .check { margin: 0; font-size: 12.5px; }

/* عرض تصميم العنصر بشكل عائم */
.it-lb { grid-template-rows: 1fr auto; gap: 12px; cursor: default; }
.it-lb-stage { display: grid; place-items: center; min-height: 0; width: 100%; height: 100%; cursor: zoom-out; }
.it-lb-stage img, .it-lb-stage video { max-width: min(100%, 1100px) !important; max-height: calc(100dvh - 190px) !important; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.4); cursor: default; }
.it-lb-stage iframe { width: min(100%, 1000px); height: calc(100dvh - 190px); border: 0; border-radius: 10px; background: #fff; }
.it-lb-cap { max-width: 720px; width: 100%; text-align: center; color: rgb(255 255 255) !important; } .it-lb-cap b { font-size: 15px; } .it-lb-cap span { margin-inline-start: 10px; font-size: 12px; opacity: .7; }
.it-lb-cap p { margin: 6px 0 0; font-size: 13px; opacity: .85; white-space: pre-line; max-height: 90px; overflow: auto; }
.it-lb-nav { position: absolute; top: 50%; translate: 0 -50%; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: rgb(255 255 255) !important; display: grid; place-items: center; cursor: pointer; }
.it-lb-nav:hover { background: rgba(255,255,255,.28); } .it-lb-nav svg { width: 22px; height: 22px; }
.it-lb-nav.prev { inset-inline-start: 14px; } .it-lb-nav.next { inset-inline-end: 14px; }
.it-lb-nav.next svg { transform: rotate(180deg); }

/* بطاقة العنصر (تصميم محدّث) */
.ti-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: stretch; }
.ti-tile { display: flex; flex-direction: column; gap: 0; padding: 0; border-radius: 16px; }
.ti-tile::before { display: none; }
.ti-tile .ti-media { margin: 0; aspect-ratio: 16 / 11; border-bottom: 1px solid #eaecf0; border-top: 3px solid var(--c); }
.ti-chip { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.92); color: #344054; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.ti-chip.st-design { color: #5925dc; } .ti-chip.st-review { color: #b54708; } .ti-chip.st-approved { color: #175cd3; } .ti-chip.st-scheduled, .ti-chip.st-published { background: #12b76a; color: #fff; }
.ti-count { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(16,24,40,.6); color: #fff; }
.ti-count svg { width: 12px; height: 12px; }
.ti-body { flex: 1; display: grid; align-content: start; gap: 8px; padding: 12px 14px 10px; }
.ti-head b { display: block; font-size: 15px; line-height: 1.3; } .ti-head span { font-size: 11.5px; color: #a8690f; }
.ti-foot { display: grid; gap: 8px; padding: 0 14px 14px; }

/* بطاقة العنصر — الإصدار 3 */
.ti-tile { box-shadow: 0 1px 3px rgba(16,24,40,.06); transition: box-shadow .2s, transform .2s; }
.ti-tile:hover { box-shadow: 0 8px 24px rgba(16,24,40,.10); }
.ti-tile .ti-media { aspect-ratio: 16 / 10; border-top: 0; background: color-mix(in srgb, var(--c) 7%, #f9fafb); }
.ti-tile .ti-media::after { content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--c); }
.ti-ph { display: grid; place-items: center; align-content: center; gap: 4px; width: calc(100% - 24px); height: calc(100% - 24px); border: 1.5px dashed color-mix(in srgb, var(--c) 45%, #d0d5dd); border-radius: 12px; background: transparent; color: #475467; font: inherit; cursor: pointer; transition: background .2s, border-color .2s; }
.ti-ph svg { width: 22px; height: 22px; color: var(--c); } .ti-ph b { font-size: 13px; } .ti-ph small { font-size: 11px; color: #6b6f80; }
.ti-ph:hover { background: color-mix(in srgb, var(--c) 10%, transparent); border-color: var(--c); }
.ti-shown { position: absolute; inset-block-end: 10px; inset-inline-end: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(16,24,40,.65); color: #fff; }
.ti-shown svg { width: 12px; height: 12px; } .ti-shown.ok { background: #12b76a; }
.ti-body { gap: 10px; padding: 14px 14px 12px; }
.ti-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ti-head b { font-size: 15.5px; }
.ti-type { flex: none; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); }
.ti-note { font-size: 11.5px; color: #a8690f; margin-top: -6px; }
.ti-dates { display: grid; gap: 6px; } .ti-dates.two { grid-template-columns: 1fr 1fr; }
.ti-d { position: relative; display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: #f9fafb; border: 1px solid #f0f1f4; min-width: 0; }
.ti-d span { display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: #6b6f80; } .ti-d span svg { width: 12px; height: 12px; }
.ti-d b { font-size: 12.5px; font-weight: 700; color: #344054; line-height: 1.35; }
.ti-d em { font-style: normal; font-size: 10.5px; font-weight: 700; }
.ti-d.ok { background: #f6fef9; border-color: #d1fadf; } .ti-d.ok span, .ti-d.ok em { color: #067647; }
.ti-d.late { background: #fef3f2; border-color: #fecdca; } .ti-d.late span, .ti-d.late em, .ti-d.late b { color: #b42318; }
.ti-edit { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; width: 24px; height: 24px; border-radius: 7px; border: 0; background: transparent; color: #6b6f80; display: grid; place-items: center; cursor: pointer; }
.ti-edit:hover { background: #eaecf0; color: #344054; } .ti-edit svg { width: 13px; height: 13px; }
.ti-cap { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid #eaecf0; background: #fff; font: inherit; text-align: start; cursor: pointer; min-width: 0; }
.ti-cap svg { width: 14px; height: 14px; flex: none; color: #6b6f80; } .ti-cap span { flex: 1; min-width: 0; font-size: 12px; color: #475467; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-cap b { flex: none; font-size: 11.5px; color: #a8690f; } .ti-cap:hover { border-color: #d0d5dd; background: #fcfcfd; }
.ti-cap.add { justify-content: center; border-style: dashed; } .ti-cap.add svg { color: #a8690f; }
.ti-foot { display: flex; align-items: center; gap: 6px; padding: 0 14px 14px; }
.ti-foot .ti-st { flex: 1; min-width: 0; }
.ti-ib { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid #eaecf0; background: #fff; color: #475467; display: grid; place-items: center; cursor: pointer; }
.ti-ib svg { width: 15px; height: 15px; } .ti-ib:hover { background: #f2f4f7; color: #101828; }
.ti-ib.on { background: #12b76a; border-color: #12b76a; color: #fff; } .ti-ib.primary { width: auto; padding: 0 12px; background: var(--brand-600, #a8690f); border-color: transparent; color: #fff; }

/* مراحل العنصر: التصوير والتمويل، وأدوار المهمة */
.ti-stg { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid #eaecf0; background: #fcfcfd; font: inherit; text-align: start; cursor: pointer; min-width: 0; color: #344054; }
.ti-stg:disabled { cursor: default; }
.ti-stg > svg { width: 15px; height: 15px; flex: none; color: #6b6f80; } .ti-stg b { flex: none; font-size: 12px; }
.ti-stg span { flex: 1; min-width: 0; font-size: 11.5px; color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ti-stg i { font-style: normal; color: #344054; font-weight: 600; }
.ti-stg.done { background: #f6fef9; border-color: #d1fadf; } .ti-stg.done > svg { color: #12b76a; } .ti-stg.done span { color: #067647; }
.ti-stg.late { background: #fef3f2; border-color: #fecdca; } .ti-stg.late span { color: #b42318; }
.ti-stg.muted { border-style: dashed; background: transparent; } .ti-stg.muted span { color: #6b6f80; }
.ti-cap.add i { font-style: normal; font-size: 11px; color: #6b6f80; margin-inline-start: 4px; }
.ti-by { display: flex; align-items: center; gap: 4px; margin-top: -4px; font-size: 10.5px; color: #6b6f80; } .ti-by svg { width: 11px; height: 11px; }
.tf-flags { display: flex; flex-wrap: wrap; gap: 6px; } .tf-flags label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; padding: 3px 9px; border: 1px solid #eaecf0; border-radius: 999px; background: #fff; cursor: pointer; }
.tf-flags svg { width: 13px; height: 13px; vertical-align: -2px; } .tf-flags [hidden] { display: none; }
.tf-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tf-role { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 6px; margin: 0; font-size: 12px; color: #667085; }
.tf-role svg { width: 14px; height: 14px; color: #a8690f; } .tf-role .input { grid-column: 1 / -1; }
@media (max-width: 640px) { .tf-roles { grid-template-columns: 1fr; } }

/* رفع التصميم داخل البطاقة */
.ti-tile .ti-media .ti-ph { position: absolute; inset: 46px 12px 12px; width: auto; height: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed color-mix(in srgb, var(--c) 40%, #d0d5dd); border-radius: 12px; background: color-mix(in srgb, var(--c) 4%, transparent); }
.ti-ph-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, #fff); color: var(--c); transition: transform .2s; }
.ti-ph-ic svg { width: 19px; height: 19px; } .ti-ph b { font-size: 13px; color: #344054; } .ti-ph small { font-size: 11px; color: #6b6f80; }
.ti-tile .ti-media .ti-ph:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); } .ti-ph:hover .ti-ph-ic { transform: translateY(-2px); }
/* نموذج المهمة: عنصر مضغوط مع شرائح اختيار */
.tf-item { gap: 10px; padding: 12px; }
.tf-r1 { grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.5fr) minmax(170px, 1fr) auto auto; align-items: end; }
.tf-r1 .btn-ghost { height: 40px; width: 36px; padding: 0; }
.tf-r2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.tf-plat, .tf-flags { gap: 5px; }
.tf-plat label, .tf-flags label { padding: 4px 11px; font-size: 12px; font-weight: 600; color: #667085; border: 1px solid #eaecf0; background: #fff; transition: all .15s; }
.tf-plat label input, .tf-flags label input { display: none; }
.tf-plat label:has(input:checked) { background: #101828; border-color: #101828; color: #fff; }
.tf-flags label:has(input:checked) { background: #fff8eb; border-color: #f1d9a8; color: #8a5a00; }
.tf-flags { padding-inline-start: 14px; border-inline-start: 1px solid #eaecf0; }
.tf-sl { font-size: 12px; color: #667085; } .tf-sl .input { width: 70px; height: 32px; }

/* نافذة التصوير */
.shm { display: grid; gap: 16px; }
.shm-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } .shm-seg button { justify-content: center; gap: 6px; } .shm-seg svg { width: 15px; height: 15px; vertical-align: -3px; }
.shm-body { display: grid; gap: 14px; } .shm-body[hidden], .shm-off[hidden] { display: none; }
.shm-who { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 10px; background: #f9fafb; border: 1px solid #f0f1f4; font-size: 13px; color: #344054; }
.shm-who svg { width: 15px; height: 15px; color: #6b6f80; }
.shm-done { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #eaecf0; cursor: pointer; transition: all .15s; }
.shm-done input { display: none; }
.shm-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid #d0d5dd; color: transparent; transition: all .15s; } .shm-ic svg { width: 16px; height: 16px; }
.shm-done b { display: block; font-size: 14px; } .shm-done small { font-size: 12px; color: #6b6f80; }
.shm-done:has(input:checked) { background: #f6fef9; border-color: #a6f4c5; } .shm-done:has(input:checked) .shm-ic { background: #12b76a; border-color: #12b76a; color: #fff; }
.shm-off { margin: 0; padding: 14px; border-radius: 12px; background: #f9fafb; border: 1px dashed #d0d5dd; text-align: center; }
.ti-tile .ti-media::after { display: none; }

.ti-d span em { margin-inline-start: 4px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.ti-d.late span em { background: #fee4e2; color: #b42318; } .ti-d.ok span em { background: #dcfae6; color: #067647; }
.ti-d.late b { color: #344054; }

/* لوحات العمل في صفحة المهمة */
.ab-side { gap: 10px; } .ab-side .ab-desc { flex: none; font-size: 13.5px; }
.ab-sub { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.ab-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.ab-stats div { padding: 10px 12px; border-radius: 12px; background: #f9fafb; border: 1px solid #f0f1f4; } .ab-stats b { display: block; font-size: 18px; } .ab-stats span { font-size: 11.5px; color: var(--muted); }
.ab-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .ab-meta svg { width: 13px; height: 13px; }

.ab-side { gap: 12px; padding: 20px; }
.ab-side .ab-title { font-size: 17px; line-height: 1.4; }
.ab-stats { margin-top: 4px; } .ab-stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; } .ab-stats b { font-size: 20px; }
.ab-meta { border-top: 0; padding-top: 0; }
.ab-open { margin-top: auto; width: 100%; justify-content: center; }

/* ملفات لوحة العمل */
.ab-files-btn { width: 100%; justify-content: space-between; } .ab-files-btn span { min-width: 24px; padding: 0 7px; border-radius: 999px; background: #f2f4f7; font-size: 12px; font-weight: 700; }
.ab-files-btn + .ab-open { margin-top: 0; } .ab-side .ab-files-btn { margin-top: auto; }
.dfm { display: grid; gap: 14px; }
.dfm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: #f9fafb; border: 1px solid #f0f1f4; font-size: 13px; color: #667085; }
.dfm-top b { font-size: 18px; color: #101828; }
.dfm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.dfm-list li { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid #eaecf0; border-radius: 12px; transition: background .15s; }
.dfm-list li:hover { background: #fcfcfd; }
.dfm-th { width: 52px; height: 52px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #f2f4f7; color: #6b6f80; }
.dfm-th img { width: 100%; height: 100%; object-fit: cover; } .dfm-th svg { width: 20px; height: 20px; }
.dfm-info { flex: 1; min-width: 0; } .dfm-info b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dfm-info small { font-size: 11.5px; color: #6b6f80; }
.dfm-dl { flex: none; } .dfm-dl svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .dfm-dl span { display: none; } }

/* خيارات تصميم العنصر */
.ti-media.opts { padding: 42px 10px 10px; align-content: stretch; }
.ti-opts { position: absolute; inset: 44px 10px 10px; display: grid; gap: 8px; } .ti-opts.n2 { grid-template-columns: 1fr 1fr; }
.ti-opt { position: relative; min-height: 0; border-radius: 10px; overflow: hidden; background: #f2f4f7; border: 1px solid #eaecf0; }
.ti-opt-img { width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; display: grid; place-items: center; color: #6b6f80; }
.ti-opt-img img { width: 100%; height: 100%; object-fit: cover; } .ti-opt-img svg { width: 22px; height: 22px; }
.ti-opt-n { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: rgba(16,24,40,.65); color: #fff; }
.ti-opt-ok { position: absolute; inset-inline: 6px; inset-block-end: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 28px; border: 0; border-radius: 8px; font: 700 11.5px var(--font); background: rgba(255,255,255,.94); color: #101828; cursor: pointer; opacity: 0; transition: opacity .15s; }
.ti-opt-ok svg { width: 13px; height: 13px; } .ti-opt:hover .ti-opt-ok, .ti-opt-ok:focus-visible { opacity: 1; }
@media (hover: none) { .ti-opt-ok { opacity: 1; } }
.du-opt { margin-top: 10px; }
/* التواريخ: الشارة تنزل لسطر جديد بدل الخروج من الخانة */
.ti-d { overflow: hidden; }
.ti-d span { flex-wrap: wrap; row-gap: 3px; }
.ti-d span em { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* بطاقة العنصر: الحالة بسطر كامل والأيقونات بصف متساوٍ، والتواريخ فوق بعض في البطاقات الضيقة */
.ti-tile { container-type: inline-size; }
.ti-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(34px, 1fr)); gap: 6px; }
.ti-foot .ti-st { grid-column: 1 / -1; }
.ti-foot .ti-ib { width: 100%; }
.ti-foot .ti-ib.primary { grid-column: span 2; }
@container (max-width: 330px) { .ti-dates.two { grid-template-columns: 1fr; } }
.ti-foot { display: flex; flex-wrap: wrap; } .ti-foot .ti-st { flex: 1 1 100%; } .ti-foot .ti-ib { flex: 1 1 0; width: auto; min-width: 34px; } .ti-foot .ti-ib.primary { flex: 2 1 0; }

/* أسفل البطاقة: الحالة وعرض للعميل بسطر، والأيقونات تحتهما */
.ti-r1 { flex: 1 1 100%; display: flex; gap: 6px; min-width: 0; } .ti-r1 .ti-st { flex: 1; min-width: 0; }
.ti-cl { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid #eaecf0; background: #fff; color: #344054; font: 700 12px var(--font); cursor: pointer; white-space: nowrap; }
.ti-cl svg { width: 14px; height: 14px; } .ti-cl:hover { background: #f2f4f7; }
.ti-cl.on { background: #12b76a; border-color: #12b76a; color: #fff; }
/* نافذة التمويل */
.adm-budget { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: #f9fafb; border: 1px solid #f0f1f4; }
.adm-budget > label { margin: 0; font-size: 12.5px; font-weight: 700; color: #667085; }
.adm-in { position: relative; } .adm-in .input { height: 52px; font-size: 22px; font-weight: 800; padding-inline-end: 56px; }
.adm-in span { position: absolute; inset-inline-end: 14px; top: 50%; translate: 0 -50%; font-size: 13px; font-weight: 700; color: #6b6f80; }
.adm-chips { display: flex; gap: 6px; flex-wrap: wrap; } .adm-chips button { padding: 4px 14px; border-radius: 999px; border: 1px solid #eaecf0; background: #fff; font: 700 12px var(--font); color: #475467; cursor: pointer; } .adm-chips button:hover { border-color: #d0d5dd; background: #f2f4f7; }
.adm-sum { margin: -6px 0 0; } .adm-sum:empty { display: none; }
/* بوابة العميل: خيارات التصميم */
.vis-opt { direction: rtl; text-align: right; background: #f4f3ff; border-color: #d9d6fe; color: #3e1c96; } .vis-opt .vis-ic { background: #ebe9fe; color: #5925dc; font-weight: 800; font-size: 1.05em; }
.adm-in .input::-webkit-inner-spin-button, .adm-in .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } .adm-in .input { -moz-appearance: textfield; }

.vis-opts { flex-direction: column; align-items: stretch; gap: .6em; } .vis-optbtns { display: flex; flex-wrap: wrap; gap: .45em; } .vis-optbtns .vis-btn { flex: 1 1 auto; justify-content: center; }

/* ── الهاتف: إعدادات اللغة والمظهر في القائمة الجانبية، والإشعارات فقط في الأعلى ── */
@media (max-width: 760px) {
  .topbar .lang-switch.top, .topbar .theme-btn { display: none !important; }
  .sidebar .brand > .lang-switch.side { display: none; }
  /* عنوان الصفحة يظهر في الصفحة نفسها — لا يتكرر في الشريط العلوي */
  /* بوابة العميل: القائمة الجانبية تفتح من الصورة الشخصية أو «المزيد» */
  .cp-app .sidebar { display: flex; position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); z-index: 60; transform: translateX(100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  [dir=ltr] .cp-app .sidebar { transform: translateX(-100%); }
  .cp-app.nav-open .sidebar { transform: none; }
  .cp-app.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(18,19,35,.45); z-index: 55; backdrop-filter: blur(2px); }
  .cp-app .cp-sheet { display: none !important; }
}
/* عارض التصاميم: أزرار Feed/Board منسّقة دائماً (حتى لو تغيّر حجم النافذة بعد الفتح) */
.dv-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: #eef0f4; flex: none; }
.dv-seg button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 12.5px var(--font); cursor: pointer; }
.dv-seg button svg { width: 15px; height: 15px; } .dv-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
/* بانتظار الاعتماد على الهاتف: الأزرار تحت النص */
@media (max-width: 760px) {
  .sidebar .brand { flex-wrap: wrap; row-gap: 10px; }
}

/* إعدادات اللغة والمظهر في القائمة الجانبية (الهاتف) */
@media (max-width: 760px) {
  .sp-sw { position: relative; width: 44px; height: 26px; flex: none; border-radius: 999px; background: #d0d5dd; transition: background .2s; }
  .sp-sw > i { position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: inset-inline-start .2s; }
  html.dark .sp-sw { background: #c08a2b; } html.dark .sp-sw > i { inset-inline-start: 21px; }
}
/* إعدادات القائمة الجانبية: سطر واحد بسيط — اللغة ومفتاح الوضع الداكن */
/* بوابة العميل: العنوان شريحة بأيقونة في منتصف الشريط على الهاتف */
.cp-tpill { display: inline-flex; align-items: center; gap: 8px; } .cp-tpill svg { display: none; }
@media (max-width: 760px) {
  .cp-app .topbar { row-gap: 12px; }
  .cp-app .topbar .title-tile { display: none !important; }
  .cp-app .topbar .cp-title { grid-area: title; justify-self: center; margin: 0; font-size: 15px; font-weight: 700; }
  .cp-tpill { padding: 7px 16px; border-radius: 999px; background: rgba(214,160,74,.14); color: #8a5a00; box-shadow: inset 0 0 0 1px rgba(214,160,74,.28); }
  .cp-tpill svg { display: none; }
  html.dark .cp-tpill { background: rgba(214,160,74,.16); color: #f1cf8f; box-shadow: inset 0 0 0 1px rgba(214,160,74,.32); }
}

/* بوابة العميل — الأعمال: تنبيه الموافقة وبطاقات اللوحات */
.cp-bg { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
@media (max-width: 760px) { .cp-bg { grid-template-columns: 1fr; } }

/* تطبيق الموظفين على الهاتف: العنوان شريحة بأيقونة في منتصف الشريط (مثل بوابة العميل) */
@media (max-width: 760px) {
  .shell:not(.cp-app) .topbar #page-title { grid-area: title; justify-self: center; margin: 0; font-size: 15px; font-weight: 700; max-width: 100%; }
  .shell:not(.cp-app) .topbar #page-title .cp-tpill > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
  .shell:not(.cp-app) .topbar .title-tile { display: none !important; }
}

/* شريحة العنوان مع العدد — على الهاتف والكمبيوتر، والعنوان يظهر مرة واحدة فقط */
.page-head h2.dup-title { display: none; }
.page-head:has(> div:first-child > h2.dup-title:only-child) > div:first-child { display: none; }
.page-head:has(> div:first-child > h2.dup-title:only-child) { justify-content: flex-end; }
.tp-n { font-style: normal; min-width: 22px; padding: 1px 9px; border-radius: 999px; background: #d6a04a; color: #2b1a02; font-size: 12px; font-weight: 800; text-align: center; line-height: 1.6; }
@media (min-width: 761px) {
  .topbar #page-title, .cp-app .topbar .cp-title { font-size: 16px; margin: 0; }
  .topbar .title-tile, .cp-app .topbar .title-tile { display: none !important; }
  .cp-tpill { padding-block: 6px; padding-inline: 16px 6px; border-radius: 999px; background: rgba(214,160,74,.12); color: #8a5a00; box-shadow: inset 0 0 0 1px rgba(214,160,74,.3); font-weight: 700; }
  .cp-tpill svg { display: block; width: 17px; height: 17px; color: #c08a2b; }
  .cp-tpill:not(:has(.tp-n)) { padding-inline-end: 16px; }
  html.dark .cp-tpill { background: rgba(214,160,74,.16); color: #f1cf8f; box-shadow: inset 0 0 0 1px rgba(214,160,74,.32); }
}
@media (max-width: 760px) { .cp-tpill:has(.tp-n) { padding-inline-end: 6px; } }
/* العنوان: بلا تباعد أحرف (يكسر اتصال الحروف العربية فتظهر «ي» بلا نقاط)، وشريحة أوضح قليلاً على الكمبيوتر */
.topbar h1, .topbar .cp-title, .cp-tpill { letter-spacing: normal !important; }
@media (min-width: 761px) {
  .cp-tpill { gap: 9px; font-size: 16.5px; padding-block: 7px; padding-inline: 14px 7px; }
  .cp-tpill:not(:has(.tp-n)) { padding-inline-end: 16px; }
  .cp-tpill .tp-n { font-size: 12.5px; padding: 1px 10px; }
}
/* نقاط الحروف تحت السطر (ي، ب…) لا تُقص داخل الشريحة */
.cp-tpill > span { line-height: 1.75; padding-block: 1px; }

/* بانتظار الاعتماد: بطاقات */
.apr .card-head { flex-wrap: wrap; gap: 8px; }
.apr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 14px; }
.apr-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid #eaecf0; background: #fcfcfd; border-inline-start: 3px solid var(--c, #a8690f); }
.apr-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.apr-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #fff4e0; color: #9a5b00; } .apr-tag svg { width: 12px; height: 12px; }
.apr-tag.req { background: #eff8ff; color: #175cd3; }
.apr-cat { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); }
.apr-title { font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.apr-title:hover { color: var(--brand-600); }
.apr-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.apr-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; background: #f2f4f7; font-size: 12px; color: #475467; } .apr-chip svg { width: 13px; height: 13px; color: #6b6f80; }
.apr-chip.warn { background: #fef3f2; color: #b42318; } .apr-chip.warn svg { color: #d92d20; }
.apr-desc { margin: 0; font-size: 12.5px; color: #667085; line-height: 1.6; }
.apr-acts { display: flex; gap: 8px; margin-top: auto; } .apr-acts .btn { flex: 1; justify-content: center; }
@media (max-width: 640px) { .apr-grid { grid-template-columns: 1fr; padding: 12px; } .apr [data-ok-all] { width: 100%; justify-content: center; } }

/* عنوان الصفحة: بطاقة بسطرين وأيقونة بلون القسم — على الكمبيوتر والهاتف */
.tp-tx { display: grid; line-height: 1.4; } .tp-tx b { font-weight: inherit; }
.topbar .cp-tpill { gap: 10px; padding-block: 6px !important; padding-inline: 6px 18px !important; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 15px; font-weight: 700; }
html.dark .topbar .cp-tpill { background: #24252d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); color: #fff; }
.topbar .cp-tpill svg { display: block !important; box-sizing: content-box; width: 18px; height: 18px; padding: 9px; border-radius: 10px; background: color-mix(in srgb, var(--sc, #a8690f) 16%, transparent); color: var(--sc, #a8690f); }
.topbar .cp-tpill .tp-n { display: none; }
.topbar .cp-tpill > span.tp-tx { line-height: 1.4; padding: 0; max-width: none; white-space: normal; }
.topbar .tp-tx b{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; padding-bottom: 2px; }
@media (max-width: 760px) { .topbar .cp-tpill { text-align: start; } }

/* عنوان الصفحة: مسار «القسم ‹ الصفحة» في سطر واحد، على يسار الشريط */
.topbar .cp-tpill { gap: 8px; padding-block: 5px !important; padding-inline: 5px 14px !important; }
.topbar .cp-tpill:has(.tp-n) { padding-inline-end: 6px !important; }
.topbar .cp-tpill > svg:first-child { padding: 7px !important; }
.tp-sec { font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.topbar .cp-tpill svg.tp-chev { box-sizing: border-box; width: 14px !important; height: 14px !important; padding: 0 !important; background: none !important; color: var(--muted) !important; opacity: .7; }
[dir=rtl] .topbar .cp-tpill svg.tp-chev { transform: scaleX(-1) !important; }
.topbar .cp-tpill .tp-n { display: inline-block; background: color-mix(in srgb, var(--sc, #a8690f) 20%, transparent); color: var(--sc, #a8690f); }
html.dark .topbar .cp-tpill .tp-n { color: color-mix(in srgb, var(--sc, #a8690f) 55%, #fff); }
@media (max-width: 760px) {
  .shell:not(.cp-app) .topbar #page-title, .cp-app .topbar .cp-title { justify-self: end; }
  .tp-sec { max-width: 28vw; overflow: hidden; text-overflow: ellipsis; }
}
/* الهاتف: المسار على اليمين، أصغر، بلا إطار أو خلفية */
@media (max-width: 760px) {
  .shell:not(.cp-app) .topbar #page-title, .cp-app .topbar .cp-title { justify-self: start; }
  .topbar .cp-tpill, html.dark .topbar .cp-tpill { background: none !important; box-shadow: none !important; padding: 0 !important; gap: 6px; font-size: 14px; }
  .topbar .cp-tpill > svg:first-child { width: 15px !important; height: 15px !important; padding: 6px !important; border-radius: 8px; }
  .tp-sec { font-size: 12.5px; }
  .topbar .cp-tpill .tp-n { font-size: 11px; padding: 0 7px; }
}
@media (max-width: 760px) { .shell:not(.cp-app) .topbar #page-title, .cp-app .topbar .cp-title { justify-self: center; } }
/* المسار: أيقونة ورقم بلون رمادي محايد، بلا خلفية أو شكل */
.topbar .cp-tpill > svg:first-child { background: none !important; color: var(--muted) !important; padding: 0 !important; width: 17px !important; height: 17px !important; border-radius: 0; }
.topbar .cp-tpill .tp-n, html.dark .topbar .cp-tpill .tp-n { background: none !important; color: var(--muted) !important; padding: 0 !important; font-weight: 600; font-size: 13px; min-width: 0; }
.topbar .cp-tpill { padding-inline: 12px 14px !important; }
@media (max-width: 760px) { .topbar .cp-tpill { padding: 0 !important; } }
/* الهاتف: شعار أكبر، والمسار أصغر بـ 20% مع مسافة قبل الرقم */
@media (max-width: 760px) {
  .topbar .cp-tpill { font-size: 11.5px !important; }
  .topbar .tp-sec { font-size: 10px !important; }
  .topbar .cp-tpill > svg:first-child { width: 14px !important; height: 14px !important; }
  .topbar .cp-tpill .tp-n { margin-inline-start: 8px; font-size: 13px !important; }
}
@media (max-width: 760px) {
  .topbar .cp-tpill .tp-n { margin-inline-start: 0; }
  .shell:not(.cp-app) .topbar #page-title, .cp-app .topbar .cp-title { margin-top: 4px !important; }
}
/* سطح المكتب أيضاً: المسار بلا خلفية أو إطار */
.topbar .cp-tpill, html.dark .topbar .cp-tpill { background: none !important; box-shadow: none !important; padding-inline: 0 !important; }
/* سطح المكتب: الشعار في منتصف الشريط الجانبي */
@media (min-width: 761px) { .sidebar .brand { justify-content: center; } }

/* سجل النشاطات: IP مختصر قابل للنقر */

/* ── تحسينات الجوال (الطلبات، الدفعات، المهام، البيانات، الملفات، المالية، الشركاء، أنواع المهام) ── */
[dir=rtl] dd.num { text-align: right; }
.file .info .f-note { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file .info .fchip { max-width: 100%; }
.ty-it { padding: 10px; border: 1px solid #eaecf0; border-radius: 10px; background: var(--surface); }
@media (max-width: 760px) {
  .rq-act { grid-column: 1 / -1 !important; display: flex; flex-wrap: nowrap; gap: 8px; justify-content: stretch !important; padding-top: 10px; border-top: 1px solid var(--line); }
  .rq-act .btn { flex: 1 1 0; justify-content: center; min-width: 0; }
  .rq-act .btn-ok { flex-grow: 1.4; }
  .pr-act { grid-column: 1 / -1 !important; flex-wrap: nowrap; }
  .pr-act > .btn, .pr-act > a.btn { flex: 1 1 0; min-width: 0; justify-content: center; padding-inline: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pr-act > .icon-btn { flex: none; }
  .card-head .seg { flex-wrap: nowrap; width: 100%; }
  .card-head .seg button { flex: 1 1 auto; padding-inline: 6px; font-size: 12px; white-space: nowrap; }
  .pm-table td.actions { width: auto; }
  .pm-acts:not(.pay-acts-grid) { width: 100%; margin: 0; }
  .pm-acts:not(.pay-acts-grid) > .btn { flex: 1 1 0; justify-content: center; }
  .pt-acts { display: grid !important; grid-template-columns: 1fr 1fr 1fr; width: 100%; }
  .pt-acts .btn { justify-content: center; padding-inline: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ty-it { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) 32px; gap: 8px 12px; }
  .ty-it .input { grid-column: 1 / 5; min-width: 0; }
  .ty-it [data-ti-rm] { grid-column: 5; grid-row: 1; width: 32px; padding: 0; justify-content: center; }
  .ty-it .check { grid-row: 2; white-space: nowrap; }
}
.settings-grid > .stack { min-width: 0; } .settings-section { max-width: 100%; min-width: 0; }

/* اللغة والوضع الداكن: على الهاتف داخل صفحة الإعدادات بدل القائمة الجانبية؛ الكمبيوتر كما هو */
.prefs-card { margin-bottom: 18px; }
.pc-title { margin: 0 6px 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.pc-group { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pc-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.pc-row + .pc-row { border-top: 1px solid var(--line-2); }
.pc-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #fbf3e4; color: #a8690f; }
.pc-ic svg { width: 18px; height: 18px; }
.pc-tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pc-tx b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pc-tx small { font-size: 12px; color: var(--muted); }
.pc-on { display: none; } html.dark .pc-on { display: block; } html.dark .pc-off { display: none; }
.pc-seg { display: inline-flex; flex: none; padding: 3px; border-radius: 10px; background: var(--gray-bg); }
.pc-seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font: 600 12.5px var(--font); color: var(--muted); cursor: pointer; }
.pc-seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.pc-sw { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: #d0d5dd; transition: background .2s; }
.pc-sw > i { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
html.dark .pc-sw { background: #c08a2b; } html.dark .pc-sw > i { inset-inline-start: 21px; }
.cp-settings { padding: 16px; }
@media (min-width: 761px) { .prefs-card, .cp-shell [data-tab="settings"] { display: none !important; } }
@media (max-width: 760px) {
  .sidebar .brand { justify-content: center !important; }
}

/* سجل الحضور: خلية الخصم */
.atd { display: flex; flex-direction: column; gap: 4px; }
.atd small { color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.atd-none { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: 12.5px; font-weight: 600; }
.atd-none svg { width: 14px; height: 14px; }
.atd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.atd-c { display: inline-flex; align-items: baseline; gap: 4px; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; }
.atd-c small { font-weight: 500; font-size: 11px; color: inherit; opacity: .85; }
.atd-c.ex { background: var(--warn-bg); color: var(--warn); }
.atd-c.an { background: var(--bad-bg); color: var(--bad); }
.atd-c.sa { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
/* التزام المتدرب (بلا خصم): خانة اليوم وملخص النسب */
.atd-cm .c-tag { align-self: flex-start; }
.cmt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cmt-t { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--sunk, var(--bg)); border: 1px solid var(--line); min-width: 0; }
.cmt-t small { color: var(--muted); font-size: 12px; }
.cmt-t b { font-size: 22px; line-height: 1.2; }
.cmt-t span { color: var(--muted); font-size: 11.5px; }
.cmt-t.ok b, .cmt-p.ok { color: var(--ok); } .cmt-t.warn b, .cmt-p.warn { color: var(--warn); } .cmt-t.bad b, .cmt-p.bad { color: var(--bad); }
.cmt-n { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cmt-h { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.cmt-p { font-size: 15px; }
.cmt-sub { display: block; color: var(--muted); font-size: 11.5px; }
@media (max-width: 420px) { .cmt-t { padding: 8px; } .cmt-t b { font-size: 18px; } }
.atd-ex { display: block; max-width: 210px; white-space: normal; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.atl-why { display: block; color: var(--muted); font-size: 11.5px; }
.att-esum { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2, var(--bg)); font-size: 13px; }
.att-exr { display: grid; gap: 6px; }
.atd-late { display: flex; flex-direction: column; gap: 2px; }
.atd-late small { font-size: 11px; }

/* سجل الحضور: تجميع بالأيام وخلايا أوضح */
.atl td { vertical-align: middle; }
.atl .atl-day td { background: var(--surface-2); padding: 8px 14px; border-top: 1px solid var(--line); }
.atl .atl-day span { font-weight: 700; font-size: 13px; color: var(--ink); }
.atl .atl-day small { color: var(--muted); font-size: 12px; margin-inline-start: 10px; }
.atl-emp { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.atl-emp b { display: block; font-size: 13.5px; }
.atl-emp small { color: var(--muted); font-size: 11.5px; }
.atl-time { display: flex; flex-direction: column; gap: 3px; }
.atl-span { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.atl-span i { display: inline-flex; color: var(--faint); }
.atl-span i svg { width: 14px; height: 14px; }
.atl-span em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--warn); }
.atl-dur { font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.atl-time small { color: var(--faint); font-size: 11px; }
.atl-st { display: flex; gap: 6px; flex-wrap: wrap; }
.atl-note { display: inline-block; max-width: 180px; font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* لوحة اليوم بالحضور */

/* ════ واجهة الهاتف بأسلوب تطبيق iOS: شريط سفلي ملتصق بكبسولة ذهبية ناعمة، بطاقات بلا حدود، أرقام عادية،
   أزرار ذهبية متدرجة، وقائمة «المزيد» كمجموعات. كل ما هنا خاص بعرض الهاتف ولا يمسّ سطح المكتب. ════ */
@media (max-width: 760px) {
  body { background: #f5f6fa; }
  .content { padding: 12px 16px calc(92px + env(safe-area-inset-bottom)); }
  .stack, .grid { gap: 10px; }

  /* البطاقات */
  .card { border: 0; border-radius: 18px; box-shadow: 0 1px 2px rgba(18,19,26,.04), 0 6px 18px rgba(18,19,26,.05); }
  .card-head { padding: 14px 16px; }
  .card-head h3 { font-size: 15.5px; font-weight: 700; }
  .card-body { padding: 14px 16px; }

  /* الأرقام بخط الواجهة (كما في التطبيق) بدل الخط الثابت العرض */
  .stat .value, .clock, .balance-num, .strip .value, .kcol-head .n{ font-family: var(--font); font-variant-numeric: tabular-nums; letter-spacing: 0; }
  .clock { font-size: 34px; font-weight: 700; }

  /* بطاقة الرقم: أيقونة، ثم الرقم الكبير، ثم التسمية */
  .stat { border-top: 0; padding: 14px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .stat .ic { order: 0; width: 38px; height: 38px; border-radius: 12px; }
  .stat .ic svg { width: 19px; height: 19px; }
  .stat > div:not(.ic) { display: flex; flex-direction: column; width: 100%; }
  .stat .value { order: -1; font-size: 26px; font-weight: 700; margin-top: 0; line-height: 1.15; }
  .stat .label { font-size: 13px; margin-top: 4px; }
  .stat .hint { font-size: 11.5px; color: var(--faint); margin-top: 2px; }

  /* الأزرار */
  .btn { min-height: 44px; border-radius: 999px; font-weight: 600; font-size: 14.5px; }
  .btn-sm { min-height: 36px; font-size: 13px; }
  .btn-primary, .hero .btn-light { background: linear-gradient(135deg, #d39a3e, #a8690f 60%, #7a4b09); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(168,105,15,.3); }
  .btn-primary:hover, .hero .btn-light:hover { background: linear-gradient(135deg, #d39a3e, #a8690f 60%, #7a4b09); }
  .page-head .actions > .btn-primary:only-child, .page-head .actions > .btn-primary:last-child { min-height: 50px; }

  /* التبويبات والتحكم المقسّم */
  .seg { border-radius: 999px; padding: 3px; background: #e6e7ee; border: 0; }
  .seg button { border-radius: 999px; min-height: 34px; font-weight: 600; color: var(--ink-2); }
  .seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(18,19,26,.12); }
  .tabs a { background: #fff; color: var(--ink-2); border-radius: 999px; min-height: 34px; padding: 7px 14px; font-weight: 600; font-size: 13px; }
  .tabs a.active { background: var(--brand-600); color: #fff; }

  /* لا شيء يخرج عن عرض الشاشة: الشريط المقسّم الطويل يُمرَّر أفقياً بدل أن يُقصّ */
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex-shrink: 0; white-space: nowrap; }
  .sx-head > div { min-width: 0; max-width: 100%; }
  /* أنماط الصفحة المضمّنة تأتي بعد هذا الملف، لذلك تُسبق القواعد بـ .content */
  .content .sx-head h2 { display: none; }
  .content .sx-seg { display: flex; width: 100%; overflow: visible; flex-wrap: nowrap; border: 0; border-radius: 999px; background: #e6e7ee; }
  .content .sx-seg button { flex: 1 1 0; min-width: 0; padding: 7px 2px; border-radius: 999px; font-size: 12px; white-space: normal; line-height: 1.25; }
  .content .sx-k { border: 0; border-radius: 18px; padding: 12px 14px 8px; gap: 4px; box-shadow: 0 1px 2px rgba(18,19,26,.04), 0 6px 18px rgba(18,19,26,.05); }
  .content .sx-k b.num { order: -1; font-size: 26px; line-height: 1.15; }
  .content .sx-k .t { flex-direction: row; width: 100%; align-items: center; justify-content: space-between; gap: 6px; }

  /* الحقول: 16px حتى لا يكبّر iOS الصفحة عند الكتابة */
  .input, select.input, textarea.input { min-height: 46px; border-radius: 14px; font-size: 16px; border-color: var(--line); }
  textarea.input { min-height: 96px; }

  /* الصفوف والقوائم */
  .list-ic { width: 38px; height: 38px; border-radius: 12px; }
  .task-card { border: 0; border-radius: 16px; margin: 8px 0; box-shadow: 0 1px 2px rgba(18,19,26,.04), 0 4px 12px rgba(18,19,26,.04); }
  .table th { font-size: 12px; padding: 10px 14px; }
  .table td { padding: 12px 14px; }
  .badge { border-radius: 999px; font-weight: 600; }

  /* الشريط السفلي: ملتصق بالحافة، والتبويب النشط بكبسولة ذهبية ناعمة */
  /* ملتصق بأسفل الشاشة تماماً (قاعدة قديمة كانت ترفعه بـ ‎!important فيظهر المحتوى تحته على الآيفون) */
  .tabbar, .cp-tabbar { bottom: 0 !important; }
  .tabbar { inset-inline: 0; bottom: 0; padding: 7px 6px calc(3px + env(safe-area-inset-bottom)); border-radius: 0; border: 0; border-top: 1px solid rgba(18,19,35,.08); box-shadow: none; background: rgba(255,255,255,.86); }
  .tabbar a, .tabbar button { padding: 0 2px 2px; gap: 3px; border-radius: 0; color: var(--muted); font-size: 10.5px; font-weight: 600; }
  .tabbar svg { width: 20px; height: 20px; padding: 5px 16px; }
  .tabbar .active { color: var(--brand-600); }
  .tabbar .active svg { background: var(--brand-100); color: var(--brand-600); box-shadow: none; }
  .tabbar .active span { color: var(--brand-600); font-weight: 700; }
  .tabbar .tcount { top: -3px; inset-inline-end: calc(50% - 26px); }
  .toasts { bottom: calc(78px + env(safe-area-inset-bottom)); }

  /* «المزيد»: القائمة الجانبية كمجموعات بطاقات كما في التطبيق (‎!important لأن قواعد القائمة الأصلية تستخدمها) */
  /* صفحة كاملة لا درج: تملأ العرض، يبقى الشريط السفلي ظاهراً و«المزيد» هو التبويب النشط، ورأسها كترويسة الصفحات */
  .sidebar { background: #f5f6fa !important; width: 100vw !important; max-width: none; inset-inline: 0; top: 0; bottom: var(--m-bar-h, calc(57px + env(safe-area-inset-bottom))) !important; height: auto; padding: 0 !important; border-inline-end: 0 !important; box-shadow: none !important; transition: none !important; }
  .shell.nav-open .backdrop { display: none !important; }
  /* رأس «المزيد» هو ترويسة الصفحات نفسها (الصورة، الشعار، الجرس) ويقول مسارها «المزيد» */
  .sidebar .brand{ display: none !important; }
  .sidebar { padding-top: var(--m-top-h, calc(env(safe-area-inset-top) + 128px)) !important; overflow-y: auto; overscroll-behavior: contain; }
  /* القائمة وبطاقة الحساب تمرّران معاً، فتأتي البطاقة في آخر القائمة كما في التطبيق ولا تغطي عناصرها */
  .sidebar .nav { flex: none !important; overflow: visible !important; }
  .shell.nav-open .topbar { position: fixed; inset-inline: 0; top: 0; z-index: 65; }
  .shell.nav-open #page-title > *, .shell.nav-open .topbar .cp-title > * { display: none !important; }
  .shell.nav-open #page-title::after, .shell.nav-open .topbar .cp-title::after { content: 'المزيد'; font-size: 13.5px; font-weight: 700; color: var(--ink); }
  [dir=ltr] .shell.nav-open #page-title::after, [dir=ltr] .shell.nav-open .topbar .cp-title::after { content: 'More'; }
  .shell.nav-open .topbar .back-btn, .shell.nav-open .topbar .title-tile { display: none !important; }
  .shell.nav-open .tabbar > :not(:last-child) { color: var(--muted) !important; }
  .shell.nav-open .tabbar > :not(:last-child) svg { background: none !important; color: inherit !important; box-shadow: none !important; }
  .shell.nav-open .tabbar > :not(:last-child) span { color: inherit !important; font-weight: 600 !important; }
  .shell.nav-open .tabbar > :last-child { color: var(--brand-600) !important; }
  .shell.nav-open .tabbar > :last-child svg { background: var(--brand-100) !important; color: var(--brand-600) !important; }
  .shell.nav-open .tabbar > :last-child span { color: var(--brand-600) !important; font-weight: 700 !important; }
  .shell.nav-open .tabbar { z-index: 70; }
  .sidebar .nav { padding: 4px 16px 12px !important; }
  .sidebar .nav a { background: #fff !important; padding: 7px 12px !important; gap: 12px !important; min-height: 52px; font-size: 14.5px; font-weight: 600 !important; color: var(--ink) !important; box-shadow: inset 0 -1px 0 var(--line-2) !important; }
  .sidebar .nav a::before { display: none !important; }
  .sidebar .nav a svg:first-child { box-sizing: content-box; width: 18px !important; height: 18px !important; padding: 9px; border-radius: 11px; background: var(--brand-100); color: var(--brand-600) !important; flex-shrink: 0; }
  .sidebar .nav a > span:first-of-type { flex: 1; }
  .sidebar .nav a .count { margin-inline-start: 0; }
  .sidebar .nav a::after { content: ''; width: 7px; height: 7px; border: solid var(--faint); border-width: 0 0 2px 2px; transform: rotate(45deg); flex-shrink: 0; margin-inline: 4px 6px; }
  [dir=ltr] .sidebar .nav a::after { border-width: 0 2px 2px 0; transform: rotate(-45deg); }
   .sidebar .nav a:first-child { border-start-start-radius: 16px !important; border-start-end-radius: 16px !important; }
  .sidebar .nav a:has(+ .nav-section), .sidebar .nav a:last-child { border-end-start-radius: 16px !important; border-end-end-radius: 16px !important; box-shadow: none !important; }
  .sidebar .nav a.active { background: var(--brand-50) !important; color: var(--brand-700) !important; padding-inline-start: 12px !important; }
  .sidebar .nav a.active svg:first-child { background: var(--brand-600); color: #fff !important; }
}

/* «إضافة إلى تقويمي» في الاجتماعات */
.ac-list { display: flex; flex-direction: column; gap: 8px; }
.ac-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none !important; }
.ac-opt:hover { border-color: var(--brand-200); background: var(--brand-50); }
.ac-opt .ac-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; flex-shrink: 0; }
.ac-opt .ac-ic svg { width: 18px; height: 18px; color: var(--brand-600); }
.ac-opt b { display: block; font-size: 14px; } .ac-opt small { display: block; color: var(--muted); font-size: 12px; }
.ac-opt > svg { width: 16px; height: 16px; color: var(--faint); flex-shrink: 0; }
[dir=rtl] .ac-opt > svg { transform: scaleX(-1); }
.mt-card.mt-hl { box-shadow: 0 0 0 2px var(--brand-500), var(--shadow); }

/* نقطة ورقم الإشعارات غير المقروءة على كل قسم في القائمة والشريط السفلي */
.nav a .ndot, .tabbar .ndot { font-style: normal; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 20px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--bad); color: #fff; font: 700 11px/20px var(--font); flex-shrink: 0; }
.nav a .ndot[hidden], .tabbar .ndot[hidden] { display: none; }
.nav a .ndot::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: .9; }
.nav a .ndot { margin-inline-start: 6px; }
.tabbar .ndot { position: absolute; top: -3px; inset-inline-end: calc(50% - 30px); min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; line-height: 18px; border: 2px solid var(--surface); }
.tabbar .tcount:not([hidden]) ~ .ndot { display: none; }

/* الاجتماعات: إنهاء ومحضر وسلسلة متابعة */
.mt-done { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #067647; background: #ecfdf3; padding: 2px 8px; border-radius: 999px; }
.mt-done svg, .mt-series svg { width: 12px; height: 12px; }
.mt-series { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 11px; font-weight: 700; color: #4f46e5; background: #eef2ff; border: 0; padding: 2px 9px; border-radius: 999px; cursor: pointer; }
.mt-series:hover { background: #e0e7ff; }
.mt-minutes { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #f9fafb; border: 1px solid #eaecf0; cursor: pointer; }
.mt-minutes b { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #344054; margin-bottom: 4px; }
.mt-minutes b svg { width: 14px; height: 14px; }
.mt-minutes p { margin: 0; font-size: 12.5px; color: #475467; line-height: 1.8; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mf-follow { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #eef2ff; color: #3730a3; font-size: 13px; margin-bottom: 12px; }
.mf-follow svg { width: 16px; height: 16px; flex: none; }
.mt-cm-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #f9fafb; margin-bottom: 4px; }
.mt-cm-head small { color: #667085; }
.mt-min-full { white-space: pre-line; line-height: 1.9; font-size: 14px; color: #344054; margin: 10px 0 0; }
.ms-list { list-style: none; margin: 0; padding: 0; position: relative; }
.ms-list::before { content: ''; position: absolute; inset-inline-start: 13px; top: 14px; bottom: 14px; width: 2px; background: #eaecf0; }
.ms-item { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.ms-item.cur .ms-top b { color: var(--brand-600, #b7791f); }
.ms-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #f2f4f7; color: #475467; position: relative; z-index: 1; border: 2px solid #fff; }
.ms-dot.ok { background: #dcfae6; color: #067647; } .ms-dot.soon { background: #eef2ff; color: #4f46e5; } .ms-dot.warn { background: #fef0c7; color: #93370d; }
.ms-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ms-st { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f2f4f7; color: #475467; flex: none; }
.ms-st.ok { background: #ecfdf3; color: #067647; } .ms-st.soon { background: #eef2ff; color: #4f46e5; } .ms-st.warn { background: #fffaeb; color: #b54708; }
.ms-item small { color: #667085; font-size: 12px; }
.ms-min { margin: 6px 0 0; padding: 8px 10px; background: #f9fafb; border-radius: 10px; font-size: 12.5px; line-height: 1.8; white-space: pre-line; color: #475467; }
.ms-acts { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.mt-main { grid-template-columns: minmax(0, 1fr); }
.mt-acts { flex-wrap: wrap; justify-content: flex-end; }

/* بوابة العميل — المستندات: تبويبات العقود/التقارير/المستندات، وتاريخ التنفيذ، وعرض الصور */
.cp-docseg { display: flex; width: max-content; max-width: 100%; overflow-x: auto; margin: 4px 0 14px; }
.cp-docseg button em { font-style: normal; font-size: 11px; opacity: .7; margin-inline-start: 2px; }
.cp-exec { display: inline-flex; align-items: center; gap: 4px; color: var(--brand, #a8690f); font-weight: 600; }
.cp-exec svg { width: 13px; height: 13px; }
.cp-imgview { display: grid; place-items: center; padding: 16px; min-height: 60vh; }
.cp-imgview img { max-width: 100%; max-height: 82vh; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,.18); }
.doc-kind { display: flex; width: max-content; }

/* الاجتماعات — إعادة الجدولة: مؤجَّل / ملغى، والموعد السابق، ونافذة إعادة الجدولة */
.mt-cancel, .mt-post { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.mt-cancel { color: #b42318; background: #fef3f2; }
.mt-post { color: #b54708; background: #fffaeb; }
.mt-cancel svg, .mt-post svg, .mt-was svg { width: 12px; height: 12px; }
.mt-card.is-cancelled { opacity: .78; }
.mt-card.is-cancelled h3 { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
.mt-was { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.mt-was s { opacity: .8; }
.mt-was em { font-style: normal; font-size: 11px; background: var(--gray-bg); padding: 0 6px; border-radius: 999px; }
.mt-was:hover { color: var(--ink); }
.mt-reason { margin: 6px 0 0; font-size: 13px; color: var(--ink-2, #475467); background: var(--gray-bg); padding: 6px 10px; border-radius: 8px; }
.mr-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: 10px; background: var(--gray-bg); margin-bottom: 12px; font-size: 13px; }
.mr-now > span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.mr-now > span svg { width: 14px; height: 14px; }
.mr-acts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mr-notify { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 4px; }
.mh-list { margin: 0; }
@media (max-width: 560px) { .mr-acts { grid-template-columns: minmax(0, 1fr); } }

/* حساب الراتب: ملاحظة الشهر في نافذة الدفعة */
.lg-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--gray-bg); font-size: 13px; }
.lg-note svg { width: 14px; height: 14px; color: var(--muted); }

/* اختيار ظاهر على كل الأجهزة (is-on): الصفحة تضع is-on على الخيار المحدد — بديل لـ :has() و :checked + في متصفحات الأجهزة القديمة (iPad/iPhone قبل iOS 15.4) */
.switch .is-on > input + span, .switch.is-on > input + span { background: var(--brand-600); }
.switch .is-on > input + span::before, .switch.is-on > input + span::before { transform: translateX(-18px); }
[dir=ltr] .switch .is-on > input + span::before, [dir=ltr] .switch.is-on > input + span::before { transform: translateX(18px); }
.ev-colors .is-on > input + i, .ev-colors.is-on > input + i { box-shadow: 0 0 0 2px var(--ink); }
.acct-type .income .is-on > input + span, .acct-type .income.is-on > input + span { border-color: #0f9960; background: #e7f7ef; color: #0f9960; }
.acct-type .expense .is-on > input + span, .acct-type .expense.is-on > input + span { border-color: #d63b3b; background: #fdecec; color: #d63b3b; }
.acct-type .capital .is-on > input + span, .acct-type .capital.is-on > input + span { border-color: #2563eb; background: #eef3ff; color: #1d4ed8; }
.ch-to .is-on > input + b, .ch-to.is-on > input + b { background: #fdf3e3; border-color: #f2d9ad; color: #8a5a0b; }
.hb-p.is-on { background: #fdf8ef; border-color: #f2d9ad; }
.hb-p.is-on .hb-ck { background: #c08a2b; border-color: #c08a2b; color: #fff; }
.as-kinds .is-on > input + span, .as-kinds.is-on > input + span { background: #fdf3e3; border-color: #f2d9ad; color: #8a5a0b; }
.mt-modes .is-on > input + span, .mt-modes.is-on > input + span { background: #fdf6ea; border-color: #e4c48e; color: #8a5a0b; }
.mf-p.is-on { border-color: #e4c48e; background: #fffaf2; }
.mf-p.is-on i { background: #b07a24; border-color: #b07a24; color: #fff; }
.cf-tm.is-on { border-color: #e4c48e; background: #fffaf2; }
.cf-sw .is-on > input + i, .cf-sw.is-on > input + i { outline: 2px solid var(--brand-600, #b07a24); outline-offset: 2px; transform: scale(1.08); }
.inv-pay.is-on { border-color: #e4c48e; background: #fffaf2; }
.sl-outs .is-on > input + span, .sl-outs.is-on > input + span { border-color: #c08a2b; background: #fbf3e4; color: #8a560c; font-weight: 700; }
.wp-day .seg .is-on > input + span, .wp-day .seg.is-on > input + span { background: #fbf3e4; border-color: #e4c48c; color: #8a560c; font-weight: 700; }
.wp-day .seg .is-on > input[value=remote] + span, .wp-day .seg.is-on > input[value=remote] + span { background: #eef4ff; border-color: #b2ccff; color: #1d4ed8; }
.wp-day .seg .is-on > input[value=off] + span, .wp-day .seg.is-on > input[value=off] + span { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.tf-plat label.is-on { background: #101828; border-color: #101828; color: #fff; }
.tf-flags label.is-on { background: #fff8eb; border-color: #f1d9a8; color: #8a5a00; }
.shm-done.is-on { background: #f6fef9; border-color: #a6f4c5; }
.shm-done.is-on .shm-ic { background: #12b76a; border-color: #12b76a; color: #fff; }

/* طلبات الشراء */
.pq-list { display: grid; gap: 8px; }
.pq-row { display: grid; grid-template-columns: 26px minmax(0, 1.4fr) minmax(0, .8fr) auto; gap: 8px; align-items: center; }
.pq-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gray-bg); font-size: 12px; font-weight: 700; color: var(--muted); }
.pq-file { white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.pq-file span { overflow: hidden; text-overflow: ellipsis; }
.pq-file.on { border-color: #e4c48e; background: #fffaf2; color: #8a5a0b; }
.pq-total b { color: var(--ink); }
.pq-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pq-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.pq-nums > div { padding: 10px 12px; border-radius: 10px; background: var(--gray-bg); display: grid; gap: 2px; }
.pq-nums small { color: var(--muted); font-size: 12px; } .pq-nums b { font-size: 16px; }
.pq-block { margin-bottom: 10px; } .pq-block b { font-size: 13px; color: var(--muted); } .pq-block p { margin: 4px 0 0; white-space: pre-wrap; }
.pq-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pq-quotes { display: grid; gap: 8px; }
.pq-quote { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: default; }
.pq-quote:has(input) { cursor: pointer; }
.pq-quote .grow { display: grid; gap: 2px; min-width: 0; } .pq-quote small { color: var(--muted); font-size: 12px; }
.pq-quote input { accent-color: #b07a24; width: 18px; height: 18px; }
.pq-quote.chosen, .pq-quote:has(input:checked) { border-color: #e4c48e; background: #fffaf2; }
.pq-quote.is-on { border-color: #e4c48e; background: #fffaf2; }
@media (max-width: 640px) { .pq-row { grid-template-columns: 26px minmax(0, 1fr) 90px; } .pq-row .pq-file { grid-column: 2 / -1; max-width: none; } .pq-two { grid-template-columns: 1fr; } }

/* من المنفّذ / المسؤول / من أنشأ المهمة — على كل بطاقة مهمة */
.twho { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; font-size: 11.5px; }
.twho-i { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 7px; border-radius: 999px; background: #f3f4f7; color: var(--ink-2); line-height: 1.6; max-width: 100%; }
.twho-i svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--muted); }
.twho-i small { color: var(--muted); font-size: 10.5px; }
.twho-i b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.twho-x { background: #fdf3e2; color: #7a5410; }
.twho-x svg, .twho-x small { color: #a8741a; }
.twho-big { margin-top: 10px; font-size: 13px; gap: 6px 8px; }
.twho-big .twho-i { padding: 4px 11px 4px 10px; }
.twho-big .twho-i svg { width: 14px; height: 14px; }
.twho-big .twho-i small { font-size: 12px; }

/* عناصر المهمة في نموذج المهمة: إضافة سريعة بنوع العنصر، بطاقات مرقّمة بلون النوع، وملخص */
.tf-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.tf-q { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1px dashed var(--c); background: transparent; color: var(--c); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background .15s; }
.tf-q:hover { background: color-mix(in srgb, var(--c) 12%, transparent); }
.tf-q svg { width: 13px; height: 13px; }
.tf-quick .tf-qmore { width: auto; max-width: 190px; height: 32px; padding-block: 0; font-size: 12.5px; border-radius: 999px; }
.tf-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12px; color: #667085; }
.tf-sum b { color: var(--ink-2); margin-inline-end: 2px; }
.tf-sum span { padding: 2px 9px; border-radius: 999px; background: #f2f4f7; }
.tf-sum[hidden], .tf-empty[hidden] { display: none; }
.tf-empty { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed #d0d5dd; border-radius: 12px; background: #fcfcfd; color: #667085; font-size: 12.5px; line-height: 1.7; }
.tf-empty svg { width: 20px; height: 20px; flex-shrink: 0; opacity: .6; }
.tf-items { counter-reset: tfi; }
.tf-item { counter-increment: tfi; border-inline-start: 4px solid var(--c, #c08a2b); }
.tf-r1 { grid-template-columns: auto minmax(120px, 1fr) minmax(140px, 1.5fr) minmax(170px, 1fr) auto auto; }
.tf-no { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 6px; border-radius: 50%; background: color-mix(in srgb, var(--c, #c08a2b) 15%, transparent); color: var(--c, #c08a2b); font-size: 12px; font-weight: 800; }
.tf-no::before { content: counter(tfi); }
@media (max-width: 640px) {
  /* الهاتف: الرقم والنوع وزرّا التكرار والحذف في سطر، ثم العنوان، ثم التاريخ */
  .tf-r1 { grid-template-columns: auto 1fr auto auto; align-items: center; }
  .tf-r1 > .tf-no { grid-row: 1; grid-column: 1; margin: 0; }
  .tf-r1 > [data-k=item_type] { grid-row: 1; grid-column: 2; }
  .tf-r1 > [data-dup] { grid-row: 1; grid-column: 3; }
  .tf-r1 > [data-rm] { grid-row: 1; grid-column: 4; }
  .tf-r1 > [data-k=title] { grid-row: 2; grid-column: 1 / -1; }
  .tf-r1 > .tf-date { grid-row: 3; grid-column: 1 / -1; }
  .tf-r2 { flex-direction: column; align-items: stretch; }
  .tf-flags { padding-inline-start: 0; border-inline-start: 0; }
  .tf-q { padding: 7px 12px; }
}

/* تقييم مهام التدريب (مكتوب) */
.trv-card .card-head h3 svg { width: 16px; height: 16px; vertical-align: -3px; color: #c08a2b; }
.trv + .trv { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eaecf0; }
.trv-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.trv-s { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: #fcfaf5; border: 1px solid #f1e6cf; }
.trv-s small { display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 700; color: #a8741a; }
.trv-s .task-desc { font-size: 13.5px; }

/* حقل مطلوب لم يُعبّأ (مثل نوع المهمة) */
.field.has-error .input { border-color: #d92d20; box-shadow: 0 0 0 3px rgba(217, 45, 32, .15); }
.field.has-error > label { color: #d92d20; }

/* بطاقة المهمة: المنفّذ بصورته واسمه، وسطر صغير للمسؤول ومن أنشأها */
.tw { display: grid; gap: 5px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed #e6e8ee; min-width: 0; }
.tw-ex { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tw-av { display: inline-flex; flex-shrink: 0; }
.tw-av .avatar { width: 26px; height: 26px; min-width: 26px; font-size: 10.5px; border: 2px solid #fff; box-sizing: content-box; }
.tw-av .avatar + .avatar { margin-inline-start: -9px; }
.tw-n { display: grid; min-width: 0; line-height: 1.35; }
.tw-n small { font-size: 10.5px; color: var(--muted); }
.tw-n b { font-size: 12.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-meta { display: flex; flex-wrap: wrap; gap: 1px 12px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.tw-meta b { font-weight: 600; color: var(--ink-2); }
.tw-meta i { display: none; }
.scard .tw + .m, .tcard .tw + .tcard-foot { margin-top: 8px; }
.scard .t { font-size: 14.5px; line-height: 1.55; }

/* ── جدول الأسعار ── */
.pr-mode { width: max-content; }
.pr-preview { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 14px; border-radius: 12px; background: #faf6ee; border: 1px solid #ecdfc6; }
.pr-preview > span:first-child { font-size: 12px; color: var(--muted); }
.pr-preview b { font-size: 20px; color: #7a5410; }
.pr-preview span { font-size: 12px; color: var(--muted); }
.pr-preview small { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }
.pr-pls { display: grid; gap: 6px; }
.pr-pl { display: grid; grid-template-columns: 1fr 90px 34px; gap: 6px; }
.pr-crs { display: grid; gap: 6px; }
.pr-cr { display: grid; grid-template-columns: 1.2fr 130px 2fr 34px; gap: 6px; align-items: center; }
.pr-crh span { font-size: 11px; color: #6b6f80; padding-inline: 4px; }
@media (max-width: 700px) { .pr-cr { grid-template-columns: 1fr 1fr; } .pr-crh { display: none; } .pr-cr [data-k=note] { grid-column: 1 / -1; } }
/* اختيار البنود من جدول الأسعار */
.pp-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; position: sticky; top: -16px; z-index: 2; padding: 6px 0; background: var(--card, #fff); }
.pp-bar .search { flex: 1; min-width: 200px; }
.pp-cat { margin-bottom: 12px; }
.pp-cat h4 { margin: 0 0 6px; font-size: 12.5px; color: #7a5410; }
.pp-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid #eaecf0; border-radius: 10px; margin-bottom: 6px; cursor: pointer; transition: border-color .12s, background .12s; }
.pp-item:hover { border-color: #e2c48f; }
.pp-item.on, .pp-item:has(input:checked) { border-color: #c08a2b; background: #fdf8ef; }
.pp-item[hidden], .pp-cat[hidden] { display: none; }
.pp-main { display: grid; gap: 2px; min-width: 0; }
.pp-main small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-unit { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pp-price { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pp-price small { font-weight: 500; color: var(--muted); }
.pp-pkg { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; text-align: start; padding: 12px 14px; margin-bottom: 8px; border: 1px solid #eaecf0; border-radius: 12px; background: transparent; font: inherit; color: inherit; cursor: pointer; }
.pp-pkg:hover { border-color: #c08a2b; background: #fdf8ef; }
.pp-pkg span { grid-column: 1; font-size: 12px; color: var(--muted); }
.pp-pkg em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-weight: 800; color: #7a5410; }
@media (max-width: 640px) { .pp-item { grid-template-columns: auto 1fr auto; } .pp-unit { display: none; } }
/* جدول البنود في العقود والعروض: كل بند بطاقة — الخدمة، الوصف، ثم الوحدة والكمية والسعر والخصم */
.it-h.items { display: none; }
.it-ed[data-tbl=items] [data-it-rows] { display: grid; gap: 8px; counter-reset: itr; }
.it-row.items { grid-template-columns: repeat(4, minmax(0, 1fr)) 34px; grid-template-areas: "s s s s x" "d d d d d" "u q p c c"; padding: 10px; border: 1px solid #eaecf0; border-radius: 12px; background: #fcfcfd; position: relative; counter-increment: itr; }
.it-row.items::before { content: counter(itr); position: absolute; inset-inline-start: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; background: #c08a2b; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.it-row.items [data-c=service] { grid-area: s; font-weight: 700; }
.it-row.items [data-c=desc] { grid-area: d; font-size: 12.5px; }
.it-row.items [data-c=unit] { grid-area: u; }
.it-row.items [data-c=qty] { grid-area: q; }
.it-row.items [data-c=price] { grid-area: p; }
.it-row.items [data-c=disc] { grid-area: c; }
.it-row.items [data-it-del] { grid-area: x; }
.it-sum { color: var(--muted); }
@media (max-width: 700px) { .it-row.items { grid-template-columns: repeat(2, minmax(0, 1fr)) 34px; grid-template-areas: "s s x" "d d d" "u q q" "p c c"; } }

/* ═════════ شاشة المكتب (tv-ui.js) — أصناف tvc- فقط ═════════ */
.tvc { display: grid; gap: 18px; }
.tvc > .page-head { margin-bottom: 0; }
.tvc > .alert { margin: 0; }
.tvc-card .card-head h3 { min-width: 0; }
.tvc-state { display: none; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tvc-state.is-on { display: inline-flex; }
.tvc-state.is-on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: tvcPulse 1.6s ease-out infinite; }
@keyframes tvcPulse { 0% { box-shadow: 0 0 0 0 rgba(15,153,96,.45); } 100% { box-shadow: 0 0 0 7px rgba(15,153,96,0); } }

/* الحالة + ما يُعرض الآن */
.tvc-hero { padding: 22px; display: grid; gap: 16px; background: linear-gradient(135deg, #fffaf1 0%, #ffffff 55%); }
.tvc-hero-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tvc-tv { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; background: #2a2b36; color: #c9cbd6; box-shadow: 0 6px 16px rgba(18,19,26,.16); }
.tvc-tv svg { width: 24px; height: 24px; }
.tvc-tv.is-on { background: linear-gradient(135deg, #2b2216, #12131a); color: #f0d09b; }
.tvc-tv i { position: absolute; top: -3px; inset-inline-end: -3px; width: 14px; height: 14px; border-radius: 50%; background: #9a9db0; border: 3px solid #fff; }
.tvc-tv.is-on i { background: var(--ok); animation: tvcPulse 1.8s ease-out infinite; }
.tvc-hero-txt { flex: 1 1 220px; min-width: 0; display: grid; gap: 4px; }
.tvc-hero-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tvc-hero-name > b { font-size: 19px; font-weight: 800; letter-spacing: -.2px; direction: ltr; unicode-bidi: isolate; }
.tvc-live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--gray-bg); color: var(--muted); font-size: 12px; font-weight: 700; }
.tvc-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tvc-live.is-on { background: var(--ok-bg); color: var(--ok); }
.tvc-hero-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13.5px; }
.tvc-hero-meta b { color: var(--ink); }
.tvc-dotsep { position: relative; }
.tvc-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.tvc-flags:empty { display: none; }
.tvc-flag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: 12.5px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(168,105,15,.15); }
.tvc-flag svg { width: 14px; height: 14px; }
.tvc-hero-sub { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid #f1eadc; }
.tvc-hero-sub b { font-size: 14.5px; }
.tvc-hero-sub span { color: var(--muted); font-size: 12.5px; }
.tvc-screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tvc-scr { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 14px 8px 12px; border: 1px solid #e8e9ef; border-radius: 16px; background: #fff; color: var(--ink-2); font: 600 13px var(--font); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .12s, background .15s; text-align: center; }
.tvc-scr:hover { border-color: var(--brand-200); box-shadow: 0 6px 18px rgba(168,105,15,.10); transform: translateY(-1px); }
.tvc-scr:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 2px; }
.tvc-scr-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gray-bg); color: var(--ink-2); transition: background .15s, color .15s; }
.tvc-scr-ic svg { width: 20px; height: 20px; }
.tvc-scr:hover .tvc-scr-ic { background: var(--brand-50); color: var(--brand-600); }
.tvc-scr.is-cur { border-color: var(--brand-500); background: linear-gradient(180deg, #fff8ec, #fff); box-shadow: 0 0 0 3px rgba(192,125,28,.14); color: var(--brand-900); }
.tvc-scr.is-cur .tvc-scr-ic { background: var(--gold-grad); color: #fff; box-shadow: 0 4px 12px rgba(168,105,15,.3); }
.tvc-scr em { position: absolute; top: 8px; inset-inline-end: 8px; font-style: normal; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--ok); border-radius: 999px; padding: 1px 7px; }
.tvc-scr.loading { opacity: .6; pointer-events: none; }
.tvc-scr-name { line-height: 1.3; }

/* صف التحكم السريع */
.tvc-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.tvc-toggle { display: flex; align-items: center; gap: 16px; padding: 20px 22px; cursor: pointer; transition: background .2s, box-shadow .2s; margin: 0; }
.tvc-toggle-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; background: var(--gray-bg); color: var(--ink-2); transition: background .2s, color .2s; }
.tvc-toggle-ic svg { width: 24px; height: 24px; }
.tvc-toggle-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tvc-toggle-txt b { font-size: 16px; font-weight: 800; }
.tvc-toggle-txt small { color: var(--muted); font-size: 13px; }
.tvc-toggle-txt em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--faint); margin-top: 4px; }
.tvc-toggle.is-on { background: linear-gradient(135deg, #fff6e6, #fffdf8); box-shadow: inset 0 0 0 1.5px var(--brand-300), var(--shadow-sm); }
.tvc-toggle.is-on .tvc-toggle-ic { background: var(--gold-grad); color: #fff; }
.tvc-toggle.is-on em { color: var(--brand-700); }
.tvc-switch-lg { width: 54px; height: 30px; }
.tvc-switch-lg span::before { width: 24px; height: 24px; }
.tvc-switch-lg input:checked + span::before { transform: translateX(-24px); }
[dir=ltr] .tvc-switch-lg input:checked + span::before { transform: translateX(24px); }
.tvc-switch-lg input:focus-visible + span { outline: 3px solid var(--brand-200); outline-offset: 2px; }

/* مؤقت التركيز */
.tvc-focus .card-body { display: grid; gap: 14px; }
.tvc-count { display: grid; justify-items: center; gap: 2px; padding: 4px 0; }
.tvc-count-num { font: 800 44px/1.05 var(--mono); letter-spacing: -1px; color: var(--ink); direction: ltr; font-variant-numeric: tabular-nums; }
.tvc-count-lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tvc-bar { width: 100%; height: 6px; border-radius: 99px; background: var(--gray-bg); overflow: hidden; margin-top: 8px; }
.tvc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold-grad); transition: width 1s linear; }
.tvc-idle { color: var(--muted); font-size: 13.5px; }
.tvc-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tvc-pill { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 60px; padding: 6px; border: 1px solid #e8e9ef; border-radius: 18px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, transform .12s; }
.tvc-pill b { font: 800 20px/1.1 var(--mono); }
.tvc-pill small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tvc-pill svg { width: 20px; height: 20px; }
.tvc-pill:hover { border-color: var(--brand-300); transform: translateY(-1px); }
.tvc-pill:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 1px; }
.tvc-pill.is-cur { background: var(--gold-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(168,105,15,.28); }
.tvc-pill.is-cur small { color: rgba(255,255,255,.85); }
.tvc-pill-stop { color: var(--bad); }
.tvc-pill-stop small { color: var(--bad); }
.tvc-pill-stop:hover { border-color: #f3b9b9; background: var(--bad-bg); }
.tvc-pill.loading { opacity: .6; pointer-events: none; }

/* العمودان الرئيسيان */
.tvc-main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tvc-col { display: grid; gap: 16px; min-width: 0; }
.tvc-sec { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 6px 4px 0; }
.tvc-sec h4 { font-size: 12.5px; font-weight: 800; color: var(--brand-700); letter-spacing: .3px; text-transform: uppercase; }
.tvc-sec span { font-size: 12.5px; color: var(--muted); }
.tvc-col > .tvc-sec:not(:first-child) { padding-top: 10px; }
.tvc-form { gap: 14px 16px; }
.tvc textarea.tvc-ta { height: auto; min-height: 72px; padding-block: 10px; resize: vertical; line-height: 1.6; }
.tvc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 2px; }
.tvc-stack { display: grid; gap: 14px; }
.tvc-lbl { font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.tvc-lbl small { font-weight: 400; font-size: 12px; color: var(--muted); }
.tvc-divider { height: 1px; background: var(--line-2); margin: 18px 0; }

/* صف خيار بمفتاح */
.tvc-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; }
.tvc-opt-txt { display: grid; gap: 1px; min-width: 0; }
.tvc-opt-txt b { font-size: 14px; font-weight: 600; }
.tvc-opt-txt small { font-size: 12px; color: var(--muted); }
.tvc-opt .switch input:focus-visible + span { outline: 3px solid var(--brand-200); outline-offset: 2px; }
.tvc-opt-urgent:has(input:checked) { background: var(--bad-bg); box-shadow: inset 0 0 0 1px #f5c2c2; }
.tvc-opt-urgent:has(input:checked) b { color: var(--bad); }
.tvc-opt-urgent input:checked + span { background: var(--bad); }

/* معاينة الإعلان على التلفاز */
.tvc-pv { position: relative; aspect-ratio: 16 / 6; margin-bottom: 18px; border-radius: 14px; overflow: hidden; padding: 12px; display: flex; flex-direction: column; gap: 10px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(192,125,28,.28), transparent 55%), linear-gradient(160deg, #1b1c26, #0e0f15); border: 6px solid #22232c; box-shadow: 0 10px 26px rgba(18,19,26,.18); color: #fff; }
.tvc-pv-tag { position: absolute; bottom: 8px; inset-inline-end: 12px; font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.55); letter-spacing: .4px; }
.tvc-pv-banner { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: linear-gradient(90deg, #c78a2c, #9a610f); box-shadow: 0 6px 18px rgba(0,0,0,.35); min-width: 0; }
.tvc-pv-banner > svg { width: 18px; height: 18px; flex-shrink: 0; }
.tvc-pv-banner > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.tvc-pv-banner b { font-size: 13.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tvc-pv-banner [data-pv-ph] { opacity: .7; font-weight: 600; }
.tvc-pv-banner span { font-size: 12px; opacity: .88; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tvc-pv-wall { flex: 1; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; min-height: 0; }
.tvc-pv-tile { border-radius: 9px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); min-height: 0; }
.tvc-pv-ann { padding: 8px 10px; display: grid; align-content: start; gap: 2px; overflow: hidden; }
.tvc-pv-ann small { font-size: 10px; color: #f0d09b; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvc-pv-ann b { font-size: 11.5px; font-weight: 700; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tvc-pv.no-banner .tvc-pv-banner { display: none; }
.tvc-pv.no-banner .tvc-pv-ann { box-shadow: inset 0 0 0 1.5px rgba(240,208,155,.6); background: rgba(192,125,28,.16); }
.tvc-pv.is-urgent { border-color: #c62f2f; animation: tvcUrgent 1.4s ease-in-out infinite; }
.tvc-pv.is-urgent .tvc-pv-banner { background: linear-gradient(90deg, #e04848, #b42424); }
@keyframes tvcUrgent { 50% { border-color: #ff6b6b; box-shadow: 0 0 0 3px rgba(214,59,59,.25), 0 10px 26px rgba(18,19,26,.18); } }
@media (prefers-reduced-motion: reduce) { .tvc-pv.is-urgent, .tvc-tv.is-on i, .tvc-state.is-on::before { animation: none; } }

/* بطاقات الجدار كشرائح */
.tvc-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tvc-chip, .tvc-day { position: relative; cursor: pointer; }
.tvc-chip input, .tvc-day input, .tvc-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tvc-chip span { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 12px; border-radius: 14px; border: 1px solid #e8e9ef; background: #fff; color: var(--muted); font-size: 13px; font-weight: 600; transition: border-color .15s, background .15s, color .15s; }
.tvc-chip span > svg { width: 17px; height: 17px; flex-shrink: 0; }
.tvc-chip i { margin-inline-start: auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #d6d8e2; color: transparent; flex-shrink: 0; transition: background .15s, border-color .15s; }
.tvc-chip i svg { width: 12px; height: 12px; stroke-width: 3; }
.tvc-chip input:checked + span { border-color: var(--brand-300); background: #fffaf1; color: var(--ink); }
.tvc-chip input:checked + span > svg { color: var(--brand-600); }
.tvc-chip input:checked + span i { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.tvc-chip input:focus-visible + span, .tvc-day input:focus-visible + span, .tvc-seg input:focus-visible + span { outline: 3px solid var(--brand-200); outline-offset: 1px; }

/* أيام الجدول */
.tvc-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.tvc-day span { display: grid; place-items: center; min-height: 44px; padding: 4px 2px; border-radius: 12px; border: 1px solid #e8e9ef; background: #fff; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.2; transition: background .15s, color .15s, border-color .15s; }
.tvc-day input:checked + span { background: var(--gold-grad); border-color: transparent; color: #fff; }

/* الصوت والخلفية */
.tvc-vol { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.tvc-vol > svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.tvc-vol output { min-width: 44px; text-align: center; font-weight: 800; color: var(--brand-700); }
.tvc-range { flex: 1; min-width: 0; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.tvc-range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--brand-500) var(--v, 30%), #dcdee7 var(--v, 30%)); }
[dir=rtl] .tvc-range::-webkit-slider-runnable-track { background: linear-gradient(to left, var(--brand-500) var(--v, 30%), #dcdee7 var(--v, 30%)); }
.tvc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-600); box-shadow: 0 2px 6px rgba(18,19,26,.2); }
.tvc-range::-moz-range-track { height: 6px; border-radius: 99px; background: #dcdee7; }
.tvc-range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--brand-500); }
.tvc-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-600); }
.tvc-range:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 2px; border-radius: 8px; }
.tvc-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--gray-bg); }
.tvc-seg label { position: relative; cursor: pointer; }
.tvc-seg span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s, box-shadow .15s; }
.tvc-seg input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.tvc-seg i { width: 16px; height: 16px; border-radius: 5px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.tvc-sw-pattern { background: repeating-linear-gradient(45deg, #2a2216 0 3px, #8a560c 3px 5px); }
.tvc-sw-black { background: #000; }

/* الصلاحيات */
.tvc-flush .card-body { padding: 6px 0; }
.tvc-perms { display: grid; }
.tvc-perm { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 22px; cursor: pointer; transition: background .12s; }
.tvc-perm + .tvc-perm { border-top: 1px solid var(--line-2); }
.tvc-perm:hover { background: #fcfaf6; }
.tvc-perm .avatar { flex-shrink: 0; }
.tvc-perm-txt { flex: 1; min-width: 0; display: grid; }
.tvc-perm-txt b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvc-perm-txt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvc-perm .switch input:focus-visible + span { outline: 3px solid var(--brand-200); outline-offset: 2px; }
.tvc-perms > .muted { padding: 12px 22px; }

@media (max-width: 1100px) {
  .tvc-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .tvc { gap: 14px; }
  .tvc-hero { padding: 16px; gap: 14px; border-radius: 20px; }
  .tvc-tv { width: 46px; height: 46px; border-radius: 14px; }
  .tvc-hero-name > b { font-size: 17px; }
  .tvc-flags { width: 100%; }
  .tvc-screens { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tvc-scr { flex-direction: row; justify-content: flex-start; min-height: 56px; padding: 8px 10px; gap: 10px; border-radius: 14px; text-align: start; font-size: 13.5px; }
  .tvc-scr-ic { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; }
  .tvc-scr-ic svg { width: 18px; height: 18px; }
  .tvc-scr em { top: -7px; inset-inline-end: 8px; }
  .tvc-scr:active { transform: scale(.97); }
  .tvc-quick { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tvc-toggle { padding: 16px; gap: 12px; border-radius: 20px; }
  .tvc-toggle-ic { width: 46px; height: 46px; border-radius: 14px; }
  .tvc-count-num { font-size: 40px; }
  .tvc-pills { gap: 6px; }
  .tvc-pill { min-height: 58px; border-radius: 16px; }
  .tvc-pv { aspect-ratio: 16 / 9; border-width: 5px; padding: 10px; }
  .tvc-pv-banner { padding: 7px 10px; }
  .tvc-pv-banner > div { display: grid; }
  .tvc-actions .btn { flex: 1 1 100%; }
  .tvc-form-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tvc-form-2 .field:has(select) { grid-column: 1 / -1; }
  .tvc-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tvc-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tvc-perm { padding: 8px 16px; }
  .tvc-sec { padding-inline: 6px; }
}
@media (max-width: 360px) {
  .tvc-screens, .tvc-chips { grid-template-columns: minmax(0, 1fr); }
  .tvc-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* المحاسبة: التبويبات، المرفقات، الحسابات، الميزانية */
.acct-closed svg { width: 13px; height: 13px; }
.acct-clip { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font: 600 12px var(--font); cursor: pointer; vertical-align: middle; }
.acct-clip svg { width: 13px; height: 13px; }
.acct-clip:hover { border-color: var(--brand-500); color: var(--brand-600); }
.acct-files-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.acct-files-box h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 14px; }
.acct-files-box h4 svg { width: 16px; height: 16px; color: var(--muted); }
.acct-files { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.acct-files li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.acct-files li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.acct-files li small { color: var(--muted); flex-shrink: 0; }
.acct-files .hic svg { width: 15px; height: 15px; color: var(--muted); }
.acct-upload { cursor: pointer; }
.acct-strip .value { font-size: 19px; white-space: nowrap; }
.acct-strip .small { overflow-wrap: anywhere; }
.acct-strip.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acct-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acct-lines li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.acct-lines li:last-child { border-bottom: 0; }
.acct-lines li > span { min-width: 0; }
.acct-lines li > b { flex-shrink: 0; }
.acct-lines li.total { font-weight: 800; font-size: 15px; border-top: 2px solid var(--line); }
.acct-accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.acct-acct { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.acct-acct.off { opacity: .65; }
.acct-acct .aa-head { display: flex; align-items: center; gap: 10px; }
.acct-acct .aa-head .hic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex-shrink: 0; }
.acct-acct .aa-head .hic svg { width: 19px; height: 19px; }
.acct-acct .aa-head b { display: block; font-size: 15px; }
.acct-acct .aa-head small { color: var(--muted); font-size: 12px; }
.acct-acct .aa-bal { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.acct-acct .aa-rec { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.acct-acct .aa-rec .badge { height: 22px; font-size: 11.5px; }
.acct-acct .aa-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.acct-budget { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.acct-budget .ab-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.acct-budget .ab-nums { display: inline-flex; align-items: center; gap: 6px; }
.acct-budget .ab-nums .input { width: 120px; height: 32px; }
.acct-budget .acct-bar { height: 10px; margin: 6px 0 4px; }
.acct-budget li.over .ab-row b { color: #d63b3b; }
@media (max-width: 760px) {
  .strip.acct-strip { grid-template-columns: minmax(0, 1fr) !important; }
  .strip.acct-strip > * { border-inline-start: 0 !important; border-top: 1px solid var(--line) !important; padding: 14px 16px; }
  .strip.acct-strip > *:first-child { border-top: 0 !important; }
  .acct-strip .ic { width: 38px; height: 38px; }
  .acct-bud-add { width: 100%; }
  .acct-bud-add .input, .acct-bud-add select.input { flex: 1 1 120px; min-width: 0; width: auto !important; }
  .acct-accts { grid-template-columns: minmax(0, 1fr); }
}

/* ── الرواتب: المستحقات وحسابات الموظفين (صفوف بطاقات) ── */
.sal-group { overflow: hidden; }
.sal-ghead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.sal-ghead h3 { margin: 0; font-size: 15px; }
.sal-list { display: flex; flex-direction: column; }
.sal-row { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(200px, 1.6fr) minmax(150px, auto) auto; align-items: center; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sal-row:last-child { border-bottom: 0; }
.sal-row.acc { grid-template-columns: minmax(170px, 1fr) minmax(220px, 2fr) minmax(130px, auto) auto; }
.sal-row.clickable { cursor: pointer; transition: background .15s; }
.sal-row.clickable:hover { background: var(--surface-2); }
.sal-amt-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sal-amt-top b { font-size: 16px; }
.sal-bar { height: 6px; background: var(--gray-bg); border-radius: 6px; overflow: hidden; margin: 7px 0 5px; max-width: 280px; }
.sal-bar i { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.sal-state { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sal-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.sal-pill svg { width: 13px; height: 13px; }
.sal-pill.warn { background: var(--warn-bg); color: var(--warn); }
.sal-pill.bad { background: var(--bad-bg); color: var(--bad); }
.sal-note { font-size: 11.5px; color: var(--faint); }
.sal-acts { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.sal-icons { display: inline-flex; gap: 2px; margin-inline-start: 2px; }
.sal-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sal-chip { display: inline-flex; flex-direction: column; gap: 1px; padding: 5px 10px; border-radius: 9px; background: var(--gray-bg); line-height: 1.25; }
.sal-chip small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sal-chip b { font-size: 13.5px; }
.sal-chip.bad { background: var(--bad-bg); } .sal-chip.bad b { color: var(--bad); }
.sal-chip.warn { background: var(--warn-bg); } .sal-chip.warn b { color: var(--warn); }
.sal-op { color: var(--faint); font-weight: 700; }
.sal-total { display: flex; flex-direction: column; align-items: flex-start; }
.sal-total small { font-size: 11.5px; color: var(--muted); }
.sal-total b { font-size: 19px; color: var(--brand-500); }
.sal-total.zero b { color: var(--faint); }
.sal-quiet { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.sal-qchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; color: inherit; text-decoration: none; background: var(--surface); }
.sal-qchip .avatar { width: 22px; height: 22px; font-size: 10px; }
.sal-qchip:hover { border-color: var(--brand-500); }
@media (max-width: 760px) {
  .sal-row, .sal-row.acc { grid-template-columns: 1fr auto; gap: 10px 12px; padding: 14px; }
  .sal-who { grid-column: 1 / -1; }
  .sal-amt, .sal-mid { grid-column: 1 / -1; }
  .sal-bar { max-width: none; }
  .sal-state { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .sal-acts { justify-content: flex-end; }
  .sal-ghead { padding: 12px 14px; }
}

/* ── شرائح راتب المبيعات ── */
.tier-ed { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
.tier-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tier-row .input { width: 110px; }
.tier-comm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.tier-comm label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.tier-comm .input { width: 80px; }
.tier-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tier-steps span { display: inline-flex; flex-direction: column; padding: 6px 12px; border-radius: 10px; background: var(--gray-bg); line-height: 1.3; }
.tier-steps span small { font-size: 11px; color: var(--muted); }
.tier-steps span.on { background: var(--ok-bg); }
.tier-steps span.on b { color: var(--ok); }

/* بوابة العميل: تحميل الملف الأصلي ونسخ الكابشن لعنصر مسموح */
.cp-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.cp-dl small { color: #667085; font-size: .78em; }
.cp-dl .vis-btn:first-child { background: #1b1f27; border-color: #1b1f27; color: #fff; }
.cp-dl .vis-btn:first-child:hover { background: #2b303b; }
.ti-cdl { color: #067647; font-weight: 700; }
.cp-dl.wait { gap: 6px; color: #667085; } .cp-dl.wait svg { width: 14px; height: 14px; }
/* تاريخ النشر بجانب رقم التصميم في اللوحات */
.ab-gdate { font-weight: 700; color: #a8690f; white-space: nowrap; }
.fd-date { font-weight: 700; color: #a8690f; white-space: nowrap; font-size: .9em; }
/* نقل حالة المهمة بالسحب بين الأعمدة */
.sboard[data-sdrag] .scard { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.scard-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: rotate(-2deg) scale(1.03); box-shadow: 0 18px 40px rgba(16,24,40,.28); opacity: .96; cursor: grabbing; }
.scard.scard-src { opacity: .35; }
.sboard.is-dragging .scol { transition: box-shadow .15s, background-color .15s; }
.sboard.is-dragging .scol.drop-on { box-shadow: 0 0 0 2px var(--st), 0 8px 24px color-mix(in srgb, var(--st) 25%, transparent); }
.sboard.is-dragging .scol.no-drop { opacity: .45; }
/* معاينة الحساب: غلاف الصفحة، صورة الحساب فوقه، والهايلايت — الضغط على عنصر يُظهر حالته */
.igp { font-family: var(--font); background: #fff; color: #1c1d2e; border: 1px solid rgba(18,19,35,.08); border-radius: 1.1em; overflow: hidden; padding-bottom: 1em; }
.igp-cover { position: relative; height: 0; padding-top: 38%; background: #eceef3; overflow: hidden; }
.igp-cover.none { padding-top: 0; height: 3.4em; }
.igp-covers { position: absolute; inset: 0; }
.igp-cv.igp-off, .igp-c.av.igp-off { display: none; }
.igp-avs { flex-direction: column; align-items: center; }
.igp-nav { display: flex; align-items: center; gap: .35em; padding: .2em .3em; border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 .1em .4em rgba(16,24,40,.18); font-size: .6em; color: #344054; white-space: nowrap; }
.igp-covers .igp-nav { position: absolute; left: 50%; bottom: .7em; transform: translateX(-50%); z-index: 2; }
.igp-avs .igp-nav { margin-top: .5em; }
.igp-ar { width: 1.7em; height: 1.7em; border-radius: 50%; border: 0; background: #f2f4f7; color: #101828; font: 700 1.2em/1 var(--font); cursor: pointer; padding: 0; display: grid; place-items: center; }
.igp-ar:hover { background: #e4e7ec; }
.igp-dots { display: flex; gap: .3em; } .igp-dots i { width: .45em; height: .45em; border-radius: 50%; background: #d0d5dd; } .igp-dots i.on { background: #a8690f; }
.igp-cnt { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.2em; text-align: center; }
.igp-cv { position: relative; display: block; width: 100%; height: 100%; min-height: 0; overflow: hidden; padding: 0; border: 0; background: none; cursor: pointer; }
.igp-cv img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.igp-cv.sel { outline: .2em solid #a8690f; outline-offset: -.2em; }
.igp-head { display: flex; align-items: flex-start; gap: 1em; padding: 0 1.3em; position: relative; }
.igp-head .igp-avs { margin-top: -2.4em; }
.igp-cover.none + .igp-head .igp-avs { margin-top: -1.6em; }
.igp-avs { display: flex; gap: .5em; flex: none; }
.igp-c { position: relative; display: block; padding: 0; border: 0; background: #f2f2f4; border-radius: 50%; cursor: pointer; flex: none; }
.igp-c img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; pointer-events: none; }
.igp-c.av { width: 4.8em; height: 4.8em; box-shadow: 0 0 0 .22em #fff; }
.igp-c.av.empty { cursor: default; }
.igp-c.sel, .igp-c.av.sel { box-shadow: 0 0 0 .18em #fff, 0 0 0 .34em #a8690f; }
.igp-meta { min-width: 0; display: flex; flex-direction: column; gap: .1em; padding-top: .55em; }
.igp-meta > b { font-size: 1em; font-weight: 700; }
.igp-meta > span { font-size: .7em; color: #667085; }
.igp-hl { display: flex; gap: .9em; margin-top: 1.1em; padding: 0 1.3em .2em; overflow-x: auto; scrollbar-width: none; }
.igp-h { display: flex; flex-direction: column; align-items: center; gap: .35em; flex: none; width: 3.6em; }
.igp-h > span { font-size: .55em; color: #344054; max-width: 6.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.igp-c.hl { width: 3.2em; height: 3.2em; box-shadow: 0 0 0 .1em #fff, 0 0 0 .18em #d8d9e0; }
.igp-st { position: absolute; right: -.1em; bottom: -.1em; width: 1.1em; height: 1.1em; border-radius: 50%; font-style: normal; font-size: .55em; line-height: 1.1em; text-align: center; color: #fff; border: .12em solid #fff; }
.igp-cv .igp-st { right: .6em; bottom: .6em; font-size: .7em; }
.igp-st.ok { background: #12b76a; } .igp-st.wait { background: #f79009; }
.igp-hint { margin: .9em 1.3em 0; font-size: .55em; color: #6b6f80; }
.igp-panel { margin: .9em 1.3em 0; padding-top: .8em; border-top: 1px solid rgba(18,19,35,.08); }
.igp-pt { display: flex; align-items: baseline; gap: .6em; flex-wrap: wrap; margin-bottom: .5em; }
.igp-pt b { font-size: .7em; font-weight: 700; } .igp-pt small { font-size: .55em; color: #667085; }
.igp-zoom { margin-inline-start: auto; font: 700 .55em var(--font); padding: .45em 1em; border-radius: 999px; border: 1px solid rgba(18,19,35,.15); background: #fff; color: #1c1d2e; cursor: zoom-in; }
.igp-px { font-size: .5em; }
.igp-px .vis { margin: 0; }
.ab-ig { position: absolute; font-size: 34px; }
.fd-ig { font-size: 15px; margin: 0 0 14px; }
.fd-ig .igp-px { font-size: 13px; }
.ab-ig .igp-c.av { width: 7.5em; height: 7.5em; }
.ab-ig .igp-head .igp-avs { margin-top: -3.8em; }
.ab-ig .igp-meta > b { font-size: 1.4em; } .ab-ig .igp-meta > span { font-size: .85em; }
.ab-ig .igp-hl { gap: 1.6em; margin-top: 1.6em; }
.ab-ig .igp-h { width: 5.8em; } .ab-ig .igp-c.hl { width: 5.2em; height: 5.2em; } .ab-ig .igp-h > span { font-size: .7em; }
/* داشبورد المهام */
.tdb-hero { display: flex; gap: 24px; align-items: center; padding: 20px 22px; }
.tdb-ring { --p: 0; flex: none; width: 150px; height: 150px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--card, #fff) 76%, transparent 77%), conic-gradient(#059669 calc(var(--p) * 1%), #eef0f4 0); }
.tdb-ring b { font-size: 30px; line-height: 1; color: #101828; } .tdb-ring span { font-size: 11.5px; color: #667085; margin-top: 4px; }
.tdb-hero-r { flex: 1; min-width: 0; }
.tdb-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tdb-k { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #f8f9fb; border: 1px solid #eef0f4; }
.tdb-ki { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #eef0f4; color: #475467; } .tdb-ki svg { width: 18px; height: 18px; }
.tdb-k b { display: block; font-size: 20px; line-height: 1.1; color: #101828; } .tdb-k span { font-size: 12px; color: #667085; }
.tdb-k.info .tdb-ki { background: #e0ecff; color: #2563eb; } .tdb-k.warn .tdb-ki { background: #fef0c7; color: #b54708; } .tdb-k.ok .tdb-ki { background: #d1fadf; color: #067647; } .tdb-k.bad .tdb-ki { background: #fee4e2; color: #b42318; } .tdb-k.bad b { color: #b42318; }
.tdb-stbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; margin-top: 14px; background: #eef0f4; }
.tdb-stleg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12px; color: #475467; } .tdb-stleg i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 6px; } .tdb-stleg b { color: #101828; }
.tdb-filters { flex-wrap: wrap; gap: 8px; } .tdb-filters select { width: auto; }
.tdb-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tdb-grid > .card { margin: 0; } .tdb-grid > .card:only-child { grid-column: 1 / -1; }
/* تصميم 2: «حسب الشركة» و«العناصر المنفّذة» عمود جانبي واحد بجانب «النشر خلال أسبوعين» (كان فراغ كبير تحت البطاقة الجانبية وبطاقة المنفّذين بعرض الصفحة) */
.tdb-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; } .tdb-side > .card, .tdb-side > .c-card { margin: 0; } .tdb-grid > .tdb-side:only-child { grid-column: 1 / -1; }
.tdb-days { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 16px; scrollbar-width: thin; }
.tdb-day { flex: none; width: 190px; display: flex; flex-direction: column; gap: 6px; }
.tdb-dh { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 10px; background: #f2f4f7; font-size: 12.5px; }
.tdb-dh span { font-size: 11px; font-weight: 700; background: #fff; border-radius: 999px; padding: 1px 8px; color: #475467; }
.tdb-day.today .tdb-dh { background: #a8690f; color: #fff; } .tdb-day.today .tdb-dh span { color: #a8690f; }
.tdb-u { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid #eaecf0; border-radius: 10px; color: inherit; text-decoration: none; background: #fff; }
.tdb-u:hover { border-color: #a8690f; } .tdb-u b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tdb-u small { font-size: 11px; color: #667085; }
.tdb-u em { align-self: flex-start; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #f2f4f7; color: #475467; margin-top: 2px; }
.tdb-u em.st-approved, .tdb-u em.st-scheduled, .tdb-u em.st-published { background: #d1fadf; color: #067647; } .tdb-u em.st-review { background: #fef0c7; color: #b54708; } .tdb-u em.st-design { background: #ede9fe; color: #6d28d9; }
.tdb-cls { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.tdb-clh { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 6px; } .tdb-clh b { font-size: 13px; } .tdb-clh span { font-size: 11.5px; color: #667085; } .tdb-clh em { font-style: normal; color: #b42318; font-weight: 700; }
.tdb-bar { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: #eef0f4; } .tdb-bar i.d { background: #12b76a; } .tdb-bar i.o { background: #d0d5dd; } .tdb-bar i.l { background: #f04438; }
.tdb-list { display: flex; flex-direction: column; }
.tdb-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; padding: 14px 18px; border-top: 1px solid #f2f4f7; }
.tdb-row.late { border-inline-start: 3px solid #f04438; }
.tdb-title { font-weight: 700; font-size: 14.5px; color: #101828; text-decoration: none; } .tdb-title:hover { text-decoration: underline; }
.tdb-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 5px; font-size: 12px; color: #667085; } .tdb-meta svg { width: 13px; height: 13px; vertical-align: -2px; }
.tdb-prog { display: flex; align-items: center; gap: 10px; margin-top: 9px; } .tdb-prog .tdb-bar { width: 160px; flex: none; } .tdb-prog > span { font-size: 12px; color: #475467; } .tdb-prog em { font-style: normal; color: #b42318; font-weight: 700; }
.tdb-dates { display: flex; gap: 18px; align-items: flex-start; } .tdb-dates > div { display: flex; flex-direction: column; min-width: 72px; } .tdb-dates small { font-size: 11px; color: #6b6f80; } .tdb-dates b { font-size: 13px; }
.tdb-its { display: flex; flex-wrap: wrap; gap: 6px; }
.tdb-it { display: inline-flex; gap: 6px; align-items: center; padding: 3px 9px; border-radius: 999px; background: #f2f4f7; font-size: 11.5px; color: #344054; }
.tdb-it em { font-style: normal; color: #667085; } .tdb-it.done { background: #ecfdf3; color: #067647; } .tdb-it.late { background: #fee4e2; color: #b42318; }
@media (max-width: 900px) { .tdb-grid { grid-template-columns: minmax(0, 1fr); } .tdb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .tdb-hero { flex-direction: column; align-items: stretch; } .tdb-ring { align-self: center; } .tdb-row { grid-template-columns: 1fr; } .tdb-dates { gap: 12px; } .tdb-prog .tdb-bar { width: 110px; } }
/* قائمة المهام */
.todos { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-top: 1px solid #f2f4f7; } .todo.late small em { font-style: normal; color: #b42318; font-weight: 700; }

/* بطاقة المهمة الجديدة في لوحة الحالات */
.sc-t { margin-top: 10px; min-height: 2.9em; font-size: 15px; font-weight: 700; line-height: 1.45; color: #101828; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* الكاروسيل على اللوحة: مروحة من 3 بطاقات — الغلاف أمام، والثالثة «+العدد الباقي» */
.ab-frame.ab-fan { transform-origin: 50% 100%; border-radius: 22px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.12), 0 26px 60px rgba(0,0,0,.24); cursor: zoom-in; }
.ab-frame.ab-fan:not(.cover) { filter: brightness(.93); }
.ab-frame.ab-fan .ab-name { display: none; }
.ab-fanmore { background: #1c1d2e; }
.ab-fanmore > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.45); transform: scale(1.1); }
.ab-fm { position: absolute; top: 0; bottom: 0; right: 0; direction: ltr; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; font-family: var(--font); }
.ab-fm b { font-size: 120px; font-weight: 800; line-height: 1; letter-spacing: -4px; }
.ab-fm span { font-size: 34px; font-weight: 600; opacity: .8; }
/* لوحة الحالات: أعمدة بخلفية محايدة (لون الحالة في رأس العمود فقط) حتى تبقى البطاقات واضحة، وبدون شريط تمرير ظاهر */
.sboard .scol { background: #f6f7f9; border: 1px solid #e4e7ec; border-top: 3px solid var(--st); }
.sboard .scol-head { border-bottom-color: #e4e7ec; }
.sboard .scol-body { scrollbar-width: none; -ms-overflow-style: none; }
.sboard .scol-body::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* الوضع الداكن للوحة الحالات: البطاقة أفتح من العمود ليظهر الفرق (تُكتب بألوان فاتحة وتُحوَّل في dark.css) */
html.dark .sboard .scol { background: #fdfdfe; border-color: #dfe2e8; }
html.dark .sboard .scol-head { border-bottom-color: #dfe2e8; }
/* «غير معتمد»: حالة عنصر وقرار العميل */
.vis-bad { background: #fef3f2; border-color: #fecdca; color: #912018; } .vis-bad .vis-ic { background: #fee4e2; color: #b42318; }
.vis-btn.reject { background: #fff; border-color: #fda29b; color: #b42318; } .vis-btn.reject:hover { background: #fef3f2; }
.vis-wait .vis-optbtns { display: flex; gap: .5em; flex-wrap: wrap; justify-content: flex-end; }
.cc-badge.rej { background: #fee4e2; color: #b42318; }
.ti-c.st-rejected i { background: #f04438; }
.ti-st.st-rejected { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.ti-chip.st-rejected { color: #b42318; }
.tdb-u em.st-rejected { background: #fee4e2; color: #b42318; }
.igp-st.bad { background: #f04438; }

/* ملخص صفحات المهام بشكل داشبورد المهام */
.tdb-hero.tprog2 { margin-bottom: 14px; }

/* بوابة العميل: «مطلوب منكم» — تصاميم بانتظار الموافقة */
.vis-rev { display: block; margin-top: 2px; font-size: 12px; opacity: .8; }

/* الحذف النهائي: اختيار الملفات */
.pg-sec { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.pg-items { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-chip { padding: 3px 10px; border-radius: 999px; background: #f2f4f7; font-size: 12.5px; }
.pg-chip em { font-style: normal; color: var(--muted); margin-inline-start: 4px; font-size: 11.5px; }
.pg-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; max-height: 46vh; overflow: auto; padding: 2px; }
.pg-f { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #eaecf0; border-radius: 10px; cursor: pointer; min-width: 0; }
.pg-f:has(input:checked) { border-color: #d92d20; background: #fef3f2; }
.pg-f img, .pg-ic { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: #f2f4f7; display: grid; place-items: center; }
.pg-t { display: flex; flex-direction: column; min-width: 0; }
.pg-t b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-t small { color: var(--muted); font-size: 11.5px; } .pg-t em { color: #067647; font-style: normal; }
@media (max-width: 640px) { .pg-files { grid-template-columns: 1fr; max-height: 50vh; } }

/* ═════════ المحاسبة: الرئيسية المالية، الحركات، المستحقات، الإقفال، الإضافة السريعة ═════════ */
/* مكوّن المبلغ: أرقام ثابتة العرض LTR، العملة صغيرة، الإيراد أخضر والمصروف والسالب أحمر */
.famt { display: inline-flex; align-items: baseline; gap: 4px; direction: ltr; unicode-bidi: isolate; white-space: nowrap; font-variant-numeric: tabular-nums; }
.famt b { font-weight: 700; }
.famt small { font-size: .72em; font-weight: 600; color: var(--muted); }
.famt.pos b { color: #0f9960; }
.famt.neg b { color: #d63b3b; }
.up { color: #0f9960; } .down { color: #d63b3b; }
.fmonth { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.fmonth .input { height: 34px; border: 0; background-color: transparent; width: auto; min-width: 0; padding-inline: 6px; font-weight: 700; box-shadow: none; }
.fmonth .icon-btn { width: 32px; height: 32px; border-radius: 999px; }
.fmonth [data-mnext] svg { transform: scaleX(-1); }
[dir=ltr] .fmonth [data-mprev] svg { transform: scaleX(-1); }
[dir=ltr] .fmonth [data-mnext] svg { transform: none; }
.fdir { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; }
.fdir svg { width: 16px; height: 16px; }
.fdir.in { background: #e7f7ef; color: #0f9960; }
.fdir.out { background: #fdecec; color: #d63b3b; }
.fdir.cap { background: #eef3ff; color: #2563eb; }
.fdir.tr { background: #f0f1f5; color: #6b6f80; }

/* يحتاج إجراء اليوم */
.fcount { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; margin-inline-start: 6px; border-radius: 999px; background: #d63b3b; color: #fff; font: 700 12px var(--font); }
.fin-list { list-style: none; margin: 0; padding: 0; }
.fin-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line-2); }
.fin-item:first-child { border-top: 0; }
.fi-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #f0f1f5; color: #6b6f80; }
.fi-ic svg { width: 18px; height: 18px; }
.fin-item.t-bad .fi-ic { background: #fdecec; color: #d63b3b; }
.fin-item.t-ok .fi-ic { background: #e7f7ef; color: #0f9960; }
.fin-item.t-warn .fi-ic { background: #fff6e0; color: #b7791f; }
.fin-item.t-info .fi-ic { background: #e8f0fe; color: #2563eb; }
.fin-item.t-brand .fi-ic { background: var(--brand-50); color: var(--brand-700); }
.fi-h { font-size: 14px; line-height: 1.5; }
.fi-s { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.fi-amt { font-size: 15px; }
.fi-a { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fi-a .btn svg { width: 15px; height: 15px; }

/* الحركات */
.fl-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); }
.fl-table th { white-space: nowrap; }
.fl-table th svg { width: 14px; height: 14px; vertical-align: -2px; }
.fl-table td { vertical-align: middle; }
.fl-table th, .fl-table td { padding-inline: 9px; }
.fl-table td.small { font-size: 12.5px; line-height: 1.4; }
.fl-table td:last-child { padding-inline: 4px; }
.fl-table td.out { color: #d63b3b; font-weight: 600; }
.fl-table td.in { color: #0f9960; font-weight: 600; }
.fl-table td.cap { color: #2563eb; font-weight: 600; }
.fl-table td.bal { font-weight: 700; color: var(--ink); background: #fafbfd; }
.fl-table td.bal.neg { color: #d63b3b; }
.fl-row { outline: none; }
.fl-row:focus-visible, .fl-row:focus { box-shadow: inset 3px 0 0 var(--brand-600); background: #fffaf1; }
[dir=rtl] .fl-row:focus-visible, [dir=rtl] .fl-row:focus { box-shadow: inset -3px 0 0 var(--brand-600); }
.fl-row.closed { opacity: .85; }
.fl-row.tr td { color: var(--muted); }
.fl-desc { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.fl-desc .fdir { width: 28px; height: 28px; border-radius: 9px; }
.fl-desc b { font-weight: 600; }
.fsrc { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px; background: #f0f1f5; color: #5b5f70; font: 600 11.5px var(--font); vertical-align: middle; text-decoration: none !important; }
.fsrc svg { width: 11px; height: 11px; }
.fsrc.locked { background: #eef3ff; color: #1d4ed8; }
a.fsrc.locked:hover { background: #dfe8ff; }
.fmiss { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border: 1px dashed #e0a43a; border-radius: 99px; background: #fffaf0; color: #a8690f; font: 600 11.5px var(--font); cursor: pointer; white-space: nowrap; }
.fmiss svg { width: 12px; height: 12px; }
.fmiss:hover { background: #fdf0d9; }
.fl-days, .fst-cards{ display: none; }
.fl-keys { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 18px; border-top: 1px solid var(--line-2); }
kbd { display: inline-block; min-width: 20px; padding: 1px 6px; margin-inline-end: 3px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: #fff; font: 600 11px var(--mono); color: var(--ink-2); text-align: center; }

/* العملاء والمستحقات وكشف الحساب */
.fst-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.fst-head .t { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.fst-head .t b { font-size: 16px; }
.fst-head .t small { color: var(--muted); font-size: 12.5px; }
.fst-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.fst-table tr.receipt td { background: #f6fcf9; }
.fst-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #fafbfd; font-size: 13px; }
.fst-bal { font-weight: 800; font-size: 14.5px; }
.fst-bal .famt b { color: var(--brand-700); }

/* إقفال الشهر */
.fck-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.fck-prog { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.fck-prog .ring { --p: 0; width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#0f9960 calc(var(--p) * 1%), #eceef3 0); }
.fck-prog .ring b { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 14px; }
.fck { list-style: none; margin: 0; padding: 0; }
.fck li { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line-2); }
.fck li:first-child { border-top: 0; }
.fck .t { flex: 1; min-width: 0; }
.fck .t b { font-size: 14px; }
.fck-ic { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; }
.fck-ic svg { width: 14px; height: 14px; stroke-width: 2.6; }
.fck li.s-ok .fck-ic { background: #e7f7ef; color: #0f9960; }
.fck li.s-warn .fck-ic { background: #fff6e0; color: #b7791f; }
.fck li.s-bad .fck-ic { background: #fdecec; color: #d63b3b; }
.fck-acc { margin-top: 2px; }
.fck-items { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fck-items li { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; }
.fck-pl tr.h td { font-weight: 800; background: #fafbfd; }
.fck-pl td.sub { color: var(--muted); font-size: 13px; padding-inline-start: 22px; }
.fck-pl tr.t td { font-weight: 800; border-top: 2px solid var(--line); }

/* الإضافة السريعة */
.modal.qe { max-width: 520px; }
.qe { display: flex; flex-direction: column; gap: 14px; }
.qe-type { align-self: center; }
.qe-type button { min-width: 110px; justify-content: center; }
.qe-amount { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 6px 0 4px; border-bottom: 2px solid var(--line); direction: ltr; }
.qe-amount:focus-within { border-color: var(--brand-500); }
.qe-amount input { width: 100%; max-width: 280px; border: 0; outline: none; background: transparent; text-align: center; font: 800 40px var(--font); font-variant-numeric: tabular-nums; color: var(--ink); padding: 0; }
.qe-amount span { font-weight: 700; color: var(--muted); }
.qe-receipt { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1.5px dashed #e0c48f; border-radius: 16px; background: #fffcf6; }
.qe-receipt.has { border-style: solid; border-color: #9ad8b8; background: #f4fbf7; }
.qe-shot { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--brand-600); color: #fff; font: 700 13px var(--font); cursor: pointer; }
.qe-shot.ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.qe-shot svg { width: 17px; height: 17px; }
.qe-files { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.qe-files:empty { display: none; }
.qe-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 12px; }
.qe-file img { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; }
.qe-file > svg { width: 18px; height: 18px; color: var(--muted); }
.qe-file span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qe-file button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #f0f1f5; display: grid; place-items: center; cursor: pointer; }
.qe-file button svg { width: 12px; height: 12px; }
.qe-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -6px; }
.qe-sug svg { width: 13px; height: 13px; vertical-align: -2px; }
.qe-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.qe-chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: 600 12.5px var(--font); cursor: pointer; }
.qe-chip.sug { border-color: #e0b45f; background: #fffaf0; }
.qe-chip.on { background: var(--ink, #12131a); border-color: var(--ink, #12131a); color: #fff; }
.qe-bud { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: #e7f7ef; color: #0b7a4c; }
.qe-bud.near { background: #fff6e0; color: #8a5a10; }
.qe-bud.over { background: #fdecec; color: #b42e2e; }
.qe-bud svg { width: 15px; height: 15px; }
.qe-rec { font-size: 13px; }
.btn-link { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--brand-600); font-weight: 600; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

/* شريط الأفعال السفلي (الهاتف فقط) */

@media (max-width: 1100px) {
   .fck-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .fin-item { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px 14px; gap: 10px; }
  .fi-a { grid-column: 2 / -1; justify-content: flex-start; }
  .fi-a .btn { min-height: 34px; }
  .fl-desk, .fl-keys { display: none !important; }
  .fl-days { display: block; }
  /* مقارنة التقرير الشهري تبقى جدولاً صغيراً بأربعة أعمدة */
  .table.stackable.fck-pl { display: table; min-width: 0; width: 100%; font-size: 12.5px; }
  .table.stackable.fck-pl thead { display: table-header-group; }
  .table.stackable.fck-pl tbody { display: table-row-group; padding: 0; }
  .table.stackable.fck-pl tr { display: table-row; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  .table.stackable.fck-pl td, .table.stackable.fck-pl th { display: table-cell; padding: 8px 10px !important; border-bottom: 1px solid var(--line-2) !important; font-size: 12.5px !important; font-weight: inherit; white-space: nowrap; }
  .table.stackable.fck-pl td::before { display: none; }
  .table.stackable.fck-pl td:first-child { white-space: normal; margin: 0; }
  .fl-sum { gap: 4px 12px; padding: 10px 14px; font-size: 12.5px; }
  .fl-day header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: #f7f8fb; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); }
  .fl-card-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-top: 1px solid var(--line-2); background: #fff; text-align: start; font: inherit; color: inherit; cursor: pointer; }
  .fl-card-row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .fl-card-row .t b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fl-card-row .t small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fl-card-row small svg { width: 11px; height: 11px; vertical-align: -1px; }
  .fl-card-row > .famt { font-size: 14.5px; }
  .fst-cards { display: block; list-style: none; margin: 12px 0 0; padding: 0; }
  .fst-cards li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); }
  .fst-cards .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
  .fst-cards .t small { color: var(--muted); font-size: 12px; }
  .fst-acts { width: 100%; }
  .fst-acts .btn { flex: 1; }
  .qe-amount input { font-size: 38px; }
  .content:has(> .fin-mbar) { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
}
/* ═════════ بوابة العميل — نمط تطبيق الجوال: «مطلوب منكم»، طابور المراجعة، الستوري، الخيارات، الدفعات ═════════ */
body.cp-ovl-open { overflow: hidden; }
/* الهاتف: شريط علوي خفيف (العنوان والجرس) — اللغة والمظهر في الإعدادات */
@media (max-width: 760px) { .cp-app .topbar .lang-switch.top, .cp-app .topbar .theme-btn { display: none !important; } }

/* الترحيب */
.chl { display: flex; align-items: center; gap: 14px; }
.chl-av { width: 54px; height: 54px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #fff; border: 2px solid #f0e3c8; box-shadow: 0 4px 14px rgba(168,105,15,.12); }
.chl-av img { width: 100%; height: 100%; object-fit: cover; } .chl-av i { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font: 800 16px/1 var(--font); font-style: normal; }
.chl small { display: block; font-size: 13px; color: #8a6a2f; font-weight: 600; } .chl h2 { margin: 0; font-size: 22px; font-weight: 800; color: #1d1a16; } .chl p { margin: 2px 0 0; font-size: 12.5px; color: #667085; }

/* «مطلوب منكم»: بطاقة داكنة في الوضعين */
.cact { border-radius: 22px; padding: 18px 18px 8px; background: rgba(29, 26, 22, .98); color: #f4ede1; box-shadow: 0 14px 34px rgba(29,26,22,.22); border: 1px solid rgba(232, 196, 120, .35); }

/* تقدّم الشهر حسب النوع */
.mp { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 20px; background: #fff; border: 1px solid #eceef3; box-shadow: 0 1px 3px rgba(16,24,40,.04); }
.mp-ring { --p: 0; width: 96px; height: 96px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, #fff 78%, transparent 79%), conic-gradient(#12a46b calc(var(--p) * 1%), #eef0f4 0); }
.mp-ring b { font-size: 22px; font-weight: 800; color: #1d1a16; line-height: 1.1; } .mp-ring span { font-size: 11.5px; color: #667085; }
.mp-tx { flex: 1; min-width: 0; } .mp-tx h3 { margin: 0; font-size: 16px; font-weight: 800; } .mp-tx > p { margin: 2px 0 10px; font-size: 12.5px; color: #667085; }
.mp-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px 14px; }
.mp-t { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: baseline; }
.mp-t span { font-size: 12.5px; color: #475467; font-weight: 600; } .mp-t b { font-size: 13px; font-weight: 800; color: #1d1a16; }
.mp-bar { grid-column: 1 / -1; display: flex; height: 6px; border-radius: 6px; background: #eef0f4; overflow: hidden; }
.mp-bar s { display: block; height: 100%; } .mp-bar .ok { background: #12a46b; } .mp-bar .wait { background: #f0b445; } .mp-bar .bad { background: #f04438; }
.mp-key { display: flex; gap: 12px; margin-top: 10px; font-size: 11.5px; color: #667085; }
.mp-key span::before, .pgp-key span::before { content: none; }
.mp-key span { display: inline-flex; align-items: center; gap: 5px; } .mp-key span::after { content: ''; order: -1; width: 8px; height: 8px; border-radius: 50%; background: #12a46b; }
.mp-key .wait::after { background: #f0b445; } .mp-key .bad::after { background: #f04438; }

/* القادم على صفحتكم */
.up-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.up-h h3 { margin: 0; font-size: 16px; font-weight: 800; color: #12131a; } .up-h a { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: #a8690f; }
.up-chev { width: 15px; height: 15px; } [dir=rtl] .up-chev { transform: scaleX(-1); }
.up-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.up-row::-webkit-scrollbar { display: none; }
.up-c { flex: none; width: 128px; scroll-snap-align: start; color: inherit; text-decoration: none !important; }
.up-th { display: grid; place-items: center; width: 128px; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, var(--c) 18%, #fff); border: 1px solid #eceef3; }
.up-th img { width: 100%; height: 100%; object-fit: cover; } .up-th b { font: 800 15px/1 var(--mono); color: var(--c); letter-spacing: .5px; }
.up-c small { display: block; margin-top: 6px; font-size: 11.5px; color: #8a6a2f; font-weight: 700; } .up-c > b { display: block; font-size: 13px; line-height: 1.4; color: #1d2939; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-meet .mt-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* الأعمال: دوائر القصص + بطاقة المراجعة */

/* معاينة شكل الصفحة (Grid) */
.pgp { max-width: 560px; margin: 0 auto; }
.pgp-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .pgp-h b { display: block; font-size: 16px; } .pgp-h small { font-size: 12.5px; color: #667085; }
.pgp-m { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.pgp-m button { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid #eaecf0; background: #fff; font: 600 12.5px/1 var(--font); color: #475467; cursor: pointer; }
.pgp-m button.on { background: #1d1a16; border-color: #1d1a16; color: #fff; }
.pgp-key { display: flex; justify-content: center; gap: 14px; margin-top: 12px; font-size: 12px; color: #667085; }
.pgp-key span { display: inline-flex; align-items: center; gap: 4px; } .pgp-key svg { width: 14px; height: 14px; }
.pgp-key .ok svg { color: #12a46b; } .pgp-key .wait svg { color: #d98a0b; } .pgp-key .bad svg { color: #d92d20; }
.cp-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; border-radius: 6px; overflow: hidden; direction: ltr; }
.cp-g { position: relative; aspect-ratio: 4 / 5; border: 0; padding: 0; background: #eef0f4; cursor: pointer; overflow: hidden; }
.cp-g img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-g-v { display: grid; place-items: center; width: 100%; height: 100%; color: #6b6f80; } .cp-g-v svg { width: 26px; height: 26px; }
.cp-g-multi { position: absolute; top: 6px; right: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); } .cp-g-multi svg { width: 16px; height: 16px; }
.cp-g-st { position: absolute; bottom: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #12a46b; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.cp-g-st svg { width: 13px; height: 13px; stroke-width: 2.6; } .cp-g-st.wait { background: #e3920f; } .cp-g-st.bad { background: #d92d20; }
.cp-g.mark { outline: 3px solid #e9b860; outline-offset: -3px; }
.cp-g.mark::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 999px rgba(233,184,96,.0); }

/* ── طابور المراجعة بملء الشاشة ── */
@keyframes rqIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cq-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 8px; background: #fff; }
.cq-x { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid #eceef3; background: #fff; display: grid; place-items: center; cursor: pointer; color: #344054; }
.cq-x svg { width: 19px; height: 19px; } [dir=ltr] .cq-x svg { transform: scaleX(-1); }
.cq-tt { flex: 1; min-width: 0; } .cq-tt b { display: block; font-size: 16px; font-weight: 800; } .cq-tt small { display: block; font-size: 12.5px; color: #667085; }
@keyframes rqCard { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.cq-av { width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #fdf3e3; color: #a8690f; font: 800 12px/1 var(--font); border: 2px solid #f0e3c8; }
.cq-av img { width: 100%; height: 100%; object-fit: cover; } .cq-av.lg { width: 64px; height: 64px; font-size: 18px; }
.cq-cnt { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(16, 16, 20, .62); color: #fff; font: 700 11.5px/1.4 var(--font); font-style: normal; }
.cq-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.cq-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 2px rgba(0,0,0,.3); } .cq-dots i.on { background: #fff; width: 16px; border-radius: 4px; }
.cq-zoomhint { position: absolute; bottom: 10px; inset-inline-start: 10px; display: none; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(16, 16, 20, .62); color: #fff; font-size: 11px; }
.cq-zoomhint svg { width: 12px; height: 12px; }
.cq-o-l { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(16,16,20,.7); color: #fff; font: 800 14px/1 var(--font); z-index: 1; }
.cq-o-ck { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: none; place-items: center; background: #12a46b; color: #fff; z-index: 1; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.cq-o-ck svg { width: 17px; height: 17px; stroke-width: 2.8; }

/* ── عارض الستوري / الريلز ── */
.sv { position: fixed; inset: 0; z-index: 270; display: flex; flex-direction: column; background: rgba(8, 8, 10, .985); color: #fff; outline: none; animation: rqIn .2s ease; }
.sv-bars { display: flex; gap: 4px; padding: calc(10px + env(safe-area-inset-top)) 12px 6px; }
.sv-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.sv-bars i.seen { background: rgba(255, 255, 255, .85); } .sv-bars i.cur { background: #fff; } .sv-bars i.wait:not(.seen):not(.cur) { background: rgba(240, 196, 109, .6); }
.sv-h { display: flex; align-items: center; gap: 10px; padding: 4px 12px 8px; }
.sv-h > div { flex: 1; min-width: 0; } .sv-h b { display: block; font-size: 14px; } .sv-h small { display: block; font-size: 12px; color: rgba(255, 255, 255, .7); }
.sv-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; } .sv-x svg { width: 20px; height: 20px; }
.sv-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; padding: 0 8px; }
.sv-stage img, .sv-stage video { max-width: 100%; max-height: 100%; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 14px; background: #000; }
.sv-stage.zoomed { touch-action: none; }
.sv-tap { position: absolute; top: 90px; bottom: 170px; width: 22%; border: 0; background: transparent; cursor: pointer; z-index: 2; }
.sv-tap.prev { inset-inline-start: 0; } .sv-tap.next { inset-inline-end: 0; }
.sv-f { padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); }
.sv-st { display: flex; align-items: center; gap: 10px; justify-content: center; direction: ltr; text-align: left; font-size: 13px; }
.sv-st svg { width: 22px; height: 22px; flex: none; } .sv-st b { display: block; font-size: 14.5px; } .sv-st small { display: block; color: rgba(255,255,255,.7); font-size: 12px; }
.sv-st.ok { color: #4ade80; } .sv-st.bad { color: #fca5a5; flex-wrap: wrap; }

/* ── ورقة «Not approved» (من الأسفل على الهاتف) ── */

/* ── «تراجع» لمدة 5 ثوانٍ ── */
.cp-undo { position: fixed; z-index: 450; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px; background: rgba(24, 24, 27, .96); color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.25); overflow: hidden; animation: undoIn .22s ease; }
.cp-undo.out { opacity: 0; transform: translate(-50%, 10px); transition: all .2s; }
@keyframes undoIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cp-undo-ic svg { width: 20px; height: 20px; color: #4ade80; display: block; }
.cp-undo b { flex: 1; font-size: 13.5px; font-weight: 600; }
.cp-undo button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: rgba(255,255,255,.14); color: #f0c46d; font: 800 13.5px/1 var(--font); cursor: pointer; }
.cp-undo button svg { width: 16px; height: 16px; }
.cp-undo-t { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #f0c46d; transform-origin: left; animation: undoT 5s linear forwards; }
@keyframes undoT { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (min-width: 761px) { .cp-undo { bottom: 28px; } }

/* ── الدفعات: المستحق الآن وطرق الدفع وكشف الحساب ── */
.pay-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cp-app .cp-page > .pay-top h2 { display: block; margin: 0; font-size: 20px; }
@media (min-width: 761px) { .cp-app .cp-page > .pay-top h2 { visibility: hidden; } }
.due { border-radius: 22px; padding: 18px; background: linear-gradient(135deg, #fffaf0, #fdf1da); border: 1px solid #f1d9a8; }
.due.late { background: linear-gradient(135deg, #fff6f5, #fde8e6); border-color: #fbc7c2; }
.due > small { font-size: 12.5px; font-weight: 700; color: #8a6a2f; } .due.late > small { color: #b42318; }
.due-amt { font-size: 32px; font-weight: 800; color: #1d1a16; line-height: 1.2; margin: 2px 0; } .due-amt small { font-size: 15px; font-weight: 700; color: #667085; }
.due > p { margin: 0; font-size: 13px; color: #475467; }
.due-ms { display: grid; gap: 8px; margin-top: 14px; } .due-ms > small { font-size: 12px; font-weight: 700; color: #667085; }
.due-m { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.85); border: 1px solid #f0e3c8; }
.due-m b { font-size: 14px; word-break: break-all; } .due-m .grow { flex: 1; min-width: 0; } .due-m .grow small { display: block; font-size: 12px; color: #667085; }
.due-m > b { flex: 1; min-width: 0; }
.due-mk { flex: none; min-width: 48px; height: 28px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; background: #1d1a16; color: #f0c46d; font: 800 11.5px/1 var(--font); }
.due-mk svg { width: 15px; height: 15px; }
.due-copy { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid #eaecf0; background: #fff; color: #475467; font: 600 12px/1 var(--font); cursor: pointer; }
.due-copy svg { width: 14px; height: 14px; }
.due-sent { width: 100%; justify-content: center; margin-top: 14px; height: 48px; border-radius: 14px; }
.stmt { width: min(900px, 100%); background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.stmt-h { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid #eceef3; }
.stmt-h img { height: 30px; } .stmt-h b { display: block; font-size: 18px; text-align: end; } .stmt-h small { display: block; font-size: 12.5px; color: #667085; text-align: end; }
.stmt-k { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 14px 0; }
.stmt-k .stat { padding: 10px 12px; border-radius: 12px; background: #f9fafb; border: 1px solid #eceef3; } .stmt-k span { display: block; font-size: 12px; color: #667085; } .stmt-k b { font-size: 16px; }
.stmt .card { box-shadow: none; border: 1px solid #eceef3; } .stmt .card-head { padding: 12px 14px; } .stmt .card-head h3 { font-size: 15px; }
.stmt-tw { overflow-x: auto; } .stmt .table { min-width: 560px; } .stmt .table td, .stmt .table th { white-space: nowrap; font-size: 13px; }
.pdfv-bar .btn { margin-inline-start: auto; }

/* ── جدول أعمال التقويم ── */
.ag-f { display: flex; gap: 6px; overflow-x: auto; margin: 4px 0 12px; scrollbar-width: none; }
.ag-f button { flex: none; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #eaecf0; background: #fff; font: 600 12.5px/1 var(--font); color: #475467; cursor: pointer; }
.ag-f button em { font-style: normal; color: #6b6f80; margin-inline-start: 2px; } .ag-f button.on { background: #1d1a16; color: #fff; border-color: #1d1a16; } .ag-f button.on em { color: #e9c98f; }
.ag { display: grid; gap: 14px; }
.ag-day { display: grid; grid-template-columns: 54px 1fr; gap: 10px; }
.ag-day.past { opacity: .62; }
.ag-dh { display: grid; justify-items: center; align-content: start; gap: 0; padding-top: 4px; }
.ag-dh b { font-size: 22px; font-weight: 800; line-height: 1.1; color: #1d1a16; } .ag-dh span { font-size: 11.5px; color: #667085; }
.ag-dh em { font-style: normal; font-size: 10.5px; font-weight: 800; color: #fff; background: #c08a2b; padding: 1px 8px; border-radius: 999px; margin-top: 3px; }
.ag-day.today .ag-dh b { color: #a8690f; }
.ag-items { display: grid; gap: 8px; }
.ag-it { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid #eceef3; background: #fff; text-align: start; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.ag-th { width: 52px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, #fff); }
.ag-th img { width: 100%; height: 100%; object-fit: cover; } .ag-th b { font: 800 11px/1 var(--mono); color: var(--c); }
.ag-tx { flex: 1; min-width: 0; } .ag-tx b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ag-tx small { display: block; font-size: 12px; color: #667085; }
.ag-tx .ag-n { color: #8a6a2f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-pill { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #f2f4f7; color: #475467; }
.ag-pill.pub { background: #ecfdf3; color: #067647; } .ag-pill.sch { background: #eff8ff; color: #175cd3; } .ag-pill.ok { background: #f0fdf4; color: #15803d; box-shadow: inset 0 0 0 1px #bbf7d0; }
.ag-pill.wait { background: #fffaeb; color: #b54708; box-shadow: inset 0 0 0 1px #fedf89; } .ag-pill.bad { background: #fef3f2; color: #b42318; }

/* ── الإشعارات والإعدادات ── */
.cp-note { width: 100%; text-align: start; font: inherit; color: inherit; cursor: pointer; flex-wrap: nowrap !important; }
.cp-note-go { color: #6b6f80; flex: none; } .cp-note-go svg { width: 18px; height: 18px; } [dir=rtl] .cp-note-go svg { transform: scaleX(-1); }
.cp-acct { display: grid; gap: 10px; }
.cp-acct-who { display: flex; align-items: center; gap: 10px; } .cp-acct-who b { display: block; } .cp-acct-who small { display: block; font-size: 12.5px; color: #667085; }
.cp-acct .btn { justify-content: center; }
.cp-acct [data-out] { color: #b42318; border-color: #fecdca; }

/* ── العارض: التكبير داخل صفحات PDF والصور ── */
.pdfv-in { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pdfv-pages.zoomed { align-items: flex-start; }
.pdfv-pages, .cp-imgview { touch-action: pan-x pan-y; }
.cp-imgview { overflow: hidden; }
.cp-imgview.zoomed { touch-action: none; }
.ab-lb-stage.zoomed { cursor: grab; } /* U3: الأسهم تبقى ظاهرة أثناء التكبير (كان إخفاؤها يجعل النقرة التالية تقع على الخلفية فتُغلق التصميم) */
/* أزرار القرار في متناول الإبهام: تبقى ظاهرة أسفل الشاشة أثناء تمرير التصميم */
/* ═════════ التنقّل الموحّد: قائمة مختصرة بأقسام تُطوى، مثبّتة، طي إلى أيقونات، مركز العمل، ⌘K، «المزيد» ═════════ */
kbd, .tb-quick kbd { font: 600 10.5px/17px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); background: #fff; direction: ltr; white-space: nowrap; }
/* العناصر المثبّتة في الأعلى بلا عنوان، وفاصل رفيع قبل أول قسم */
/* الطي إلى أيقونات (الحاسوب فقط) */
@media (min-width: 961px) {
  .shell.rail { --rail-w: 76px; }
  .shell.rail .sidebar { width: var(--rail-w) !important; overflow: hidden; }
  .shell.rail .sidebar > * { zoom: 1 !important; }
  .shell.rail .main { margin-inline-start: var(--rail-w) !important; }
  .shell.rail .sidebar .brand { padding: 14px 8px !important; min-height: 64px; justify-content: center; }
  .shell.rail .brand-wordmark { height: 26px !important; max-width: 56px; object-fit: cover; object-position: right; }
  [dir=ltr] .shell.rail .brand-wordmark { object-position: left; }
   .shell.rail .nav a .ndot { display: none !important; }
}
/* زر البحث في الشريط العلوي */
.tb-quick { display: inline-flex; align-items: center; gap: 8px; height: 38px; width: 240px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--faint); font: 500 13px var(--font); cursor: pointer; margin-inline-end: 8px; }
.tb-quick:hover { border-color: var(--brand-200); color: var(--muted); }
.tb-quick svg { width: 16px; height: 16px; flex-shrink: 0; }
.tb-quick span { flex: 1; text-align: start; }
@media (max-width: 1100px) { .tb-quick { width: auto; } .tb-quick span, .tb-quick kbd { display: none; } }
@media (max-width: 760px) { .tb-quick { width: 40px; height: 40px; border-radius: 12px; justify-content: center; padding: 0; margin: 0; color: var(--ink-2); } .tb-quick svg { width: 18px; height: 18px; } }
.tb-end { display: flex; align-items: center; gap: 8px; }
/* تبويبات القسم (مركز العمل وغيره) */
.hub-slot:empty { display: none; }
.hub-slot { position: sticky; top: var(--topbar-h); z-index: 29; }
.hub-head { display: flex; align-items: center; gap: 16px; padding: 0 28px; background: #fff; border-bottom: 1px solid var(--line); }
.hub-t { display: none; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.hub-t svg { width: 17px; height: 17px; color: var(--brand-600); }
.hub-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: 1480px; width: 100%; margin: 0 auto; }
.hub-tabs::-webkit-scrollbar { display: none; }
.hub-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 12px 14px 10px; font-weight: 600; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; position: relative; }
.hub-tabs a svg { width: 16px; height: 16px; }
.hub-tabs a:hover { color: var(--ink); }
.hub-tabs a.on { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.hub-tabs a.on svg { color: var(--brand-600); }
.hub-tabs .count { background: var(--warn-bg); color: var(--warn); border: 1px solid #f5dfa6; font: 700 10.5px/17px var(--mono); border-radius: 99px; padding: 0 6px; min-width: 19px; text-align: center; }
.hub-tabs .count.g { background: var(--gray-bg); color: var(--muted); border-color: var(--line); }
.hub-tabs .ndot { font-style: normal; background: var(--bad); color: #fff; font: 700 10px/16px var(--mono); border-radius: 99px; padding: 0 5px; }
@media (max-width: 760px) {
  .hub-slot { position: static; }
  .hub-head { padding: 10px 14px 0; background: transparent; border: 0; }
  .hub-tabs { gap: 6px; padding-bottom: 2px; }
  .hub-tabs a { padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: 13px; margin: 0; }
  .hub-tabs a.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
  .hub-tabs a.on svg { color: #fff; }
  .hub-tabs a.on .count { background: rgba(255,255,255,.22); color: #fff; border-color: transparent; }
  .hub-slot + .content { padding-top: 10px; }
}
/* «المزيد» كورقة سفلية */
.tb-pick { display: grid; gap: 6px; }
.tb-pick label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; }
.tb-pick label:has(input:checked) { border-color: var(--brand-300); background: var(--brand-50); }
.tb-pick svg { width: 18px; height: 18px; color: var(--brand-600); }
/* البحث السريع ⌘K */
.qs-root { position: fixed; inset: 0; z-index: 600; background: rgba(18,19,26,.34); backdrop-filter: blur(2px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.qs { width: min(620px, 100%); background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; animation: pageIn .16s ease-out; }
.qs-in { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.qs-in > svg { width: 20px; height: 20px; color: var(--brand-600); flex-shrink: 0; }
.qs-in input { flex: 1; border: 0; outline: 0; font-size: 16px; background: transparent; min-width: 0; }
.qs-in input::-webkit-search-cancel-button { display: none; }
.qs-esc { font: 600 10.5px/17px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; color: var(--muted); background: #fff; cursor: pointer; }
.qs-list { overflow-y: auto; padding-bottom: 6px; }
.qs-h { font-size: 11px; color: var(--faint); font-weight: 700; padding: 10px 16px 3px; }
.qs-r { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 16px; font: 500 13.5px var(--font); color: var(--ink); background: none; border: 0; text-align: start; cursor: pointer; }
.qs-r > svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.qs-r .qs-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-r small { color: var(--muted); font-size: 12px; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.qs-r.on { background: var(--brand-50); box-shadow: inset -3px 0 0 var(--brand-600); }
[dir=ltr] .qs-r.on { box-shadow: inset 3px 0 0 var(--brand-600); }
.qs-r mark { background: var(--brand-100); color: inherit; border-radius: 3px; padding: 0 1px; }
.qs-lg { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font: 700 9px var(--mono); flex-shrink: 0; }
.qs-empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.qs-ft { display: flex; gap: 14px; padding: 9px 16px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
@media (max-width: 760px) { .qs-root { padding: calc(env(safe-area-inset-top) + 10px) 10px 10px; } .qs { max-height: calc(100vh - 40px); border-radius: 16px; } .qs-ft { display: none; } .qs-r { padding: 11px 14px; font-size: 14.5px; } }
/* تخصيص القائمة */
.mz-t td { vertical-align: middle; }
.mz-t tr.off td:not(:last-child):not(:nth-last-child(2)) { opacity: .42; }
.mz-t tr.drag { opacity: .5; }
.mz-t tr[draggable=true] { cursor: grab; }

/* ═════════ «قائمتي» ═════════ */
.td-page { display: flex; flex-direction: column; gap: 12px; }
.bad-text { color: var(--bad) !important; } .warn-text { color: var(--warn) !important; }
.td-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 0 8px; border-radius: 99px; background: var(--gray-bg); color: var(--ink-2); white-space: nowrap; line-height: 22px; border: 0; font-family: var(--font); }
.td-pill svg { width: 12px; height: 12px; }
.td-pill.bad { background: var(--bad-bg); color: var(--bad); } .td-pill.warn { background: var(--warn-bg); color: var(--warn); } .td-pill.info { background: #eef0ff; color: #4338ca; cursor: pointer; }
.td-lgx.avatar { width: 16px; height: 16px; border-radius: 5px; font-size: 7.5px; letter-spacing: 0; }
.td-co { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.td-lk { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 6px; background: #eef0ff; color: #4338ca; font-weight: 600; line-height: 20px; font-size: 11px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.td-lk svg { width: 11px; height: 11px; flex-shrink: 0; }
.td-meta { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.td-meta svg { width: 12px; height: 12px; }
.td-bar { display: block; height: 6px; border-radius: 9px; background: var(--line-2); overflow: hidden; flex: 1; min-width: 40px; }
.td-bar > i { display: block; height: 100%; background: linear-gradient(135deg, #d6a04a, #b47515 45%, #8a560c); border-radius: 9px; transition: width .3s; }
.td-bar.g > i { background: var(--ok); }
.td-ring { position: relative; display: grid; place-items: center; flex-shrink: 0; }
.td-ring svg { position: absolute; inset: 0; }
.td-ring b { position: relative; font: 700 15px var(--mono); direction: ltr; }
.td-ring b small { font-size: 10px; color: var(--muted); }
/* الدائرة الذهبية للإنجاز */
.td-ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--brand-300); flex-shrink: 0; display: grid; place-items: center; cursor: pointer; background: #fff; transition: background .15s, border-color .15s, transform .12s; padding: 0; margin-top: 1px; }
.td-ck:hover { background: var(--brand-50); }
.td-ck:active { transform: scale(.9); }
.td-ck.on { background: var(--brand-600); border-color: var(--brand-600); }
.td-ck.on::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: translateY(-1px) rotate(45deg); }
/* تركيز اليوم */
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); animation: tdPulse 1.6s infinite; flex-shrink: 0; }
@keyframes tdPulse { 50% { box-shadow: 0 0 0 5px rgba(214,59,59,.08); } }
.fn-t { display: block; font: 700 15.5px/1.4 var(--font); color: var(--ink); background: none; border: 0; padding: 0; text-align: start; cursor: pointer; }
.fn-t:hover { color: var(--brand-700); }
/* الإضافة السريعة */
/* المجموعات والبنود */
.td-gh { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font: 700 13px var(--font); cursor: pointer; background: none; border: 0; color: var(--ink); width: 100%; text-align: start; }
.td-gh .cv { width: 13px; height: 13px; color: var(--faint); transition: transform .2s; }
.td-gh .c { font: 700 11px/18px var(--mono); background: var(--gray-bg); color: var(--muted); border-radius: 99px; padding: 0 7px; }
.td-gh.bad { color: var(--bad); } .td-gh.bad .c { background: var(--bad-bg); color: var(--bad); }
.td-gh small { font-weight: 500; color: var(--muted); }
 .td-col.over, .td-tl2.over { background: var(--brand-50); outline: 2px dashed var(--brand-300); outline-offset: 2px; }
.td-empty { color: var(--faint); font-size: 12.5px; padding: 8px 6px; margin: 0; }
.td-it { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; position: relative; transition: border-color .15s, box-shadow .15s; }
.td-it:hover { border-color: #d9dbe5; }
.td-it.hi::before, .td-it.md::before, .td-card.hi::before, .td-card.md::before { content: ''; position: absolute; top: 10px; bottom: 10px; inset-inline-start: -1px; width: 3px; border-radius: 3px; background: var(--bad); }
.td-it.md::before, .td-card.md::before { background: var(--warn); }
.td-it.sel { border-color: var(--brand-300); box-shadow: 0 0 0 3px rgba(192,125,28,.12); }
.td-it.now { background: linear-gradient(90deg, #fff, #fff9ef); }
[dir=rtl] .td-it.now { background: linear-gradient(270deg, #fff, #fff9ef); }
.td-it.done { background: #fcfcfd; }
.td-it.done .td-tl { text-decoration: line-through; color: var(--faint); }
.td-it.drag, .td-card.drag, .td-blk.drag { opacity: .45; }
.td-it[draggable=true] { cursor: grab; }
.td-bo { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: start; cursor: pointer; font-family: var(--font); color: inherit; }
.td-tl { font-weight: 600; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.td-now { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 6px; font-size: 11px; font-weight: 700; color: var(--brand-700); background: var(--brand-50); border-radius: 99px; padding: 0 7px; line-height: 19px; vertical-align: 1px; }
.td-now i { width: 6px; height: 6px; border-radius: 50%; background: var(--bad); }
.td-mt { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 3px; font-size: 11.5px; color: var(--muted); align-items: center; }
.td-mt:empty { display: none; }
.td-it.sm { padding: 7px 10px; }
.td-it.sm .td-ck { width: 18px; height: 18px; }
.td-it.sm .td-ck.on::after { width: 4px; height: 8px; }
/* لوحة التفاصيل */
.seg.sm button { padding: 3px 9px; font-size: 12px; }
/* اللوحة */
.td-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.td-col { background: #eceef3; border-radius: 14px; padding: 10px; min-height: 160px; transition: background .15s; }
.td-col h5 { font-size: 12.5px; margin: 0 0 8px; display: flex; gap: 6px; align-items: center; }
.td-col h5 .c { font: 700 11px/18px var(--mono); background: #fff; border-radius: 99px; padding: 0 7px; color: var(--muted); }
.td-card { background: #fff; border-radius: 11px; padding: 9px 10px; margin-bottom: 7px; box-shadow: var(--shadow-sm); position: relative; }
.td-card[draggable=true] { cursor: grab; }
.td-card.now { box-shadow: 0 0 0 2px var(--brand-300); }
.td-card.done .tc-t { color: var(--faint); text-decoration: line-through; }
.tc-t { display: block; font: 600 12.5px/1.45 var(--font); color: var(--ink); background: none; border: 0; padding: 0; text-align: start; cursor: pointer; width: 100%; }
.tc-m { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 11px; color: var(--muted); align-items: center; }
.tc-m:empty { display: none; }
/* الأسبوع */
.td-week { display: flex; flex-direction: column; gap: 12px; }
.td-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.td-wd { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font: 500 12px var(--font); text-align: start; cursor: pointer; display: flex; flex-direction: column; gap: 1px; color: var(--ink-2); }
.td-wd b { font-size: 17px; color: var(--ink); }
.td-wd span { color: var(--muted); font-size: 11.5px; }
.td-wd .td-bar { margin-top: 5px; height: 4px; min-width: 0; }
.td-wd.on { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(192,125,28,.12); background: var(--brand-50); }
.td-wd.off { background: repeating-linear-gradient(-45deg, #fafafb, #fafafb 6px, #f2f3f6 6px, #f2f3f6 12px); color: var(--faint); }
.td-wgrid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
.td-uns { padding: 10px; }
.td-uns .td-gh { cursor: default; }
.td-uns .td-gh svg { width: 15px; height: 15px; color: var(--muted); }
.td-tl2 { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-top: 2px; }
.td-tl2 .hr { position: absolute; inset-inline: 0; height: 44px; border-top: 1px dashed var(--line-2); font-size: 11px; color: var(--faint); padding: 2px 10px 0; }
.td-tl2 .hr:first-child { border-top: 0; }
.td-blk { position: absolute; inset-inline-start: 70px; inset-inline-end: 12px; border-radius: 9px; padding: 3px 10px; font: 600 12px/1.35 var(--font); text-align: start; border: 0; border-inline-start: 3px solid var(--brand-500); background: var(--brand-50); color: var(--ink); cursor: pointer; overflow: hidden; z-index: 1; }
.td-blk.half { inset-inline-start: calc(50% + 35px); } .td-blk.h1 { inset-inline-end: calc(50% - 31px); }
.td-blk small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-blk b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.td-blk.done { opacity: .6; }
.nowl { position: absolute; inset-inline: 62px 6px; height: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.nowl::before { content: ''; position: absolute; inset-inline-start: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
/* شريط «تراجع» */
.td-undo { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; border-radius: 12px; padding: 9px 10px 9px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); z-index: 650; opacity: 0; transition: opacity .2s, transform .2s; max-width: calc(100vw - 24px); }
.td-undo.on { opacity: 1; transform: translate(-50%, 0); }
.td-undo svg { width: 17px; height: 17px; color: #7ee2b0; flex-shrink: 0; }
.td-undo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-undo b { font-weight: 600; }
.td-undo button { border: 0; background: rgba(255,255,255,.1); color: #f0d09b; font: 700 13px var(--font); border-radius: 8px; padding: 4px 12px; cursor: pointer; flex-shrink: 0; }
.td-undo button:hover { background: rgba(255,255,255,.18); }
@media (max-width: 1000px) { .td-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .td-wgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .pfc-t { display: block; font: 700 14px/1.35 var(--font); color: var(--ink); background: none; border: 0; padding: 0; text-align: start; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
  .td-page { padding-bottom: 64px; }
  .td-it { border-radius: 14px; padding: 11px 12px; }
  .td-ck { width: 24px; height: 24px; }
  .td-board { grid-template-columns: minmax(0, 1fr); }
  .td-wk { grid-template-columns: repeat(7, minmax(64px, 1fr)); overflow-x: auto; scrollbar-width: none; }
  .td-wd { padding: 7px 8px; }
  .td-wd span:not(.td-bar) { font-size: 10.5px; }
  .td-undo { bottom: calc(150px + env(safe-area-inset-bottom)); }
}
@keyframes tdUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ═════════ ودجت «عملي» ═════════ */
.mw-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.mw-card { overflow: hidden; }
.mw-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.mw-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-inline-end: 6px; }
.mw-head h3 .hic, .mw-side h3 .hic { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); color: var(--brand-600); display: grid; place-items: center; }
.mw-head h3 .hic svg, .mw-side h3 .hic svg { width: 16px; height: 16px; }
.mw-head .seg button .num { font-size: 11px; opacity: .8; }
.mw-key { display: flex; gap: 6px; align-items: center; }
.mw-ty { font-size: 10.5px; font-weight: 700; padding: 0 7px; border-radius: 6px; line-height: 19px; white-space: nowrap; flex-shrink: 0; display: inline-block; }
.mw-ty.tk { background: #eef0ff; color: #4338ca; box-shadow: inset 0 0 0 1px #dfe2ff; }
.mw-ty.td { background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-100); }
.mw-g { padding: 7px 16px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--ink-2); border-top: 1px solid var(--line-2); }
.mw-g:first-child { border-top: 0; }
.mw-g small { color: var(--muted); font-weight: 500; }
.mw-g.bad { color: var(--bad); background: #fffafa; }
.mw-g.off { color: var(--faint); font-weight: 500; }
.mw-r { display: grid; grid-template-columns: 30px minmax(0, 1fr) 104px 92px; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-2); color: inherit; text-decoration: none !important; position: relative; }
.mw-r:hover { background: #fcfcfd; }
.mw-r.tk { box-shadow: inset -3px 0 0 #dfe2ff; } .mw-r.td { box-shadow: inset -3px 0 0 var(--brand-200); }
[dir=ltr] .mw-r.tk { box-shadow: inset 3px 0 0 #dfe2ff; } [dir=ltr] .mw-r.td { box-shadow: inset 3px 0 0 var(--brand-200); }
.mw-lg.avatar { width: 30px; height: 30px; border-radius: 8px; font-size: 10.5px; }
.mw-lg.avatar svg { width: 15px; height: 15px; }
.mw-ck { margin: 0 4px; }
.mw-b { min-width: 0; color: inherit; text-decoration: none !important; display: block; }
.mw-t { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; min-width: 0; color: var(--ink); }
.mw-t > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-r.done .mw-t > span:last-child { text-decoration: line-through; color: var(--faint); }
.mw-s { font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.mw-s > span + span:not(.td-lk):not(.td-co):not(.td-meta)::before { content: '·'; margin-inline-end: 8px; }
.mw-its { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.mw-ic { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 11.5px; font-weight: 600; line-height: 21px; background: #fff; white-space: nowrap; color: var(--ink-2); }
.mw-ic::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.mw-ic.ok::before { background: var(--ok); } .mw-ic.warn::before { background: var(--warn); } .mw-ic.bad::before { background: var(--bad); } .mw-ic.info::before { background: var(--info); }
.mw-ic.more::before { display: none; }
.mw-ic small { color: var(--muted); font-weight: 500; }
.mw-cb { max-width: 140px; margin-top: 6px; height: 5px; }
.mw-tm { font-size: 12px; color: var(--ink-2); text-align: center; line-height: 1.3; }
.mw-tm small { display: block; color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-tm.bad { color: var(--bad); font-weight: 600; }
.mw-st { justify-self: end; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; padding: 0 9px; border-radius: 99px; background: var(--gray-bg); color: var(--ink-2); white-space: nowrap; line-height: 22px; }
.mw-st.ok { background: var(--ok-bg); color: var(--ok); } .mw-st.warn { background: var(--warn-bg); color: var(--warn); } .mw-st.bad { background: var(--bad-bg); color: var(--bad); } .mw-st.info { background: var(--info-bg); color: var(--info); }
.mw-empty { padding: 30px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mw-empty svg { width: 28px; height: 28px; color: var(--brand-500); }
.mw-empty b { color: var(--ink); }
.mw-foot { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-2); }
.mw-qa { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.mw-qa:focus-within { border-color: var(--brand-300); background: #fff; box-shadow: 0 0 0 3px rgba(192,125,28,.1); }
.mw-qa svg { width: 16px; height: 16px; color: var(--brand-600); flex-shrink: 0; }
.mw-qa input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13.5px; }
.mw-foot .btn svg { width: 15px; height: 15px; }
.mw-side { display: flex; flex-direction: column; gap: 14px; }
.mw-side .card-head h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.mw-prog { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.mw-prog > div { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.mw-prog > div > div { display: flex; gap: 6px; align-items: center; }
.mw-prog > div > div span:nth-child(2) { flex: 1; color: var(--muted); }
.mw-sum { list-style: none; margin: 0; padding: 6px 16px 10px; font-size: 13px; }
.mw-sum li { display: flex; justify-content: space-between; padding: 6px 0; }
.mw-sum li + li { border-top: 1px dashed var(--line); }
@media (max-width: 1200px) { .mw-wrap { grid-template-columns: minmax(0, 1fr); } .mw-side { display: grid; grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .mw-head { padding: 11px 12px 9px; gap: 8px; }
  .mw-head h3 { flex: 1; }
  .mw-head .seg { order: 3; }
  .mw-head [data-mwf] { flex: 1 1 100%; display: flex; } .mw-head [data-mwf] button { flex: 1; }
  .mw-head [data-mwr] { display: none; }
  .mw-key { display: none; }
  .mw-g { padding: 6px 12px; }
  .mw-r { grid-template-columns: 30px minmax(0, 1fr) auto; padding: 11px 12px; gap: 10px; align-items: start; }
  .mw-r > .mw-st { display: none; }
  .mw-t { flex-wrap: wrap; white-space: normal; }
  .mw-t > span:last-child { white-space: normal; }
  .mw-ex { display: none; }
  .mw-tm { text-align: end; font-size: 11.5px; color: var(--muted); padding-top: 2px; }
  .mw-foot { flex-direction: column; align-items: stretch; padding: 10px 12px; }
  .mw-foot kbd { display: none; }
  .mw-qa { height: 44px; }
  .mw-side { grid-template-columns: minmax(0, 1fr); }
}
/* ═════════ جدول الأسعار الموحّد: الفئات · الكتالوج والباقات · منشئ عرض السعر · وضع التحرير ═════════ */
.upr { --upr-top: calc(var(--topbar-h) + 14px); }
.upr-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.upr-ttl h2 { font-size: 22px; } .upr-ttl small { color: var(--muted); font-size: 12.5px; }
.upr-act { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.upr-srch { position: relative; } .upr-srch svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.upr-srch .input { width: 230px; padding-inline-start: 36px; height: 36px; }
.upr-seg button { white-space: nowrap; }
.upr-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; }
.upr-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upr-sw i { width: 36px; height: 21px; border-radius: 99px; background: #d6d8e1; position: relative; transition: background .2s; }
.upr-sw i::after { content: ""; position: absolute; top: 2.5px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
.upr-sw input:checked + i { background: var(--brand-600); } .upr-sw input:checked + i::after { inset-inline-start: 17px; }
.upr-sw input:focus-visible + i { box-shadow: 0 0 0 3px var(--brand-100); }
.upr-sw em { font-style: normal; font-size: 10.5px; background: var(--ink); color: #fff; border-radius: 6px; padding: 1px 6px; font-weight: 700; }
.upr-body { display: grid; grid-template-columns: 210px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.upr-cats, .upr-quote { position: sticky; top: var(--upr-top); max-height: calc(100vh - var(--topbar-h) - 28px); overflow: auto; }
.upr-cats { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.upr-cats > button { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; background: transparent; text-align: start; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.upr-cats > button b { font-weight: 600; display: block; } .upr-cats > button small { display: block; font-size: 11px; color: var(--faint); font-weight: 500; }
.upr-cats > button em { font-style: normal; font-size: 11.5px; background: var(--gray-bg); padding: 0 7px; border-radius: 99px; color: var(--muted); }
.upr-cats > button.on, .upr-cats > button:hover { background: var(--brand-50); color: var(--brand-700); }
.upr-set { margin-top: 10px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 10px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.upr-set div { display: flex; justify-content: space-between; gap: 6px; } .upr-set b { color: var(--ink); } .upr-set small { display: block; margin-top: 4px; line-height: 1.5; color: var(--faint); }
.upr-mcats { display: none; }
.upr-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.upr-chips::-webkit-scrollbar { display: none; }
.upr-chips button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.upr-chips button em { font-style: normal; font-size: 11px; color: var(--muted); }
.upr-chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; } .upr-chips button.on em { color: #c9cad3; }
.upr-main { min-width: 0; }
.upr.editing .upr-body { grid-template-columns: 210px minmax(0, 1fr); } .upr.editing .upr-quote { display: none; }
.upr-xl td:nth-child(2) { min-width: 120px; }
.upr-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--gray-bg); color: var(--ink-2); white-space: nowrap; }
.upr-tag.g { background: var(--brand-50); color: var(--brand-700); } .upr-tag.w { background: var(--warn-bg); color: var(--warn); } .upr-tag.ok { background: var(--ok-bg); color: var(--ok); } .upr-tag.i { background: var(--info-bg); color: var(--info); }
/* الباقات */
.upr-pk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 22px; box-shadow: var(--shadow-sm); scroll-margin-top: var(--upr-top); }
.upr-pk-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.upr-pk-h h3 { font-size: 15.5px; } .upr-pk-n { margin-inline-start: auto; }
.upr-pk-wrap { overflow-x: auto; padding-top: 8px; }
.upr-pkt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.upr-pkt th, .upr-pkt td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); text-align: center; }
.upr-pkt th:first-child, .upr-pkt td:first-child { text-align: start; color: var(--ink-2); }
.upr-pkt thead th { vertical-align: bottom; border-bottom: 0; padding: 18px 10px 12px; position: relative; }
.upr-pkt .feat { background: var(--brand-50); }
.upr-pkt thead .feat { border-radius: 12px 12px 0 0; } .upr-pkt tbody tr:last-child .feat { border-radius: 0 0 12px 12px; }
.upr-pn { display: block; font-size: 14px; font-weight: 800; }
.upr-pp { display: block; margin: 2px 0 8px; white-space: nowrap; } .upr-pp .num { font-size: 22px; font-weight: 800; color: var(--ink); } .upr-pp small { font-size: 12px; color: var(--muted); font-weight: 500; }
.upr-best { position: absolute; top: 0; inset-inline: 0; margin: auto; width: max-content; font-size: 10.5px; background: var(--brand-600); color: #fff; border-radius: 99px; padding: 0 8px; transform: translateY(-40%); font-weight: 700; }
.upr-pkt tr.upr-sv td { color: var(--ok); font-weight: 700; } .upr-pkt tr.tx td { color: var(--muted); font-size: 12px; }
.upr-ok { color: var(--ok); font-weight: 800; }
.upr-pkc-row { display: none; }
/* الخدمات */
.upr-cat { margin-bottom: 22px; }
.upr-cat-h { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 8px; flex-wrap: wrap; }
.upr-cat-h h3 { font-size: 15.5px; } .upr-cat-h > span { font-size: 12px; color: var(--muted); }
.upr-svc { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px 104px; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; margin-bottom: 6px; transition: border-color .15s, background .15s; }
.upr-svc:hover { border-color: var(--brand-200); }
.upr-svc.in { border-color: var(--brand-300); background: linear-gradient(90deg, #fff, var(--brand-50)); }
[dir=ltr] .upr-svc.in { background: linear-gradient(270deg, #fff, var(--brand-50)); }
.upr-svc-m b { font-size: 14px; display: block; } .upr-svc-m p { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.upr-svc-m .upr-note { color: var(--warn); } .upr-note svg { width: 12px; height: 12px; vertical-align: -2px; }
.upr-u { font-size: 12px; color: var(--muted); }
.upr-pr { text-align: end; } .upr-pr > .num { font-size: 15px; font-weight: 700; display: block; } .upr-pr small { font-size: 11px; color: var(--faint); white-space: nowrap; }
.upr-ad { display: flex; justify-content: flex-end; }
.upr-addb { border: 1px dashed var(--brand-300); background: var(--surface); color: var(--brand-700); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.upr-addb:hover { background: var(--brand-50); }
.upr-stp { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.upr-stp button { border: 0; background: transparent; width: 28px; height: 28px; font-size: 16px; line-height: 1; color: var(--brand-700); cursor: pointer; }
.upr-stp button:hover { background: var(--brand-50); } .upr-stp .num { min-width: 26px; text-align: center; font-size: 13px; font-weight: 700; }
/* عرض السعر */
.upr-quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.upr-q-grab, .upr-q-x, .upr-mbar, .upr-dim { display: none; }
.upr-q-h { padding: 14px 16px 12px; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.upr-q-h h3 { font-size: 15.5px; } .upr-q-h select { grid-column: 1 / -1; }
.upr-q-lines { padding: 4px 16px; flex: 1; overflow: auto; min-height: 90px; }
.upr-ql { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.upr-ql:last-child { border-bottom: 0; }
.upr-ql-n b { font-weight: 600; display: block; } .upr-ql-n small { color: var(--muted); font-size: 11.5px; }
.upr-ql-x { border: 0; background: none; color: var(--faint); font-size: 18px; line-height: 1; padding: 0 4px; cursor: pointer; align-self: start; }
.upr-ql-x:hover { color: var(--bad); }
.upr-ql-r { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.upr-q-empty { display: grid; justify-items: center; gap: 4px; text-align: center; color: var(--muted); font-size: 12.5px; padding: 22px 6px; }
.upr-q-empty svg { width: 28px; height: 28px; color: var(--brand-300); } .upr-q-empty b { color: var(--ink-2); font-size: 13.5px; }
.upr-q-sum { padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.upr-q-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; padding: 3px 0; }
.upr-q-row.t { font-size: 15px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.upr-q-row.t .num { font-size: 24px; color: var(--brand-700); font-weight: 800; }
.upr-q-disc { display: inline-flex; align-items: center; gap: 6px; } .upr-q-disc .seg { padding: 2px; } .upr-q-disc .seg button { padding: 2px 8px; font-size: 12px; }
.upr-bad { color: var(--bad); }
.upr-q-hint { display: flex; gap: 8px; font-size: 12px; color: var(--brand-900); background: var(--brand-50); border-radius: 9px; padding: 8px 10px; margin-top: 10px; line-height: 1.6; }
.upr-q-hint svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--brand-600); }
.upr-q-cta { display: grid; gap: 8px; margin-top: 12px; }
.upr-q-cta .btn { justify-content: center; }
.upr-q-mini { display: flex; gap: 6px; justify-content: center; }
.upr-gd { background: linear-gradient(135deg, #d6a04a 0%, #b47515 45%, #8a560c 100%); border: 0; color: #fff; box-shadow: 0 4px 14px rgba(168,105,15,.3); }
.upr-gd:hover { filter: brightness(1.05); color: #fff; }
.upr-gd:disabled { opacity: .5; box-shadow: none; }
/* وضع التحرير */
.upr-ced { display: flex; flex-direction: column; gap: 4px; }
.upr-ced > b { font-size: 12.5px; color: var(--muted); margin: 2px 4px 6px; }
.upr-ced > button { display: flex; justify-content: space-between; border: 0; background: transparent; padding: 7px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.upr-ced > button em { font-style: normal; font-size: 11px; color: var(--muted); }
.upr-cer { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 6px; align-items: center; border-radius: 9px; padding: 2px 2px 2px 0; }
.upr-cer button { border: 0; background: transparent; text-align: start; padding: 6px 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upr-ced > button.on, .upr-cer.on button { background: var(--brand-50); color: var(--brand-700); }
.upr-cer input, .upr-gset input { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; font: 600 12.5px var(--mono); text-align: center; padding: 4px 2px; width: 100%; }
.upr-cer input.chg, .upr-gset input.chg { background: #fff6d6; border-color: #f0c869; }
.upr-ced small { margin-top: 8px; font-size: 11.5px; line-height: 1.5; }
.upr-grid { min-width: 0; }
.upr-gset { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.upr-gset > b { font-size: 13.5px; }
.upr-gset label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--gray-bg); border-radius: 8px; padding: 3px 4px 3px 8px; }
.upr-gset label input { width: 58px; }
.upr-gset [data-chg] { margin-inline-start: auto; }
.upr-gtools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.upr-gpk { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-inline-start: auto; }
.upr-gpkc { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 2px 4px 2px 10px; font-size: 12.5px; }
.upr-gpkc button { border: 0; background: none; width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); cursor: pointer; border-radius: 50%; }
.upr-gpkc button:hover { background: var(--gray-bg); color: var(--ink); } .upr-gpkc svg { width: 13px; height: 13px; }
.upr-fx { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 10px; font: 12.5px var(--mono); direction: ltr; overflow: hidden; }
.upr-fx b { background: var(--gray-bg); padding: 6px 10px; border-inline-end: 1px solid var(--line); min-width: 46px; text-align: center; }
.upr-fx i { font-style: italic; color: var(--brand-600); padding: 6px 10px; border-inline-end: 1px solid var(--line); }
.upr-fx span { padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }
.upr-xl-wrap { overflow: auto; max-height: calc(100vh - var(--topbar-h) - 210px); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.upr-xl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 980px; }
.upr-xl th { background: var(--surface-2); color: var(--muted); font-weight: 700; padding: 6px 8px; border: 1px solid var(--line); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.upr-xl td { border: 1px solid var(--line-2); padding: 0; height: 32px; }
.upr-xl td.t { padding: 0 8px; color: var(--faint); text-align: center; }
.upr-xl td.c { padding: 0 8px; text-align: end; color: var(--muted); background: #fcfcfd; white-space: nowrap; }
.upr-xl td.f { padding: 0 8px; text-align: end; font-weight: 700; background: var(--brand-50); white-space: nowrap; }
.upr-xl td.w { min-width: 220px; }
.upr-xl input, .upr-xl select { width: 100%; height: 31px; border: 0; background: transparent; text-align: center; font: 12.5px var(--font); outline: none; padding: 0 6px; color: var(--ink); }
.upr-xl input[type=number] { font-family: var(--mono); min-width: 58px; }
.upr-xl td.w input, .upr-xl select { text-align: start; }
.upr-xl input:focus, .upr-xl select:focus { box-shadow: inset 0 0 0 2px var(--brand-500); background: var(--surface); }
.upr-xl tr.chg td { background: #fffbe9; } .upr-xl tr.chg td.f { background: #fff1c2; }
.upr-xl tr.off td { opacity: .55; }
.upr-xl td.a { white-space: nowrap; padding: 0 4px; }
.upr-xl td.a button { border: 0; background: none; width: 26px; height: 26px; border-radius: 6px; display: inline-grid; place-items: center; color: var(--muted); cursor: pointer; }
.upr-xl td.a button:hover { background: var(--gray-bg); color: var(--ink); } .upr-xl td.a svg { width: 14px; height: 14px; }
.upr-d { font-size: 10.5px; font-weight: 700; margin-inline-start: 4px; } .upr-d.up { color: var(--ok); } .upr-d.dn { color: var(--bad); }
.upr-gfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.upr-gfoot b { color: var(--ink); font-weight: 600; }
@media (max-width: 1180px) { .upr-body { grid-template-columns: minmax(0, 1fr) 320px; } .upr-cats { display: none; } .upr-mcats { display: block; margin-bottom: 12px; } .upr.editing .upr-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .upr-body { grid-template-columns: minmax(0, 1fr); }
  .upr-head { gap: 10px; } .upr-act { margin-inline-start: 0; width: 100%; } .upr-srch { flex: 1 1 100%; } .upr-srch .input { width: 100%; }
  .upr-pk { padding: 12px; background: transparent; border: 0; box-shadow: none; padding-inline: 0; }
  .upr-pk-wrap { display: none; } .upr-pk-n { display: none; }
  .upr-pkc-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
  .upr-pkc-row::-webkit-scrollbar { display: none; }
  .upr-pkc { flex: none; width: 240px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
  .upr-pkc.feat { background: var(--brand-50); border-color: var(--brand-200); }
  .upr-pkc-h { display: flex; justify-content: space-between; align-items: center; gap: 6px; } .upr-pkc-h b { font-size: 14.5px; }
  .upr-pkc-p .num { font-size: 22px; font-weight: 800; } .upr-pkc-p small { color: var(--muted); }
  .upr-pkc ul { margin: 0; padding-inline-start: 16px; color: var(--ink-2); line-height: 1.8; }
  .upr-save { color: var(--ok); font-weight: 700; } .upr-pkc .btn { margin-top: auto; }
  .upr-svc { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 11px 12px; border-radius: 12px; }
  .upr-u { display: none; } .upr-pr { grid-column: 2; grid-row: 1; } .upr-ad { grid-column: 1 / -1; justify-content: flex-start; }
  .upr-quote { position: fixed; inset: auto 0 0 0; top: auto; z-index: 70; max-height: 86vh; border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -10px 40px rgba(0,0,0,.18); padding-bottom: env(safe-area-inset-bottom); }
  .upr.q-open .upr-quote { transform: none; }
  .upr-q-grab { display: block; width: 40px; height: 5px; border-radius: 99px; background: #d9dae2; margin: 8px auto 0; }
  .upr-q-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: var(--gray-bg); border-radius: 50%; cursor: pointer; }
  .upr-q-x svg { width: 16px; height: 16px; }
  .upr-q-sum { border-radius: 0; }
  .upr-dim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(18,19,26,.38); }
  .upr-mbar { display: flex; position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 20; margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; gap: 10px; align-items: center; box-shadow: 0 8px 26px rgba(18,19,26,.12); }
  .upr.editing .upr-mbar { display: none; }
  .upr-mb-s { flex: 1; line-height: 1.3; } .upr-mb-s small { display: block; font-size: 11.5px; color: var(--muted); } .upr-mb-s b { font-size: 19px; color: var(--brand-700); }
  .upr-mbar .btn { padding: 10px 16px; border-radius: 12px; }
  .upr-gset [data-chg] { margin-inline-start: 0; } .upr-gpk { margin-inline-start: 0; }
  .upr-xl-wrap { max-height: 70vh; }
}
@media (min-width: 761px) and (max-width: 900px) { .upr-mbar { bottom: 12px; } }

/* ═════════ إنشاء العقد: خطوات + نموذج + معاينة حيّة ═════════ */
.ucw-head, .ucv-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ucw-ttl h2, .ucv-ttl h2 { font-size: 20px; } .ucw-ttl small, .ucv-ttl small { color: var(--muted); font-size: 12.5px; display: block; }
.ucw-head .actions, .ucv-head .actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ucw-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-inline-end: 6px; vertical-align: 1px; }
.ucw-steps { display: flex; gap: 4px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.ucw-steps::-webkit-scrollbar { display: none; }
.ucw-steps button { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: start; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--ink); }
.ucw-steps button:disabled { cursor: default; opacity: .55; }
.ucw-steps button:not(:disabled):hover { background: var(--surface-2); }
.ucw-steps i { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 12.5px var(--mono); font-style: normal; background: var(--gray-bg); color: var(--muted); }
.ucw-steps b { display: block; font-size: 13.5px; } .ucw-steps small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.ucw-steps .done i { background: var(--ok-bg); color: var(--ok); }
.ucw-steps .on { background: var(--brand-50); } .ucw-steps .on i { background: var(--brand-700); color: #fff; }
.ucw-m { display: none; }
.ucw-body { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ucw-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px 16px; min-width: 0; }
.ucw-fp { display: none; } .ucw-fp.on { display: block; animation: pageIn .18s ease-out; }
.ucw-fp > h4 { font-size: 16px; margin-bottom: 2px; } .ucw-fp > p { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.ucw-fp .form-grid { gap: 12px; } .ucw-g1 { grid-template-columns: minmax(0, 1fr) !important; }
.ucw-fp .form-grid .field:has(textarea), .ucw-fp .form-grid .it-field, .ucw-fp .form-grid .inv-src { grid-column: 1 / -1; }
.ucw-sub { font-size: 12px; font-weight: 700; color: var(--muted); margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.ucw-sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ucw-none { padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.ucw-tg { margin-bottom: 12px; } .ucw-tg h5 { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.ucw-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ucw-tpls label { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; font-size: 13px; cursor: pointer; display: block; background: var(--surface); }
.ucw-tpls label b { display: block; font-weight: 600; line-height: 1.4; } .ucw-tpls label small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.ucw-tpls label em { font-style: normal; color: var(--brand-700); font-weight: 700; }
.ucw-tpls input { position: absolute; opacity: 0; pointer-events: none; }
.ucw-tpls label:has(input:checked), .ucw-tpls label.on { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-50); }
.ucw-tpls label:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--brand-200); }
.ucw-tpls label:has(input:disabled) { cursor: default; }
.ucw-pick { margin-top: 0; } .ucw-pick h4 { font-size: 16px; }
.ucw-paste { border: 1.5px dashed var(--brand-300); background: var(--brand-50); border-radius: 12px; padding: 12px; margin-bottom: 6px; }
.ucw-paste-h { display: flex; align-items: center; gap: 8px; color: var(--brand-700); margin-bottom: 8px; } .ucw-paste-h svg { width: 16px; height: 16px; }
.ucw-paste textarea { background: var(--surface); font-size: 13px; min-height: 66px; }
.ucw-paste-a { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ucw-paste-r { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; } .ucw-paste-r .ok { color: var(--ok); font-weight: 700; } .ucw-paste-r .bad { color: var(--bad); }
.ucw-paste-r em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; } .ucw-paste-r em.y { background: var(--ok-bg); color: var(--ok); } .ucw-paste-r em.n { background: var(--gray-bg); color: var(--faint); }
.ucw-fromp { display: flex; align-items: flex-start; gap: 8px; background: var(--info-bg); color: var(--info); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; margin-bottom: 12px; line-height: 1.6; }
.ucw-fromp svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }
.ucw-split { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 14px; display: grid; gap: 10px; }
.ucw-split-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ucw-bar { display: flex; height: 9px; border-radius: 99px; overflow: hidden; gap: 2px; }
.ucw-bar span, .ucw-split-l i { background: var(--brand-500); } .ucw-bar .c2, .ucw-split-l i.c2 { background: #8a560c; }
.ucw-split-l { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.ucw-split-l i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-end: 4px; }
.ucw-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.ucw-nav [data-next] { margin-inline-start: auto; }
.ucw-chk { display: grid; gap: 8px; margin: 6px 0 14px; }
.ucw-chk > div { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; font-size: 13px; }
.ucw-chk i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--gray-bg); font-weight: 800; font-size: 12px; }
.ucw-chk .ok i { background: var(--ok-bg); color: var(--ok); } .ucw-chk .warn i { background: var(--warn-bg); color: var(--warn); } .ucw-chk .bad { border-color: #f5c2c2; } .ucw-chk .bad i { background: var(--bad-bg); color: var(--bad); }
.ucw-chk b { display: block; font-weight: 600; } .ucw-chk small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ucw-chk a { cursor: pointer; text-decoration: underline dotted; }
.ucw-txt { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.ucw-txt summary { cursor: pointer; padding: 10px 12px; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.ucw-txt summary svg { width: 15px; height: 15px; color: var(--muted); }
.ucw-txt-b { padding: 0 12px 12px; } .ucw-txt .ct-body { min-height: 300px; }
.ucw-final { display: grid; gap: 8px; } .ucw-final .btn { justify-content: center; padding: 11px 14px; }
.ucw-wa, a.ucw-wa { background: #1f9d55; border-color: #1f9d55; color: #fff; } .ucw-wa:hover { background: #188547; color: #fff; text-decoration: none; }
.field.ucw-flash .input { animation: ucwFlash 1.2s ease; }
@keyframes ucwFlash { 0%, 60% { box-shadow: 0 0 0 4px var(--brand-200); border-color: var(--brand-500); } 100% { box-shadow: none; } }
/* المعاينة */
.ucw-pv { position: sticky; top: calc(var(--topbar-h) + 14px); background: #eceae5; border-radius: var(--radius-lg); padding: 14px 18px 26px; max-height: calc(100vh - var(--topbar-h) - 28px); overflow: auto; min-width: 0; }
.ucw-pv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 auto 12px; max-width: 760px; font-size: 12.5px; color: #3a3d4a; }
.ucw-pvp { flex: 1; min-width: 100px; height: 6px; border-radius: 99px; background: #dcd9d2; overflow: hidden; } .ucw-pvp i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .3s; }
.ucw-paper { background: #fff; color: #1c1d26; max-width: 760px; margin: auto; padding: 30px 42px 38px; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 40px rgba(0,0,0,.08); font-size: 14.5px; line-height: 2; min-height: 400px; }
.ucw-lh { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--brand-500); margin-bottom: 6px; }
.ucw-lh img { height: 40px; width: auto; }
.ucw-lh-m { margin-inline-start: auto; text-align: end; font-size: 11.5px; color: var(--muted); line-height: 1.7; display: flex; flex-direction: column; }
.ucw-paper h2 { text-align: center; font-size: 20px; margin: 16px 0 10px; }
.ucw-paper h5 { font-size: 14.5px; margin: 14px 0 2px; color: var(--brand-900); } .ucw-paper h5 em { font-style: normal; color: var(--brand-600); margin-inline-end: 4px; }
.ucw-paper p { margin: 0 0 4px; } .ucw-paper ul { margin: 2px 0 6px; padding-inline-start: 20px; }
.ucw-parties { display: grid; gap: 6px; margin: 8px 0; } .ucw-parties > div { background: #faf8f3; border: 1px solid #eee7da; border-radius: 10px; padding: 6px 12px; }
.ucw-parties > div > span { display: block; font-size: 11.5px; color: #8a6a2f; font-weight: 700; } .ucw-parties > div > b { font-weight: 500; }
.ucw-v { background: var(--brand-50); border-bottom: 1.5px solid var(--brand-500); padding: 0 3px; border-radius: 3px; font-weight: 700; color: var(--brand-900); cursor: pointer; transition: background .2s; }
.ucw-v:hover { background: #ffe9a8; }
.ucw-blank { display: inline-block; min-width: 86px; background: var(--warn-bg); border: 1.5px dashed var(--warn); border-radius: 5px; padding: 0 6px; line-height: 1.6; color: var(--ink); font-size: 13px; outline: none; cursor: text; vertical-align: baseline; }
.ucw-blank:empty::before { content: attr(data-ph); color: var(--warn); }
.ucw-blank:not([contenteditable]) { cursor: pointer; }
.ucw-blank:focus, .ucw-blank.cur { background: #fff; border-style: solid; box-shadow: 0 0 0 3px var(--brand-100); }
.ucw-paper.manual .ucw-v { background: none; border: 0; font-weight: inherit; color: inherit; }
.ucw-t { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0; line-height: 1.6; }
.ucw-t th, .ucw-t td { border: 1px solid #e3e1db; padding: 5px 8px; text-align: start; vertical-align: top; } .ucw-t th { background: #faf8f3; font-weight: 700; }
.ucw-t small { display: block; color: var(--muted); font-size: 11px; }
.ucw-tot { display: grid; gap: 2px; max-width: 260px; margin-inline-start: auto; font-size: 13px; }
.ucw-tot div { display: flex; justify-content: space-between; } .ucw-tot .g { border-top: 1.5px solid var(--brand-500); padding-top: 4px; font-weight: 800; }
.ucw-desc { border: 1px solid #eee7da; border-radius: 10px; background: #fdfaf3; padding: 8px 12px; margin: 6px 0; } .ucw-desc b { font-size: 11.5px; color: #8a6a2f; display: block; }
.ucw-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 26px; font-size: 12.5px; line-height: 1.5; }
.ucw-signs.one { grid-template-columns: minmax(0, 50%); justify-content: center; }
.ucw-signs > div { position: relative; min-height: 120px; display: flex; flex-direction: column; gap: 2px; }
.ucw-signs b { font-size: 12.5px; } .ucw-signs span { color: var(--muted); } .ucw-signs em { font-style: normal; font-size: 11.5px; color: var(--warn); } .ucw-signs em.ok { color: var(--ok); }
.ucw-signs i { font-style: normal; margin-top: auto; border-top: 1px solid #ccc; padding-top: 4px; color: var(--muted); font-size: 11px; }
.ucw-sigimg { position: relative; height: 70px; } .ucw-sigimg .sg { position: relative; z-index: 2; max-height: 64px; max-width: 160px; } .ucw-sigimg .st { position: absolute; inset-inline-start: 40px; top: -10px; height: 84px; opacity: .9; mix-blend-mode: multiply; transform: rotate(-8deg); }
@media (max-width: 1100px) { .ucw-body { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); } .ucw-paper { padding: 22px 22px 28px; } }
@media (max-width: 900px) {
  .ucw-steps { display: none; }
  .ucw-m { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-bottom: 12px; }
  .ucw-m-t { font-size: 13px; color: var(--ink-2); }
  .ucw-prog { display: flex; gap: 4px; margin-top: 8px; } .ucw-prog i { flex: 1; height: 4px; border-radius: 99px; background: var(--gray-bg); } .ucw-prog i.d { background: var(--ok); } .ucw-prog i.c { background: var(--brand-600); }
  .ucw-tog { display: flex; background: var(--gray-bg); border-radius: 10px; padding: 3px; margin-top: 10px; }
  .ucw-tog button { flex: 1; border: 0; background: transparent; border-radius: 8px; padding: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
  .ucw-tog button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
  .ucw-body { grid-template-columns: minmax(0, 1fr); }
  .ucw[data-view="form"] .ucw-pv, .ucw[data-view="preview"] .ucw-form { display: none; }
  .ucw-pv { position: static; max-height: none; padding: 10px 8px 18px; border-radius: 16px; }
  .ucw-paper { padding: 18px 16px 24px; font-size: 13.5px; } .ucw-lh-m { display: none; }
  .ucw-signs { grid-template-columns: 1fr; gap: 16px; }
  .ucw-form { padding: 14px 14px 12px; border-radius: 18px; }
  .ucw-nav { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 6; background: var(--surface); margin: 14px -14px -12px; padding: 10px 14px; border-radius: 0 0 18px 18px; box-shadow: 0 -6px 18px rgba(18,19,26,.06); }
  .ucw-nav [data-prev] { flex: none; } .ucw-nav [data-next] { flex: 1; }
  .ucw-head .actions { width: 100%; } .ucw-head .actions .btn { flex: 1; }
  .ucw-tpls { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 761px) and (max-width: 900px) { .ucw-nav { bottom: 0; } }

/* ═════════ عرض العقد: الورقة + لوحة الملخّص + البنود ═════════ */
.ucv-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex: none; } .ucv-ic svg { width: 22px; height: 22px; }
.ucv-path { display: flex; align-items: center; gap: 0; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.ucv-path::-webkit-scrollbar { display: none; }
.ucv-path button { flex: 1; min-width: 110px; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--faint); border: 0; background: none; padding: 4px 10px 4px 0; cursor: pointer; text-align: start; }
.ucv-path button:disabled { cursor: default; }
.ucv-path button:not(:disabled):hover span { color: var(--brand-700); text-decoration: underline dotted; }
.ucv-path button i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: var(--gray-bg); flex: none; }
.ucv-path button::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 2px; min-width: 12px; }
.ucv-path button:last-of-type::after { display: none; }
.ucv-path .d { color: var(--ok); } .ucv-path .d i { background: var(--ok); color: #fff; } .ucv-path .d::after { background: var(--ok); }
.ucv-path .c { color: var(--brand-700); } .ucv-path .c i { background: var(--brand-700); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
.ucv-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.ucv-main { background: #eceae5; border-radius: var(--radius-lg); padding: 12px 16px 24px; min-width: 0; }
.ucv-tabs { display: flex; gap: 2px; border-bottom: 1px solid #d9d6ce; margin: 0 auto 14px; max-width: 840px; overflow-x: auto; }
.ucv-tabs button { border: 0; background: none; padding: 8px 14px; font-weight: 700; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; }
.ucv-tabs button.on { color: var(--brand-700); border-color: var(--brand-600); }
.ucv-tabs em { font-style: normal; font-size: 11px; background: rgba(0,0,0,.06); padding: 0 6px; border-radius: 99px; margin-inline-start: 4px; }
.ucv-docwrap { position: relative; max-width: 840px; margin: auto; }
.ucv-doc { display: block; width: 100%; min-height: 600px; border: 0; background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 40px rgba(0,0,0,.08); }
.ucv-load { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); font-size: 13px; } .ucv-load svg { width: 26px; height: 26px; }
[data-pane="cl"], [data-pane="files"] { max-width: 840px; margin: auto; }
.ucv-acc-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .ucv-acc-h h4 { font-size: 15px; } .ucv-acc-h .btn { margin-inline-start: auto; }
.ucv-cl { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; overflow: hidden; color: #1c1d26; }
.ucv-cl summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; font-size: 14px; }
.ucv-cl summary::-webkit-details-marker { display: none; }
.ucv-cl summary::after { content: "▾"; color: var(--faint); margin-inline-start: 4px; } .ucv-cl[open] summary::after { content: "▴"; }
.ucv-cl summary .upr-tag { margin-inline-start: auto; }
.ucv-cl-n { font-size: 12px; color: var(--brand-600); font-weight: 700; white-space: nowrap; }
.ucv-cl-b { padding: 0 16px 14px; font-size: 14px; line-height: 2; }
.ucv-cl.m { border-color: var(--brand-300); box-shadow: 0 0 0 3px var(--brand-50); }
.ucv-blank { background: var(--warn-bg); color: var(--warn); border-radius: 4px; padding: 0 4px; }
.ucv-side { position: sticky; top: calc(var(--topbar-h) + 14px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - var(--topbar-h) - 28px); overflow: auto; }
.ucv-side h6 { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.ucv-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ucv-kpi > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.ucv-kpi small { font-size: 11.5px; color: var(--muted); } .ucv-kpi .num { font-size: 15px; font-weight: 700; }
.ucv-kpi .big { grid-column: 1 / -1; background: var(--brand-50); border-color: var(--brand-100); }
.ucv-kpi .big > span > b.num { font-size: 28px; color: var(--brand-700); font-weight: 800; }
.ucv-dt { font-size: 12px; color: var(--muted); } .ucv-dt b { font-size: 13px; color: var(--ink); }
.ucv-pbar { height: 8px; border-radius: 99px; background: var(--gray-bg); overflow: hidden; margin: 8px 0 4px; } .ucv-pbar i { display: block; height: 100%; background: var(--ok); }
.ucv-pp { display: flex; justify-content: space-between; font-size: 12.5px; } .ucv-pp .ok { color: var(--ok); }
.ucv-tl { list-style: none; margin: 0; padding: 0; }
.ucv-tl li { position: relative; padding-inline-start: 26px; padding-bottom: 12px; font-size: 13px; }
.ucv-tl li::before { content: ""; position: absolute; inset-inline-start: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
.ucv-tl li:last-child::before { display: none; }
.ucv-tl li > i { position: absolute; inset-inline-start: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.ucv-tl li.d > i { background: var(--ok); border-color: var(--ok); } .ucv-tl li.n > i { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.ucv-tl b { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; } .ucv-tl small { color: var(--muted); font-size: 11.5px; display: block; }
.ucv-tl .bad { color: var(--bad); }
.ucv-sgn { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; }
.ucv-sgn > div { flex: 1; line-height: 1.35; min-width: 0; } .ucv-sgn small { display: block; color: var(--muted); font-size: 11.5px; }
.ucv-sgn .ok { color: var(--ok); font-weight: 800; }
.ucv-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; background: var(--brand-100); color: var(--brand-700); }
.ucv-av.lm { background: linear-gradient(135deg, #d6a04a, #b47515 45%, #8a560c); color: #fff; font-family: var(--mono); font-size: 10.5px; }
.ucv-note { border-top: 1px solid var(--line-2); padding-top: 10px; }
@media (max-width: 1100px) { .ucv-body { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 900px) {
  .ucv-body { grid-template-columns: minmax(0, 1fr); }
  .ucv-side { position: static; max-height: none; }
  .ucv-main { padding: 8px 8px 16px; border-radius: 16px; }
  .ucv-head .actions { width: 100%; } .ucv-head .actions .btn { flex: 1; }
  .ucv-doc { min-height: 300px; }
}

/* ═════════ القوالب: المعرض والمنشئ وربط الحقول ═════════ */
.utp-fc { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 13px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.utp-fc em { font-style: normal; font-size: 11px; color: var(--muted); }
.utp-fc.on { background: var(--ink); color: #fff; border-color: var(--ink); } .utp-fc.on em { color: #c9cad3; }
.utp-fc.tg { border-style: dashed; color: var(--muted); }
.utp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.utp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s, transform .15s; color: inherit; }
.utp-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.utp-thumb { height: 128px; background: linear-gradient(#f4f1ea, #ece8df); display: grid; place-items: end center; padding-top: 14px; position: relative; flex: none; }
.utp-sh { width: 64%; height: 112px; background: #fff; border-radius: 3px 3px 0 0; box-shadow: 0 -2px 12px rgba(0,0,0,.07); padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.utp-sh > i { display: block; height: 4px; border-radius: 3px; background: #e6e4de; } .utp-sh > i.h { height: 6px; width: 55%; margin: 2px auto 3px; background: #cfc8ba; } .utp-sh > i.g { background: var(--brand-200); width: 40%; } .utp-sh > i.s { width: 70%; }
.utp-sh .lg { display: flex; gap: 4px; align-items: center; border-bottom: 1.5px solid var(--brand-300); padding-bottom: 4px; } .utp-sh .lg b { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, #d6a04a, #8a560c); } .utp-sh .lg i { height: 3px; width: 30%; background: #e6e4de; border-radius: 2px; }
.utp-grp { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 11px; font-weight: 700; background: var(--brand-50); color: var(--brand-700); border-radius: 99px; padding: 1px 8px; }
.utp-ver { position: absolute; top: 10px; inset-inline-end: 10px; font: 700 10.5px var(--mono); font-weight: 700; background: #fff; border-radius: 6px; padding: 1px 6px; color: var(--muted); }
.utp-b { padding: 11px 13px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.utp-b > b { font-size: 14px; line-height: 1.4; }
.utp-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.utp-use { height: 4px; border-radius: 99px; background: var(--gray-bg); overflow: hidden; } .utp-use i { display: block; height: 100%; background: var(--brand-500); }
.utp-tabs { max-width: none; border-color: var(--line); }
.utp-ed { display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.utp-pal, .utp-lib { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; position: sticky; top: calc(var(--topbar-h) + 14px); max-height: calc(100vh - var(--topbar-h) - 28px); overflow: auto; }
.utp-pal h6, .utp-lib h6 { font-size: 12px; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.utp-vps { display: flex; flex-wrap: wrap; gap: 5px; }
.utp-vp { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 0 9px 0 8px; border-radius: 99px; background: #eef2ff; color: #3446a8; border: 1px solid #d6ddff; white-space: nowrap; line-height: 1.75; vertical-align: baseline; }
.utp-vp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.utp-vp.cl { background: var(--info-bg); color: var(--info); border-color: #cddcfb; } .utp-vp.pr { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.utp-vp.em { background: #f4ecff; color: #6941c6; border-color: #e2d4ff; } .utp-vp.fx { background: var(--ok-bg); color: var(--ok); border-color: #bfe7d3; }
.utp-vp.mn { background: var(--gray-bg); color: var(--ink-2); border-color: var(--line); } .utp-vp.bad { background: var(--bad-bg); color: var(--bad); border-color: #f5c2c2; }
.utp-leg { display: grid; gap: 4px; font-size: 11.5px; color: var(--muted); margin-top: 12px; } .utp-leg .utp-vp { padding: 0 5px; min-width: 18px; }
.utp-kinds { display: grid; gap: 5px; } .utp-kinds span { display: flex; align-items: center; gap: 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; }
.utp-kinds i { font-style: normal; width: 22px; height: 22px; border-radius: 6px; background: var(--gray-bg); display: grid; place-items: center; font-size: 12px; }
.utp-canvas { background: #eceae5; border-radius: var(--radius-lg); padding: 16px 18px 24px; min-width: 0; }
.utp-cb { background: #fff; color: #1c1d26; border: 1px solid #e3e1db; border-radius: 10px; margin: 0 auto 8px; max-width: 680px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.utp-cb .hd { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 7px 12px 0; flex-wrap: wrap; }
.utp-cb .hd i { font-style: normal; width: 20px; height: 20px; border-radius: 6px; background: var(--gray-bg); display: grid; place-items: center; font-size: 11px; } .utp-cb .hd .upr-tag { margin-inline-start: auto; }
.utp-cb .ct { padding: 4px 14px 11px; font-size: 14px; line-height: 2.05; overflow-x: auto; }
.utp-cb.ttl .ct { text-align: center; font-size: 17px; } .utp-cb.auto, .utp-cb.sig { border-style: dashed; cursor: default; } .utp-cb.auto .hd, .utp-cb.sig .hd { padding-bottom: 8px; }
.utp-cb.lnk { border-inline-start: 3px solid #6941c6; } .utp-cb.sel { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.utp-note { display: flex; gap: 8px; align-items: flex-start; max-width: 680px; margin: 12px auto 0; font-size: 12.5px; color: #5d5f6b; } .utp-note svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }
.utp-lib .input { margin-bottom: 8px; }
.utp-lf { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.utp-lf button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2); } .utp-lf button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.utp-lc { border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px; margin-bottom: 8px; font-size: 12.5px; }
.utp-lc > b { font-size: 13.5px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.utp-lc p { color: var(--muted); margin: 4px 0 6px; line-height: 1.8; }
.utp-lc .ft { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; color: var(--faint); font-size: 11.5px; flex-wrap: wrap; } .utp-lc .ok { color: var(--ok); font-weight: 700; }
.utp-lc details summary { cursor: pointer; color: var(--brand-700); font-weight: 600; } .utp-lc details div { display: grid; gap: 2px; margin-top: 4px; } .utp-lc details a { font-size: 12px; }
.utp-lc.hl { border-color: #cdb8ff; background: #faf7ff; } .utp-lc.pick { box-shadow: 0 0 0 3px var(--brand-200); }
.utp-fh { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 13.5px; }
.utp-mt code { font: 11.5px var(--mono); background: var(--gray-bg); padding: 1px 6px; border-radius: 5px; direction: ltr; display: inline-block; margin-inline-start: 4px; }
.utp-mt td { vertical-align: middle; } .utp-mt tr.bad td { background: var(--bad-bg); }
.utp-src { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 7px; white-space: nowrap; }
.utp-src.cl { background: var(--info-bg); color: var(--info); } .utp-src.pr { background: var(--brand-50); color: var(--brand-700); } .utp-src.em { background: #f4ecff; color: #6941c6; } .utp-src.mn { background: var(--gray-bg); color: var(--ink-2); } .utp-src.fx { background: var(--ok-bg); color: var(--ok); } .utp-src.bad { background: var(--bad-bg); color: var(--bad); }
.utp-warn, .utp-ok { display: flex; gap: 10px; align-items: center; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; margin-top: 10px; }
.utp-warn { background: var(--warn-bg); border: 1px solid #f3d99a; color: #7a4f0c; } .utp-ok { background: var(--ok-bg); color: var(--ok); }
.utp-warn svg, .utp-ok svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 1180px) { .utp-ed { grid-template-columns: 200px minmax(0, 1fr); } .utp-lib { grid-column: 1 / -1; position: static; max-height: none; } }
@media (max-width: 900px) {
  .utp-ed { grid-template-columns: minmax(0, 1fr); } .utp-pal { position: static; max-height: none; } .utp-kinds { display: none; } .utp-fc { flex: none; }
  .utp-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .utp-card { flex-direction: row; } .utp-thumb { width: 104px; height: auto; min-height: 120px; padding-top: 22px; } .utp-sh { width: 76%; height: 92px; padding: 7px; gap: 4px; }
  .utp-grp { font-size: 10px; inset-inline-start: 6px; top: 6px; } .utp-ver { display: none; }
  .utp-canvas { padding: 10px 8px 16px; } .utp-cb .ct { font-size: 13.5px; }
  .utp .page-head .actions .upr-srch { flex: 1 1 100%; } .utp .page-head .actions .upr-srch .input { width: 100%; }
}

/* ── الشركات: القائمة (بطاقات بالصحة ومدة العقد) وصفحة الشركة (تبويبات) و«شركتنا» ── */
.file-list { grid-template-columns: minmax(0, 1fr); } .file-list > * { min-width: 0; }
.own-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: linear-gradient(135deg, #a8690f, #c9922f); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.co-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.co-sum > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.co-sum i { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); }
.co-sum i svg { width: 19px; height: 19px; }
.co-sum b { font-size: 22px; line-height: 1.1; color: var(--ink); } .co-sum span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.co-sum .is-warn i { background: var(--warn-bg); color: #8a5508; } .co-sum .is-bad i { background: var(--bad-bg); color: #b42318; } .co-sum .is-ok i { background: var(--ok-bg); color: #067647; }
.co-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.co-search { position: relative; flex: 1 1 240px; display: block; }
.co-search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.co-search .input { padding-inline-start: 38px; min-height: 42px; }
.co-filter button { min-height: 38px; } .co-filter em { font-style: normal; font-size: 12px; color: var(--muted); margin-inline-start: 2px; }
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.co-own-wrap { margin-bottom: 16px; } .co-own-wrap .cc { max-width: none; }
.cc { position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; cursor: pointer; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; min-width: 0; }
.cc:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.cc-top { display: flex; gap: 12px; align-items: flex-start; }
.avatar.cc-logo { width: 48px; height: 48px; border-radius: 14px; font-size: 16px; flex: none; }
.cc-id { flex: 1; min-width: 0; }
.cc-name { display: block; font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-name:hover { text-decoration: none; color: var(--brand-700); }
.cc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.cc-meta .co-star { margin-top: 0; font-size: 12px; } .cc-meta .mono { color: var(--muted); }
.cc-acts { display: flex; gap: 2px; margin-inline-start: auto; flex: none; }
.cc-acts .icon-btn { width: 40px; height: 40px; border-radius: 11px; }
.cc-acts .icon-btn svg { width: 17px; height: 17px; }
.cc-health { display: inline-flex; align-self: flex-start; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--ok-bg); color: #067647; }
.cc-health i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cc-health em { font-style: normal; font-size: 12px; opacity: .85; }
.cc-health.h-warn { background: var(--warn-bg); color: #8a5508; } .cc-health.h-bad { background: var(--bad-bg); color: #b42318; }
.cc-health.h-off { background: var(--gray-bg); color: var(--ink-2); } .cc-health.h-own { background: var(--brand-50); color: var(--brand-700); }
.cc-per { display: grid; gap: 6px; }
.cc-per-t { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.cc-per-t em { font-style: normal; color: var(--muted); }
.cc-bar { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; } .cc-bar s { display: block; height: 100%; background: var(--cc, var(--brand-600)); border-radius: inherit; }
.cc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cc-stats > div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 6px; text-align: center; min-width: 0; }
.cc-stats b { display: block; font-size: 18px; line-height: 1.25; color: var(--ink); }
.cc-stats small { display: block; font-size: 12px; color: #b42318; font-weight: 600; }
.cc-stats span { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.cc-stats .is-bad b { color: #b42318; } .cc-stats .is-warn b { color: #8a5508; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); min-height: 38px; }
.cc-fee { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); line-height: 1.3; } .cc-fee b { font-size: 14.5px; color: var(--ink); }
.cc-team { display: flex; align-items: center; } .cc-team .avatar { width: 30px; height: 30px; font-size: 12px; border: 2px solid var(--surface); margin-inline-start: -8px; } .cc-team .avatar:first-child { margin-inline-start: 0; }
.cc-more { font-size: 12px; color: var(--muted); margin-inline-start: 6px; }
.cc-own { background: linear-gradient(135deg, var(--brand-50), var(--surface) 60%); border-color: var(--brand-200); }
.cc-own-note { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
/* بطاقة الشركة (طلب المالك 2026-11-27): بلا شريط علوي؛ خانات الأرقام متساوية الارتفاع (الرقم و«N متأخرة» في سطر واحد والوصف تحته)، وشارة الحالة بحجم نصّها */
.cc .cc-stats { align-items: stretch; margin-bottom: 0; overflow: visible; padding-bottom: 0; }
.cc .cc-stats > div { display: flex; flex-wrap: wrap; align-items: baseline; align-content: center; justify-content: center; column-gap: 6px; row-gap: 1px; padding: 9px 6px; }
.cc .cc-stats > div > b { display: inline; }
.cc .cc-stats > div > small { display: inline; white-space: nowrap; }
.cc .cc-stats > div > span { flex: 0 0 100%; }
.cc .cc-health { justify-self: start; max-width: 100%; }
.cc-own .cc-foot { justify-content: flex-start; gap: 10px; }
.cc-own .cc-fee { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.cc-own .cc-own-note { max-width: 62ch; }
/* «شركتنا» بعرض الصفحة على الكمبيوتر: الاسم والشعار والرمز، ثم الوصف تحتها، والأرقام ثم الفريق في العمود المقابل، و«تعديل» في زاوية البطاقة */
@media (min-width: 900px) {
  .co-own-wrap .cc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); grid-template-areas: 'top stats' 'health stats' 'note foot'; column-gap: 28px; row-gap: 8px; align-items: center; padding: 18px 20px; padding-inline-end: 68px; }
  .co-own-wrap .cc-top { grid-area: top; align-items: center; } .co-own-wrap .cc-health { grid-area: health; } .co-own-wrap .cc-own-note { grid-area: note; align-self: start; }
  .co-own-wrap .cc-stats { grid-area: stats; align-self: stretch; } .co-own-wrap .cc-foot { grid-area: foot; border-top: 0; padding-top: 0; min-height: 0; align-self: start; }
  .co-own-wrap .cc-acts { position: absolute; top: 14px; inset-inline-end: 14px; }
}
@media (max-width: 760px) { .co-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .co-sum > div { padding: 10px 12px; } .co-sum b { font-size: 19px; } .co-grid { grid-template-columns: minmax(0, 1fr); } .co-tools .seg { width: 100%; } }
/* صفحة الشركة */
.co-back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px 0 10px; margin-bottom: 8px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.co-back:hover { background: var(--gray-bg); text-decoration: none; } .co-back svg { width: 16px; height: 16px; }
[dir=ltr] .co-back svg { transform: scaleX(-1); }
.co-badges .badge { min-height: 26px; display: inline-flex; align-items: center; }
.co-badges a.badge { min-height: 32px; padding-inline: 11px; }
.co-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.co-facts span { display: inline-flex; align-items: center; gap: 5px; } .co-facts svg { width: 15px; height: 15px; color: var(--muted); }
.co-prof.is-own { border-color: var(--brand-200); }
.co-own-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; margin-bottom: 14px; border-radius: 14px; background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.co-own-note svg { width: 20px; height: 20px; color: var(--brand-700); flex: none; margin-top: 2px; } .co-own-note b { display: block; color: var(--brand-900); }
.co-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.co-tabs::-webkit-scrollbar { display: none; }
.co-tabs button { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.co-tabs button svg { width: 17px; height: 17px; }
.co-tabs button em { font-style: normal; font-size: 12px; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--gray-bg); color: var(--ink-2); line-height: 20px; text-align: center; }
.co-tabs button:hover { color: var(--ink); background: var(--surface-2); }
.co-tabs button.on { background: var(--brand-50); color: var(--brand-700); } .co-tabs button.on em { background: var(--brand-600); color: #fff; }
.co-pane > .stack, .co-pane > .card { margin-top: 0; }
.co-pane [data-treq-co]:not(:empty) { margin-bottom: 14px; }
.co-pane [data-docs]:not(:empty) .card { margin-top: 14px; }
.co-acc-own { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--brand-50); color: var(--brand-900); font-size: 13px; } .co-acc-own svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.co-files-grid { align-items: start; }
@media (max-width: 640px) {
  .co-acts { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .co-acts .btn { justify-content: center; min-height: 42px; } .co-acts .btn-primary { grid-column: 1 / -1; }
  .co-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .co-kpis .card.stat { padding: 12px; } .co-kpis .card.stat .ic { display: none; } .co-kpis .value { font-size: 20px !important; }
  .co-info h2 { font-size: 20px; }
}
.co-kpis .hint { font-size: 12px; }
/* الشركات: أهداف لمس 40px وتباين كافٍ داخل صفحات الشركات */
.cc .cc-name { padding: 9px 0; margin: -9px 0; }
.cc .cc-acts .icon-btn { width: 40px; height: 40px; }
.co-tools .co-filter button, .co-pane .seg button { min-height: 40px; color: var(--ink-2); }
.co-tools .co-filter button.active, .co-pane .seg button.active { color: var(--ink); }
.co-filter em { color: var(--ink-2); }
.co-badges a.badge { min-height: 40px; }
.co-prof .badge.b-brand, .cc-meta .badge.b-brand { color: var(--brand-900); }
.co-prof .badge.b-ok, .cc-meta .badge.b-ok { color: #05603a; }
.co-own-info .card-head .btn, .co-pane .card-head .btn-sm, .co-pane .card-head a.small { min-height: 40px; display: inline-flex; align-items: center; }
.co-pane .act-more { min-height: 40px; }
.co-kpis .hint, .co-pane .act-m { color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .co-acts { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); } .co-acts .btn:not(.btn-primary) { padding-inline: 8px; font-size: 13.5px; } }
.co-files-grid > *, .co-pane .grid > * { min-width: 0; }
@media (min-width: 900px) { .co-cover { max-height: 220px; } }
/* ══ الفواتير (#/invoices) ══ */

/* ══ محرر القوالب ══ */
.tpe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.tpe-main { display: grid; gap: 12px; min-width: 0; }
.tpe-meta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.tpe-bar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.tpe-body { width: 100%; min-height: 420px; font-size: 14.5px; line-height: 1.9; resize: vertical; padding: 14px 16px; }
.tpe-chk { display: grid; gap: 6px; }
.tpe-side { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: 8px; max-height: calc(100vh - 100px); overflow: auto; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tpe-side h6 { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.tpe-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.tpe-vars button { display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 0 10px; border: 1px dashed var(--brand-300); background: var(--brand-50); color: var(--brand-900); border-radius: 99px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tpe-vars code { font-size: 11px; color: var(--brand-700); direction: ltr; }
.tpe-lib { display: grid; gap: 8px; }
.tpe-lc { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 4px; background: var(--surface-2); }
.tpe-lc.hl { border-color: var(--ok); background: var(--ok-bg); }
.tpe-lc b { font-size: 13px; } .tpe-lc p { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.tpe-lc .ft { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.tpe-fh, .tpe-fr { display: grid; grid-template-columns: 150px minmax(140px, 1fr) 130px minmax(140px, 1fr) 90px 92px; gap: 8px; align-items: center; padding: 8px 14px; }
.tpe-fh { font-size: 12.5px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.tpe-fr { border-bottom: 1px solid var(--line-2); }
.tpe-fr .input { min-height: 40px; }
.tpe-fr [data-fk=key] { font-family: var(--mono); font-size: 13px; }
.tpe-req { margin: 0; } .tpe-fa { display: flex; gap: 4px; justify-content: flex-end; } .tpe-fa .btn { min-width: 40px; min-height: 40px; }
.tpe-ff { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; }
.tpe-vers { display: grid; gap: 8px; margin-bottom: 14px; }
.tpe-v { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tpe-v > div { display: grid; gap: 2px; } .tpe-v small { color: var(--muted); font-size: 12.5px; }
.tpe-v.cur { border-color: var(--ok); } .tpe-v.draft { border-color: var(--warn); background: var(--warn-bg); } .tpe-v.base { background: var(--surface-2); }
.tpe-va { display: flex; gap: 6px; flex-wrap: wrap; } .tpe-va .btn { min-height: 40px; }
.tpe-diff { padding: 14px; }
.tpd-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 700; margin-bottom: 10px; }
.tpd-old { color: var(--bad); } .tpd-new { color: var(--ok); }
.tpd-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.tpd-b { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 13.5px; line-height: 1.8; max-height: 60vh; overflow-y: auto; }
.tpd-l { display: grid; grid-template-columns: 22px 1fr; padding: 1px 8px; white-space: pre-wrap; word-break: break-word; }
.tpd-l i { font-style: normal; font-weight: 700; color: var(--muted); }
.tpd-l.add { background: #e7f7ef; } .tpd-l.add i { color: var(--ok); }
.tpd-l.del { background: #fdecec; text-decoration: line-through; text-decoration-color: rgba(214, 59, 59, .45); } .tpd-l.del i { color: var(--bad); }
.tpd-gap { text-align: center; color: var(--muted); background: var(--surface-2); font-size: 12px; }
@media (max-width: 1000px) { .tpe-grid { grid-template-columns: 1fr; } .tpe-side { position: static; max-height: none; } }
@media (max-width: 767px) {
  .tpe-fh { display: none; }
  .tpe-fr { grid-template-columns: 1fr 1fr; padding: 12px; gap: 8px; }
  .tpe-fr [data-fk=label], .tpe-fr [data-fk=default], .tpe-fr [data-fk=options] { grid-column: 1 / -1; }
  .tpe-body { min-height: 360px; font-size: 15px; padding: 12px; }
}

/* ══ عرض العقد: النشاط والدفعات المخططة · الحفظ التلقائي · فترات الباقات ══ */
.ucv-log { list-style: none; margin: 0 auto; padding: 0; max-width: 840px; display: grid; gap: 0; }
.ucv-log li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line-2); }
.ucv-log-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); }
.ucv-log-ic svg { width: 17px; height: 17px; }
.ucv-log li > div { display: grid; gap: 2px; } .ucv-log b { font-weight: 600; font-size: 13.5px; } .ucv-log small { color: var(--muted); font-size: 12.5px; }
.ucv-plan { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--brand-200); background: var(--brand-50); border-radius: var(--radius); color: var(--brand-900); }
.ucv-plan > svg { width: 22px; height: 22px; flex: none; color: var(--brand-700); }
.ucv-plan > div { display: grid; gap: 6px; } .ucv-plan small { font-size: 12.5px; color: var(--ink-2); } .ucv-plan .btn { justify-self: start; min-height: 40px; }
.ucw-restore { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; margin: 0 0 12px; background: var(--info-bg); border: 1px solid #c7d7fb; border-radius: var(--radius); color: var(--ink); }
.ucw-restore > svg { width: 20px; height: 20px; color: var(--info); flex: none; }
.ucw-restore > div { display: grid; flex: 1 1 200px; } .ucw-restore small { color: var(--ink-2); font-size: 12.5px; }
.ucw-restore .btn { min-height: 40px; }
.ucw-saved { color: var(--ok) !important; }
.upr-per { margin-inline-start: auto; } .upr-per em { font-style: normal; font-size: 12px; color: var(--ok); font-weight: 700; }
.upr-ptot { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ══ r2-docs: حد أدنى 12px لنصوص شاشات الأسعار والعقود والقوالب (تدقيق القراءة) ══ */
.inv-pay small,
.it-h span,
.pp-group,
.pp-main small,
.pp-unit,
.pr-amt small,
.pr-crh span,
.pr-preview small,
.ucv-kpi small,
.ucv-sgn small,
.ucv-tabs em,
.ucv-tl small,
.ucw-paste-r em,
.ucw-steps small,
.ucw-tpls label small,
.upr-best,
.upr-cats > button em,
.upr-cats > button small,
.upr-ced > button em,
.upr-ced small,
.upr-chips button em,
.upr-d,
.upr-mb-s small,
.upr-pr small,
.upr-ql-n small,
.upr-sw em,
.upr-tag,
.utp-cb .hd,
.utp-fc em,
.utp-grp,
.utp-lc .ft,
.utp-leg { font-size: 12px; }
/* قائمة العقود على الجوال: المستندات المحفوظة أولاً ثم القوالب */
@media (max-width: 767px) { .ctl { display: flex; flex-direction: column; } .ctl > .ct-groups { order: 2; margin-top: 14px; } .ctl > .card.mt-3 { margin-top: 0; } }
/* ══ r2-docs: تحسينات التدقيق — أهداف لمس 40px+ على الجوال وتباين النصوص في شاشات الأسعار والعقود والقوالب والفواتير ══ */
.ucw-ttl > a.small, .ucv-ttl > a.small, .utp .page-head a.small { display: inline-flex; align-items: center; min-height: 40px; color: var(--brand-700); font-weight: 600; }
.ucw-wa, a.ucw-wa { background: #16834a; border-color: #16834a; }
.ucv-path button { color: var(--muted); min-height: 40px; }
.ucv-path button i { font-size: 12px; color: var(--ink-2); }
.ucv-tabs button { color: var(--ink-2); min-height: 40px; }
.ucv-tabs em { font-size: 12px; }
.ucv-cl summary, .utp-lf button, .utp-fc { min-height: 40px; }
@media (max-width: 767px) {
  :is(.upr, .ucw, .ucv, .utp, .ctl, .inv, .tpe, .pp, .modal) .btn { height: auto; min-height: 44px; }
  :is(.upr, .ucw, .ucv, .utp, .ctl, .inv, .tpe, .pp) .btn-sm, .modal .btn-sm { min-height: 40px; min-width: 40px; }
  :is(.upr, .ucw, .ucv, .utp, .ctl, .inv, .tpe) .input, .modal .input { min-height: 44px; }
  :is(.upr, .ucw, .ucv, .utp, .inv, .tpe) .seg button, .ucw .seg button { min-height: 40px; }
  .ucw-tog button { min-height: 44px; }
  .ucw-steps button, .utp-fc, .utp-lf button, .upr-chips button{ min-height: 40px; }
  .upr-stp button, .upr-ql-x, .upr-addb, .upr-q-x { min-width: 40px; min-height: 40px; }
  .ucw .it-row .btn-ghost, .ucw [data-back] { min-width: 44px; }
}
.upr-save, .utp-vp.fx, .upr-tag.ok, .tpd-new, .ucv-path .d, .upr-per em, .ucw-saved { color: #0b7a4b !important; }
.utp-lc details summary { display: inline-flex; align-items: center; min-height: 40px; }
.utp-fc em, .ucv-tabs em { color: var(--ink-2); }
@media (max-width: 767px) { .upr { padding-bottom: 8px; } .ucw-tpls label { min-height: 44px; } }
.tpe-side h6, .ucv-side h6 { font-size: 12.5px; } .ucv-side h6 small { font-size: 12px; }
.tpe-vars code { font-size: 12px; }
.utp-lc .ft, .utp-cb .hd, .upr-pr small, .upr-pkt .faint, .tpe-lc .ft .muted { color: var(--ink-2); }
.utp-cb .hd i { color: var(--ink-2); } .utp-lc .ok { color: #0b7a4b; }
/* ═════════ المحاسبة (الجولة الثانية): زر الإضافة العائم، سحب بطاقات الحركات، التدفق النقدي، المطابقة، الموافقات، قراءة الإيصال ═════════ */
.famt small { font-size: max(12px, .72em); }
.famt.pos b, .acct-scope .ok-text { color: #0b7f50; }
.famt.neg b { color: #c62f2f; }
.acct-scope .cal-seg button { color: #575b6b; }
.acct-scope .cal-seg button.on { color: var(--ink); }
.acct-scope .badge, .fmiss{ font-size: 12px; }
/* تباين 4.5:1 على الأقل داخل صفحات المحاسبة (الألوان العامة كما هي في بقية الموقع) */
.acct-scope span.badge, .acct-scope .badge .num { font-size: 12px; }
.acct-scope .b-ok, .acct-scope .b-approved, .acct-scope .b-issued, .acct-scope .b-completed { color: #0b6b44; }
.acct-scope .b-warn, .acct-scope .b-pending { color: #8a5508; }
.acct-scope .b-bad, .acct-scope .b-rejected { color: #b42318; }
.acct-scope .warn-text { color: #8a5508; }
.acct-scope .bad-text { color: #c62f2f; }
.acct-scope a.small, .acct-scope .card-head a { color: var(--brand-700); }
.acct-scope .table th { color: #626678; }
.fmiss { color: #8a5508; border-color: #d08f20; }
/* أهداف نقر مريحة على سطح المكتب أيضاً (40px) */
.acct-scope .btn-sm, .acct-scope .cal-seg button{ min-height: 40px; }
.acct-scope .fmonth .icon-btn, .acct-scope .table .btn-sm.btn-ghost { min-width: 40px; min-height: 40px; }
.acct-scope .card-head a.small { display: inline-flex; align-items: center; min-height: 40px; margin-block: -10px; }
.acct-scope .fmiss { height: 40px; }

/* التدفق النقدي */
.cf-chart { width: 100%; height: 150px; display: block; overflow: visible; }
.cf-area { fill: rgba(192,138,43,.12); }
.cf-line { fill: none; stroke: #a8690f; stroke-width: 2.2; stroke-linejoin: round; }
.cf-zero { stroke: #c62f2f; stroke-width: 1; stroke-dasharray: 4 4; }
.cf-low { fill: #fff; stroke: #c62f2f; stroke-width: 2.5; }
.cf-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cf-cal { display: grid; gap: 18px; }
.cf-month h4 { margin: 0 0 8px; font-size: 14px; }
.cf-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cf-wd { text-align: center; font-size: 12px; font-weight: 700; color: #6b6f80; padding-bottom: 2px; }
.cf-d { position: relative; min-height: 52px; padding: 5px 4px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2px; font: inherit; color: var(--ink); }
.cf-d i { font-style: normal; font-size: 12.5px; font-weight: 600; }
.cf-d em { font-style: normal; font-size: 12px; font-weight: 700; line-height: 1.1; }
.cf-d.out { background: transparent; border-color: transparent; color: #9a9db0; }
.cf-d.out i { color: #6b6f80; font-weight: 500; }
button.cf-d { cursor: pointer; }
button.cf-d:disabled { cursor: default; color: var(--ink-2); }
.cf-d.in { background: #effaf4; border-color: #bfe8d2; } .cf-d.in em { color: #0b7f50; }
.cf-d.outf { background: #fdf2f2; border-color: #f4cccc; } .cf-d.outf em { color: #c62f2f; }
.cf-d.tn em { color: #8a5a10; }
.cf-d.neg { box-shadow: inset 0 -3px 0 #c62f2f; }
.cf-d.today { outline: 2px solid #c08a2b; outline-offset: -2px; }
.cf-d.on { background: var(--ink); border-color: var(--ink); color: #fff; } .cf-d.on em { color: #fff; }
.cf-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: #575b6b; }
.cf-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-inline-end: 5px; }
.cf-legend i.in { background: #bfe8d2; } .cf-legend i.outf { background: #f4cccc; } .cf-legend i.neg { background: #c62f2f; height: 3px; vertical-align: 3px; }
.cf-day header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; background: #f7f8fb; border-top: 1px solid var(--line-2); font-size: 13px; }
.cf-day:first-child header { border-top: 0; }
.cf-day ul { list-style: none; margin: 0; padding: 0; }
.cf-ev-a { display: flex; align-items: center; gap: 12px; padding: 12px 18px; min-height: 56px; border-top: 1px solid var(--line-2); color: inherit; text-decoration: none !important; }
.cf-ev-a:hover { background: var(--surface-2); }
.cf-ev .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cf-ev .t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-ev .t small { font-size: 12.5px; color: #575b6b; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.cf-ev.tent { opacity: .75; } .cf-ev.tent .famt b { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }

/* المطابقة */
.rc-bar { align-items: flex-end; }
.rc-f { display: flex; flex-direction: column; gap: 4px; }
.rc-f .input { min-width: 150px; }
.rc-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.rc-sum { position: sticky; top: calc(var(--topbar-h) + 12px); }
.rc-diff.ok b { color: #0b7f50; }
.rc-hint { margin: 10px 0 12px; min-height: 18px; }
.rc-done { width: 100%; justify-content: center; min-height: 44px; }
.rc-list { list-style: none; margin: 0; padding: 0; }
.rc-l { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 14px; min-height: 56px; border-top: 1px solid var(--line-2); }
.rc-l:first-child { border-top: 0; }
.rc-l.on { background: #f4fbf7; }
.rc-list.only .rc-l.on { display: none; }
.rc-l .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rc-l .t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-l .t small { font-size: 12.5px; color: #575b6b; }
.rc-chk { position: relative; width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; cursor: pointer; }
.rc-chk input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rc-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #b8bbc8; display: grid; place-items: center; color: transparent; background: #fff; }
.rc-box svg { width: 15px; height: 15px; stroke-width: 3; }
.rc-chk input:checked + .rc-box { background: #0b7f50; border-color: #0b7f50; color: #fff; }
.rc-chk input:focus-visible + .rc-box { outline: 2px solid var(--brand-600); outline-offset: 2px; }

/* الموافقات */
.apv-list { list-style: none; margin: 0; padding: 0; }
.apv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line-2); }
.apv:first-child { border-top: 0; }
.apv .fi-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.apv .fi-s { color: #575b6b; margin-top: 2px; }
.apv .fi-a { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.apv .fi-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #f0f1f5; color: #575b6b; }
.apv .fi-ic svg { width: 17px; height: 17px; }
.apv.t-bad .fi-ic { background: #fdecec; color: #c62f2f; } .apv.t-info .fi-ic { background: #eef3ff; color: #2563eb; } .apv.t-ok .fi-ic { background: #e7f7ef; color: #0b7f50; } .apv.t-brand .fi-ic { background: #fbf1df; color: #8a5a10; }
.apv-f .fcount { min-width: 20px; height: 20px; font-size: 12px; }

/* قراءة الإيصال في الإضافة السريعة */
.qe-rd { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 12px; background: #f4f5f9; color: var(--ink-2); line-height: 1.6; }
.qe-rd > svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; }
.qe-rd.ok { background: #effaf4; color: #0b6b44; } .qe-rd.warn { background: #fff8e8; color: #7c5410; }

@media (max-width: 1100px) { .cf-wrap, .rc-grid { grid-template-columns: minmax(0, 1fr); } .rc-sum { position: static; } }
@media (max-width: 760px) {
  /* زر إضافة عائم واحد فوق شريط التطبيق بدل شريط تنقل ثانٍ */
  .content:has(> .fin-fab) { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  /* أهداف لمس لا تقل عن 44px */
  .acct-scope .btn-sm, .acct-scope .fi-a .btn, .acct-scope .aa-actions .btn, .modal .fst-acts .btn, .pm-acts .btn, .sal-acts .btn { min-height: 44px; }
  .acct-scope .cal-seg button, .modal .qe-type button { height: 44px; }
  .acct-scope .fmonth .icon-btn, .sal-icons .icon-btn.sm { width: 44px; height: 44px; }
  .acct-scope .card-head a.small { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 6px; margin-block: -12px; }
  .acct-scope .fmiss { height: 44px; }
  .modal .qe-chip { height: 44px; padding: 0 14px; }
  .acct-scope .table .btn-sm { min-width: 44px; }
  /* سحب بطاقات الحركات */
  .fl-sw { position: relative; overflow: hidden; border-top: 1px solid var(--line-2); }
  .fl-sw-front { position: relative; z-index: 1; display: flex; align-items: stretch; background: #fff; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
  .fl-sw-front .fl-card-row { border-top: 0; flex: 1; min-width: 0; min-height: 60px; }
  .fl-sw-more { width: 44px; flex-shrink: 0; border: 0; background: #fff; color: #6b6f80; display: grid; place-items: center; cursor: pointer; }
  .fl-sw-more svg { width: 18px; height: 18px; }
  .fl-sw.open .fl-sw-more { color: var(--brand-700); }
  .fl-sw-acts { position: absolute; inset-block: 0; inset-inline-end: 0; display: flex; }
  .sw-a { width: 72px; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #fff; font: 700 12px var(--font); cursor: pointer; }
  .sw-a svg { width: 19px; height: 19px; }
  .sw-a.rc { background: #3a6ee8; } .sw-a.ed { background: #8a5a10; } .sw-a.dl { background: #c62f2f; }
  .cf-d { min-height: 46px; padding: 4px 2px; border-radius: 9px; }
  .cf-d em { font-size: 12px; letter-spacing: -.3px; }
  .cf-day header, .cf-ev-a { padding-inline: 14px; }
  .rc-bar .rc-accts { flex-basis: 100%; overflow-x: auto; }
  .rc-f { flex: 1 1 45%; } .rc-f .input { min-width: 0; width: 100%; height: 44px; }
  .rc-l { padding-inline: 6px 14px; }
  .apv { grid-template-columns: auto minmax(0, 1fr) auto; padding: 14px; }
  .apv .fi-a { grid-column: 1 / -1; justify-content: flex-start; }
  .apv .fi-a .btn { flex: 1; justify-content: center; }
  .apv-f { max-width: 100%; overflow-x: auto; }
  .apv-f button { flex-shrink: 0; }
}
/* ── قائمتي: السحب على الجوال (يميناً تمّت، يساراً للغد) ── */
.td-it[data-sw]::before { content: ''; position: absolute; inset-block: -1px; width: 170px; border-radius: 12px; display: flex; align-items: center; font: 700 13px var(--font); color: #fff; padding-inline: 16px; pointer-events: none; }
.td-it[data-sw=r]::before { content: '✓  تمّت'; right: calc(100% + 6px); background: #16a34a; justify-content: flex-end; opacity: .55; }
.td-it[data-sw=l]::before { content: 'للغد  ↻'; left: calc(100% + 6px); background: #d97706; justify-content: flex-start; opacity: .55; }
.td-it.sw-go[data-sw]::before { opacity: 1; }
[dir=ltr] .td-it[data-sw=r]::before { content: '✓  Done'; } [dir=ltr] .td-it[data-sw=l]::before { content: 'Tomorrow  ↻'; }
/* ── قائمتي: الأسبوع — مواعيد النشر والاجتماعات بجانب البنود ── */
.td-daycol { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.td-pubs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; color: var(--muted); }
.td-pubs > svg { width: 15px; height: 15px; color: #2563eb; }
.td-pubs-l { font-weight: 700; color: var(--ink-2); margin-inline-end: 2px; }
.td-pub { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border-radius: 9px; background: #eff6ff; color: #1e3a8a; font-weight: 600; text-decoration: none; border-inline-start: 3px solid #3b82f6; max-width: 100%; }
.td-pub span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-pub.ok { background: #ecfdf3; color: #14532d; border-inline-start-color: #16a34a; }
.td-pub.warn { background: #fffbeb; color: #78350f; border-inline-start-color: #d97706; }
.td-blk.mt { background: #eef2ff; border-inline-start-color: #6366f1; text-decoration: none; display: block; }
.td-blk.mt b svg { width: 13px; height: 13px; vertical-align: -2px; margin-inline-end: 4px; color: #4f46e5; }
.td-wag { display: flex; gap: 6px; margin-top: 4px; }
.td-wag i { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 6px; }
.td-wag i svg { width: 11px; height: 11px; }
.td-wag i.mt { background: #eef2ff; color: #4338ca; } .td-wag i.pb { background: #eff6ff; color: #1d4ed8; }
.td-wag i span { color: inherit !important; font-size: 11px !important; }
/* ── الجوال: القائمة المغلقة خارج الشاشة لا تُقرأ ولا تُلمس ولا يصلها التبويب ── */
@media (max-width: 960px) { .shell:not(.nav-open) > .sidebar { visibility: hidden; } }

/* ══ مراجعة التصميم (تشرين الثاني 2026): قياسات الجوال — لمس ≥ 40px، نص ≥ 12px، تباين ≥ 4.5، شريط سفلي واحد ══ */
/* نصوص ثانوية بلون أفتح من المسموح (تباين ~2.6) → الرمادي الثانوي */
:root { --faint: #6f7487; --muted: #62667a; }
.rq-l, .mt-date small, .mt-people small, .mt-people em, .tdb-dates small, .tdb-meta small{ color: var(--muted) !important; }
.b-completed, .b-approved, .b-issued, .b-ok { color: #0b7a4b; }
.tabbar .active span { color: var(--brand-700) !important; }
/* حبوب التبويب الذهبية بنص أبيض: ذهبي أعمق قليلاً حتى يبلغ التباين 4.5 */
@media (max-width: 760px) { .hub-tabs a.on, .tabs a.active { background: #9a5f0d; border-color: #9a5f0d; } }
 .tb-quick span, .lang-switch.top button:not(.on), .sn-tx small { color: var(--muted); }
 .hub-tabs .count.g, .td-gh .c { color: #555a6c; }
/* بطاقة المهمة: نصوصها الصغيرة لا تقل عن 12px */
 .tdb-ring span, .tdb-clh span, .tdb-dh span, .tdb-u small, .rq-l, .sn-tx small { font-size: 12px !important; }
.nav a .ndot, .tabbar .ndot, .icon-btn .dot, .hub-tabs .ndot, .hub-tabs .count { font-size: 12px !important; }
kbd, .tb-quick kbd { font-size: 12px !important; }
.td-co .avatar, .td-lgx { color: #fff; }
@media (max-width: 760px) {
  /* أهداف اللمس */
  .hub-tabs a { min-height: 40px; }
  .seg > button, .seg.sm > button, .card-head .seg button, .cal-seg > button, .hb-tabs > button, .tabs > a { min-height: 40px; }
  .btn-sm, .icon-btn { min-height: 40px; }
  .icon-btn { min-width: 40px; }
  .card-head a.small { display: inline-flex; align-items: center; min-height: 40px; padding-inline: 8px; margin-inline-end: -8px; }
  .td-gh { min-height: 40px; }
  .tdb-title { display: block; padding: 9px 0; }
  .mw-r.td > a.mw-b { min-height: 40px; }
  .rq-act .btn, .mt-acts .btn { min-height: 40px; }
  /* دائرة الإنجاز: تبقى 22px مرئية بمساحة لمس 40px */
  .td-ck { width: 40px; height: 40px; margin: -9px; border: 0; background: transparent; position: relative; }
  .td-ck::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; border: 2px solid var(--brand-300); background: #fff; transition: background .15s, border-color .15s; }
  .td-ck.on::before { background: var(--brand-600); border-color: var(--brand-600); }
  .td-ck.on::after { position: relative; z-index: 1; }
  .td-ck:hover { background: transparent; }
  /* أحجام الخط الدنيا */
  .tabbar a, .tabbar button, .tabbar a span, .tabbar button span { font-size: 12px !important; }
  .tabbar .ndot, .tabbar .tcount, .nav .ndot, .icon-btn .dot, .hub-tabs .ndot, .count { font-size: 12px !important; }
  .topbar .cp-tpill, .topbar .tp-tx b { font-size: 12.5px !important; }
  .topbar .tp-sec { font-size: 12px !important; }
  .mw-ty, .rq-l, .mt-date small, .mt-people small, .mt-people em, .cat-chip, .mw-s, .mw-tm, .tdb-ring span, .hint, .td-gh .c, .tdb-u small, .tdb-dates small { font-size: 12px !important; }
  /* «قائمتي»: شريط سفلي واحد — الإضافة السريعة زر عائم بدل شريط ثانٍ فوق الشريط السفلي */
  .td-page { padding-bottom: 72px; }
  .td-undo { bottom: calc(150px + env(safe-area-inset-bottom)); }
  /* «تخصيص القائمة»: وصف البطاقة يلتف بدل أن يُقص */
}
/* ── بوابة العميل: إصلاحات القراءة واللمس على الهاتف (تدقيق 375/390/430) ── */
body.cp-body { --faint: #667085; }
body.cp-body .btn-primary{ color: #1d1a16; }
body.cp-body .btn-primary svg { color: currentColor; }
 .ch-m, .mt-sec em, .ps-c span, .ps-c b small, .pr-amt small, .cc-h { color: #667085; }
.cact .up-h h3 { color: inherit; } section.up .up-h h3 { color: #12131a; }
.up-th b { color: color-mix(in srgb, var(--c) 70%, #000); }
.cp-docseg button em { opacity: 1; font-size: 12px; }
.cp-item-acts { gap: 8px; flex-wrap: wrap; }
.cp-signed { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: #067647; font-weight: 600; }
.cp-signed svg { width: 15px; height: 15px; }
/* أرقام ملخّصة على بطاقة التقرير */
.cp-rstats { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-top: 10px; }
.cp-rstats > span { display: grid; gap: 1px; min-width: 76px; padding: 8px 12px; border-radius: 12px; background: #faf6ee; border: 1px solid #f0e3c8; }
.cp-rstats > span b { font: 800 18px/1.1 var(--font); color: #101828; font-variant-numeric: tabular-nums; }
.cp-rstats > span small { font-size: 12px; color: #667085; font-weight: 600; }
.cp-rstats .cp-rs-m { flex-basis: 100%; min-width: 0; padding: 0; background: none; border: 0; font-size: 12px; font-weight: 700; color: #8a560c; }
@media (max-width: 760px) {
  body.cp-body input.input, body.cp-body textarea.input, body.cp-body select.input { font-size: 16px; } /* لا تكبير تلقائي عند الكتابة بعد تفعيل تكبير الصفحة */
  body.cp-body .btn-sm{ min-height: 42px; padding-inline: 14px; font-size: 13.5px; }
  body.cp-body .seg button, .cc-views button, .cc-nav button, .ag-f button, .pgp-m button, .cm-tabs button { min-height: 42px; }
  .cc-nav button[data-mv] { min-width: 44px; }
  .up-h a { min-height: 44px; padding-inline: 6px; }
  .vis-optbtns .vis-btn, .vis .vis-btn { min-height: 44px; }
  .hc-emo { width: 40px; height: 40px; }
  .cp-tabbar button, .cp-tabbar a { font-size: 12px !important; }
  .cp-tabbar .tcount, .cp-bcount, .tabbar .tcount { font-size: 12px !important; min-width: 20px; height: 20px; line-height: 20px !important; }
  .topbar .tp-sec { font-size: 12px !important; }
  .topbar .cp-tpill .tp-tx b, .topbar .cp-tpill b { font-size: 13px !important; }
  .mp-key, .up-c small, .ag-pill, .ch-m, .ps-cap, .ps-c b small, .pr-amt small, .cc-h .s{ font-size: 12px; }
   body.cp-body .lang-switch button { min-height: 40px; }
}
/* توقيع العقد من الهاتف */
.csg { position: fixed; inset: 0; z-index: 280; display: flex; flex-direction: column; background: #f6f5f2; animation: rqIn .22s ease; }
.csg-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: #fff; border-bottom: 1px solid #eaecf0; }
.csg-x { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: #f2f4f7; color: #101828; display: grid; place-items: center; cursor: pointer; }
html[dir=ltr] .csg-x svg, html[dir=ltr] .csg-back svg { transform: scaleX(-1); }
.csg-tt { flex: 1; min-width: 0; display: grid; } .csg-tt b { font-size: 16px; } .csg-tt small { color: #667085; font-size: 12.5px; }
.csg-steps { display: flex; gap: 5px; margin: 0; padding: 0; list-style: none; } .csg-steps li { width: 22px; height: 5px; border-radius: 9px; background: #e4e7ec; } .csg-steps li.on { background: #c08a2b; }
.csg-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px 24px; display: grid; gap: 14px; align-content: start; width: min(760px, 100%); margin: 0 auto; box-sizing: border-box; }
.csg-card { background: #fff; border: 1px solid #eaecf0; border-radius: 20px; padding: 18px; display: grid; gap: 12px; }
.csg-card h2 { margin: 0; font-size: 19px; line-height: 1.35; } .csg-lead { margin: -4px 0 0; color: #475467; font-size: 14px; }
.csg-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #fdf3e1; color: #8a560c; } .csg-ic svg { width: 22px; height: 22px; }
.csg-kvs { display: grid; gap: 0; border-top: 1px solid #f2f4f7; }
.csg-kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f2f4f7; font-size: 14px; } .csg-kv span:first-child { color: #667085; } .csg-kv b { text-align: end; }
.csg-doc { background: #fff; border: 1px solid #eaecf0; border-radius: 20px; overflow: hidden; }
.csg-doc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid #f2f4f7; }
.csg-frame { display: block; width: 100%; height: 520px; border: 0; background: #fff; }
.csg-l { display: grid; gap: 6px; } .csg-l span { font-size: 13px; font-weight: 600; color: #344054; }
.csg-pad { position: relative; height: 210px; border: 1.5px dashed #d0b27a; border-radius: 16px; background: #fffdf8; touch-action: none; overflow: hidden; }
.csg-pad canvas { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.csg-base { position: absolute; inset-inline: 22px; bottom: 46px; height: 0; border-top: 1px solid #e4d3b0; pointer-events: none; }
.csg-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; color: #8a6a2c; font-weight: 600; pointer-events: none; transition: opacity .2s; } .csg-hint svg { width: 18px; height: 18px; }
.csg-pad.inked .csg-hint { opacity: 0; }
.csg-padbar { display: flex; justify-content: flex-end; margin-top: -4px; }
.csg-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #344054; line-height: 1.6; cursor: pointer; }
.csg-agree input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: #b47515; }
.csg-sum { display: grid; gap: 12px; }
.csg-sigimg { display: grid; place-items: center; min-height: 120px; border-radius: 14px; background: #fffdf8; border: 1px solid #f0e3c8; padding: 10px; } .csg-sigimg img { max-width: 100%; max-height: 140px; }
html.dark .csg-sigimg, html.dark .csg-pad { background: #fffdf8; }
.csg-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #eaecf0; justify-content: center; }
.csg-foot .btn { min-height: 50px; border-radius: 14px; font-size: 15px; justify-content: center; }
.csg-go { flex: 1; max-width: 420px; } .csg-go:disabled { opacity: .5; }
.csg-done { text-align: center; padding: 40px 10px; display: grid; justify-items: center; gap: 8px; }
.csg-done-ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #ecfdf3; color: #067647; } .csg-done-ic svg { width: 36px; height: 36px; }
.csg-done h2 { margin: 8px 0 0; } .csg-done p { color: #475467; max-width: 420px; margin: 0; line-height: 1.7; }
/* «Not approved»: دبوس على الصورة وملاحظة صوتية */
@keyframes cpRec { 50% { opacity: .35; } }
.cp-voice-t { font: 700 14px var(--mono); color: #b42318; }
.dv-c-audio { width: 100%; height: 36px; margin-top: 6px; }
/* مقارنة النسخ v1 / v2 */
.cmpv { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; background: #f6f5f2; animation: rqIn .22s ease; }
.cmpv-body { flex: 1; overflow-y: auto; padding: 14px 12px calc(20px + env(safe-area-inset-bottom)); }
.cmpv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(1000px, 100%); margin: 0 auto; }
.cmpv-c { margin: 0; display: grid; gap: 8px; align-content: start; }
.cmpv-c figcaption { display: flex; align-items: center; gap: 6px; } .cmpv-c figcaption b { padding: 3px 10px; border-radius: 999px; font: 800 13px var(--mono); background: #f2f4f7; color: #475467; } .cmpv-c.new figcaption b { background: #ecfdf3; color: #067647; } .cmpv-c figcaption span { font-size: 13px; color: #475467; font-weight: 600; }
.cmpv-imgs { display: grid; gap: 8px; } .cmpv-im { border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid #eaecf0; line-height: 0; touch-action: pan-x pan-y; } .cmpv-im img { width: 100%; height: auto; display: block; }
.cmpv-c.old .cmpv-im { border-color: #fecdca; } .cmpv-c.new .cmpv-im { border-color: #abefc6; }
.cmpv-note { margin: 0; display: flex; gap: 6px; font-size: 13px; color: #b42318; background: #fef3f2; border-radius: 10px; padding: 8px 10px; line-height: 1.6; } .cmpv-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.cmpv-hint { text-align: center; color: #667085; font-size: 12.5px; display: flex; gap: 6px; justify-content: center; align-items: center; } .cmpv-hint svg { width: 14px; height: 14px; }
.cmpv-none { padding: 30px; text-align: center; color: #6b6f80; }
/* دليل البداية */
.cpg { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(16,24,40,.0); transition: background .2s; }
.cpg.in { background: rgba(16,24,40,.55); }
.cpg-card { position: relative; width: min(420px, 100%); background: #fff; border-radius: 24px; padding: 22px 20px 18px; display: grid; gap: 8px; text-align: center; box-shadow: 0 20px 60px rgba(16,24,40,.3); transform: translateY(14px); opacity: 0; transition: transform .24s, opacity .24s; }
.cpg.in .cpg-card { transform: none; opacity: 1; }
.cpg-skip { position: absolute; top: 10px; inset-inline-end: 10px; min-height: 40px; padding: 0 12px; border: 0; background: none; color: #475467; font: 600 13.5px var(--font); cursor: pointer; border-radius: 10px; }
.cpg-art { position: relative; justify-self: center; width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(135deg, #fdf3e1, #f6e2bb); color: #8a560c; margin: 8px 0 6px; }
.cpg-art svg { width: 42px; height: 42px; } .cpg-art em { position: absolute; bottom: -8px; inset-inline-end: -8px; font: 800 12px/1 var(--mono); font-style: normal; background: #1d1a16; color: #fff; padding: 5px 8px; border-radius: 999px; }
.cpg-k { color: #8a560c; font-weight: 700; font-size: 12.5px; } .cpg-card h2 { margin: 0; font-size: 20px; line-height: 1.35; } .cpg-card p { margin: 0; color: #475467; font-size: 14.5px; line-height: 1.75; }
.cpg-tip { font-weight: 700; color: #344054 !important; }
.cpg-dots { display: flex; gap: 6px; justify-content: center; margin: 8px 0 4px; } .cpg-dots i { width: 7px; height: 7px; border-radius: 9px; background: #e4e7ec; transition: width .2s; } .cpg-dots i.on { width: 22px; background: #c08a2b; }
.cpg-acts { display: flex; gap: 10px; } .cpg-acts .btn { flex: 1; min-height: 48px; justify-content: center; border-radius: 14px; font-size: 15px; }
html[dir=ltr] .cpg-acts svg { transform: scaleX(-1); }

/* ═════════ بوابة العميل — كومة المراجعة (بطاقات بالسحب + أزرار ثابتة)، ورقة Not approved، التأشير، العارض ═════════ */
.cr { position: fixed; inset: 0; z-index: 260; display: flex; flex-direction: column; background: #f4efe7; color: #12131a; outline: none; animation: rqIn .22s ease; }
.cr-hd { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 8px; flex: none; }
.cr-ib { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: #fff; color: #3a3d4a; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.cr-ib svg { width: 19px; height: 19px; } [dir=ltr] .cr-hd .cr-ib svg { transform: scaleX(-1); }
.cr-ib.sm { width: 34px; height: 34px; } .cr-ib.sm svg { width: 16px; height: 16px; }
.cr-tt { flex: 1; min-width: 0; line-height: 1.3; } .cr-tt b { display: block; font-size: 16px; font-weight: 800; } .cr-tt small { display: block; font-size: 12.5px; color: #6b6f80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-pill { flex: none; display: inline-flex; gap: 4px; align-items: center; height: 28px; padding: 0 11px; border-radius: 99px; background: #fff; font: 700 12.5px/1 var(--font); color: #3a3d4a; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cr-skip { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 8px 0 10px; border-radius: 99px; border: 1px solid #e3ddd2; background: transparent; color: #6b6f80; font: 600 12.5px/1 var(--font); cursor: pointer; }
.cr-skip svg { width: 15px; height: 15px; } [dir=rtl] .cr-skip svg { transform: scaleX(-1); }
.cr-prog { display: flex; gap: 4px; padding: 0 16px 10px; flex: none; }
.cr-prog i { flex: 1; height: 4px; border-radius: 2px; background: #e1dbd0; transition: background .2s; }
.cr-prog i.ok { background: #14a06a; } .cr-prog i.no { background: #d4473b; } .cr-prog i.cur { background: #c07d1c; }
.cr-body { flex: 1; min-height: 0; display: flex; justify-content: center; gap: 40px; }
.cr-col { flex: 1; min-width: 0; max-width: 540px; display: flex; flex-direction: column; min-height: 0; }
.cr-stage { position: relative; flex: 1; min-height: 0; margin: 2px 16px 0; }
.cr-card { position: absolute; inset: 0 0 22px; background: #fff; border-radius: 26px; box-shadow: 0 18px 40px -18px rgba(60,40,10,.35), 0 2px 6px rgba(0,0,0,.05); overflow: hidden; display: flex; flex-direction: column; }
.cr-card.g1 { transform: translateY(12px) scale(.95); opacity: .85; z-index: 2; }
.cr-card.g2 { transform: translateY(24px) scale(.9); opacity: .6; z-index: 1; }
.cr-card.top { z-index: 3; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; transition: transform .22s ease; }
.cr-card.top.dragging { cursor: grabbing; }
.cr-card.top.is-car, .cr-card.top.is-choice { touch-action: auto; cursor: default; }
.cr-card.in { animation: crIn .3s cubic-bezier(.2,.9,.3,1.1); } .cr-card.back { animation: crBack .32s cubic-bezier(.2,.9,.3,1.1); }
@keyframes crIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes crBack { from { opacity: 0; transform: translateX(-40%) rotate(-10deg); } to { opacity: 1; transform: none; } }
.cr-media { position: relative; flex: 1; min-height: 0; overflow: hidden; background: rgba(28, 26, 23, .98); }
.cr-one, .cr-story { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.cr-story { cursor: pointer; }
.cr-fill { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) saturate(1.15) brightness(.82); }
.cr-fill.dark { background: rgba(0, 0, 0, .96); filter: none; }
.cr-img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; pointer-events: none; }
video.cr-img { pointer-events: auto; }
.cr-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; direction: ltr; scrollbar-width: none; touch-action: pan-x; overscroll-behavior-x: contain; }
.cr-track::-webkit-scrollbar { display: none; }
.cr-slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; overflow: hidden; display: grid; place-items: center; }
.cr-ctr { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 2px 9px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font: 600 12px/1.6 var(--mono); font-style: normal; pointer-events: none; }
.cr-dots { position: absolute; bottom: 12px; left: 0; right: 0; z-index: 2; display: flex; direction: ltr; justify-content: center; gap: 5px; pointer-events: none; }
.cr-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 0 2px rgba(0,0,0,.35); transition: all .2s; } .cr-dots i.on { width: 16px; border-radius: 3px; background: #fff; }
.cr-note { position: absolute; bottom: 30px; left: 12px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 12px; background: rgba(18, 19, 26, .74); color: #fff; font-size: 12px; pointer-events: none; transition: opacity .3s; }
.cr-note svg { width: 15px; height: 15px; flex: none; } .cr-card.all-seen .cr-note { opacity: 0; }
.cr-play { position: absolute; z-index: 2; width: 58px; height: 58px; border-radius: 50%; background: rgba(0, 0, 0, .42); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); pointer-events: none; }
.cr-play svg { width: 24px; height: 24px; fill: #fff; stroke: none; }
.cr-stag { position: absolute; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 4px 11px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.cr-ver { position: absolute; z-index: 3; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .94); color: #12131a; font: 700 12px/1 var(--font); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.cr-ver svg { width: 14px; height: 14px; }
.cr-stamp { position: absolute; top: 22px; z-index: 5; padding: 4px 14px; border-radius: 12px; border: 3px solid; font: 800 20px/1.3 var(--font); opacity: 0; pointer-events: none; background: rgba(255, 255, 255, .88); }
.cr-stamp.ok { left: 20px; color: #0e7a4e; transform: rotate(-12deg); } .cr-stamp.no { right: 20px; color: #c2352b; transform: rotate(12deg); }
.cr-meta { display: flex; align-items: center; gap: 8px; padding: 12px 16px 4px; font-size: 12.5px; color: #6b6f80; flex: none; min-height: 44px; }
.cr-card:not(:has(.cr-cap)) .cr-meta { padding-bottom: 12px; }
.cr-tag { padding: 1px 8px; border-radius: 8px; background: #fdf3df; color: #8a560c; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cr-date { display: inline-flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cr-date svg { width: 14px; height: 14px; flex: none; }
.cr-zb { margin-inline-start: auto; width: 32px; height: 32px; flex: none; border-radius: 50%; border: 0; background: #f4f1ec; color: #3a3d4a; display: grid; place-items: center; cursor: zoom-in; }
.cr-zb svg { width: 16px; height: 16px; }
.cr-cap { margin: 0; padding: 0 16px 14px; font-size: 13.5px; line-height: 1.6; color: #3a3d4a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: none; }
.cr-oq { padding: 14px 16px 8px; text-align: center; flex: none; line-height: 1.4; } .cr-oq b { display: block; font-size: 18px; font-weight: 800; } .cr-oq small { display: block; font-size: 12.5px; color: #6b6f80; }
.cr-card.is-choice .cr-media { background: #f7f4ef; }
.cr-opts { position: absolute; inset: 0; display: flex; gap: 12px; align-items: center; justify-content: center; padding: 12px 14px 18px; }
.cr-o { position: relative; flex: 1; max-width: 48%; padding: 0; border-radius: 18px; overflow: hidden; background: #fff; border: 3px solid transparent; box-shadow: 0 14px 30px -14px rgba(60,40,10,.45); cursor: pointer; transition: transform .2s, opacity .2s, border-color .2s; font: inherit; color: inherit; }
.cr-o:first-child { transform: rotate(-2deg); } .cr-o:last-child { transform: rotate(2deg); }
.cr-o img, .cr-o .cp-g-v { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cr-o.on { border-color: #14a06a; transform: scale(1.04); z-index: 2; } .cr-o.off { opacity: .5; transform: scale(.95); }
.cr-o-l { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 1px 9px; border-radius: 8px; background: #fff; color: #12131a; font: 700 14px/1.5 var(--mono); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.cr-o.on .cr-o-l { background: #14a06a; color: #fff; }
.cr-o-ck { position: absolute; top: 10px; right: 10px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; display: none; place-items: center; background: #14a06a; color: #fff; }
.cr-o-ck svg { width: 15px; height: 15px; stroke-width: 3; } .cr-o.on .cr-o-ck { display: grid; }
.cr-o-n { display: block; padding: 8px; font-size: 12.5px; color: #6b6f80; text-align: center; direction: rtl; }
[dir=ltr] .cr-o-n { direction: ltr; }
.cr-acts { display: flex; direction: ltr; align-items: flex-start; justify-content: center; gap: 24px; padding: 6px 0 2px; flex: none; }
.cr-rb { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 76px; padding: 0; border: 0; background: none; font: 700 12.5px/1.2 var(--font); cursor: pointer; color: #3a3d4a; }
.cr-rb i.c { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 8px 20px -8px rgba(0,0,0,.28); transition: transform .12s; font-style: normal; }
.cr-rb:active i.c { transform: scale(.93); }
.cr-rb.ok { color: #0e7a4e; } .cr-rb.ok i.c { width: 76px; height: 76px; box-shadow: 0 12px 24px -8px rgba(14,122,78,.6); }
.cr-rb.ok svg { width: 34px; height: 34px; stroke-width: 2.8; }
.cr-rb.no { color: #c2352b; } .cr-rb.no svg { width: 28px; height: 28px; stroke-width: 2.6; }
.cr-rb.inf { color: #6b6f80; font-weight: 600; } .cr-rb.inf i.c { width: 48px; height: 48px; margin-top: 14px; color: #3a3d4a; } .cr-rb.inf svg { width: 20px; height: 20px; }
.cr-rb:disabled { opacity: .45; cursor: default; } .cr-rb:disabled i.c { box-shadow: none; }
.cr-rb kbd { display: none; }
.cr-hint { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 8px; padding: 6px 20px calc(12px + env(safe-area-inset-bottom)); font-size: 12px; color: #6b6f80; flex: none; min-height: 34px; }
.cr-hint .r { color: #0e7a4e; } .cr-hint .l { color: #c2352b; } .cr-hint > span { white-space: nowrap; }
.cr-hint.c { justify-content: center; flex-wrap: wrap; text-align: center; gap: 4px; } .cr-hint svg { width: 15px; height: 15px; }
.cr-left { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; background: #e6f6ee; color: #0e7a4e; font-size: 12px; font-weight: 700; white-space: nowrap; } .cr-left svg { width: 13px; height: 13px; stroke-width: 3; }
.cr-side { display: none; }
[lang=en] .cr-hint, html:not([dir=rtl]) .cr-hint { justify-content: center; column-gap: 14px; }
@media (max-width: 380px) { .cr-acts { gap: 16px; } .cr-hint { padding-inline: 12px; font-size: 11.5px; } .cr-skip span { display: none; } }
@media (max-height: 700px) { .cr-rb.ok i.c { width: 64px; height: 64px; } .cr-rb i.c { width: 56px; height: 56px; } .cr-rb.inf i.c { width: 44px; height: 44px; margin-top: 10px; } }

/* المكتب: الكومة + لوحة التفاصيل واختصارات لوحة المفاتيح */
@media (min-width: 1000px) {
  .cr-hd, .cr-prog { width: 100%; max-width: 980px; margin: 0 auto; }
  .cr-hd { padding-top: 18px; }
  .cr-body { padding: 4px 40px 20px; }
  .cr-col { max-width: 500px; }
  .cr-hint { padding-bottom: 4px; }
  .cr-rb kbd { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border: 1px solid currentColor; border-radius: 6px; font: 600 11px/1 var(--mono); opacity: .7; }
  .cr-side { display: block; width: 380px; flex: none; align-self: flex-start; max-height: 100%; overflow: auto; background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-top: 2px; }
}
.cr-side-h { display: block; font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.cr-dl { list-style: none; margin: 0 0 12px; padding: 0; }
.cr-dl li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px dashed #e8e9ef; }
.cr-dl li > span { font-size: 12px; color: #6b6f80; } .cr-dl li > b { font-size: 13.5px; font-weight: 600; color: #12131a; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.cr-link { border: 0; background: none; padding: 0; color: #a8690f; font: 700 13px/1 var(--font); cursor: pointer; text-decoration: underline; }
.cr-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; color: #3a3d4a; margin: 4px 0 14px; } .cr-keys > b { width: 100%; font-size: 12px; color: #6b6f80; font-weight: 500; }
.cr-keys kbd, .cr-side kbd { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border: 1px solid #c9cbd4; border-radius: 6px; font: 600 11px/1 var(--mono); background: #f7f7f9; }
.cr-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid #e8e9ef; background: #fff; color: #12131a; font: 600 13px/1 var(--font); cursor: pointer; margin-bottom: 12px; }
.cr-ghost svg { width: 16px; height: 16px; }
.cr-next { padding-top: 12px; border-top: 1px solid #e8e9ef; } .cr-next > b { display: block; font-size: 14px; margin-bottom: 8px; } .cr-next > div { display: flex; gap: 8px; }
.cr-up { width: 64px; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #eee; cursor: pointer; display: grid; place-items: center; color: #6b6f80; }
.cr-up img { width: 100%; height: 100%; object-fit: cover; display: block; } .cr-up:hover { outline: 2px solid #c07d1c; outline-offset: 1px; }
.cr-side-note { margin: 14px 0 0; padding: 10px 12px; border: 1px dashed #d9d3c7; border-radius: 12px; font-size: 12.5px; color: #6b6f80; text-align: center; }

/* نهاية الكومة: Approve all على ما شوهد، و«كل شيء جاهز» */
.cr-bulk { flex: 1; max-width: 540px; display: flex; flex-direction: column; min-height: 0; padding: 4px 16px calc(16px + env(safe-area-inset-bottom)); }
.cr-bulk-h b { display: block; font-size: 21px; font-weight: 800; } .cr-bulk-h small { display: block; font-size: 13px; color: #6b6f80; }
.cr-bulk-p { margin: 8px 2px 12px; font-size: 12.5px; color: #6b6f80; line-height: 1.6; } .cr-bulk-p.sm { margin: 4px 2px 0; font-size: 12px; }
.cr-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.cr-li { display: flex; align-items: center; gap: 12px; padding: 8px; margin-bottom: 8px; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.cr-li > img, .cr-li > .cp-g-v { width: 56px; height: 56px; flex: none; border-radius: 12px; object-fit: cover; background: #eee; }
.cr-li > div { flex: 1; min-width: 0; line-height: 1.35; } .cr-li b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cr-li small { display: block; font-size: 12px; color: #6b6f80; }
.cr-li.ex { opacity: .7; background: transparent; border: 1.5px dashed #d8cfbf; box-shadow: none; }
.cr-seen { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: #0e7a4e; flex: none; } .cr-seen svg { width: 14px; height: 14px; } .cr-seen.x { color: #8a560c; }
.cr-bulk-f { display: grid; gap: 8px; padding-top: 12px; } .cr-bulk-f small { text-align: center; font-size: 12px; color: #6b6f80; }
.cr-big { width: 100%; height: 54px; border-radius: 16px; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 15.5px/1 var(--font); cursor: pointer; }
.cr-big svg { width: 20px; height: 20px; stroke-width: 2.6; }
.cr-big.ok { box-shadow: 0 10px 22px -10px rgba(14,122,78,.7); }
.cr-big.gold { box-shadow: 0 10px 22px -10px rgba(168,105,15,.7); }
.cr-big.sec { background: #fff; border: 1px solid #e8e9ef; color: #12131a; }
.cr-done { flex: 1; max-width: 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 26px calc(24px + env(safe-area-inset-bottom)); }
.cr-ghost-st { position: relative; width: 190px; height: 220px; margin-bottom: 24px; border-radius: 26px; border: 2.5px dashed #d6ccbb; background: rgba(255,255,255,.5); display: grid; place-items: center; }
.cr-ghost-st::before, .cr-ghost-st::after { content: ''; position: absolute; inset: 0; border-radius: 26px; border: 2px dashed #e4dccd; transform: rotate(-6deg); } .cr-ghost-st::after { transform: rotate(6deg); }
.cr-ghost-st span { position: relative; z-index: 1; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; animation: crPop .45s cubic-bezier(.2,1.5,.4,1); }
.cr-ghost-st svg { width: 40px; height: 40px; stroke-width: 2.8; }
@keyframes crPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.cr-done h2 { margin: 0; font-size: 25px; font-weight: 800; } .cr-done-sum { margin: 6px 0 16px; color: #6b6f80; font-size: 14px; }
.cr-nextb { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 16px; border-radius: 16px; background: #fff; text-align: start; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.cr-nextb > svg { width: 22px; height: 22px; color: #a8690f; flex: none; } .cr-nextb b { display: block; font-size: 14px; } .cr-nextb small { display: block; font-size: 12px; color: #6b6f80; }
.cr-done-acts { display: grid; gap: 10px; width: 100%; }

/* ورقة Not approved / التفاصيل: تغطي الشاشة كلها (بلا تسرّب للخلفية) */
.cr-sheet { position: fixed; inset: 0; z-index: 330; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 8, 6, 0); transition: background .2s; overscroll-behavior: contain; }
.cr-sheet.in { background: rgba(10, 8, 6, .62); }
.cr-sh-in { width: min(560px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: #fff; color: #12131a; border-radius: 28px 28px 0 0; padding: 8px 18px 0; transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.9,.3,1); scrollbar-width: none; }
.cr-det .cr-sh-in { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.cr-sheet.in .cr-sh-in { transform: none; }
.cr-grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: #d7d8de; margin: 2px auto 10px; }
.cr-sh-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; } .cr-sh-h > div { flex: 1; line-height: 1.35; min-width: 0; }
.cr-sh-h b { display: block; font-size: 19px; color: #c2352b; } .cr-det .cr-sh-h b { color: #12131a; } .cr-sh-h small { display: block; font-size: 13px; color: #6b6f80; }
.cr-sh-h .cr-ib { background: #f3f3f6; box-shadow: none; }
.cr-sh-ic { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; background: #fdecea; color: #c2352b; } .cr-sh-ic svg { width: 21px; height: 21px; stroke-width: 2.6; }
.cr-sh-ic.in { background: #f4f1ec; color: #3a3d4a; }
.cr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-chip { min-height: 40px; padding: 6px 14px; border-radius: 12px; border: 1.5px solid #e8e9ef; background: #fff; color: #12131a; font: 600 13.5px/1.2 var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all .12s; }
.cr-chip.on { border-color: #c2352b; background: #fdecea; color: #c2352b; } .cr-chip.on::before { content: '✓'; font-weight: 800; }
.cr-tl { display: flex; gap: 6px; margin-bottom: 8px; }
.cr-tl button { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 12px; border-radius: 10px; border: 0; background: #f3f3f6; color: #12131a; font: 600 13px/1 var(--font); cursor: pointer; }
.cr-tl button svg { width: 15px; height: 15px; } .cr-tl button.on { background: #17130e; color: #fff; }
.cr-tl .cr-tl-clr { margin-inline-start: auto; background: none; color: #6b6f80; }
.cr-pf { display: flex; gap: 6px; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.cr-pf button { position: relative; width: 48px; flex: none; padding: 0; border-radius: 10px; border: 2px solid transparent; overflow: hidden; background: #eee; cursor: pointer; }
.cr-pf img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; } .cr-pf button.on { border-color: #17130e; }
.cr-pf bdi { position: absolute; bottom: 1px; right: 4px; color: #fff; font: 700 11px/1.3 var(--mono); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.cr-mkp { position: relative; display: block; width: min(64%, 260px); margin: 0 auto; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #eee; cursor: zoom-in; }
.cr-mkp > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cr-mkp-go { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: rgba(18, 19, 26, .74); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; }
.cr-mkp-go svg { width: 13px; height: 13px; }
.cr-ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cr-ink polyline { fill: none; stroke: #ff3b30; stroke-width: 4px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cr-pins { position: absolute; inset: 0; pointer-events: none; }
.cr-pins i { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #ff3b30; color: #fff; font: 700 12px/26px var(--mono); font-style: normal; text-align: center; box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(0,0,0,.35); animation: crPop .25s cubic-bezier(.2,1.4,.4,1); }
.cr-vc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 8px; border-radius: 16px; background: #f6f6f9; }
.cr-recb { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: #c2352b; color: #fff; cursor: pointer; } .cr-recb svg { width: 22px; height: 22px; }
.cr-vc.rec .cr-recb { animation: crPulse 1.2s infinite; }
@keyframes crPulse { 0% { box-shadow: 0 0 0 0 rgba(194,53,43,.45); } 100% { box-shadow: 0 0 0 12px rgba(194,53,43,0); } }
@keyframes crWave { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.cr-vt { min-width: 44px; text-align: center; font: 600 12.5px/1.2 var(--mono); color: #6b6f80; }
.cr-vc:not(.has):not(.rec) .cr-vt { font: 500 12px/1.2 var(--font); white-space: nowrap; }
.cr-sheet textarea { width: 100%; min-height: 64px; resize: none; border: 1.5px solid #e8e9ef; border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.cr-sh-err { margin: 2px 0 0; color: #d92d20; font-size: 12.5px; font-weight: 600; }
.cr-sh-f { position: sticky; bottom: 0; z-index: 2; background: #fff; padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); margin-top: 4px; }
.cr-send { width: 100%; height: 56px; border-radius: 18px; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 17px/1 var(--font); cursor: pointer; box-shadow: 0 10px 24px -10px rgba(168,105,15,.8); }
.cr-send svg { width: 19px; height: 19px; } [dir=rtl] .cr-send svg { transform: scaleX(-1); }
.cr-send:disabled { background: #e4e5ea; color: #8b8f9c; box-shadow: none; cursor: default; }
.cr-sh-f small { display: block; margin-top: 6px; text-align: center; font-size: 12.5px; color: #6b6f80; }
@media (min-width: 761px) { .cr-sheet { align-items: center; } .cr-sh-in { border-radius: 24px; max-height: 88vh; transform: translateY(30px); opacity: 0; transition: transform .2s, opacity .2s; } .cr-sheet.in .cr-sh-in { opacity: 1; } .cr-sh-f { padding-bottom: 18px; } }

/* التكبير والتأشير بملء الشاشة (الرأس مخفي) */
.cr-mk { position: fixed; inset: 0; z-index: 360; display: flex; flex-direction: column; background: #0d0c0b; color: #fff; animation: rqIn .18s ease; transition: transform .2s; }
.cr-mk-bar { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 8px; position: relative; z-index: 2; }
.cr-mk-bar .cr-ib { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.cr-mk-bar b { flex: 1; text-align: center; font-size: 14px; font-weight: 600; }
.cr-mk-done { height: 40px; padding: 0 18px; border-radius: 12px; border: 0; background: #fff; color: #17130e; font: 700 14px/1 var(--font); cursor: pointer; }
.cr-mk-sp { width: 40px; }
.cr-mk-frame { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px; }
.cr-mk-box { position: relative; flex: none; }
.cr-mk-box img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.cr-mk[data-tool=pin] .cr-mk-box, .cr-mk[data-tool=draw] .cr-mk-box { cursor: crosshair; touch-action: none; }
.cr-mk-tools { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); }
.cr-mk-tools .cr-tl { justify-content: center; }
.cr-mk-tools .cr-tl button { background: rgba(255, 255, 255, .12); color: #fff; } .cr-mk-tools .cr-tl button.on { background: #fff; color: #17130e; } .cr-mk-tools .cr-tl .cr-tl-clr { margin: 0; background: none; color: #cfc8bc; }
.cr-mk-tools p { margin: 8px 0 0; text-align: center; font-size: 12px; color: #cfc8bc; }

/* أزرار القرار بألوانها الكاملة في الوضعين (تُستثنى من تحويل الوضع الداكن) */
.cr-vivid-ok { background: linear-gradient(135deg, #17a56c, #0b6d44) !important; color: #fff !important; }
.cr-vivid-gold { background: linear-gradient(135deg, #d39a3e, #a8690f 60%, #7a4b09) !important; color: #fff !important; }
.cr-sh-f .cr-send:disabled { background: #e4e5ea !important; color: #8b8f9c !important; }
/* «تراجع» داخل الكومة: فوق الأزرار مباشرة */
.cp-undo-tx { flex: 1; min-width: 0; line-height: 1.3; } .cp-undo-tx b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cp-undo-tx small { display: block; font-size: 12px; color: #b9bcc6; }
.cp-undo .cp-undo-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #14a06a; } .cp-undo .cp-undo-ic svg { color: #fff; width: 16px; height: 16px; stroke-width: 3; }
.cp-undo.no .cp-undo-ic { background: #d4473b; }
body.cr-on .cp-undo { bottom: calc(150px + env(safe-area-inset-bottom)); }
@media (min-width: 1000px) { body.cr-on .cp-undo { bottom: 10px; } }
[dir=rtl] .cr-rb > span { direction: rtl; }
body.cr-on.cr-top .cp-undo { top: calc(74px + env(safe-area-inset-top)); bottom: auto; }

/* عارض الستوري: خلفية ضبابية، إطار 9:16، إيقاف */
.sv-fill { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(40px) brightness(.4); pointer-events: none; }
.sv-top { position: relative; z-index: 3; }
.sv-bars i { position: relative; overflow: hidden; } .sv-bars i s { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
[dir=rtl] .sv-bars i s { transform-origin: right; } .sv-bars i.seen s { transform: scaleX(1); }
.sv-stage { position: relative; z-index: 1; padding: 0 10px; }
.sv-frame { position: relative; height: min(100%, calc((100vw - 20px) * 16 / 9)); aspect-ratio: 9 / 16; max-width: 100%; border-radius: 16px; overflow: hidden; background: rgba(0, 0, 0, .96); }
.sv-ffill { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(26px) saturate(1.1) brightness(.85); }
.sv-frame img, .sv-frame video { position: relative; display: block; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: contain; border-radius: 0; background: none; }
.sv-tap { top: 120px; bottom: 180px; }
.sv-f { position: relative; z-index: 3; }
.sv-acts { display: flex; direction: ltr; align-items: center; justify-content: center; gap: 22px; }
.sv-await { max-width: 96px; text-align: center; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .72); }
.sv .cr-rb.no { color: #fecaca; } .sv .cr-rb.no i.c { background: rgba(255, 255, 255, .14); color: #fca5a5; box-shadow: none; } .sv .cr-rb.ok { color: #86efac; }
.sv.paused .sv-frame::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); pointer-events: none; }

/* الرئيسية: «مطلوب منكم» = كومة المراجعة أولاً ثم بقية الأفعال */
.cr-req { border-radius: 24px; padding: 16px; background: #fff; border: 1px solid #eceef3; box-shadow: 0 1px 3px rgba(16,24,40,.04); }
.cr-req-h { display: flex; align-items: center; gap: 8px; } .cr-req-h b { font-size: 17px; font-weight: 800; }
.cr-req-h em, .cr-hsec em { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center; background: linear-gradient(135deg, #d39a3e, #a8690f); color: #fff; font: 700 12px/1 var(--mono); font-style: normal; }
.cr-req > small { display: block; margin: 2px 0 4px; font-size: 12.5px; color: #6b6f80; }
.cr-fan { position: relative; display: block; width: 100%; height: 168px; margin: 6px 0 12px; padding: 0; border: 0; background: none; cursor: pointer; }
.cr-fan img { position: absolute; top: 8px; left: 50%; width: 108px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; border: 3px solid #fff; box-shadow: 0 10px 20px -8px rgba(0,0,0,.4); background: #eee; }
.cr-fan img:nth-child(1) { transform: translateX(-50%); z-index: 3; }
.cr-fan img:nth-child(2) { transform: translateX(-50%) translateX(-60px) rotate(-10deg); z-index: 2; }
.cr-fan img:nth-child(3) { transform: translateX(-50%) translateX(60px) rotate(10deg); z-index: 1; }
.cr-cta { width: 100%; height: 52px; border-radius: 16px; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 15.5px/1 var(--font); cursor: pointer; box-shadow: 0 10px 22px -12px rgba(168,105,15,.8); }
.cr-cta svg { width: 17px; height: 17px; fill: #fff; stroke: none; }
.cr-hsec { display: flex; align-items: center; gap: 6px; margin: 6px 4px -4px; font-size: 13.5px; font-weight: 700; color: #3a3d4a; }
.cr-todo { border-radius: 20px; padding: 4px 14px; background: #fff; border: 1px solid #eceef3; box-shadow: 0 1px 3px rgba(16,24,40,.04); }
.cr-todo-r { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #f1efeb; } .cr-todo-r:first-child { border-top: 0; }
.cr-ti { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #fdf6ea; color: #a8690f; } .cr-ti svg { width: 18px; height: 18px; }
.cr-ti.b { background: #eef3ff; color: #3b5bdb; } .cr-ti.r { background: #fdecea; color: #c2352b; } .cr-ti.w { background: #fff6dd; color: #b45309; }
.cr-tx { flex: 1; min-width: 0; } .cr-tx b { display: block; font-size: 13.5px; font-weight: 700; color: #12131a; line-height: 1.45; } .cr-tx small { display: block; margin-top: 1px; font-size: 12px; color: #6b6f80; line-height: 1.45; }
.cr-act { flex: none; padding: 7px 12px; border-radius: 10px; border: 0; background: #fdf6ea; color: #8a560c; font: 700 12.5px/1.2 var(--font); cursor: pointer; }
.cr-todo-ok { display: flex; align-items: center; gap: 10px; padding: 14px; color: #067647; font-weight: 700; } .cr-todo-ok svg { width: 22px; height: 22px; color: #12a46b; }
.up-th > * { grid-area: 1 / 1; } .up-th > img { position: relative; }
.up-ph { display: grid; justify-items: center; gap: 4px; color: var(--c); } .up-ph svg { width: 26px; height: 26px; } .up-ph small { font-size: 12px; font-weight: 700; }

/* الأعمال: مدخل واحد واضح للمراجعة */

/* علامات العميل على التصميم (لوحة الفريق) */
.dv-c-mark { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: #a8690f; text-decoration: none; }
.dv-c-mark img { width: 64px; border-radius: 8px; border: 1px solid #e8e9ef; }
/* ═════════ «قائمتي» v2 (تشرين الثاني 2026): تركيز اليوم · فلاتر · مجموعات · عمود جانبي · لوحة «بند جديد» · درج التفاصيل · مراجعة الأسبوع ═════════ */
.ml-page { display: flex; flex-direction: column; gap: 16px; padding-bottom: 80px; }
.ml-page svg, .ml-ap-root svg, .ml-drw-root svg, .ml-fs-root svg, .ml-menu svg { width: 16px; height: 16px; flex-shrink: 0; }
.ml-ph { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ml-tt { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex-shrink: 0; }
.ml-tt svg { width: 20px !important; height: 20px !important; }
.ml-h h1 { font-size: 21px; margin: 0; font-weight: 800; }
.ml-h .sub { font-size: 12.5px; color: var(--muted); }
.ml-ph .act { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.ml-seg { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.ml-seg button { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.ml-seg svg { width: 15px !important; height: 15px !important; }
.ml-pbtn { display: none !important; }
/* تركيز اليوم */
.ml-focus { display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; background: linear-gradient(135deg, #fff8eb 0%, #ffffff 60%); border: 1px solid var(--brand-100); border-radius: 16px; overflow: hidden; }
.ml-focus > div { padding: 16px 18px; min-width: 0; }
.ml-focus > div + div { border-inline-start: 1px solid var(--brand-100); }
.ml-focus .fl, .ml-pfc .fl { font-size: 11.5px; font-weight: 700; color: var(--brand-700); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ml-focus .fl svg { width: 13px; height: 13px; }
.ml-focus .fl .sub { color: var(--muted); font-weight: 500; }
.ml-ringw { display: flex; gap: 14px; align-items: center; }
.ml-ring { position: relative; display: grid; place-items: center; flex-shrink: 0; }
.ml-ring svg { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.ml-ring b { position: relative; font: 600 17px var(--mono); direction: ltr; }
.ml-ring b small { font-size: 11px; color: var(--muted); }
.ml-fst { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.ml-fst > b { color: var(--ink); font-size: 14px; }
.ml-fst > span, .ml-streak { display: flex; align-items: center; gap: 6px; }
.ml-fst svg { width: 13px !important; height: 13px !important; color: var(--brand-600); }
.ml-fst .num { font-size: 12px; color: var(--ink); }
.ml-streak { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-align: start; }
.ml-streak:hover { color: var(--brand-700); }
.ml-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(15, 153, 96, .22); display: inline-block; flex-shrink: 0; animation: mlPulse 1.8s infinite; }
.ml-live.sm { width: 6px; height: 6px; box-shadow: none; }
@keyframes mlPulse { 50% { box-shadow: 0 0 0 6px rgba(15, 153, 96, .08); } }
.ml-now-t { display: block; font: 700 17px/1.4 var(--font); color: var(--ink); background: none; border: 0; padding: 0; margin: 0 0 4px; text-align: start; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-now-t:hover { color: var(--brand-700); }
.ml-now-m { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ml-now-m > span { display: inline-flex; align-items: center; gap: 5px; }
.ml-now-m .lk { color: var(--info); }
.ml-timer { font: 600 22px var(--mono) !important; color: var(--ok); direction: ltr; }
.ml-now-b { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.ml-now-b .btn svg { width: 14px; height: 14px; }
.ml-calm { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }
.ml-top3 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.ml-top3 li { display: flex; gap: 9px; align-items: center; font-size: 12.5px; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line-2); cursor: grab; }
.ml-top3 li.drag { opacity: .5; }
.ml-top3 .no { width: 19px; height: 19px; border-radius: 6px; background: var(--brand-50); color: var(--brand-700); font: 600 11px/19px var(--mono); text-align: center; flex-shrink: 0; }
.ml-top3 .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; padding: 0; text-align: start; font: 500 12.5px var(--font); color: var(--ink); cursor: pointer; }
.ml-top3 small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.ml-top3 small.ok { color: var(--ok); font-weight: 600; } .ml-top3 small.bad { color: var(--bad); font-weight: 600; }
.ml-pfc { display: none; }
/* الفلاتر */
.ml-fbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ml-fbar .sp { flex: 1; }
.ml-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 12.5px var(--font); color: var(--ink-2); white-space: nowrap; cursor: pointer; position: relative; }
.ml-chip svg { width: 14px !important; height: 14px !important; }
.ml-chip .c { font: 600 10.5px var(--mono); color: var(--muted); }
.ml-chip.on { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); font-weight: 600; }
.ml-chip.on .c { color: var(--brand-600); }
.ml-chip:hover:not(.on) { border-color: #d6d8e1; }
.ml-srch { cursor: text; width: 200px; padding-inline-end: 8px; }
.ml-srch input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font: inherit; color: var(--ink); }
.ml-srch:focus-within { border-color: var(--brand-300); box-shadow: 0 0 0 3px rgba(192, 125, 28, .12); }
.ml-srch kbd { font-size: 10.5px !important; }
.ml-csel select { border: 0; background: transparent; font: inherit; color: inherit; appearance: none; -webkit-appearance: none; padding-inline-end: 2px; cursor: pointer; outline: 0; max-width: 160px; }
.ml-csel > svg:last-child { width: 12px !important; height: 12px !important; color: var(--muted); }
/* القائمة + العمود الجانبي */
.ml-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ml-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ml-gh { display: flex; align-items: center; gap: 8px; padding: 11px 16px 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); border-top: 1px solid var(--line-2); }
.ml-gh:first-child { border-top: 0; }
.ml-gh svg { width: 15px !important; height: 15px !important; color: var(--muted); }
.ml-gh .c { font: 600 11px/18px var(--mono); color: var(--muted); background: var(--gray-bg); border-radius: 999px; padding: 0 7px; }
.ml-gh.late, .ml-gh.late svg { color: var(--bad); } .ml-gh.late .c { background: var(--bad-bg); color: var(--bad); }
.ml-gh.today svg { color: var(--brand-600); }
.ml-gh.over, .ml-gb.over { background: var(--brand-50); box-shadow: inset 0 0 0 2px var(--brand-300); }
.ml-add { margin-inline-start: auto; font: 500 11.5px var(--font); color: var(--muted); display: flex; gap: 4px; align-items: center; border: 0; background: none; cursor: pointer; padding: 3px 6px; border-radius: 7px; }
.ml-add:hover { color: var(--brand-600); background: var(--brand-50); }
.ml-add svg { width: 13px !important; height: 13px !important; color: inherit !important; }
.ml-gb { min-height: 4px; }
.ml-empty { color: var(--muted); font-size: 12.5px; padding: 10px 16px; margin: 0; border-top: 1px solid var(--line-2); }
.ml-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line-2); position: relative; background: var(--surface); }
.ml-row:hover { background: var(--surface-2); }
.ml-row.sel { background: var(--brand-50); }
.ml-row.pk { background: #eef4ff; }
.ml-row.kb { box-shadow: inset 3px 0 0 var(--brand-500); }
[dir=rtl] .ml-row.kb { box-shadow: inset -3px 0 0 var(--brand-500); }
.ml-row.drag { opacity: .45; }
.ml-row.dt { box-shadow: inset 0 2px 0 var(--brand-500); } .ml-row.db { box-shadow: inset 0 -2px 0 var(--brand-500); }
.ml-row[draggable=true] { cursor: grab; }
.ml-grip { position: absolute; inset-inline-start: 1px; color: var(--faint); opacity: 0; display: grid; }
.ml-grip svg { width: 14px !important; height: 14px !important; }
.ml-row:hover .ml-grip { opacity: 1; }
.ml-ck { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--faint); flex-shrink: 0; display: grid; place-items: center; background: none; padding: 0; color: transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.ml-ck svg { width: 12px !important; height: 12px !important; stroke-width: 3; }
.ml-ck:hover { border-color: var(--ok); color: var(--ok); } .ml-ck.p2 { border-color: var(--bad); background: rgba(214, 59, 59, .08); }
.ml-ck.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.ml-pick { width: 18px; height: 18px; border-radius: 5px; border: 1.8px solid var(--faint); background: var(--surface); padding: 0; display: grid; place-items: center; color: transparent; cursor: pointer; flex-shrink: 0; }
.ml-pick svg { width: 11px !important; height: 11px !important; stroke-width: 3; }
.ml-pick.on { background: var(--info); border-color: var(--info); color: #fff; }
.ml-rb { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: start; cursor: pointer; font-family: var(--font); color: inherit; display: block; }
.ml-rt { font-size: 13.8px; font-weight: 600; display: flex; align-items: center; gap: 7px; color: var(--ink); min-width: 0; }
.ml-rt .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ml-row.done .ml-rt .tt { text-decoration: line-through; color: var(--muted); }
.ml-pf { font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 5px; line-height: 17px; flex-shrink: 0; }
.ml-pf.p2 { background: var(--bad-bg); color: var(--bad); }
.ml-st3 { color: var(--brand-500); display: inline-grid; } .ml-st3 svg { width: 13px !important; height: 13px !important; fill: currentColor; }
.ml-rm { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ml-rm > span { display: inline-flex; align-items: center; gap: 4px; }
.ml-rm svg { width: 12px !important; height: 12px !important; }
.ml-rm .lk { color: var(--info); } .ml-rm .wt { color: var(--orange); }
.ml-lg.avatar { width: 16px; height: 16px; border-radius: 5px; font-size: 7.5px; letter-spacing: 0; color: #fff; flex-shrink: 0; }
.ml-pb { width: 34px; height: 4px; border-radius: 9px; background: var(--line); overflow: hidden; display: inline-block; }
.ml-pb i { display: block; height: 100%; background: var(--ok); border-radius: 9px; }
.ml-rm b.num { font-weight: 500; }
.ml-nowtag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ok) !important; background: var(--ok-bg); border-radius: 999px; padding: 0 7px; font-weight: 600; }
.ml-nowtag i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.ml-rw { font-size: 12px; color: var(--ink-2); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 86px; text-align: end; }
.ml-rw small { font-size: 10.5px; color: var(--muted); }
.ml-rw.late, .ml-rw.late small { color: var(--bad); }
.ml-ra { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.ml-row:hover .ml-ra, .ml-row:focus-within .ml-ra, .ml-row.kb .ml-ra { opacity: 1; }
.ml-ra button { width: 28px; height: 28px; border-radius: 7px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.ml-ra button:hover { background: var(--gray-bg); color: var(--ink); }
[dir=ltr] .ml-ra [data-post] svg, [dir=ltr] .ml-now-b [data-post] svg { transform: scaleX(-1); }
.ml-dn { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border: 0; border-top: 1px solid var(--line-2); font: 400 12px var(--font); color: var(--muted); background: var(--surface); width: 100%; text-align: start; cursor: pointer; }
.ml-dn svg { color: var(--ok); width: 14px !important; height: 14px !important; }
.ml-dn .ml-dnl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.ml-dn .go { margin-inline-start: auto; color: var(--brand-600); font-weight: 600; }
.ml-gh.done svg { color: var(--ok); }
.ml-zero { padding: 40px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ml-zero svg { width: 30px !important; height: 30px !important; color: var(--brand-500); }
.ml-zero b { color: var(--ink); font-size: 15px; }
.ml-rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--topbar-h) + 14px); }
.ml-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px; }
.ml-card h3 { font-size: 13px; margin: 0 0 10px; display: flex; align-items: center; gap: 7px; }
.ml-card h3 svg { color: var(--brand-600); }
.ml-card h3 small { margin-inline-start: auto; font-weight: 500; color: var(--muted); font-size: 11px; }
.ml-wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.ml-wk > div { border-radius: 9px; padding: 6px 0; font-size: 10.5px; color: var(--muted); border: 1px dashed transparent; cursor: pointer; transition: background .12s; }
.ml-wk > div:hover { background: var(--surface-2); }
.ml-wk b { display: block; font: 600 14px var(--mono); color: var(--ink); }
.ml-wk .on { background: var(--brand-50); color: var(--brand-700); } .ml-wk .on b { color: var(--brand-700); }
.ml-wk .dots { display: flex; justify-content: center; gap: 2px; margin-top: 4px; height: 5px; }
.ml-wk .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-500); }
.ml-wk .dots i.r { background: var(--bad); }
.ml-page.dragging .ml-wk > div { border-color: var(--brand-200); }
.ml-wk > div.over { border-color: var(--brand-500) !important; background: var(--brand-50); }
.ml-hint { font-size: 11px; color: var(--muted); margin-top: 9px; display: flex; gap: 6px; align-items: center; }
.ml-hint svg { width: 13px !important; height: 13px !important; }
.ml-wl { display: flex; flex-direction: column; gap: 9px; }
.ml-wl > div { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; }
.ml-wl .avatar.ml-lg, .ml-lg0 { margin-top: 2px; }
.ml-lg0 { width: 16px; height: 16px; display: grid; place-items: center; color: var(--orange); }
.ml-wl .p { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: start; font: 500 12.5px var(--font); color: var(--ink); cursor: pointer; }
.ml-wl .p > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-wl small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.ml-wl .btn { height: 26px; min-height: 26px; font-size: 11px; padding: 0 8px; }
/* الزر العائم */
.ml-fab { position: fixed; inset-inline-end: 28px; bottom: 26px; display: flex; align-items: center; gap: 9px; height: 50px; padding: 0 20px 0 16px; border-radius: 999px; border: 0; background: var(--brand-600); color: #fff; font: 700 14.5px var(--font); box-shadow: 0 10px 30px rgba(168, 105, 15, .4), 0 2px 6px rgba(0, 0, 0, .2); z-index: 45; cursor: pointer; transition: transform .15s; }
.ml-fab:hover { transform: translateY(-1px); }
.ml-fab svg { width: 20px !important; height: 20px !important; stroke-width: 2.4; }
.ml-fab kbd { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .35); color: inherit; }
/* شريط التحديد المتعدد */
.ml-bulk { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; border-radius: 14px; padding: 7px 8px 7px 12px; box-shadow: 0 20px 50px rgba(18, 19, 26, .3); z-index: 46; white-space: nowrap; font-size: 12.5px; animation: tdUp .2s ease; }
.ml-bulk > b { background: var(--brand-600); color: #fff; border-radius: 6px; padding: 0 7px; font-family: var(--mono); }
.ml-bulk > span { opacity: .75; } .ml-bulk .sp { width: 6px; }
.ml-bulk button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; border-radius: 8px; height: 32px; padding: 0 10px; font: 600 12.5px var(--font); cursor: pointer; }
.ml-bulk button:hover { background: rgba(255, 255, 255, .2); }
.ml-bulk button.danger { color: #ffb4b4; }
.ml-bulk svg { width: 14px !important; height: 14px !important; }
/* نوافذ عامة */
.ml-scrim { position: absolute; inset: 0; background: rgba(18, 19, 26, .38); opacity: 0; transition: opacity .2s; }
.ml-ap-root, .ml-drw-root, .ml-fs-root { position: fixed; inset: 0; z-index: 300; }
.ml-ap-root.on .ml-scrim, .ml-drw-root.on .ml-scrim, .ml-fs-root.on .ml-scrim { opacity: 1; }
.ml-grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 8px auto 4px; flex-shrink: 0; }
.ml-x, .ml-ib { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.ml-x:hover, .ml-ib:hover { background: var(--gray-bg); color: var(--ink); }
.ml-o { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font: 500 12.5px var(--font); color: var(--ink-2); cursor: pointer; white-space: nowrap; position: relative; }
.ml-o svg { width: 14px !important; height: 14px !important; }
.ml-o.on { background: var(--brand-50); border-color: var(--brand-500); color: var(--brand-700); font-weight: 600; }
.ml-o.dash { border-style: dashed; color: var(--muted); }
.ml-o.dash.on { border-style: solid; color: var(--brand-700); }
.ml-o.ghost { border-color: transparent; background: none; padding: 0 6px; color: var(--muted); }
.ml-o.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.ml-o.danger { color: var(--bad); }
.ml-o:hover:not(.on) { border-color: #d6d8e1; }
.ml-opts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ml-pk { display: inline-flex; }
.ml-pk .picker { width: auto; min-width: 0; }
.ml-pk .picker-face { height: 30px; min-height: 30px !important; padding: 0 10px; border-radius: 9px; font-size: 12.5px; gap: 6px; background: var(--surface); }
.ml-pk .picker-ic svg { width: 14px; height: 14px; }
.ml-pk.dash .picker-face { border-style: dashed; color: var(--muted); }
.ml-pk.dash.on .picker-face { border-style: solid; border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.ml-pk.tm .picker { width: 104px; } .ml-pk.tm .picker-text:not(.ph) { font-family: var(--mono); }
.ml-pk.dt .picker { width: 196px; }
.ml-kv .ml-pk .picker-face { border-color: transparent; background: var(--surface-2); }
.ml-kv .ml-pk .picker-face:hover { border-color: var(--line); }
.ml-pk input:disabled + .picker-face { opacity: .5; cursor: default; }
.ml-sel select { border: 0; background: transparent; font: inherit; color: inherit; outline: 0; cursor: pointer; max-width: 130px; }
.ml-tw { display: inline-flex; gap: 6px; align-items: center; }
.ml-to { color: var(--muted); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.ml-pseg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ml-pseg button { border: 0; background: var(--surface); padding: 0 14px; height: 30px; font: 500 12.5px var(--font); color: var(--ink-2); display: flex; gap: 6px; align-items: center; cursor: pointer; }
.ml-pseg.sm button { height: 26px; padding: 0 10px; font-size: 12px; }
.ml-pseg button + button { border-inline-start: 1px solid var(--line); }
.ml-pseg i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); } .ml-pseg .p2 i { background: var(--bad); }
.ml-pseg .on { background: var(--brand-50); color: var(--brand-700); font-weight: 600; } .ml-pseg .p2.on { background: var(--bad-bg); color: var(--bad); }
.ml-co { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 6px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font: 500 12px var(--font); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
[dir=rtl] .ml-co { padding: 0 6px 0 10px; }
.ml-co .ml-lg.avatar { width: 20px; height: 20px; font-size: 9px; border-radius: 6px; }
.ml-co.on { border-color: var(--brand-500); background: var(--brand-50); font-weight: 600; color: var(--brand-700); }
.ml-lkc { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 6px 0 10px; border-radius: 9px; background: var(--info-bg); color: var(--info); font-size: 12.5px; font-weight: 600; max-width: 100%; }
.ml-lkc a { display: inline-flex; align-items: center; gap: 7px; color: inherit; min-width: 0; overflow: hidden; }
.ml-lkc a > span, .ml-lkc > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-lkc small { font-weight: 500; opacity: .8; white-space: nowrap; }
.ml-lkc button { border: 0; background: none; color: inherit; padding: 2px; border-radius: 5px; display: grid; cursor: pointer; opacity: .7; }
.ml-lkc button:hover { opacity: 1; background: rgba(37, 99, 235, .12); }
.ml-lkc svg { width: 13px !important; height: 13px !important; }
.ml-lkc.sm { height: 30px; font-size: 12px; }
.ml-lkl { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; max-height: 230px; overflow-y: auto; padding: 4px; background: var(--surface-2); }
.ml-lkt > button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 7px; font: 600 12.5px var(--font); color: var(--ink); cursor: pointer; text-align: start; }
.ml-lkt > button:hover, .ml-lki button:hover { background: var(--brand-50); }
.ml-lkt b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ml-lkt small { color: var(--muted); font-size: 11px; }
.ml-lki { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 8px 6px 32px; }
[dir=rtl] .ml-lki { padding: 0 32px 6px 8px; }
.ml-lki button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; font: 500 11.5px var(--font); color: var(--ink-2); padding: 2px 8px; cursor: pointer; }
.ml-cl { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.ml-cli { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 4px 6px; border-radius: 7px; }
.ml-cli:hover { background: var(--surface-2); }
.ml-cli.drag { opacity: .4; }
.ml-cli .bx { width: 16px; height: 16px; border: 1.8px solid var(--faint); border-radius: 5px; flex-shrink: 0; background: none; padding: 0; display: grid; place-items: center; color: #fff; cursor: pointer; }
button.bx:hover { border-color: var(--ok); }
.ml-cli .bx svg { width: 10px !important; height: 10px !important; stroke-width: 3.2; }
.ml-cli.dn .bx { background: var(--ok); border-color: var(--ok); }
.ml-cli.dn .tx { text-decoration: line-through; color: var(--muted); }
.ml-cli .tx { flex: 1; min-width: 0; }
.ml-cli .gp { color: var(--faint); width: 14px !important; height: 14px !important; cursor: grab; }
.ml-cli .dx, .ml-fil .dx { border: 0; background: none; color: var(--faint); padding: 2px; border-radius: 5px; display: grid; cursor: pointer; opacity: 0; }
.ml-cli:hover .dx, .ml-fil:hover .dx, .dx:focus { opacity: 1; }
.ml-cli .dx:hover, .ml-fil .dx:hover { color: var(--bad); background: var(--bad-bg); }
.ml-cli .dx svg, .ml-fil .dx svg { width: 13px !important; height: 13px !important; }
.ml-cli.add { color: var(--muted); }
.ml-cli.add input { border: 0; background: none; outline: none; flex: 1; font: 13px var(--font); color: var(--ink); min-width: 0; }
.ml-tg { display: flex; gap: 8px 18px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.ml-tg > span { display: inline-flex; align-items: center; gap: 7px; }
.ml-sw { width: 32px; height: 18px; border-radius: 999px; background: #d6d8e1; position: relative; display: inline-block; border: 0; padding: 0; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.ml-sw::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.ml-sw.on { background: var(--brand-600); }
.ml-sw.on::after { inset-inline-start: 16px; }
/* الوضع الداكن: مقبض المفتاح يبقى فاتحاً (يُحوَّل اللون في dark.css) */
html.dark .ml-sw::after { background: #000000; }
.ml-att { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); border: 0; background: none; font: 500 12.5px var(--font); cursor: pointer; padding: 4px 6px; border-radius: 7px; }
.ml-att:hover { color: var(--brand-700); background: var(--brand-50); }
.ml-fch { display: inline-flex; align-items: center; gap: 5px; background: var(--gray-bg); border-radius: 7px; padding: 2px 4px 2px 8px; font-size: 12px; color: var(--ink-2); max-width: 200px; }
.ml-fch > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-fch button { border: 0; background: none; color: var(--muted); display: grid; padding: 1px; cursor: pointer; }
.ml-fch svg { width: 12px !important; height: 12px !important; }
.ml-inp { height: 30px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); padding: 0 10px; font: 12.5px var(--font); color: var(--ink); outline: none; min-width: 0; }
.ml-inp:focus { border-color: var(--brand-300); background: var(--surface); }
.ml-wbox { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ml-wait { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ml-wait .ml-inp { flex: 1 1 180px; }
.ml-vhost:empty { display: none; }
.ml-vhost { padding: 0 20px 10px; }
.ml-vhost .vrec { position: static; }
/* لوحة «بند جديد» */
.ml-ap-root:not(.ph) { display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; }
.ml-ap { position: relative; width: 700px; max-width: 100%; max-height: calc(100vh - 12vh); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(18, 19, 26, .22); display: flex; flex-direction: column; overflow: hidden; transform: translateY(10px) scale(.98); opacity: 0; transition: transform .18s ease, opacity .18s ease; }
.ml-ap-root.on .ml-ap { transform: none; opacity: 1; }
.ml-ap-root.busy .ml-ap-f .btn { opacity: .6; pointer-events: none; }
.ml-ap-h { display: flex; align-items: center; gap: 10px; padding: 14px 20px 10px; flex-shrink: 0; }
.ml-ap-h > svg { color: var(--brand-600); }
.ml-ap-h b { font-size: 15px; }
.ml-ap-h .ml-x { margin-inline-start: auto; }
.ml-saved { font-size: 11.5px; color: var(--muted); display: flex; gap: 5px; align-items: center; }
.ml-saved svg { width: 13px !important; height: 13px !important; color: var(--ok); }
.ml-tpl { padding: 0 20px 12px; flex-shrink: 0; }
.ml-tpr, .ml-mine { display: flex; gap: 7px; flex-wrap: wrap; }
.ml-mine { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); align-items: center; }
.ml-tp { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font: 500 12.5px var(--font); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.ml-tp em { font-style: normal; font-size: 14px; }
.ml-tp.on { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.ml-tp.mine, .ml-tp.dash { border-style: dashed; color: var(--muted); }
.ml-tp.mine.open { border-style: solid; color: var(--brand-700); background: var(--brand-50); }
.ml-tp.mine svg { width: 14px !important; height: 14px !important; }
.ml-tp.u { padding: 0 4px 0 0; gap: 0; }
[dir=rtl] .ml-tp.u { padding: 0 0 0 4px; }
.ml-tp.u > button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0 8px 0 11px; height: 100%; }
.ml-tp.u small { font: 600 10.5px var(--mono); color: var(--muted); }
.ml-tp.u .ux { border: 0; background: none; color: var(--faint); display: grid; padding: 3px; border-radius: 6px; cursor: pointer; }
.ml-tp.u .ux:hover { color: var(--bad); background: var(--bad-bg); }
.ml-tp.u .ux svg { width: 12px !important; height: 12px !important; }
.ml-ap-sc { overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.ml-ap-t { padding: 4px 20px 2px; border-top: 1px solid var(--line-2); }
.ml-ap-t input { width: 100%; border: 0; background: none; font: 700 21px var(--font); padding: 12px 0 2px; outline: none; color: var(--ink); }
.ml-ap-t input::placeholder { color: var(--faint); font-weight: 600; }
.ml-ap-t textarea { width: 100%; border: 0; background: none; resize: none; font: 13px/1.6 var(--font); color: var(--ink-2); outline: none; padding: 4px 0 10px; }
.ml-ap-b { padding: 4px 20px 12px; display: flex; flex-direction: column; }
.ml-fr { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); }
.ml-fr.top { align-items: start; }
.ml-fr.top > label { padding-top: 5px; }
.ml-fr > label { font-size: 12.5px; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.ml-fr > label svg { color: var(--brand-600); width: 15px !important; height: 15px !important; }
.ml-fv { min-width: 0; }
.ml-smart { margin: 0 20px 14px; border: 1px dashed var(--brand-300); border-radius: 12px; background: var(--brand-50); padding: 9px 12px; }
.ml-smart .h { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--brand-700); font-weight: 600; }
.ml-smart .h small { margin-inline-start: auto; font-weight: 500; color: var(--muted); }
.ml-smart input { width: 100%; border: 0; background: none; outline: none; font: 13.5px var(--font); margin-top: 6px; color: var(--ink); }
.ml-parsed { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.ml-parsed:empty { display: none; }
.ml-parsed span { font-size: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--ink-2); }
.ml-parsed b { color: var(--brand-600); font-weight: 600; }
.ml-ap-f { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); flex-shrink: 0; }
.ml-ap-f .kh { font-size: 11px; color: var(--muted); display: flex; gap: 5px; align-items: center; }
.ml-ap-f .sp { flex: 1; }
.ml-ap-f .btn svg { width: 15px; height: 15px; }
.ml-more { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-top: 1px dashed var(--line); background: none; padding: 10px 0; font: 500 12.5px var(--font); color: var(--muted); cursor: pointer; text-align: start; }
.ml-more > svg:first-child { color: var(--brand-600); }
.ml-more .cv { margin-inline-start: auto; transition: transform .2s; }
.ml-more.open .cv { transform: rotate(180deg); }
.ml-moresum { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; }
.ml-moresum .ml-o { height: 26px; font-size: 11.5px; padding: 0 8px; pointer-events: none; }
.ml-ap-root.ph .ml-ap-t textarea { display: none; }
.ml-ap-root.ph.more-on .ml-ap-t textarea { display: block; }
.ml-ap-root.ph:not(.more-on) .ml-smart { display: none; }
/* درج التفاصيل */
.ml-drw { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 470px; max-width: 100%; background: var(--surface); border-inline-start: 1px solid var(--line); box-shadow: 0 24px 60px rgba(18, 19, 26, .22); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .2s ease; }
[dir=ltr] .ml-drw { transform: translateX(100%); }
.ml-drw-root.on .ml-drw { transform: none; }
.ml-drw-root .ml-scrim { background: rgba(18, 19, 26, .2); }
.ml-dw-h { padding: 16px 22px 12px; border-bottom: 1px solid var(--line-2); flex-shrink: 0; }
.ml-dw-h .tl { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ml-dw-h .sp, .ml-dw-f .sp, .ml-fs-h .sp, .ml-dsec h4 .sp { flex: 1; }
.ml-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; font-weight: 600; background: var(--gray-bg); color: var(--ink-2); }
.ml-pill svg { width: 12px !important; height: 12px !important; }
.ml-pill.doing, .ml-pill.ok { background: var(--ok-bg); color: var(--ok); }
.ml-pill.wt { background: var(--orange-bg); color: var(--orange); }
.ml-pill.p2 { background: var(--bad-bg); color: var(--bad); }
.ml-dh { display: flex; gap: 11px; align-items: flex-start; }
.ml-dh .ml-ck { margin-top: 6px; width: 22px; height: 22px; }
.ml-dtitle { flex: 1; border: 1px solid transparent; border-radius: 8px; resize: none; font: 700 19px/1.4 var(--font); padding: 2px 6px; background: transparent; color: var(--ink); overflow: hidden; outline: 0; }
.ml-dtitle:hover { border-color: var(--line); } .ml-dtitle:focus { border-color: var(--brand-300); background: var(--surface); }
.ml-dw-b { flex: 1; overflow-y: auto; padding: 4px 22px 10px; overscroll-behavior: contain; }
.ml-kv { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px 10px; font-size: 12.5px; padding: 12px 0; border-bottom: 1px solid var(--line-2); margin: 0; align-items: center; }
.ml-kv dt { color: var(--muted); display: flex; align-items: center; gap: 7px; }
.ml-kv dt svg { width: 14px !important; height: 14px !important; }
.ml-kv dd { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
.ml-kv dd.col { flex-direction: column; align-items: flex-start; }
.ml-kv dt { white-space: nowrap; }
.ml-kv dd.tg { gap: 8px 18px; color: var(--ink-2); }
.ml-kv dd.tg > span { display: inline-flex; align-items: center; gap: 7px; }
.ml-kv .ml-wait { width: 100%; }
.ml-kv .ml-wait .ml-in { flex: 1 1 160px; }
.ml-kv .ar { color: var(--muted); }
[dir=ltr] .ml-kv .ar { transform: scaleX(-1); }
.ml-in { height: 30px; border: 1px solid transparent; border-radius: 8px; background: var(--surface-2); padding: 0 8px; font: 500 12.5px var(--font); color: var(--ink); outline: 0; min-width: 0; }
.ml-in:hover { border-color: var(--line); } .ml-in:focus { border-color: var(--brand-300); background: var(--surface); }
.ml-in[type=time] { font-family: var(--mono); width: 96px; direction: ltr; }
.ml-in[type=date] { width: 138px; }
select.ml-in { max-width: 220px; cursor: pointer; }
.ml-fu { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.ml-dsec { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.ml-dsec.last { border: 0; }
.ml-dsec h4 { font-size: 12.5px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.ml-dsec h4 > svg { color: var(--brand-600); }
.ml-dsec h4 small { margin-inline-start: auto; color: var(--muted); font-weight: 500; }
.ml-dsec h4 .ml-o input { display: none; }
.ml-bar { height: 5px; border-radius: 9px; background: var(--line); overflow: hidden; margin-bottom: 8px; }
.ml-bar i { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.ml-note { width: 100%; font: 13px/1.6 var(--font); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; resize: vertical; min-height: 64px; outline: 0; }
.ml-note:focus { border-color: var(--brand-300); background: var(--surface); }
.ml-att { flex-wrap: wrap; }
.ml-dsec .ml-att { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; cursor: default; }
.ml-dsec .ml-att:hover { background: none; }
.ml-fil { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px 7px 10px; font-size: 12px; min-width: 0; }
.ml-fil > a { display: flex; gap: 9px; align-items: center; color: var(--ink); flex: 1; min-width: 0; text-decoration: none !important; }
.ml-fil p { margin: 0; min-width: 0; }
.ml-fil p > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-fil small { display: block; color: var(--muted); font-size: 10.5px; }
.ml-fil .vn { flex: 1; min-width: 0; }
.ml-fil .fi { width: 30px; height: 34px; border-radius: 6px; background: var(--bad-bg); color: var(--bad); display: grid; place-items: center; font: 700 9px var(--mono); flex-shrink: 0; }
.ml-hist { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 7px; }
.ml-hist li { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ml-hist li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line); flex-shrink: 0; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--faint); margin-inline-end: 3px; }
.ml-hist b { color: var(--ink-2); font-weight: 600; }
.ml-hist time { margin-inline-start: auto; font-size: 11px; }
.ml-dw-f { display: flex; gap: 7px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; flex-shrink: 0; }
.ml-dw-f .btn svg { width: 14px; height: 14px; }
/* قائمة منبثقة */
.ml-menu { position: fixed; z-index: 350; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(18, 19, 26, .18); padding: 5px; animation: fade .12s ease; }
.ml-menu button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: 500 13px var(--font); color: var(--ink-2); cursor: pointer; text-align: start; }
.ml-menu button:hover, .ml-menu button:focus { background: var(--surface-2); color: var(--ink); outline: 0; }
.ml-menu button svg { color: var(--muted); }
.ml-menu button.danger, .ml-menu button.danger svg { color: var(--bad); }
.ml-menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 2px; }
/* نافذة عامة (مراجعة الأسبوع · الاختصارات · فلاتر الجوال) */
.ml-fs-root:not(.ph) { display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px 16px; }
.ml-fs { position: relative; width: 620px; max-width: 100%; max-height: 86vh; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(18, 19, 26, .22); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(10px); transition: opacity .18s, transform .18s; }
.ml-kb-root .ml-fs, .ml-pf-root .ml-fs { width: 440px; }
.ml-fs-root.on .ml-fs { opacity: 1; transform: none; }
.ml-fs-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line-2); }
.ml-fs-h b { font-size: 16px; display: block; }
.ml-fs-h small { font-size: 12px; color: var(--muted); }
.ml-fs-b { overflow-y: auto; padding: 6px 20px 20px; }
.ml-fs-b h4 { font-size: 13px; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.ml-fs-b h4 > svg { color: var(--brand-600); }
.ml-fs-b h4 small { margin-inline-start: auto; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.ml-rvs { display: flex; gap: 14px; align-items: center; padding: 14px; margin-top: 10px; border-radius: 14px; background: linear-gradient(135deg, #fff8eb 0%, #ffffff 60%); border: 1px solid var(--brand-100); }
.ml-rvs b { display: block; font-size: 15px; }
.ml-rvs > div > span { font-size: 12.5px; color: var(--muted); }
.ml-rvs .ml-ring b { font-size: 14px; }
.ml-rvl { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ml-rvi { display: flex; gap: 10px; align-items: center; padding: 9px 12px; }
.ml-rvi + .ml-rvi { border-top: 1px solid var(--line-2); }
.ml-rvi .tt { flex: 1; min-width: 0; }
.ml-rvi .tt b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-rvi .tt small { font-size: 11.5px; color: var(--muted); }
.ml-rvi .ac { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.ml-heatw { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ml-heat { display: grid; grid-template-columns: repeat(14, 16px); gap: 4px; direction: ltr; }
.ml-heat i { width: 16px; height: 16px; border-radius: 4px; background: var(--line); }
.ml-heat i.a { background: #ead2a7; } .ml-heat i.b { background: #d6a65a; } .ml-heat i.c { background: var(--brand-500); }
.ml-heat i.td { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--brand-600); }
.ml-heatw .ml-hint { font-size: 12.5px; margin: 0; } .ml-heatw .ml-hint b { color: var(--ink); }
.ml-heatw .ml-hint svg { color: var(--orange); }
.ml-rvd { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.ml-rvd li { display: flex; gap: 8px; align-items: center; }
.ml-rvd svg { width: 13px !important; height: 13px !important; color: var(--ok); }
.ml-kbs { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; align-items: center; font-size: 13px; padding-top: 12px; }
.ml-kbs kbd { font-size: 12px !important; padding: 1px 8px; line-height: 20px; text-align: center; justify-self: start; }
.ml-pfl { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.ml-pfl .lb { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ml-pfl .w { display: flex; width: 100%; } .ml-pfl .seg.w button { flex: 1; justify-content: center; min-height: 40px; }
.ml-pfl .btn.w { justify-content: center; min-height: 44px; margin-top: 8px; }
.ml-pfr { display: flex; gap: 10px; align-items: center; font-size: 14px; padding: 10px 0; }
/* ودجت «عملي»: زر الإضافة */
button.mw-qa { cursor: pointer; font: 500 13.5px var(--font); color: var(--muted); text-align: start; }
button.mw-qa span { flex: 1; }
button.mw-qa:hover { border-color: var(--brand-300); color: var(--brand-700); }
@media (max-width: 1250px) { .ml-focus { grid-template-columns: 230px minmax(0, 1fr); } .ml-focus .ml-ftop { grid-column: 1 / -1; border-inline-start: 0 !important; border-top: 1px solid var(--brand-100); } .ml-cols { grid-template-columns: minmax(0, 1fr) 270px; } }
@media (max-width: 1060px) { .ml-cols { grid-template-columns: minmax(0, 1fr); } .ml-rail { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .ml-srch { width: 160px; } }
@media (max-width: 760px) {
  .ml-page { gap: 10px; padding-bottom: 96px; }
  .ml-ph { gap: 10px; flex-wrap: nowrap; }
  .ml-tt, .ml-h h1, .ml-seg:not(.w), .ml-rvbtn { display: none !important; }
  .ml-h .sub { font-size: 12.5px; }
  .ml-pbtn { display: inline-grid !important; }
  .ml-focus { display: none; }
  .ml-pfc { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #fff8eb 0%, #ffffff 60%); border: 1px solid var(--brand-100); border-radius: 16px; padding: 12px; }
  .ml-pfc .ml-ring b { font-size: 13px; }
  .ml-pfc .tx { flex: 1; min-width: 0; }
  .ml-pfc .tx .t { display: block; font: 700 14.5px/1.4 var(--font); color: var(--ink); background: none; border: 0; padding: 0; text-align: start; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ml-pfc .tx small { font-size: 12px; color: var(--muted); display: flex; gap: 5px; align-items: center; white-space: nowrap; overflow: hidden; }
  .ml-pfc .tx small svg { width: 12px !important; height: 12px !important; }
  .ml-pfc .tx small .ok { color: var(--ok); font-size: 12px; }
  .ml-pfc .go { width: 42px; height: 42px; border-radius: 12px; background: var(--ok); color: #fff; border: 0; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; }
  .ml-pfc .go svg { width: 20px !important; height: 20px !important; stroke-width: 2.4; }
  .ml-fbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -12px; padding-inline: 12px; }
  .ml-fbar::-webkit-scrollbar { display: none; }
  .ml-fbar .sp, .ml-csel, .ml-fbar [data-sort], .ml-fbar [data-showdone], .ml-srch:not(.open) { display: none; }
  .ml-fbar .ml-chip { height: 36px; flex-shrink: 0; }
  .ml-srch.open { order: -1; width: auto; flex: 1 0 100%; }
  .ml-srch kbd { display: none; }
  .ml-fbar:has(.ml-srch.open) { flex-wrap: wrap; }
  .ml-cols { display: block; }
  .ml-rail { display: none; }
  .ml-gh { padding: 9px 12px 7px; min-height: 40px; }
  .ml-row { padding: 10px 12px; gap: 10px; }
  .ml-grip, .ml-ra, .xp { display: none !important; }
  .ml-rt { font-size: 14px; }
  .ml-rt .tt { white-space: normal; }
  .ml-rw { min-width: 0; }
  .ml-ck { width: 24px; height: 24px; }
  .ml-row .ml-ck { margin: -8px; border-width: 0; width: 40px; height: 40px; background: transparent !important; position: relative; color: transparent; }
  .ml-row .ml-ck::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; border: 2px solid var(--faint); } .ml-row .ml-ck.p2::before { border-color: var(--bad); background: rgba(214, 59, 59, .08); }
  .ml-row .ml-ck.on::before { background: var(--ok); border-color: var(--ok); }
  .ml-row .ml-ck svg { position: relative; z-index: 1; }
  .ml-row .ml-ck.on { color: #fff; }
  .ml-add { min-height: 32px; min-width: 32px; justify-content: center; }
  .ml-fab { inset-inline-end: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 58px; height: 58px; padding: 0; border-radius: 18px; justify-content: center; }
  .ml-fab span, .ml-fab kbd { display: none; }
  .ml-fab svg { width: 26px !important; height: 26px !important; }
  .ml-bulk { bottom: calc(78px + env(safe-area-inset-bottom)); left: 12px; right: 12px; transform: none; overflow-x: auto; scrollbar-width: none; }
  .ml-bulk button span { display: none; }
  .ml-bulk button { width: 40px; justify-content: center; padding: 0; flex-shrink: 0; }
  .ml-bulk .sp { flex: 1; }
  /* أوراق سفلية */
  .ml-ap-root.ph .ml-ap, .ml-drw-root.ph .ml-drw, .ml-fs-root.ph .ml-fs { position: absolute; inset-inline: 0; bottom: 0; top: auto; width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; border: 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .3); transform: translateY(100%); opacity: 1; transition: transform .22s ease; }
  .ml-ap-root.ph.on .ml-ap, .ml-drw-root.ph.on .ml-drw, .ml-fs-root.ph.on .ml-fs { transform: none; }
  .ml-ap-root.ph .ml-ap-h { padding: 4px 16px 8px; }
  .ml-ap-root.ph .ml-tpl { padding: 0 16px 10px; }
  .ml-ap-root.ph .ml-tpr { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .ml-ap-root.ph .ml-tp { flex-shrink: 0; height: 34px; font-size: 12.5px; }
  .ml-ap-root.ph .ml-ap-t { padding: 0 16px; }
  .ml-ap-root.ph .ml-ap-t input { font-size: 18px; padding-top: 10px; }
  .ml-ap-root.ph .ml-ap-b { padding: 2px 16px 8px; }
  .ml-ap-root.ph .ml-fr { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 9px 0; }
  .ml-ap-root.ph .ml-fr > label { font-size: 12px; }
  .ml-ap-root.ph .ml-fr.top > label { padding-top: 0; }
  .ml-ap-root.ph .ml-opts.nowrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ml-ap-root.ph .ml-o, .ml-ap-root.ph .ml-co { height: 36px; flex-shrink: 0; }
  .ml-ap-root.ph .ml-pseg { display: flex; width: 100%; } .ml-ap-root.ph .ml-pseg button { flex: 1; justify-content: center; height: 36px; }
  .ml-ap-root.ph .ml-cl { background: var(--surface-2); border-radius: 10px; padding: 4px; }
  .ml-ap-root.ph .ml-cli { min-height: 36px; }
  .ml-ap-root.ph .ml-cli .dx { opacity: 1; }
  .ml-ap-root.ph .ml-tw { width: 100%; } .ml-ap-root.ph .ml-tw .ml-pk { flex: 1; } .ml-ap-root.ph .ml-tw .picker { width: 100%; }
  .ml-ap-root.ph .ml-pk .picker-face, .ml-drw-root.ph .ml-pk .picker-face { height: 36px; }
  .ml-drw-root.ph .ml-pk.dt .picker { width: 200px; }
  .ml-ap-root.ph .ml-smart { margin: 0 16px 12px; }
  .ml-ap-root.ph .ml-ap-f { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
  .ml-ap-root.ph .ml-ap-f .btn { height: 46px; flex: 1; justify-content: center; font-size: 14.5px; border-radius: 12px; }
  .ml-ap-root.ph .ml-ap-f .btn-primary { flex: 1.5; }
  .ml-ap-root.ph .ml-ap-t input, .ml-ap-root.ph input, .ml-ap-root.ph textarea, .ml-drw-root.ph input, .ml-drw-root.ph textarea, .ml-drw-root.ph select { font-size: 16px !important; }
  .ml-drw-root.ph .ml-dw-h { padding: 6px 16px 10px; }
  .ml-drw-root.ph .ml-dtitle { font-size: 17px; }
  .ml-drw-root.ph .ml-dw-b { padding: 0 16px; }
  .ml-drw-root.ph .ml-kv { grid-template-columns: 92px minmax(0, 1fr); }
  .ml-drw-root.ph .ml-in { height: 36px; }
  .ml-drw-root.ph .ml-in[type=date] { width: 100%; }
  .ml-drw-root.ph .ml-dsec .ml-att { grid-template-columns: minmax(0, 1fr); }
  .ml-drw-root.ph .ml-cli .dx, .ml-drw-root.ph .ml-fil .dx { opacity: 1; }
  .ml-drw-root.ph .ml-dw-f { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
  .ml-drw-root.ph .ml-dw-f .btn { flex: 1; justify-content: center; min-height: 44px; }
  .ml-drw-root.ph .ml-dw-f .sp { display: none; }
  .ml-drw-root.ph .ml-scrim { background: rgba(18, 19, 26, .38); }
  .ml-fs-root.ph .ml-fs-h { padding: 6px 16px 10px; }
  .ml-fs-root.ph .ml-fs-b { padding: 4px 16px calc(20px + env(safe-area-inset-bottom)); }
  .ml-rvi { flex-wrap: wrap; }
  .ml-rvi .ac { width: 100%; justify-content: flex-start; }
  .ml-rvi .ac .ml-o { height: 34px; }
  .ml-heat { grid-template-columns: repeat(14, 18px); } .ml-heat i { width: 18px; height: 18px; }
  .ml-menu button { min-height: 44px; }
}
.ml-page:has(.ml-bulk) .ml-fab { display: none; }
/* ───────── سجل النشاطات (al-) ───────── */
.al-c-security { --c: #d63b3b; --cb: #fdecec; } .al-c-work { --c: #a8690f; --cb: #fdf6ea; } .al-c-clients { --c: #2563eb; --cb: #e8f0fe; }
.al-c-finance { --c: #0f9960; --cb: #e7f7ef; } .al-c-team { --c: #7c5cd6; --cb: #f1ecfd; } .al-c-system { --c: #6b6f80; --cb: #f0f1f5; }
.al-page { --al-gap: 14px; }
.al-head .actions { align-items: center; }
.al-tabs { margin-bottom: 14px; }
.al-tabs svg { width: 16px; height: 16px; }
.al-sh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.al-sh h3 { font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.al-sh h3 svg { width: 16px; height: 16px; color: var(--warn); }
.al-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--cb, var(--gray-bg)); color: var(--c, var(--muted)); border: 1px solid color-mix(in srgb, var(--c, #6b6f80) 22%, transparent); }
.al-ic svg { width: 17px; height: 17px; }
.al-ic.big { width: 46px; height: 46px; border-radius: 13px; } .al-ic.big svg { width: 22px; height: 22px; }
.al-legend { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.al-legend i{ display: inline-block; }
.al-legend i { width: 8px; height: 8px; border-radius: 2px; }
.i1 { --ic: #d63b3b; } .i2 { --ic: #a8690f; } .i3 { --ic: #b9bccb; }
.al-legend i{ background: var(--ic); }
.avatar.al-av { width: 24px; height: 24px; font-size: 10.5px; }
.avatar.al-av.lg2 { width: 38px; height: 38px; font-size: 14px; }
.al-dot { position: absolute; top: 8px; inset-inline-start: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); }
.al-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.al-chip svg { width: 14px; height: 14px; color: var(--c, var(--muted)); }
.al-chip b { font-size: 11.5px; color: var(--muted); background: var(--gray-bg); border-radius: 99px; padding: 0 7px; }
.al-chip:hover { border-color: var(--c, var(--brand-300)); }
.al-chip.on { border-color: var(--c, var(--brand-500)); background: var(--cb, var(--brand-50)); color: var(--c, var(--brand-700)); }
.al-chip.on b { background: var(--surface); color: var(--c, var(--brand-700)); }
.al-dates { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.al-dates svg { width: 15px; height: 15px; }
.al-dates .input { border: 0; height: 32px; width: 150px; padding: 0 4px; background: transparent; box-shadow: none; font-size: 12.5px; }
.al-impseg { flex-shrink: 0; }
.al-impseg svg { width: 13px; height: 13px; vertical-align: -2px; margin-inline-end: 3px; }
.al-impseg button.active { color: var(--brand-700); }
.al-views { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid var(--line-2); }
.al-view { display: inline-flex; align-items: center; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); }
.al-view button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 4px 9px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.al-view svg { width: 13px; height: 13px; color: var(--muted); }
.al-view .al-view-x { padding: 4px 6px 4px 4px; color: var(--faint); }
.al-view.on { border-style: solid; border-color: var(--brand-300); background: var(--brand-50); }
.al-view.on button { color: var(--brand-700); }
.al-count { margin-inline-start: auto; }
.al-day + .al-day { border-top: 1px solid var(--line); }
.al-dc { font-size: 11px; font-weight: 700; color: var(--c); background: var(--cb); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.al-row { position: relative; display: grid; grid-template-columns: 52px 38px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.al-row[data-exp] { cursor: pointer; }
.al-row:hover { background: var(--surface-2); }
.al-row.flag::before { content: ''; position: absolute; inset-block: 8px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--c); }
.al-row.routine { opacity: .78; }
.al-row.routine .al-ic { background: var(--gray-bg); color: var(--muted); border-color: transparent; }
.al-time { font-size: 12.5px; color: var(--muted); padding-top: 7px; font-family: var(--mono); line-height: 1.2; }
.al-time small { display: block; font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.al-body { min-width: 0; padding-top: 2px; }
.al-sent { font-size: 13.8px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.al-sent b { color: var(--ink); font-weight: 700; }
.al-obj { color: var(--brand-600); font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; }
.al-obj:hover { color: var(--brand-700); text-decoration-style: solid; }
.al-x { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--gray-bg); border-radius: 6px; padding: 0 6px; }
.al-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--muted); }
.al-meta > i { font-style: normal; color: var(--faint); }
.al-co { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px 0 3px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.al-co i { font-style: normal; font-size: 9.5px; font-weight: 800; color: #fff; background: var(--brand-600); border-radius: 4px; padding: 0 3px; line-height: 15px; font-family: var(--mono); }
.al-grp { color: var(--muted); }
.al-rev { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 600; font-size: 12px; }
.al-rev svg { width: 13px; height: 13px; }
.al-end { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.al-imp { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 9px; white-space: nowrap; }
.al-imp.i1 { color: var(--bad); background: var(--bad-bg); }
.al-imp.i2 { color: var(--muted); background: var(--gray-bg); }
.al-imp.i3 { color: var(--faint); background: transparent; border: 1px dashed var(--line); }
.al-tog { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.al-tog svg { width: 15px; height: 15px; transition: transform .15s; }
.al-row.open .al-tog { border-color: var(--brand-300); color: var(--brand-600); }
.al-row.open .al-tog svg { transform: rotate(180deg); }
.al-det { grid-column: 3 / -1; margin-top: 8px; cursor: default; }
.al-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.al-kv > div { padding: 8px 12px; border-inline-end: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); min-width: 0; }
.al-kv small { display: block; font-size: 11px; color: var(--muted); }
.al-kv b { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.al-ok { color: var(--ok); } .al-bad { color: var(--bad); }
.al-chg { display: grid; gap: 6px; margin-bottom: 8px; }
.al-chg > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.al-chg .k { color: var(--muted); min-width: 70px; }
.al-chg .from { text-decoration: line-through; color: var(--muted); background: var(--bad-bg); border-radius: 6px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.al-chg .to { color: var(--ink); font-weight: 700; background: var(--ok-bg); border-radius: 6px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.al-chg .arr svg { width: 14px; height: 14px; color: var(--faint); vertical-align: -2px; }
.al-quote { margin: 6px 0 8px; padding: 6px 12px; border-inline-start: 3px solid var(--c, var(--brand-300)); background: var(--surface-2); border-radius: 6px; color: var(--ink-2); font-size: 13px; }
.al-gl { margin-top: 8px; display: grid; gap: 2px; }
.al-gi { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.al-gi > .num { color: var(--muted); font-family: var(--mono); font-size: 11.5px; width: 40px; flex-shrink: 0; }
.al-gi > span:nth-last-child(1):not(.al-imp), .al-gi > span[data-no-tr] { flex: 1; min-width: 0; }
.al-th { display: inline-flex; gap: 4px; flex-shrink: 0; }
.al-th img, .al-th-x { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; background: var(--gray-bg); border: 1px solid var(--line); display: inline-block; }
.al-th-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; color: var(--muted); }
.al-th-row .al-th img { width: 44px; height: 44px; }
.al-raw { margin-top: 8px; font-size: 12px; color: var(--muted); }
.al-raw pre { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px; margin: 6px 0 0; direction: ltr; text-align: left; max-height: 220px; overflow: auto; }
.al-det-act { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.al-det-act .mono { margin-inline-end: auto; }
.al-fold { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; font-size: 12.5px; color: var(--muted); background: repeating-linear-gradient(-45deg, var(--surface-2) 0 8px, var(--surface) 8px 16px); border-bottom: 1px solid var(--line-2); }
.al-fold > svg { width: 16px; height: 16px; }
.al-fold b { color: var(--ink-2); }
.al-kinds { display: flex; gap: 5px; flex-wrap: wrap; }
.al-kinds > span { border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; background: var(--surface); font-size: 11.5px; }
.al-fold-btn { margin-inline-start: auto; border: 0; background: transparent; color: var(--brand-600); font-weight: 700; cursor: pointer; font-size: 12.5px; }
.al-rx { background: var(--surface-2); }
.al-more, .al-end-note { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 16px; }
.al-end-note svg { width: 15px; height: 15px; }
/* حسب الشخص */
.al-pp { padding: 16px 18px; }
.al-pp-h { align-items: flex-start; flex-wrap: wrap; }
.al-daynav { display: flex; align-items: center; gap: 6px; }
.al-daynav .input { width: 210px; height: 36px; }
.al-daynav .icon-btn { width: 36px; height: 36px; }
.al-daynav .icon-btn:disabled { opacity: .4; cursor: default; }
.al-tl { margin: 6px 0 16px; }
.al-tl-axis, .al-tl-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; }
.al-tl-axis > div { position: relative; height: 20px; direction: ltr; }
.al-tl-axis i { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--faint); font-family: var(--mono); }
.al-tl-row { padding: 5px 0; }
.al-tl-n { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.al-tl-n b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-tl-track { direction: ltr; position: relative; height: 22px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); }
.al-tl-att { position: absolute; top: 9px; height: 4px; border-radius: 3px; background: color-mix(in srgb, #7c5cd6 45%, transparent); }
.al-tl-dot { position: absolute; top: 6px; width: 10px; height: 10px; margin-inline-start: -5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); }
.al-tl-dot.r { width: 6px; height: 6px; top: 8px; margin-inline-start: -3px; opacity: .55; }
.al-tl-now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--bad); border-radius: 2px; opacity: .6; }
.al-pcols { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.al-pc { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); min-width: 0; }
.al-pc-h { display: flex; align-items: center; gap: 10px; }
.al-pc-h b { display: block; font-size: 14px; }
.al-pc-h small { color: var(--muted); font-size: 11.5px; }
.al-pc-cats { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.al-pc-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.al-pc-l li { display: grid; grid-template-columns: 40px 8px 1fr; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.al-pc-l li > .num { font-family: var(--mono); color: var(--muted); font-size: 11.5px; }
.al-pc-l li > i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--faint)); align-self: center; }
.al-pc-l li.al-pc-r { color: var(--faint); }
.al-pc-l li.muted { display: block; }
/* سجل عنصر */
.al-ent { padding: 18px; }
.al-ent-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.al-ent-h > div { flex: 1; min-width: 200px; }
.al-ent-h h3 { font-size: 17px; }
.al-ent-h p { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.al-ent-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 12px; }
.al-steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0; margin: 0 0 16px; }
.al-steps li { font-size: 11.5px; color: var(--faint); text-align: center; }
.al-steps li i { display: block; height: 4px; border-radius: 3px; background: var(--line); margin-bottom: 6px; }
.al-steps li.done i { background: var(--ok); } .al-steps li.done { color: var(--muted); }
.al-steps li.cur i { background: var(--brand-500); } .al-steps li.cur { color: var(--brand-700); font-weight: 700; }
.al-ent-tl h5 { font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.al-et { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 8px 0; position: relative; }
.al-et .al-ic { width: 30px; height: 30px; border-radius: 9px; } .al-et .al-ic svg { width: 15px; height: 15px; }
.al-et > div { min-width: 0; }
.al-et small { display: block; margin-top: 2px; }
.al-et .al-th { margin-top: 6px; }
.al-et-t { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 5px; }
/* ورقة الفلاتر والتفاصيل */
.al-sheet h5 { font-size: 12.5px; color: var(--muted); margin: 14px 0 8px; font-weight: 600; }
.al-sheet h5:first-child { margin-top: 0; }
.al-sheet .al-views { padding: 0; border: 0; }
.al-sheet .al-impseg { display: flex; width: 100%; } .al-sheet .al-impseg button { flex: 1; padding: 8px 6px; }
.al-sh-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.al-sh-cats input { position: absolute; opacity: 0; pointer-events: none; }
.al-sh-cats .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.al-sh-cats .al-chip:has(input:checked) { border-color: var(--c); background: var(--cb); color: var(--c); }
.al-sh-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
.al-sh-row .input { width: auto; max-width: 60%; border: 0; box-shadow: none; text-align: end; height: 32px; background-color: transparent; }
.al-ds-h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.al-ds .al-kv { margin-top: 8px; }
@media (max-width: 760px) {
  .al-head { align-items: flex-start; margin-bottom: 12px; }
  .al-head p { display: none; }
  .al-head .actions { width: 100%; }
  .al-head [data-save]{ display: none !important; }
  .al-head .actions .btn { flex: 1; }
  .al-day + .al-day { border: 0; }
  .al-row { grid-template-columns: 36px minmax(0, 1fr); gap: 2px 10px; margin: 0 0 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .al-row.flag { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
  .al-row.flag::before { display: none; }
  .al-row .al-time { display: none; }
  .al-row .al-ic { grid-row: 1 / 3; grid-column: 1; }
  .al-row .al-body { grid-column: 2; }
  .al-row .al-end { display: none; }
  .al-fold { margin: 0 0 8px; border: 1px dashed var(--line); border-radius: 14px; }
  .al-fold .al-kinds { display: none; }
  .al-rx { background: transparent; }
  .al-tl-axis, .al-tl-row { grid-template-columns: 92px 1fr; gap: 8px; }
  .al-tl-n .avatar { display: none; }
  .al-pp, .al-ent { padding: 14px; }
  .al-steps li span { font-size: 10px; }
}

/* W2 — محادثات المندوب مع الإدارة فقط: شريط السياسة، جهات الإدارة، قفل المحادثة، ردود جاهزة */
.hb-policy { display: flex; align-items: flex-start; gap: 10px; margin: 0 12px 10px; padding: 10px 12px; border-radius: 12px; background: #fdf3e3; color: #8a5a0b; border: 1px solid #f3dfb8; }
.hb-policy svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.hb-policy span { display: grid; gap: 2px; } .hb-policy b { font-size: 13px; } .hb-policy small { font-size: 11.5px; color: #9a6a1c; }
.hb-lk { display: inline-grid; place-items: center; margin-inline-start: 6px; color: #6b6f80; } .hb-lk svg { width: 13px; height: 13px; }
.hb-admins { display: grid; gap: 8px; width: min(360px, 100%); margin-top: 8px; }
.hb-adm { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #eaecf0; border-radius: 14px; background: #fff; font: inherit; text-align: start; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.hb-adm:hover { border-color: #e6c88f; box-shadow: 0 2px 10px rgba(16, 24, 40, .06); }
.hb-adm span { display: grid; gap: 2px; min-width: 0; } .hb-adm b { font-size: 14px; color: #101828; } .hb-adm small { font-size: 12px; color: #667085; }
.hb-adm .hb-dot { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; border-radius: 50%; background: #12b76a; }
.hc-lock { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #f9fafb; border-top: 1px solid #f0f1f4; color: #667085; font-size: 13px; text-align: center; }
.hc-lock svg { width: 15px; height: 15px; flex: none; }
.hc-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; } .hc-quick::-webkit-scrollbar { display: none; }
.hc-quick button { flex: none; padding: 5px 11px; border: 1px solid #eaecf0; border-radius: 999px; background: #fff; font: 500 12.5px var(--font); color: #475467; cursor: pointer; white-space: nowrap; }
.hc-quick button:hover { border-color: #e6c88f; color: #8a5a0b; background: #fffaf2; }

/* == feature: sales pipeline stages (W5) == */
/* ── النسخ والأدلة: النسخة الإلكترونية + النسخة الورقية الممسوحة (W4) ── */
.pb-badge { white-space: nowrap; }
.pb-row { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; max-width: 840px; margin: 0 auto; }
.sc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sc-card > header { display: flex; align-items: flex-start; gap: 12px; }
.sc-card > header > div { flex: 1; min-width: 0; }
.sc-card > header b { display: block; font-size: 15px; }
.sc-card > header small { color: var(--muted); font-size: 12.5px; }
.sc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.sc-ic svg { width: 20px; height: 20px; }
.sc-ic.e { background: var(--info-bg); color: var(--info); }
.sc-ic.p { background: var(--brand-50); color: var(--brand-600); }
.sc-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.sc-dl dt { color: var(--muted); }
.sc-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sc-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 12px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); }
.sc-empty > svg { width: 28px; height: 28px; color: var(--brand-600); }
.sc-empty b { display: block; }
.sc-empty small { color: var(--muted); font-size: 12.5px; }
.sc-alert { margin: 0; }
.sc-vis { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--line-2); cursor: pointer; }
.sc-hist { max-width: 840px; margin: 14px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.sc-hist summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }
.sc-hist summary em { font-style: normal; font-size: 11px; background: var(--gray-bg); padding: 0 6px; border-radius: 99px; }
.sc-hist ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sc-hist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.sc-hist li > span:nth-child(2) { flex: 1; min-width: 180px; }
.sc-hist li small { flex-basis: 100%; color: var(--bad); }
.scu { display: flex; flex-direction: column; gap: 14px; }
.scu-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scu-pick small { flex-basis: 100%; }
.scu-cam { display: none; }
@media (pointer: coarse) { .scu-cam { display: inline-flex; } }
.scu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.scu-list:empty { display: none; }
.scu-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.scu-list li svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.scu-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scu-list li[draggable="true"] { cursor: grab; }
.scu-list li.drag { opacity: .45; }
.scu-list li.over { border-color: var(--brand-500); box-shadow: inset 0 3px 0 var(--brand-500); }
.scu-grip { color: var(--muted); font-size: 12px; letter-spacing: -2px; flex: none; user-select: none; }
.scu-th { width: 40px; height: 52px; border-radius: 6px; object-fit: cover; flex: none; background: var(--surface); border: 1px solid var(--line); }
.scu-th-i { display: grid; place-items: center; }
.sc-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-thumb { position: relative; width: 64px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; text-decoration: none !important; color: var(--muted); }
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-thumb-pdf { display: grid; place-items: center; gap: 2px; }
.sc-thumb-pdf svg { width: 20px; height: 20px; }
.sc-thumb-pdf small { font-size: 11px; }
.sc-thumb em { position: absolute; inset-inline-start: 4px; bottom: 4px; font-style: normal; font-size: 11px; font-weight: 700; background: rgb(0 0 0 / .55); color: #fff; border-radius: 99px; padding: 0 6px; line-height: 18px; }
.sc-thumb:hover { border-color: var(--brand-500); }
.scu-n { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.scu-prog { height: 6px; border-radius: 99px; background: var(--gray-bg); overflow: hidden; }
.scu-prog i { display: block; height: 100%; width: 0; background: var(--brand-500); transition: width .2s; }
/* شاشة المقارنة */
.cmp { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cmp-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.cmp-head .grow { flex: 1; min-width: 0; }
.cmp-head h2 { margin: 4px 0 2px; font-size: 20px; }
.cmp-head small { color: var(--muted); }
.cmp-switch { display: none; gap: 4px; background: var(--gray-bg); border-radius: 10px; padding: 3px; }
.cmp.one .cmp-switch { display: flex; }
.cmp-switch button { flex: 1; border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; min-height: 40px; }
.cmp-switch button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.cmp-switch em { font-style: normal; font-size: 11px; }
.cmp-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cmp.one .cmp-body { grid-template-columns: 1fr; }
.cmp-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.cmp-pane[hidden] { display: none; }
.cmp-pane > header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.cmp-pane > header b { font-size: 14px; margin-inline-end: auto; }
.cmp-pane > header code { font-size: 11.5px; color: var(--muted); background: var(--gray-bg); padding: 2px 8px; border-radius: 99px; }
.cmp-pane > header .ok { color: var(--ok); font-weight: 700; }
.cmp-tools { display: inline-flex; align-items: center; gap: 2px; }
.cmp-scroll { height: calc(100vh - 330px); min-height: 420px; overflow: auto; background: #f4f3ef; padding: 12px; }
.cmp.one .cmp-scroll { height: auto; max-height: 75vh; }
.cmp-doc { width: 100%; border: 0; display: block; background: #fff; box-shadow: var(--shadow); }
.cmp-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; --z: 1; --r: 0deg; }
.cmp-pages figure { margin: 0; width: calc(100% * var(--z)); max-width: none; flex: none; }
.cmp-pages img { width: 100%; display: block; background: #fff; box-shadow: var(--shadow); transform: rotate(var(--r)); transition: transform .2s; }
.cmp-pages.rot figure { padding: 18% 0; }
.cmp-pages figcaption { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.cmp-sync { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); align-self: flex-start; }
.cmp.one .cmp-sync { display: none; }
.cmp-review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cmp-review h4 { margin: 0; }
.cmp-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.cmp-checks label { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; min-height: 44px; }
.cmp-checks label:has(input:checked) { border-color: var(--ok); background: var(--ok-bg); }
.cmp-checks input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.cmp-checks b { display: block; font-size: 13.5px; }
.cmp-checks small { color: var(--muted); font-size: 12px; }
.cmp-acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 899px) { .cmp-body { grid-template-columns: 1fr; } .cmp-head .seg { display: none; } .cmp-acts .btn { flex: 1 1 100%; } }
.sc-vis { min-height: 44px; }
.sc-vis input, .cmp-sync input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--brand-600); }
.cmp-sync { min-height: 44px; cursor: pointer; }
@media (max-width: 560px) {
  .sc-dl dt:has(+ dd .sc-thumbs), .sc-dl dd:has(.sc-thumbs) { grid-column: 1 / -1; }
  .scu-list li { flex-wrap: wrap; row-gap: 4px; }
  .scu-list .grow { flex-basis: calc(100% - 120px); white-space: normal; overflow-wrap: anywhere; }
  .scu-list li > small { margin-inline-start: auto; }
  .cmp-tools .btn { min-width: 44px; min-height: 44px; }
  .cmp-switch button { min-height: 44px; }
  .cmp-head .grow > a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* == feature: public quote page /q/:token (W5) == */
.qp-page { background: var(--bg); min-height: 100vh; margin: 0; }
.qp { max-width: 680px; margin: 0 auto; padding: 20px 16px 40px; font-family: var(--font); color: var(--ink); }
.qp-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 80px 16px; text-align: center; }
.qp-loading img { width: 40px; height: 40px; }
.qp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.qp-logo { height: 34px; }
.qp-lang { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 600 13px var(--font); cursor: pointer; }
.qp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); }
.qp-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.qp-top small { color: var(--muted); font-weight: 600; }
.qp-top h1 { margin: 2px 0 0; font-size: 22px; font-family: var(--mono); }
.qp-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); }
.qp-meta b { color: var(--ink); }
.qp-banner { border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; background: var(--gray-bg); font-weight: 600; font-size: 14px; }
.qp-banner.ok { background: var(--ok-bg, #e7f6ec); color: var(--ok, #157a3c); }
.qp-banner.warn { background: var(--warn-bg, #fdf3e1); color: var(--warn, #9a5b00); }
.qp-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.qp-items li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qp-items li p { margin: 4px 0 0; font-size: 13px; color: var(--muted); white-space: pre-line; }
.qp-items li small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.qp-items li > span { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.qp-tot { margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.qp-tot div { display: flex; justify-content: space-between; }
.qp-tot b { font-family: var(--mono); }
.qp-tot .g { border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 4px; font-size: 18px; font-weight: 800; }
.qp-terms h3 { font-size: 14px; margin: 18px 0 6px; }
.qp-terms p { margin: 0; white-space: pre-line; font-size: 13.5px; color: var(--muted); }
.qp-fp { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.qp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.qp-actions .btn { flex: 1 1 140px; justify-content: center; min-height: 46px; font-size: 15px; }
.qp-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.qp-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; }
.qp-form input, .qp-form textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 500 15px var(--font); background: var(--surface); color: var(--ink); }
.qp-note { margin: 0; font-size: 13px; color: var(--muted); }
.qp-err { color: var(--bad, #b42318); font-size: 13.5px; font-weight: 600; }
.qp-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }

/* == feature: prospect quotes builder (W5) == */
.sl-qrow { display: grid; grid-template-columns: minmax(0, 1fr) 84px 110px 104px 30px; grid-template-areas: "svc qty price sum rm"; gap: 8px; align-items: center; }
.sl-qrow [data-svc] { grid-area: svc; } .sl-qrow [data-qty] { grid-area: qty; } .sl-qrow [data-price], .sl-qrow .sl-qprice { grid-area: price; } .sl-qrow .sl-qsum { grid-area: sum; } .sl-qrow [data-rm] { grid-area: rm; }
.sl-qprice { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sl-qsum { text-align: end; font-size: 13.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.sl-qtot { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; }
.sl-qtot > div:not(.alert) { display: flex; justify-content: space-between; }
.sl-qtot b { font-variant-numeric: tabular-nums; }
.sl-qtot .g { font-size: 16px; font-weight: 800; }
.sl-qlist li { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .sl-qrow { grid-template-columns: 72px minmax(0, 1fr) auto 30px; grid-template-areas: "svc svc svc svc" "qty price sum rm"; row-gap: 6px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
}

/* == feature: client «دفعت» claims (W6.1) == */
.pr-claim { grid-column: 2 / -1; margin: 0; font-size: 12.5px; color: var(--ink-2); background: var(--warn-bg); border-radius: 8px; padding: 6px 10px; }
.pr-claim.bad { background: var(--bad-bg); color: var(--bad); }
.pr-act .badge { align-self: center; }
.claim-ms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.claim-m { position: relative; flex: 1 1 110px; }
.claim-m input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.claim-m span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600; background: var(--surface); }
.claim-m span svg { width: 18px; height: 18px; }
.claim-m input:checked + span { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-700); }
.claim-m input:focus-visible + span { outline: 2px solid var(--brand-600); outline-offset: 2px; }
@media (max-width: 640px) { .pr-claim { grid-column: 1 / -1; } }

/* == feature: client OTP signing code step (W6.3) == */
.csg-code { font-size: 26px; letter-spacing: 10px; text-align: center; font-weight: 700; max-width: 240px; margin: 14px auto 8px; display: block; font-variant-numeric: tabular-nums; }
.csg-card [data-resend] { margin-top: 6px; }
/* الأدلة والختم النهائي (W7) */
.ev-wrap { margin-top: 14px; }
.ev-list ol { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.ev-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.ev-list li small { grid-column: 1; color: var(--muted); }
.ev-list li code { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 11.5px; color: var(--muted); }
@media (max-width: 560px) { .ev-list li { grid-template-columns: 1fr; } .ev-list li code { grid-column: 1; grid-row: auto; } }
/* صفحة التحقق العامة /verify (W7) */
.vp-card { display: flex; flex-direction: column; gap: 14px; }
.vp-h { margin: 0; font-size: 22px; }
.vp-muted { margin: 0; color: var(--muted); font-size: 14px; }
.vp-or { margin-top: 6px; }
.vp-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.vp-form label { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; }
.vp-form input { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: 600 18px var(--mono); letter-spacing: .12em; text-align: center; background: var(--surface); color: var(--ink); text-transform: uppercase; }
.vp-form .btn { min-height: 48px; padding-inline: 26px; font-size: 15px; }
.vp-hero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--gray-bg); }
.vp-hero.ok { background: var(--ok-bg, #e7f6ec); } .vp-hero.bad { background: var(--bad-bg, #fdecea); } .vp-hero.warn { background: var(--warn-bg, #fdf3e1); }
.vp-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: var(--muted); }
.vp-hero.ok .vp-ic { background: var(--ok, #157a3c); } .vp-hero.bad .vp-ic { background: var(--bad, #b42318); } .vp-hero.warn .vp-ic { background: var(--warn, #9a5b00); }
.vp-hero h1 { margin: 0 0 4px; font-size: 20px; line-height: 1.3; }
.vp-hero span { display: block; color: var(--ink-2); font-size: 13.5px; overflow-wrap: anywhere; }
.vp-hero .vp-mono { text-align: start; margin-top: 2px; }
.vp-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.vp-dl dt { color: var(--muted); } .vp-dl dd { margin: 0; overflow-wrap: anywhere; }
.vp-mono { font-family: var(--mono); font-size: 13px; }
.vp-h2 { margin: 4px 0 0; font-size: 15px; }
.vp-signers, .vp-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vp-signers li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.vp-signers li > div { flex: 1; min-width: 0; } .vp-signers small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.vp-signers i { font-style: normal; color: var(--ok, #157a3c); font-weight: 800; }
.vp-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); font-weight: 700; font-size: 13px; flex: none; }
.vp-facts li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.vp-facts svg { color: var(--ok, #157a3c); flex: none; }
.vp-drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 14px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; color: var(--ink-2); }
.vp-drop svg { color: var(--brand-600); } .vp-drop small { color: var(--muted); font-size: 12.5px; max-width: 440px; }
.vp-drop.on { border-color: var(--brand-500); background: var(--brand-50); }
.vp-cmp:empty { display: none; }
.vp-res { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; }
.vp-res b { font-size: 15px; } .vp-res.ok { background: var(--ok-bg, #e7f6ec); color: var(--ok, #157a3c); } .vp-res.bad { background: var(--bad-bg, #fdecea); color: var(--bad, #b42318); }
.vp-hash, .vp-cert { margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.vp-hash code, .vp-cert code { font-family: var(--mono); font-size: 11.5px; overflow-wrap: anywhere; color: var(--ink-2); }
.vp-cert a { color: var(--brand-600); font-weight: 600; }

/* أمان: أي أيقونة من icon() بلا قاعدة حجم تأخذ حجم السطر بدل أن تتمدّد لعرض الصفحة (أيقونة «افتح يحتاجني» صارت 350px). :where بلا وزن — أي قاعدة حجم أخرى تتقدّم عليها */
:where(svg[viewBox="0 0 24 24"][aria-hidden="true"]) { width: 1.25em; flex-shrink: 0; }
