/*
 * AR&T — ملف التصميم الوحيد (الهوية الجديدة، 25-11-2026).
 * المتغيرات في الأعلى؛ يُحمَّل بعد app.css وart.css فيغلب عليهما. لا شعار ولا علامة مائية: الاسم نصاً فقط.
 */
:root {
  --brand: #12315C;          /* أزرق داكن: القائمة الجانبية والأزرار الرئيسية */
  --brand-hover: #0D2748;
  --brand-link: #2F6FB5;
  --brand-soft: #EAF1FB;     /* منطقة السحب والبطاقة المختارة */
  --brand-line: #9DB6DA;
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --line: #DDE3EC;
  --line-soft: #EEF1F6;
  --line-input: #CBD4E1;
  --head: #F8FAFD;           /* رأس الجداول */
  --text: #0F1B2D;
  --muted: #5B6677;
  --nav-text: #D5E0F2;
  --ok-bg: #E3F3EA;   --ok-fg: #14653C;      /* جاهز / مرحّل */
  --draft-bg: #EEF1F6; --draft-fg: #3F4D63;  /* مسودة */
  --saved-bg: #E6EEF9; --saved-fg: #12315C;  /* محفوظ */
  --warn-bg: #FBF0D9; --warn-fg: #7A4D00;    /* بحاجة توضيح */
  --bad-bg: #FBE7E5;  --bad-fg: #9C1F18;     /* مكررة / معاد */
  --radius: 10px;
  --radius-card: 16px;
  --hb-h: 152px;

  /* الشريط العلوي والبحر: لون البحر هنا فقط */
  --sea-bar: #0A2A52;  --sea-ring: #7FB2E5;  --sea-bg: #D3E8FA;
  --sep: rgba(255, 255, 255, .3);  --add-line: #6F8FBF;  --neg: #FFD0C7;
  --wave-1: #B1D5F5; --wave-2: #8DBFEE; --wave-3: #68A8E4;
  --wave-line: #FFFFFF; --wave-line-2: #EAF4FD;
  /* دوائر المؤشرات */
  --c-cash: #1E6FE0;  --c-cash-ring: #A9CBF7;
  --c-perf: #0097A7;  --c-perf-ring: #B2EBF2;
  --c-third: #B8326F; --c-third-ring: #F5C6DB;
  /* الأقسام الستة (اللون، الإطار) */
  --c-inbox: #1565E0;   --c-inbox-ring: #C9DDFB;
  --c-entries: #00A38F; --c-entries-ring: #BDEDE5;
  --c-cheques: #F29900; --c-cheques-ring: #FDE3B0;
  --c-chart: #7B3FE4;   --c-chart-ring: #DECFFA;
  --c-tb: #EF4B2F;      --c-tb-ring: #FBCFC6;
  --c-adjustments: #C2185B; --c-adjustments-ring: #F4C4D9;
  --c-reports: #2DAA4F; --c-reports-ring: #C4EBD0;
  --badge: #C62828;
  --panel-bg: #0E2747;  --panel-line: #35537F;
  --sec-none: #3A5A85;   /* صفحات الإدارة بلا قسم */
}
.sec-inbox   { --sec: var(--c-inbox);   --sec-ring: var(--c-inbox-ring); }
.sec-entries { --sec: var(--c-entries); --sec-ring: var(--c-entries-ring); }
.sec-cheques { --sec: var(--c-cheques); --sec-ring: var(--c-cheques-ring); }
.sec-chart   { --sec: var(--c-chart);   --sec-ring: var(--c-chart-ring); }
.sec-tb      { --sec: var(--c-tb);      --sec-ring: var(--c-tb-ring); }
.sec-adjustments { --sec: var(--c-adjustments); --sec-ring: var(--c-adjustments-ring); }
.sec-reports { --sec: var(--c-reports); --sec-ring: var(--c-reports-ring); }

html, body { background: var(--bg) !important; background-image: none !important; }
body {
  font-family: "IBM Plex Sans Arabic", system-ui, Tahoma, sans-serif;
  color: var(--text);
  font-variant-numeric: tabular-nums;   /* أرقام بعرض ثابت */
}
a { color: var(--brand); }
a:hover { color: var(--brand-link); }

/* ---------- الهيكل: شريط علوي ثابت + شريط عنوان القسم + المحتوى ---------- */
.app-shell { display: block; min-height: 100vh; }
.app-main { min-width: 0; }

/* الشريط العلوي (152px): الشعار، فاصل، دوائر المؤشرات، وأدوات الشركة */
.hb {
  position: sticky; top: 0; z-index: 50; height: var(--hb-h); min-height: var(--hb-h); flex: none; box-sizing: border-box; background: var(--sea-bar);
  display: flex; align-items: center; gap: 16px; padding: 0 24px; color: #fff;
}
.hb-logo {
  flex: none; width: 68px; height: 68px; box-sizing: border-box; border-radius: 50%; background: #fff; color: var(--sea-bar);
  border: 5px solid var(--sea-ring); display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500; direction: ltr; text-decoration: none; letter-spacing: .3px;
}
.hb-logo:hover { color: var(--sea-bar); }
.hb-sep { flex: none; width: 1px; height: 96px; background: var(--sep); }
.hb-circles { display: flex; align-items: center; gap: 16px; }
.hb-circle-wrap { position: relative; flex: none; }
.hb-circle {
  width: 128px; height: 128px; box-sizing: border-box; border-radius: 50%; color: #fff; text-decoration: none;
  border: 6px solid var(--ring); background: var(--fill);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
}
.hb-circle:hover { color: #fff; }
.hb-cash  { --fill: var(--c-cash);  --ring: var(--c-cash-ring); }
.hb-perf  { --fill: var(--c-perf);  --ring: var(--c-perf-ring); }
.hb-third { --fill: var(--c-third); --ring: var(--c-third-ring); }
.hb-c-name { font-size: 14px; line-height: 1.2; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-c-val { font-size: 19px; font-weight: 500; line-height: 1.2; direction: ltr; unicode-bidi: isolate; max-width: 108px; font-variant-numeric: tabular-nums; }
.hb-c-val.is-neg { color: var(--neg); }
.hb-pencil {
  position: absolute; top: 0; inset-inline-end: 0; width: 32px; height: 32px; box-sizing: border-box; border-radius: 50%;
  background: #fff; border: 2px solid var(--sea-bar); color: var(--sea-bar); display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; font-size: 16px;
}
.hb-add {
  flex: none; width: 64px; height: 64px; box-sizing: border-box; border-radius: 50%; background: transparent; color: #fff;
  border: 2px dashed var(--add-line); display: flex; align-items: center; justify-content: center; font-size: 26px; cursor: pointer;
}
.hb-add:hover { border-color: #fff; }
.hb-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.hb a:focus-visible, .hb button:focus-visible, .hb summary:focus-visible, .hb select:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.hb .btn-primary { background: #fff; color: var(--sea-bar); border-color: #fff; }
.hb .btn-primary:hover { background: var(--sea-bg); color: var(--sea-bar); }
.hb .bell { border-color: var(--sea-ring); background: transparent; color: #fff; font-size: 20px; cursor: pointer; list-style: none; }
.hb .bell::-webkit-details-marker { display: none; }
.hb .bell:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* قوائم الشريط العلوي (الشركة، جديد، المستخدم): خلفية داكنة موحّدة */
.hb-panel {
  position: absolute; inset-inline-start: 0; top: calc(100% + 8px); z-index: 60; min-width: 14rem; max-width: 22rem;
  background: var(--panel-bg); color: #fff; border: 1px solid var(--panel-line); border-radius: 10px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px; box-shadow: none;
}
.hb-panel[hidden] { display: none; }
.hb-panel a, .hb-panel button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; box-sizing: border-box; text-align: start;
  background: none; border: 0; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 14px; color: #fff; text-decoration: none; cursor: pointer;
}
.hb-panel a:hover, .hb-panel button:hover, .hb-panel a:focus-visible, .hb-panel button:focus-visible { background: rgba(255, 255, 255, .14); color: #fff; outline: none; }
.hb-panel a[aria-selected="true"] { font-weight: 600; }
.hb-panel-empty { padding: 9px 12px; font-size: 14px; color: #B9C8E0; }
.hb-co-wrap, .user-menu, .new-menu { position: relative; }
.hb-co {
  display: flex; align-items: center; gap: 10px; height: 44px; max-width: 280px; box-sizing: border-box; padding: 0 14px;
  background: rgba(255, 255, 255, .12); border: 1px solid var(--panel-line); border-radius: 10px; color: #fff; cursor: pointer;
  font: inherit; font-size: 18px; font-weight: 500;
}
.hb-co:hover { background: rgba(255, 255, 255, .18); }
.hb-co-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-co .ti { font-size: 14px; flex: none; }
.user-menu > summary { list-style: none; }
.user-menu > summary::-webkit-details-marker { display: none; }
.hb-user { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px; color: #fff; font-size: 15px; cursor: pointer; }
.hb-user .ti { font-size: 22px; }
.user-menu .hb-panel { inset-inline-start: auto; inset-inline-end: 0; min-width: 11rem; }
.hb .new-menu-panel { inset-inline-start: 0; inset-inline-end: auto; }

/* شريط عنوان القسم (52px) بلون القسم */
.topbar {
  height: 52px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 36px; background: var(--sec, var(--sec-none)); color: #fff;
}
.topbar-title { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.topbar h1 { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.3; color: #fff; }
.topbar .page-sub { font-size: 13px; color: rgba(255, 255, 255, .85); margin: 0; }
.topbar-actions { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; margin-inline-start: auto; }
.topbar-actions .btn { height: 36px; font-size: 14px; }
.topbar .btn-primary, .topbar .btn-outline, .topbar .btn-light { background: #fff; color: var(--sec, var(--sec-none)); border-color: #fff; }
.topbar .btn-primary:hover, .topbar .btn-outline:hover, .topbar .btn-light:hover { background: rgba(255, 255, 255, .88); color: var(--sec, var(--sec-none)); }
.topbar a { color: #fff; }
.topbar .btn { color: var(--sec, var(--sec-none)); }
main.app-content { padding: 24px 36px 40px; }

/* لون القسم شريطاً جانبياً (6px) على جهة البداية لصفوف الجداول والبطاقات */
.in-section .card, .in-section .queue-card, .in-section .hm-row:not(.hm-head), .in-section .hm-empty,
.in-section table.data tbody td:first-child, .in-section .el-table tbody td:first-child {
  border-inline-start: 6px solid var(--sec);
}

/* ---------- الشاشة الرئيسية: ست دوائر على موجة ---------- */
main.menu-stage { position: relative; overflow: hidden; background: var(--sea-bg); height: calc(100vh - var(--hb-h)); min-height: 440px; padding: 0; }
/* الأحجام ثابتة بالبكسل؛ المواضع (x,y) والموج يحسبها السكربت من عرض المنطقة وارتفاعها ويملآنها */
.menu-wave { position: absolute; inset: 0; width: 100%; height: 100%; }
.wl-1 { fill: var(--wave-1); } .wl-2 { fill: var(--wave-2); } .wl-3 { fill: var(--wave-3); }
.wline-1 { stroke: var(--wave-line); stroke-width: 3; }
.wline-2 { stroke: var(--wave-line-2); stroke-width: 2; }
.menu-item {
  position: absolute; left: 0; top: 0; width: 92px; margin-left: -46px; margin-top: -46px;   /* المركز عند (x,y): left فيزيائي عمداً لأن x إحداثي شاشة */
  display: flex; flex-direction: column; align-items: center; animation: menu-float 3.6s ease-in-out var(--d) infinite;
}
.menu-circle {
  position: relative; width: 92px; height: 92px; box-sizing: border-box; border-radius: 50%;
  background: var(--sec); border: 5px solid var(--sec-ring); outline: 2px solid #fff;
  display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; transition: transform .15s ease;
}
.menu-circle .ti { font-size: 32px; line-height: 1; }
.menu-circle:hover, .menu-circle:focus-visible { transform: scale(1.1); color: #fff; }
.menu-circle:focus-visible { outline: 3px solid var(--sea-bar); outline-offset: 3px; }
.menu-label { margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--sea-bar); white-space: nowrap; }
.menu-badge {
  position: absolute; top: -6px; inset-inline-end: -6px; min-width: 24px; height: 24px; box-sizing: border-box; padding: 0 5px; border-radius: 99px;
  background: #fff; border: 2px solid var(--badge); color: var(--badge); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
@keyframes menu-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@media (prefers-reduced-motion: reduce) { .menu-item { animation: none; } .menu-circle { transition: none; } }

/* ---------- نافذة تعديل الدائرة ---------- */
.circle-dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(24rem, 92vw); box-shadow: none; }
.circle-dialog::backdrop { background: rgba(10, 42, 82, .45); }
.circle-dialog form { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.circle-dialog h2 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--sea-bar); }
.circle-dialog label { font-size: 14px; color: var(--muted); margin-top: 6px; }
.circle-dialog .ctl { height: 44px; padding: 0 12px; width: 100%; box-sizing: border-box; }
.circle-err { min-height: 18px; font-size: 13px; color: var(--bad-fg); }
.circle-actions { display: flex; gap: 8px; margin-top: 12px; }
.circle-actions [hidden] { display: none; }

/* ---------- المؤشرات النقدية ---------- */
.cash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 26px; }
.cash-card { padding: 18px 20px; }
.cash-label { font-size: 14px; color: var(--muted); }
.cash-value { font-size: 26px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.cash-value.is-neg { color: var(--bad-fg); }
.cash-card.is-selected { background: var(--brand-soft); }
.cash-h { font-size: 16px; font-weight: 600; margin: 8px 0 10px; }
.cash-chart { padding: 16px 20px 12px; margin-bottom: 26px; }
.cash-legend { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-inline-start: 12px; }
.lg-r, .bar-r { background: var(--c-cash); } .lg-s, .bar-s { background: var(--c-perf); }
.cash-bars { display: flex; gap: 8px; height: 170px; align-items: stretch; }
.cash-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.cash-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); }
.bar { width: 40%; max-width: 22px; border-radius: 3px 3px 0 0; min-height: 0; }
.cash-m { font-size: 12px; color: var(--muted); padding-top: 4px; }

@media (max-width: 900px) {
  .hb { height: auto; min-height: var(--hb-h); flex-wrap: wrap; padding: 12px 16px; }
  .hb-sep { display: none; }
  .topbar { padding: 0 16px; }
  main.app-content { padding: 16px 16px 32px; }
}

/* ---------- الأزرار والحقول ---------- */
.btn {
  height: 44px; padding: 0 18px; border-radius: var(--radius); font-size: 15px; font-weight: 600;
  justify-content: center; border: 1px solid transparent; text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-light { background: #fff; color: var(--text); border-color: var(--line-input); font-weight: 500; }
.btn-light:hover { background: var(--brand-soft); color: var(--text); }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand-line); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-danger { border-color: #F3C4BF; color: var(--bad-fg); background: #fff; }
.btn-danger:hover { background: var(--bad-bg); }
.ctl, .field input[type=text], .field input[type=password], .field input[type=number], .field input[type=email],
.field select, .field textarea {
  border: 1px solid var(--line-input); border-radius: var(--radius); background: #fff; color: var(--text);
}
.ctl:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18, 49, 92, .14);
}
.company-select {
  height: 44px; border: 1px solid var(--line-input); border-radius: var(--radius); background: #fff;
  font-size: 15px; font-weight: 500; padding: 0 14px; min-width: 14rem; max-width: 22rem; color: var(--text);
}
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--line-input); border-radius: var(--radius); background: #fff; text-decoration: none; }
.bell .badge { position: absolute; top: -6px; inset-inline-end: -6px; font-size: 11px; }

/* ---------- البطاقات والجداول ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: none; }
table.data th {
  background: var(--head); color: var(--muted); font-size: 13px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
table.data td { border-bottom: 1px solid var(--line-soft); }
table.data tr:hover td { background: #F8FAFD; }
.bg-white.border.rounded-xl, .bg-white.border.border-slate-200 { border-color: var(--line); border-radius: var(--radius-card); }

/* ---------- الحالات (شارات) ---------- */
.badge, .status-pill { border-radius: 99px; font-size: 13px; font-weight: 600; padding: 4px 12px; }
.badge-green, .status-posted { background: var(--ok-bg); color: var(--ok-fg); }
.badge-blue, .status-saved { background: var(--saved-bg); color: var(--saved-fg); }
.badge-gray, .status-draft { background: var(--draft-bg); color: var(--draft-fg); }
.badge-amber { background: var(--warn-bg); color: var(--warn-fg); }
.badge-red, .status-returned { background: var(--bad-bg); color: var(--bad-fg); }

/* ---------- الدخول ---------- */
.login-card { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--brand);
  border-radius: var(--radius-card); box-shadow: 0 12px 32px rgba(15, 27, 45, .08); padding: 2rem; }
.login-name { font-size: 44px; font-weight: 700; letter-spacing: 1px; direction: ltr; text-align: center; color: var(--brand); line-height: 1.2; }
.login-tag { text-align: center; color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- الرئيسية ---------- */
.hm-drop {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  border: 2px dashed var(--brand-line); border-radius: var(--radius-card); background: var(--brand-soft); padding: 28px;
}
.hm-drop.bulk-drop-zone { flex-direction: row; text-align: start; padding: 28px; cursor: default; }
.hm-drop.drag-over { border-color: var(--brand); background: #DCE8F8; }
.hm-drop-title { font-size: 20px; font-weight: 700; color: var(--brand); }
.hm-drop-sub { font-size: 14px; color: #3F4D63; margin-top: 6px; }
.hm-drop-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hm-alert { display: block; background: var(--warn-bg); color: var(--warn-fg); border-radius: var(--radius); padding: 10px 16px;
  margin-bottom: 16px; font-size: 14px; text-decoration: none; }
.hm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.queue-card, .queue-inbox, .queue-returned, .queue-drafts, .queue-to_post {
  background: #fff; color: var(--text); border: 2px solid var(--line); border-radius: 14px; padding: 20px 22px;
  align-items: flex-start; gap: 0; cursor: pointer; text-align: start;
}
.queue-card:hover { box-shadow: none; border-color: var(--brand-line); }
.queue-card.is-selected, .queue-inbox.is-selected, .queue-returned.is-selected, .queue-drafts.is-selected, .queue-to_post.is-selected {
  background: var(--brand-soft); border-color: var(--brand);
}
.queue-card .queue-count { font-size: 34px; font-weight: 700; line-height: 1; }
.queue-card .queue-title { font-size: 16px; font-weight: 600; margin-top: 8px; }
.queue-card .queue-sub { font-size: 13px; color: var(--muted); opacity: 1; margin-top: 2px; }
.queue-card.is-empty { opacity: 1; }
.hm-review { display: flex; align-items: center; }
.hm-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); overflow-x: auto; }
.hm-row {
  display: grid; grid-template-columns: 44px minmax(260px, 1fr) 130px 140px 96px; gap: 16px; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid var(--line-soft); min-width: 780px;
}
.hm-row:last-child { border-bottom: 0; }
.hm-row[data-href] { cursor: pointer; }
.hm-row[data-href]:hover { background: #F8FAFD; }
.hm-head { background: var(--head); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); padding: 14px 24px; }
.hm-thumb { display: flex; align-items: center; justify-content: center; width: 44px; height: 56px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--head); overflow: hidden; text-decoration: none; }
a.hm-thumb:hover { border-color: var(--brand); }
.hm-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hm-thumb .thumb-pdf { font-size: 11px; font-weight: 700; color: var(--bad-fg); }
.hm-thumb.is-none { border-style: dashed; background: transparent; }
.hm-main { min-width: 0; }
.hm-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.hm-note { font-size: 13px; color: var(--bad-fg); margin-top: 3px; }
.hm-reason { font-size: 13px; color: var(--warn-fg); margin-top: 3px; }
.hm-end { text-align: end; }
.hm-amount { font-size: 16px; font-weight: 600; direction: ltr; }
[dir="rtl"] .hm-amount.num { text-align: left; }
.hm-cur { font-size: 12px; color: var(--muted); font-weight: 400; }
.hm-empty { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.bulk-progress:empty { display: none; }

/* ---------- القيود ---------- */
.el-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.el-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border: 1px solid var(--line-input);
  border-radius: 99px; background: #fff; color: var(--text); font-size: 14px; text-decoration: none; }
.el-chip:hover { background: var(--brand-soft); color: var(--text); }
.el-chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.el-chip-hint { font-size: 13px; color: var(--muted); margin-inline-start: 8px; }
.chq-att { min-width: 11rem; font-size: 13px; }
.chq-file { margin-top: 2px; }
.chq-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; }
.el-adv { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 12px; }
.el-adv label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.el-adv .el-in { min-width: 9rem; }
.el-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); overflow: auto; max-height: calc(100vh - 230px); }
.el-table { min-width: 980px; width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.el-date { white-space: nowrap; }
.el-table thead th { position: sticky; z-index: 2; background: var(--head); }   /* رأس ثابت عند التمرير */
.el-table .el-titles th { top: 0; height: 42px; padding: 12px 14px 8px; border-bottom: 0; }
.el-table .el-filters th { top: 42px; padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.el-in { width: 100%; height: 36px; box-sizing: border-box; border: 1px solid var(--line-input); border-radius: 8px; background: #fff;
  padding: 0 10px; font-size: 13px; font-weight: 400; color: var(--text); }
.el-in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18, 49, 92, .14); }
.el-range { display: flex; gap: 6px; }
.el-table th.el-no { width: 100px; } .el-table th.el-date { width: 200px; } .el-table th.el-doc { width: 180px; }
.el-table th.el-amt { width: 120px; } .el-table th.el-status { width: 120px; }
.el-table td { padding: 14px; vertical-align: middle; }
.el-no a { font-weight: 600; text-decoration: none; }
.el-desc { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* سطر واحد مقطوع بنقاط */
.el-row[data-href] { cursor: pointer; }
.el-empty { text-align: center; padding: 36px !important; color: var(--muted); }
.el-empty > div { margin-bottom: 12px; }
.num-plain { font-variant-numeric: tabular-nums; }

/* ---------- شرح بسطر واحد وأيقونة (؟) + شريط التنبيه ---------- */
.help-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; position: relative; }
.help-tip { position: relative; display: inline-block; }
.help-tip > summary { list-style: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--brand-line);
  color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: #fff; }
.help-tip > summary::-webkit-details-marker { display: none; }
.help-tip[open] > summary { background: var(--brand); color: #fff; border-color: var(--brand); }
.help-pop { position: absolute; z-index: 30; top: 30px; inset-inline-start: 0; width: min(26rem, 80vw); background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 27, 45, .14); padding: 14px 16px; font-size: 14px; line-height: 1.8; }
.tb-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--warn-bg); color: var(--warn-fg);
  border-radius: var(--radius); padding: 6px 8px 6px 16px; margin-bottom: 14px; font-size: 14px; }

@media print {
  .hb, .topbar { display: none !important; }
  .app-shell { display: block; }
  main.app-content { padding: 0 !important; }
}

/* دليل الحسابات: قسم العملاء والموردين */
.party-search, .party-add .ctl { width: 16rem; max-width: 100%; }
.party-add { align-items: center; }

/* التقارير */
.report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.report-card { display: block; padding: 18px 20px; text-decoration: none; color: var(--text); }
.report-card:hover { background: var(--brand-soft); color: var(--text); }
.report-title { font-size: 17px; font-weight: 600; }
.report-desc { font-size: 13px; color: var(--muted); margin-top: 6px; }

.menu-circle.is-disabled { opacity: .45; cursor: not-allowed; }
.menu-circle.is-disabled:hover { transform: none; }

/* الإعدادات */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
