/* ══════════════════════════════════════════════════════════════
   فيز التفعيل — نظيفة ومنظمة
   ══════════════════════════════════════════════════════════════ */

/* ── الهيدر ── */
.ac-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--sp-4);
}
.ac-head h2 { margin: 0; font-size: var(--fs-lg); color: var(--text-strong); }
.ac-head-start { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ac-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── حبّات الحالة ── */
.ac-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: var(--fw-medium);
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
.ac-chip svg { width: 13px; height: 13px; }
.ac-chip.is-ok { color: var(--success-text); background: var(--success-soft); border-color: transparent; }
.ac-chip.is-warn { color: var(--warning-text); background: var(--warning-soft); border-color: transparent; }

/* ── تنبيه الخطأ ── */
.ac-alert {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: var(--sp-4);
  border-radius: var(--radius-sm); font-size: 13px;
  color: var(--danger-text); background: var(--danger-soft);
}
.ac-alert svg { width: 16px; height: 16px; flex: none; }

/* ── شريط الفلاتر والبحث ── */
.ac-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: var(--sp-4);
}
.ac-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ac-tab {
  border: 1px solid transparent; background: transparent;
  color: var(--text-muted); border-radius: var(--radius-full);
  padding: 6px 12px; font: 600 12px/1.2 inherit; cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.ac-tab:hover { color: var(--text-strong); background: var(--surface-2); }
.ac-tab.is-on { color: var(--text-strong); background: var(--surface-2); border-color: var(--border-subtle); }
.ac-tab b { margin-inline-start: 4px; font-weight: inherit; }
.ac-tab-sep { width: 1px; align-self: stretch; background: var(--border-subtle); margin: 2px 4px; }
.ac-toolbar-end { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ac-pull-order { display: flex; gap: 4px; align-items: center; }
.ac-pull-order input { width: 120px; direction: ltr; text-align: center; font-variant-numeric: tabular-nums; }
.ac-search { width: min(160px, 100%); }

/* ── الجدول ── */
.ac-table-wrap {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface-1);
}
.ac-table { width: 100%; border-collapse: collapse; }
.ac-table thead { background: var(--surface-2); }
.ac-table th {
  padding: 10px 16px; font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--border-subtle);
}
.ac-table td {
  padding: 12px 16px; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle); vertical-align: middle;
}
.ac-table tbody tr:last-child td { border-bottom: 0; }
.ac-table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.ac-table tr[data-state="used"] { opacity: 0.5; }
/* قيد الاستخدام: مسحوبة لحساب — صبغة كهرمانية خفيفة وشريط عند بداية الصف */
.ac-table tr[data-state="inuse"] td { background: color-mix(in srgb, var(--warning-soft) 60%, transparent); }
.ac-table tr[data-state="inuse"] td:first-child { box-shadow: inset -3px 0 0 var(--warning); }

.ac-th-flag { width: 44px; }
.ac-th-acts { width: 100px; }
.ac-td-flag { text-align: center; font-size: 18px; }
.ac-td-card {
  direction: ltr; text-align: right; font-weight: 700; letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums; color: var(--text-strong);
  white-space: nowrap;
}
.ac-dots { color: var(--text-muted); margin-inline-end: 4px; letter-spacing: 0.15em; font-weight: var(--fw-normal); }
.ac-pending-card { color: var(--text-muted); font-weight: var(--fw-normal); }
.ac-td-cost { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac-td-status { min-width: 110px; }
.ac-td-acts { text-align: left; }
.ac-acts { display: flex; gap: 4px; justify-content: flex-end; }

/* ── شارة الحالة ── */
.ac-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; white-space: nowrap;
}
.ac-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted); flex: none;
}
.ac-badge[data-s="ready"]::before { background: var(--success); }
.ac-badge[data-s="error"]::before { background: var(--danger); }
.ac-badge[data-s="claiming"]::before, .ac-badge[data-s="pinned"]::before { background: var(--warning); }
.ac-badge[data-s="listed"]::before { background: var(--info); }
.ac-badge[data-s="inuse"] { color: var(--warning-text); font-weight: 600; }
.ac-badge[data-s="inuse"]::before { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
/* ‏وفيها مشكلة: خارجَ الدور — تُقرأ من بعيدٍ ولا تُخلَط بـ«تحتاج مراجعة» */
.ac-badge[data-s="problem"] { color: var(--danger-text); font-weight: 600; }
.ac-badge[data-s="problem"]::before { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.ac-note {
  display: block; margin-top: 3px; max-width: 240px;
  font-size: 11px; line-height: 1.45; color: var(--text-muted);
  overflow-wrap: break-word;
}
.ac-note > span { display: block; }
.ac-note bdi { color: var(--text-secondary); font-weight: 600; }
.ac-note[title] { cursor: help; }
.ac-hint { display: block; font-size: 10px; color: var(--danger-text); margin-top: 3px; max-width: 180px; line-height: 1.4; }

/* ── حالة فارغة ── */
.ac-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 20px; color: var(--text-muted); text-align: center;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  background: var(--surface-1);
}
.ac-empty svg { width: 32px; height: 32px; opacity: 0.5; }

/* ── مودال الكشف ── */
/* 100% لا 90vw: الـ90vw أعرض من محتوى المودال بعد الحشوة، فكان يقصّ يساره على الموبايل (قيس 390px) */
.ac-reveal-modal { min-width: min(380px, 100%); }
.ac-reveal-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  direction: ltr; margin: 16px 0;
}
.ac-reveal-cell {
  padding: 12px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); background: var(--surface-2);
}
.ac-reveal-cell.is-wide, .ac-reveal-cell.is-full { grid-column: 1 / -1; }
.ac-reveal-cell label { display: block; font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.ac-reveal-cell b { display: block; font-size: 14px; color: var(--text-strong); overflow-wrap: anywhere; }
/* ── ‏سؤالُ «فيها مشكلة»: داخلَ نافذة الفيزا، فلا تُمحى بياناتُها من تحت عينه ── */
.ac-problem-ask {
  margin-top: 10px; padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
  display: flex; flex-direction: column; gap: 8px;
}
.ac-problem-ask[hidden] { display: none; }
.ac-problem-q { margin: 0; font-size: 13px; font-weight: var(--fw-medium); color: var(--text-strong); }
.ac-problem-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-problem-chips .ac-chip { cursor: pointer; }
.ac-problem-chips .ac-chip.is-on { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 15%, transparent); border-color: transparent; }
.ac-problem-acts { display: flex; gap: 8px; justify-content: flex-end; }
.ac-reveal-acts .btn.is-danger { color: var(--danger-text); }
.ac-reveal-note .btn { margin-inline-start: auto; }

.ac-reveal-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; direction: rtl; }
.ac-reveal-acts .btn { white-space: nowrap; }
.ac-reveal-note {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin: 12px 0;
  border-radius: var(--radius-sm); font-size: 13px;
  color: var(--info-text); background: var(--info-soft);
}
.ac-reveal-note.is-warn { color: var(--warning-text); background: var(--warning-soft); }
.ac-reveal-note svg { width: 16px; height: 16px; flex: none; }
.ac-manual-save {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}
.ac-manual-save summary {
  color: var(--text-strong); font-size: 13px; font-weight: 600;
  cursor: pointer; margin-bottom: 12px;
}
.ac-manual-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 12px; direction: ltr;
}
.ac-manual-grid label { display: block; }
.ac-manual-grid label.is-wide { grid-column: 1 / -1; }
.ac-manual-grid span {
  display: block; margin-bottom: 5px;
  color: var(--text-muted); font-size: 11px;
}
.ac-manual-grid input { width: 100%; text-align: left; }

/* ── مع الحساب + السجل (داخل مودال الكشف) ── */
.ac-assign {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px; padding: 10px 12px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  background: var(--warning-soft);
}
.ac-assign[data-s="used"] { background: var(--surface-2); }
.ac-assign > svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--warning-text); }
.ac-assign[data-s="used"] > svg { color: var(--text-muted); }
.ac-assign-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ac-assign-label { font-size: 10px; color: var(--text-muted); }
.ac-assign-email {
  align-self: flex-start; max-width: 100%;
  font-size: 13px; font-weight: 600; color: var(--text-strong); overflow-wrap: anywhere;
}
.ac-assign-text small { font-size: 11px; color: var(--text-secondary); }
.ac-history { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.ac-history-title {
  display: flex; align-items: center; gap: 6px; margin: 0 0 10px;
  font-size: 12px; font-weight: 600; color: var(--text-strong);
}
.ac-history-title svg { width: 14px; height: 14px; color: var(--text-muted); }
.ac-history-empty { margin: 0; font-size: 12px; color: var(--text-muted); }
.ac-timeline { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.ac-timeline li { position: relative; display: flex; gap: 10px; padding-bottom: 10px; }
.ac-timeline li:last-child { padding-bottom: 0; }
.ac-timeline li::before {
  content: ""; position: absolute; inset-inline-start: 3.5px; top: 13px; bottom: 0;
  width: 1px; background: var(--border-default);
}
.ac-timeline li:last-child::before { display: none; }
.ac-ev-dot {
  position: relative; flex: none; width: 8px; height: 8px; margin-top: 5px;
  border-radius: 50%; background: var(--text-muted);
}
.ac-timeline li[data-a="pulled"] .ac-ev-dot { background: var(--warning); }
.ac-timeline li[data-a="returned"] .ac-ev-dot { background: var(--success); }
.ac-timeline li[data-a="unused"] .ac-ev-dot { background: var(--info); }
.ac-ev-text {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
  font-size: 12px; line-height: 1.5; color: var(--text-secondary);
}
.ac-ev-text b { color: var(--text-strong); font-weight: 600; }
.ac-ev-text bdi { overflow-wrap: anywhere; }
.ac-ev-text small { font-size: 11px; color: var(--text-muted); }
.ac-ev-text small.ac-ev-note { color: var(--text-secondary); }

/* ── مودال الشراء ── */
.ac-buy-modal { min-width: min(360px, 90vw); }
.ac-buy-desc { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); }
.ac-buy-field { margin-bottom: 16px; }
.ac-buy-field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.ac-buy-field input { width: 100%; text-align: center; direction: ltr; }

/* ── مودال تأكيد الشراء ── */
.ac-confirm-modal { min-width: min(400px, 90vw); }
.ac-confirm-modal > p { margin: 0 0 12px; font-size: 13px; color: var(--text-muted); }
.ac-quote-grid { border-block: 1px solid var(--border-subtle); margin: 12px 0; }
.ac-q-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 4px; font-size: 13px;
}
.ac-q-row + .ac-q-row { border-top: 1px solid var(--border-subtle); }
.ac-q-row span { color: var(--text-muted); }
.ac-q-row b { color: var(--text-strong); }
.ac-q-total b { color: var(--warning-text); font-size: 16px; }
.ac-warning {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--warning-text); line-height: 1.6; margin: 12px 0;
}
.ac-warning svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* ═══ شاشة الشراء — full-screen overlay كشاشة المدراء ═══ */
body.ac-full-open { overflow: hidden; }
.ac-full {
  position: fixed; inset: 0;
  z-index: calc(var(--z-modal) + 10);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface-0);
}
.ac-full > .ac-full-bar { grid-row: 1; }
.ac-full > .ac-full-status { grid-row: 2; }
.ac-full > .ac-typebar { grid-row: 3; }
.ac-full > .ac-full-stage { grid-row: 4; }
.ac-full-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 8px 16px; min-height: 48px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-subtle);
}
.ac-full-title {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  color: var(--text-strong);
}
.ac-full-title svg { width: 18px; height: 18px; color: var(--accent); }
.ac-full-acts { display: flex; align-items: center; gap: 12px; }
.ac-full-hint {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-muted);
}
.ac-full-hint svg { width: 14px; height: 14px; }
.ac-full-status {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  color: var(--info-text); background: var(--info-soft);
  border-bottom: 1px solid var(--border-subtle);
}
.ac-full-status svg { width: 18px; height: 18px; flex: none; }
.ac-full-status[data-tone="human"] { color: var(--warning-text); background: var(--warning-soft); }
.ac-full-status[data-tone="done"] { color: var(--success-text); background: var(--success-soft); }
.ac-full-status[data-tone="failed"] { color: var(--danger-text); background: var(--danger-soft); }
.ac-full-status .btn { margin-inline-start: auto; }
.ac-typebar {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; direction: rtl;
  background: var(--surface-1); border-bottom: 1px solid var(--border-subtle);
}
.ac-typebox {
  display: flex; align-items: center; gap: 7px;
  min-width: 280px; max-width: 560px; flex: 1;
  height: 34px; padding-inline: 10px 4px;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  background: var(--surface-0);
}
.ac-typebox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ac-typebox > svg { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.ac-typebox input {
  min-width: 0; flex: 1; border: 0; outline: 0; box-shadow: none;
  padding: 0; background: transparent; color: var(--text-strong);
  text-align: left; direction: ltr; font: inherit;
}
.ac-type-eye {
  display: grid; place-items: center; width: 28px; height: 28px; flex: none;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer;
}
.ac-type-eye:hover { background: var(--surface-2); color: var(--text-strong); }
.ac-type-eye svg { width: 15px; height: 15px; }
.ac-type-sep { width: 1px; height: 24px; background: var(--border-subtle); }
.ac-full-stage {
  display: flex; align-items: center; justify-content: center;
  direction: ltr; line-height: 0; overflow: hidden;
  background: #fff;
}
/* ‏والمسرحُ أبيضُ في الثيمين (هو أرضيّةُ الصفحة البعيدة)، فحبرُه داكنٌ في الثيمين:
   كان `--text-muted` — وهو أبيضُ في الداكن — فكانت «بيفتح البروفايل…» بيضاءَ على
   أبيض، وبدت الشاشةُ فارغةً معلّقة. قيس من لقطة المالك (2026-09-27). */
.ac-screen-load, .ac-screen-err {
  color: var(--slate-600); font-size: 15px; line-height: 1.6;
  display: flex; gap: 8px; align-items: center; padding: 24px;
}
.ac-screen-err { color: var(--rose-700); }

/* ── ريسبونسيف ── */
@media (max-width: 768px) {
  .ac-head { flex-direction: column; align-items: stretch; }
  .ac-head-actions { justify-content: flex-start; }
  .ac-toolbar { flex-direction: column; align-items: stretch; }
  .ac-search { width: 100%; }
  .ac-table-wrap { overflow-x: auto; }
  .ac-table { min-width: 520px; }
  .ac-reveal-grid { grid-template-columns: 1fr; }
  .ac-reveal-cell.is-wide { grid-column: auto; }
  .ac-manual-grid { grid-template-columns: 1fr; }
  .ac-manual-grid label.is-wide { grid-column: auto; }
  .ac-note { max-width: 200px; }
  .ac-full-bar { padding: 7px 10px; }
  .ac-full-hint { display: none; }
  .ac-typebar { flex-wrap: wrap; padding: 7px; }
  .ac-typebox { flex-basis: 100%; min-width: 100%; }
  .ac-type-sep { display: none; }
}

/* ── المشتريات الأخيرة ── */
.ac-purchases { margin-bottom: var(--sp-4); }
.ac-purchases-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 8px;
}
.ac-purchases-head h3 {
  display: flex; align-items: center; gap: 6px; margin: 0;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong);
}
.ac-purchases-head h3 svg { width: 16px; height: 16px; color: var(--accent); }
.ac-purchases-table td { padding: 9px 14px; }
.ac-purchases-table tr[data-done="1"] td { color: var(--text-muted); }
.ac-purchases-table tr[data-done="1"] .ac-td-card { color: var(--text-secondary); font-weight: 600; }
.ac-purchases-table .ac-td-buy { white-space: nowrap; }
.ac-purchases-table .ac-td-buy b { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.ac-purchases-table .ac-td-when { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 12px; }
.ac-purchases-table .ac-acts .btn { white-space: nowrap; }
.ac-purchases-table .ac-th-acts { width: 150px; }
@media (max-width: 768px) {
  .ac-purchases-table .ac-td-when, .ac-purchases-table th:nth-child(5) { display: none; }
}
.ac-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; color: var(--warning-text); background: var(--warning-soft);
}

/* ══════════════════════════════════════════════════════════════
 *  \u200Fمودالُ رفع شيت الفيز
 * ══════════════════════════════════════════════════════════════
 *
 * \u200Fالرفعُ من الجهاز هو الطريق: مربّعٌ واحدٌ كبيرٌ يُنقر أو يُسحَب إليه
 * \u200Fالملفّ. واللصقُ والرابطُ تحته مطويّان لمن يحتاجهما — لا ثلاثةُ حقولٍ
 * \u200Fمفتوحةٍ يحتار بينها.
 *
 * \u200Fوكلُّ شيءٍ هنا محبوسٌ في عرض المودال: النسخةُ الأولى كان فيها نصٌّ
 * `white-space: pre` \u200Fبلا التفاف، فدفع المودالَ أعرضَ من الشاشة وظهر شريطُ
 * \u200Fتمريرٍ أفقيٌّ تحت كلِّ شيء — «اعمل صفحة زي الخلق» (المالك، 30/9).
 */
.ac-import-modal {
  width: min(560px, 92vw); max-width: 100%;
  overflow-x: hidden;
}
.ac-import-modal * { min-width: 0; }
.ac-import-modal .ac-buy-desc { margin-bottom: 14px; }
.ac-import-modal .form-input { width: 100%; max-width: 100%; box-sizing: border-box; }

/* ── مربّعُ الملفّ ── */
.ac-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 22px 16px; cursor: pointer; text-align: center;
  border: 1px dashed var(--border-default); border-radius: var(--radius-md);
  background: var(--surface-1); transition: border-color .15s, background .15s;
}
.ac-drop:hover, .ac-drop:focus-visible, .ac-drop.is-over {
  border-color: var(--accent); background: var(--accent-soft); outline: none;
}
.ac-drop > svg { width: 26px; height: 26px; color: var(--accent); }
.ac-drop-main { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.ac-drop-sub { font-size: 11px; color: var(--text-muted); }
.ac-drop-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.ac-imp-file {
  display: flex; align-items: center; gap: 7px;
  margin-top: 9px; font-size: 12px; color: var(--text-muted);
  overflow-wrap: anywhere;
}
.ac-imp-file[hidden] { display: none; }
.ac-imp-file[data-tone="bad"] { color: var(--danger-text); }
.ac-imp-file svg { width: 14px; height: 14px; flex: none; }

/* ── وبين الملفِّ واللصقِ فاصلٌ يقول «أو» ──
   ‏اللصقُ كان مطويّا تحت سطرٍ صغير فلم يره صاحبُه، وهو أسرعُ طريقيه:
   ‏ينسخ من الشيت أو الإيميل ويلصق. فصار ظاهرا كالملفّ، ورابطُ Google
   ‏وحدَه بقي مطويّا — هو الأندر. (طلب المالك 2/10) */
.ac-imp-or {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 4px; color: var(--text-muted); font-size: 12px;
}
.ac-imp-or::before, .ac-imp-or::after {
  content: ""; flex: 1; height: 1px; background: var(--border-subtle);
}

/* ── وخانتا الدفعة: تاريخٌ واسمُ تاجرٍ جنبَ بعضهما ── */
.ac-imp-batch {
  display: grid; grid-template-columns: auto 110px auto 1fr;
  align-items: center; gap: 8px; margin-top: 12px;
}
.ac-imp-batch .ac-imp-label { margin: 0; white-space: nowrap; }
@media (max-width: 520px) {
  .ac-imp-batch { grid-template-columns: auto 1fr; }
}

.ac-imp-more { margin-top: 14px; }
.ac-imp-more > summary {
  cursor: pointer; font-size: 12px; color: var(--text-muted);
  padding: 6px 0; list-style: none;
}
.ac-imp-more > summary::-webkit-details-marker { display: none; }
.ac-imp-more > summary::before { content: "+ "; }
.ac-imp-more[open] > summary::before { content: "− "; }
.ac-imp-more > summary:hover { color: var(--text-strong); }
.ac-imp-label {
  display: block; margin: 10px 0 5px;
  font-size: 12px; color: var(--text-muted);
}
.ac-imp-hint { margin: 6px 0 0; font-size: 11px; color: var(--text-muted); }
.ac-imp-text {
  min-height: 84px; resize: vertical;
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 12px; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden;
}

/* ── صندوقُ النتيجة ── */
.ac-imp-out {
  margin-top: 14px; padding: 11px 12px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  background: var(--surface-1); font-size: 13px; line-height: 1.7;
  overflow-wrap: anywhere;
}
.ac-imp-out[hidden] { display: none; }
.ac-imp-out[data-tone="good"] { border-color: var(--success-border, var(--border-subtle)); background: var(--success-soft); color: var(--success-text); }
.ac-imp-out[data-tone="bad"] { border-color: var(--danger-border, var(--border-subtle)); background: var(--danger-soft); color: var(--danger-text); }
.ac-imp-out svg { width: 15px; height: 15px; vertical-align: -3px; flex: none; }
.ac-imp-sum { display: flex; align-items: center; gap: 7px; font-weight: var(--fw-semibold); }
.ac-imp-note {
  display: flex; align-items: center; gap: 7px;
  margin-top: 7px; font-size: 12px; color: var(--text-muted);
}
.ac-imp-skip { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border-subtle); }
.ac-imp-skip-head { font-size: 12px; color: var(--warning-text); margin-bottom: 5px; }
.ac-imp-skip-row {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 11px; color: var(--text-muted); padding: 2px 0;
}
.ac-imp-skip-row code {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; color: var(--text-muted); direction: ltr; text-align: left;
}

@media (max-width: 560px) {
  .ac-import-modal { width: 100%; }
  .ac-drop { padding: 18px 12px; }
  .ac-imp-skip-row { flex-direction: column; gap: 2px; }
  .ac-imp-skip-row code { width: 100%; }
}
