/* DAN pos — الهوية: كحلي #11284f، أزرق #4a8fe7، رمادي #8a8f98 */
:root {
  --navy: #11284f;
  --navy-2: #1a3563;
  --navy-3: #24427a;
  --blue: #4a8fe7;
  --blue-hover: #3479d6;
  --blue-soft: #eaf2fd;
  --gray: #8a8f98;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e3e7ef;
  --text: #13213b;
  --muted: #6b7385;
  --danger: #d23f3f;
  --danger-soft: #fdeeee;
  --ok: #1f9d61;
  --ok-soft: #e6f6ee;
  --warn: #c9781a;
  --warn-soft: #fdf3e5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 40, 79, .05), 0 2px 8px rgba(17, 40, 79, .06);
  --side-w: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.3; color: var(--navy); }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
/* الأرقام والرموز تُقرأ من اليسار، لكن تُحاذى يميناً مثل بقية الصفحة (تحت عناوين الأعمدة) */
.num, .ltr { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; text-align: right; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- التخطيط ---------- */
.layout { display: flex; min-height: 100vh; overflow-x: clip; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 40;
  width: var(--side-w); background: var(--navy); color: #c9d4e8;
  display: flex; flex-direction: column; overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; direction: ltr; justify-content: flex-end; }
.side-brand img { width: 38px; height: 38px; }
.wm { font-family: Montserrat, "Segoe UI", sans-serif; font-size: 1.55rem; letter-spacing: -.5px; line-height: 1; }
.wm b { color: #fff; font-weight: 800; }
.wm i { color: var(--blue); font-style: normal; font-weight: 500; margin-inline-start: 4px; }
#nav { flex: 1; padding: 6px 12px 16px; }
/* عناوين الأقسام: نص فاتح + خط رفيع يكمّل للحافة، ويطوي القسم ويفتحه — هادئ لا ينافس الصفحة النشطة */
.nav-group { margin-top: 16px; }
.nav-sec { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 4px; padding: 4px 10px; border: 0; background: none;
  color: #d3ddf0; font: inherit; font-size: .84rem; font-weight: 700; letter-spacing: .2px; cursor: pointer; text-align: start; border-radius: 6px; }
.nav-sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to left, rgba(180, 195, 222, .28), rgba(180, 195, 222, .04)); order: 2; }
.nav-sec .nav-count { order: 3; font-size: .66rem; color: #8ea0c2; background: rgba(255, 255, 255, .07); padding: 0 7px; border-radius: 99px; }
.nav-sec .chev { order: 4; font-size: .95rem; line-height: 1; color: #8ea0c2; transition: transform .2s; }
.nav-sec:hover { color: #fff; }
.nav-sec:hover .chev { color: #fff; }
.nav-sec:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.nav-group.closed .chev { transform: rotate(90deg); }
.nav-group.closed .nav-items { display: none; }
.nav-group:not(.closed) .nav-count { display: none; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: #c9d4e8; font-weight: 500; font-size: .93rem;
}
.nav-item .ico { width: 20px; text-align: center; opacity: .85; }
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item.active { background: var(--blue); color: #fff; }
.nav-item.soon { opacity: .5; cursor: default; }
.nav-item.soon:hover { background: none; color: #c9d4e8; }
.nav-item .tag { margin-inline-start: auto; font-size: .66rem; background: var(--navy-3); padding: 1px 7px; border-radius: 99px; }
.side-foot { padding: 14px 20px; font-size: .72rem; color: #7f8fb0; border-top: 1px solid var(--navy-2); font-family: Montserrat, sans-serif; letter-spacing: 2px; direction: ltr; text-align: center; }

.main { flex: 1; min-width: 0; margin-inline-start: var(--side-w); }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 10px 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.spacer { flex: 1; }
.crumb { font-weight: 600; color: var(--navy); }
.menu-btn { display: none; }
.branch-pick { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.branch-pick select { width: auto; min-width: 150px; padding: 6px 10px; }
.user-chip {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 99px; padding: 4px 6px 4px 14px; font: inherit; color: var(--text); cursor: pointer;
}
.user-chip:hover { border-color: var(--blue); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: .85rem;
}
.user-chip small { color: var(--muted); display: block; font-size: .72rem; line-height: 1.2; }
.user-chip span { text-align: start; line-height: 1.25; }
.container { max-width: 1200px; margin: 0 auto; padding: 24px 24px 80px; }
.side-backdrop { display: none; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(100%); transition: transform .2s, visibility .2s; visibility: hidden; }
  .layout.nav-open .sidebar { visibility: visible; }
  .layout.nav-open .sidebar { transform: none; }
  .layout.nav-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 20, 40, .45); z-index: 35; }
  .main { margin-inline-start: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .container { padding: 16px 16px 80px; }
  .branch-pick span, .user-chip > span:first-child { display: none; }
  .user-chip { padding: 4px; }
}

/* ---------- عناصر عامة ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
/* البطاقات المتتالية رأسياً بينها مسافة؛ داخل الشبكات والصفوف المسافة من gap فلا هامش يزيحها */
.card + .card { margin-top: 16px; }
:is(.grid, .stats, .split, .g2, .g3, .g4, .g5, .journey-badges, .type-cards, .role-cards, .perm-groups, .alerts, .pos-screen, .ticket-layout) > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #c5cddc; background: var(--surface-2); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 5px 11px; font-size: .85rem; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; cursor: pointer; font-size: 1.1rem; color: var(--navy); }

input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  font: inherit; background: var(--surface); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { min-height: 80px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; font-weight: 500; color: var(--navy); }
.field small { color: var(--muted); font-weight: 400; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--blue); margin: 0; flex: none; }
.section-title { font-size: .95rem; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.section-title:first-child { margin-top: 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 16px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.blue { background: var(--blue-soft); color: var(--blue-hover); border-color: transparent; }
.badge.navy { background: var(--navy); color: #fff; border-color: transparent; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.off { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--blue); border-color: var(--blue); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px 20px; }
a.card.stat { display: block; color: inherit; text-decoration: none; }
a.card.stat:hover { border-color: var(--blue); }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 1.6rem; font-weight: 700; color: var(--navy); margin-top: 4px; }

.notice { padding: 12px 16px; border-radius: 10px; background: var(--blue-soft); color: var(--navy); font-size: .9rem; margin-bottom: 16px; }
.notice.warn { background: var(--warn-soft); color: #7a4a10; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

.loading { display: grid; place-items: center; padding: 60px; }
.spinner { width: 20px; height: 20px; border: 2.5px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 100;
  background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 50px rgba(10, 20, 40, .25); color: var(--text); }
dialog.wide { width: min(860px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(10, 20, 40, .45); }
dialog form { display: contents; }
.dlg-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.dlg-body { padding: 20px; overflow-y: auto; max-height: calc(100vh - 180px); }
.dlg-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); }

/* ---------- الدخول ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  background: var(--navy); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 48px;
  background-image: radial-gradient(circle at 20% 110%, var(--navy-3) 0, transparent 55%);
}
.auth-side .logo-big { display: flex; align-items: center; gap: 14px; direction: ltr; justify-content: flex-end; }
.auth-side .logo-big img { width: 72px; }
.auth-side .wm { font-size: 3rem; }
.auth-side .tagline { font-family: Montserrat, sans-serif; letter-spacing: 6px; color: #9fb0d0; font-size: .85rem; margin-top: 18px; direction: ltr; text-align: right; }
.auth-side p { color: #c9d4e8; max-width: 420px; margin-top: 30px; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-box { width: min(380px, 100%); }
.auth-box h1 { margin-bottom: 6px; }
.auth-box .grid { margin-top: 24px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 32px 24px; }
  .auth-side p { display: none; }
}

/* ---------- الصلاحيات ---------- */
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.role-card { position: relative; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: block; }
.role-card input { position: absolute; inset-inline-start: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.role-card b { display: block; color: var(--navy); font-size: .92rem; }
.role-card small { color: var(--muted); font-size: .75rem; line-height: 1.4; display: block; }
.role-card:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.perm-group h4 { margin: 0 0 6px; font-size: .88rem; color: var(--navy); display: flex; justify-content: space-between; align-items: center; }
.perm-group h4 button { font-size: .72rem; }
.perm-group .check { padding: 3px 0; font-size: .85rem; }
.perm-group .check.extra span::after { content: ' + إضافية'; color: var(--blue); font-size: .72rem; }
.perm-group .check.removed span { color: var(--muted); text-decoration: line-through; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 99px; cursor: pointer; font-size: .88rem; }
.chip:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); color: var(--navy); }
.chip input { accent-color: var(--blue); margin: 0; }
.pw-box { font-family: Montserrat, monospace; font-size: 1.6rem; letter-spacing: 4px; text-align: center; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: 14px; margin: 12px 0; direction: ltr; }

/* ---------- المرحلة 2: المنتجات والمخزون ---------- */
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.toolbar > input { flex: 1; min-width: 200px; }
.toolbar > select { width: auto; min-width: 150px; }
.card > .toolbar:last-child { border-bottom: 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; border-top: 1px solid var(--border); }
.row-link { cursor: pointer; }
.neg { color: var(--danger); }
.pos { color: var(--ok); }
.warn-t { color: var(--warn); }
.row-form { display: flex; gap: 6px; align-items: stretch; }
.row-form > input, .row-form > select { flex: 1; min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; }
.form-foot { display: flex; gap: 8px; margin-top: 16px; }
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--border); }
.card-head h2 small { font-weight: 400; font-size: .8rem; }
.empty .btn { display: inline-flex; }

.type-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 760px; }
.type-card { padding: 28px; color: var(--text); border: 2px solid var(--border); transition: .15s; }
.type-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.type-card h2 { margin: 12px 0 6px; }
.type-card p { margin: 0; color: var(--text); font-size: .92rem; }
.type-ico { width: 52px; height: 52px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 1.6rem; }

.opt-row { display: grid; grid-template-columns: 160px 1fr auto; gap: 10px; align-items: start; margin-bottom: 10px; }
@media (max-width: 720px) { .opt-row { grid-template-columns: 1fr; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--border); border-radius: 9px; padding: 5px 6px; min-height: 42px; background: var(--surface); }
.tags:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-soft); color: var(--navy); border-radius: 7px; padding: 3px 4px 3px 10px; font-size: .88rem; font-weight: 500; }
.tag-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; line-height: 1; padding: 0 4px; }
.tag-input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 140px; padding: 4px 6px !important; }

.edit-table td { padding: 8px 10px; }
.edit-table th { padding: 9px 10px; }
.edit-table input:not([type=checkbox]) { padding: 7px 9px; }
.edit-table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--blue); }
.w-sm { width: 110px !important; }
.w-xs { width: 80px !important; }
.vat-hint { display: block; font-size: .72rem; margin-top: 2px; }
.row-off td { opacity: .5; }
.flash { animation: flash 1s; }
@keyframes flash { from { background: var(--blue-soft); } to { background: transparent; } }

.picker { position: relative; }
.picker-list { position: absolute; z-index: 50; top: calc(100% + 4px); inset-inline: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(17, 40, 79, .15); max-height: 320px; overflow-y: auto; }
.toolbar.picker .picker-list, .toolbar .picker-list { inset-inline: 16px; }
.picker-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.picker-item:last-child { border-bottom: 0; }
.picker-item span:first-child { display: flex; flex-direction: column; }
.picker-item small { color: var(--muted); font-size: .75rem; }
.picker-item.active, .picker-item:hover { background: var(--blue-soft); }
.picker-empty { padding: 14px; color: var(--muted); text-align: center; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.split > * { min-width: 0; }
.side-panel select { min-width: 0; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.side-panel { display: grid; gap: 14px; position: sticky; top: 76px; }

/* ---------- الملصق ---------- */
.lbl-preview { max-width: 100%; display: grid; place-items: center; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--bg) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--border); border-radius: 10px; padding: 18px; overflow: auto; }
.lbl-preview .lbl { box-shadow: 0 2px 8px rgba(0, 0, 0, .18); zoom: 1.6; }
.lbl {
  background: #fff; color: #000; overflow: hidden; box-sizing: border-box; padding: 1.2mm 1.6mm;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center;
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; line-height: 1.15; direction: rtl;
}
.lbl-co { font-size: 1.9mm; font-weight: 600; }
.lbl-name { font-size: 2.6mm; font-weight: 700; max-height: 2.4em; overflow: hidden; width: 100%; }
.lbl-var { font-size: 2.2mm; }
.lbl-bc { flex: 1; width: 100%; min-height: 6mm; display: flex; }
.lbl-bc .bc-svg { width: 100%; height: 100%; }
.lbl-code { font-family: Montserrat, monospace; font-size: 2.1mm; letter-spacing: .3mm; direction: ltr; }
.lbl-foot { display: flex; justify-content: center; gap: 2mm; align-items: baseline; width: 100%; flex-wrap: wrap; }
.lbl-price { font-size: 3.2mm; font-weight: 800; font-family: Montserrat, sans-serif; direction: ltr; }
.lbl-price small { font-size: 1.8mm; font-family: "IBM Plex Sans Arabic", sans-serif; }
.lbl-sku, .lbl-exp { font-size: 1.9mm; direction: ltr; }

#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing { background: #fff; margin: 0; }
  body.printing #print-area { display: block; }
  #print-area .lbl { page-break-after: always; break-after: page; }
  #print-area .lbl:last-child { page-break-after: auto; break-after: auto; }
}

/* ---------- المرحلة 3: نقطة البيع ---------- */
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: .92rem; }
.kv.big { font-size: 1.15rem; font-weight: 700; color: var(--navy); border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 4px; }
.kv.muted { color: var(--muted); }
.big-total { font-size: 1.6rem; font-weight: 700; color: var(--navy); font-family: Montserrat, sans-serif; }
.link { border: 0; background: none; color: var(--blue); cursor: pointer; font: inherit; font-size: .78rem; padding: 0; }
tfoot td { background: var(--surface-2); border-top: 1px solid var(--border); }
.chip.active { border-color: var(--blue); background: var(--blue); color: #fff; }
button.chip { background: var(--surface); font: inherit; font-size: .88rem; white-space: nowrap; }

.open-shift { max-width: 420px; margin: 40px auto; text-align: center; }
.open-shift .type-ico { margin: 0 auto 10px; }
.open-shift form { text-align: start; margin-top: 18px; }

.container.pos-wide { max-width: none; padding: 12px 16px 16px; }
.pos-screen { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; height: calc(100vh - 92px); min-height: 520px; }
.pos-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pos-search input { font-size: 1.05rem; padding: 12px 14px; }
.pos-cats { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; flex: none; }
.pos-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; align-content: start; padding-bottom: 8px; }
.tile { display: flex; flex-direction: column; gap: 2px; text-align: start; padding: 10px 12px; min-height: 92px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--blue); }
.tile:active { transform: scale(.98); }
.tile-name { font-weight: 600; font-size: .9rem; line-height: 1.35; }
.tile-var { font-size: .8rem; color: var(--blue-hover); }
.tile-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; }
.tile-foot b { color: var(--navy); }
.tile-qty { font-size: .75rem; color: var(--muted); }
.pos-cart { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pos-cart-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.pos-customer { border: 0; border-bottom: 1px solid var(--border); background: var(--surface-2); text-align: start; padding: 8px 14px; font: inherit; cursor: pointer; color: var(--muted); }
.pos-customer:hover { color: var(--blue); }
.pos-lines { flex: 1; overflow-y: auto; }
.pos-empty { padding: 50px 20px; }
.pl { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px 24px; gap: 8px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.pl-main { cursor: pointer; min-width: 0; }
.pl-main b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-main small { font-size: .76rem; }
.pl-qty { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pl-qty button { border: 0; background: var(--surface-2); width: 28px; height: 30px; cursor: pointer; font-size: 1rem; color: var(--navy); }
.pl-qty input { width: 44px; border: 0; border-radius: 0; text-align: center; padding: 4px 2px; box-shadow: none !important; }
.pl-total { text-align: end; font-size: .92rem; }
.pl-rm { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.pl-rm:hover { color: var(--danger); }
.pos-totals { padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.pos-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 14px 14px; }
.pos-actions .btn[hidden] + .btn { grid-column: span 2; }
.pos-pay { grid-column: 1 / -1; padding: 14px; font-size: 1.1rem; font-weight: 700; }
.pos-pay small { opacity: .7; font-size: .7rem; font-weight: 400; }
@media (max-width: 960px) {
  .pos-screen { grid-template-columns: 1fr; height: auto; }
  .pos-grid { max-height: 45vh; }
  .pos-lines { max-height: 50vh; }
}

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 16px; }
.seg button { padding: 12px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; }
.seg button.active { border-color: var(--blue); background: var(--blue-soft); color: var(--navy); }
.pay-total { font-size: 1.5rem; color: var(--navy); font-family: Montserrat, sans-serif; }
.big-input { font-size: 1.4rem !important; padding: 12px !important; font-family: Montserrat, sans-serif; direction: ltr; text-align: center; }
.change { margin-top: 14px; font-size: 1.05rem; text-align: center; color: var(--muted); }
.change b { color: var(--navy); font-size: 1.3rem; }
.change-big { margin-top: 10px; text-align: center; font-size: 1.1rem; background: var(--ok-soft); color: var(--ok); padding: 12px; border-radius: 10px; }
.change-big b { font-size: 1.8rem; display: block; }

/* ---------- الإيصال الحراري ---------- */
.receipt { background: #fff; color: #000; font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; font-size: 11px; line-height: 1.45; padding: 2mm 1.5mm; box-sizing: border-box; margin: 0 auto; direction: rtl; }
.rc-head { text-align: center; }
.rc-co { font-size: 15px; display: block; }
.rc-title { margin-top: 6px; padding: 4px 0; border-top: 1px dashed #000; border-bottom: 1px dashed #000; font-weight: 700; font-size: 12px; }
.rc-meta { padding: 6px 0; border-bottom: 1px dashed #000; }
.rc-meta div, .rc-totals div { display: flex; justify-content: space-between; gap: 6px; }
.rc-lines { width: 100%; border-collapse: collapse; margin: 4px 0; }
.rc-lines th { background: none; color: #000; font-size: 10px; padding: 3px 1px; border-bottom: 1px solid #000; text-align: start; }
.rc-lines td { padding: 1px; border: 0; font-size: 11px; }
.rc-lines .rc-name { padding-top: 4px; font-weight: 600; }
.rc-lines tbody tr:hover { background: none; }
.rc-disc td { font-size: 10px; }
.rc-totals { border-top: 1px dashed #000; padding-top: 4px; }
.rc-grand { font-size: 14px; font-weight: 800; border-top: 1px solid #000; border-bottom: 1px solid #000; margin: 3px 0; padding: 3px 0; }
.rc-qr { width: 30mm; margin: 8px auto 4px; }
.rc-qr svg { width: 100%; height: auto; display: block; }
.rc-bc { height: 9mm; width: 60%; margin: 4px auto; display: flex; }
.rc-bc svg { width: 100%; height: 100%; }
.rc-foot { text-align: center; margin-top: 6px; font-weight: 600; }

/* ---------- المرحلة 4: المشتريات ---------- */
.pl-sum { max-width: 360px; margin-inline-start: auto; padding: 10px 16px 14px; }
.a4 { color: #000; background: #fff; font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; font-size: 12px; direction: rtl; }
.a4 h1, .a4 h2 { color: #000; }
.a4-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #11284f; padding-bottom: 8px; margin-bottom: 10px; }
.a4-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 12px; line-height: 1.7; }
.a4 table { width: 100%; border-collapse: collapse; }
.a4 th, .a4 td { border: 1px solid #999; padding: 5px 7px; background: none; color: #000; font-size: 11px; }
.a4-totals { width: 260px; margin: 10px 0 0 auto; margin-inline-start: auto; margin-inline-end: 0; }

/* ---------- المرحلة 5: العملاء والعروض ---------- */
.seg.seg4 { grid-template-columns: repeat(4, 1fr); }
.seg button.active { border-color: var(--blue); background: var(--blue-soft); color: var(--navy); }
.kv.promo b, .kv.promo span { color: var(--ok); }
.pl-promo { display: block; color: var(--ok); font-size: .74rem; }
div.pos-customer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pos-customer .link { margin-inline-start: auto; font-size: .8rem; }
.pick-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font: inherit; cursor: pointer; margin-bottom: 6px; text-align: start; }
.pick-row:hover { border-color: var(--blue); background: var(--blue-soft); }


/* ---------- المرحلة 6: المحاسبة ---------- */
table.fin td { padding: 8px 14px; }
table.fin tr.head td { background: var(--surface-2); font-weight: 700; color: var(--navy); }
table.fin tr.sub td { font-weight: 700; border-top: 1px solid var(--navy); }
table.fin tr.total td { font-weight: 800; font-size: 1.05rem; color: var(--navy); border-top: 2px solid var(--navy); border-bottom: 3px double var(--navy); }
tr.sub td, tr.total td { font-weight: 700; }
tr.total td { color: var(--navy); border-top: 2px solid var(--navy); }
.table-tools .spacer { flex: 1; }
.a4 h3 { margin: 0 0 10px; }


/* ---------- المرحلة 7: اللوحة والتقارير ---------- */
.kpi .value { font-size: 1.5rem; }
.split.dash { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 960px) { .split.dash { grid-template-columns: 1fr; } }
.chart { display: flex; align-items: flex-end; height: 200px; gap: 2px; padding-top: 18px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bar { width: 70%; background: linear-gradient(180deg, var(--blue), var(--navy-3)); border-radius: 5px 5px 0 0; min-height: 2px; }
.bar-col:hover .bar { background: var(--navy); }
.bar-val { font-size: .62rem; color: var(--muted); margin-bottom: 2px; direction: ltr; }
.bar-lbl { font-size: .68rem; color: var(--muted); margin-top: 4px; }
.alerts { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.alert-item { padding: 9px 14px; border-radius: 10px; background: var(--blue-soft); color: var(--navy); font-size: .9rem; }
.alert-item.warn { background: var(--warn-soft); color: #7a4a10; }
.steps { margin: 0 0 12px; padding-inline-start: 20px; line-height: 2.2; }
.checklist { margin: 4px 0; padding-inline-start: 20px; line-height: 1.9; font-size: .9rem; }

/* مؤشر اتصال جهاز الكاشير */
.net-status { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line, #e3e7ee); background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; margin-inline-end: 8px; }
.net-status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.net-status.off { background: var(--danger-soft); color: var(--danger); }
.net-status.off .dot { animation: net-blink 1.2s infinite; }
.net-status.warn { background: var(--warn-soft); color: var(--warn); }
@keyframes net-blink { 50% { opacity: .25; } }
@media (max-width: 640px) { .net-status { padding: 4px 8px; font-size: 12px; } }

/* الدعم الفني: محادثة التذكرة، وشريط «وضع الدعم» */
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 760px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); box-shadow: var(--shadow); }
.msg-me { align-self: flex-start; }
.msg-staff { align-self: flex-end; background: var(--blue-soft, #eaf2fd); border-color: transparent; }
.msg-note { align-self: flex-end; background: var(--warn-soft); border-style: dashed; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.msg-body { white-space: pre-wrap; line-height: 1.7; }
.support-bar { position: sticky; top: 0; z-index: 50; background: #b45309; color: #fff; text-align: center; padding: 6px 12px; font-size: .9rem; }
.support-bar .btn { margin-inline-start: 10px; }

/* لوحة المنصة */
.platform .sidebar { background: #0b1a36; }
.side-tag { margin: -6px 20px 10px; font-size: .75rem; color: #9fb0d0; letter-spacing: 1px; }
.pbars { display: flex; align-items: flex-end; gap: 4px; height: 140px; margin: 8px 0; }
.pbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.pbar span { width: 100%; background: var(--blue); border-radius: 4px 4px 0 0; min-height: 2px; }
.pbar small { font-size: .6rem; color: var(--muted); margin-top: 2px; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .ticket-layout { grid-template-columns: 1fr; } }
.note { border-bottom: 1px solid var(--border); padding: 8px 0; }
.note:last-child { border-bottom: 0; }
a.kv { color: inherit; text-decoration: none; }
legend { font-size: .88rem; font-weight: 600; color: var(--navy); padding: 0 4px; }

/* رحلة العميل */
.jp-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.jp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--ok)); border-radius: 99px; transition: width .4s; }
.jp-bar.small-bar { width: 90px; height: 6px; margin-inline-start: 10px; }
.journey-top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.journey-progress { flex: 1; min-width: 240px; }
.jp-label { margin-bottom: 8px; }
.journey-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.jbadge { width: 84px; text-align: center; opacity: .35; filter: grayscale(1); }
.jbadge.earned { opacity: 1; filter: none; }
.jbadge .jb-ico { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 4px; border-radius: 50%; background: var(--surface-2); font-size: 1.4rem; }
.jbadge.earned .jb-ico { background: var(--blue-soft); box-shadow: 0 0 0 3px var(--blue-soft); }
.jbadge small { font-size: .7rem; line-height: 1.3; display: block; }
.journey-next { border-inline-start: 4px solid var(--blue); margin-bottom: 14px; }
.journey-next h2 { margin: 6px 0; }
.journey-done { text-align: center; margin-bottom: 14px; background: var(--ok-soft); border-color: transparent; }
.journey-done h2 { margin: 4px 0; }
.journey-stage { margin-bottom: 12px; }
.journey-stage.advanced { opacity: .92; }
.jstep { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }
.js-mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .85rem; }
.jstep.done .js-mark { background: var(--ok); color: #fff; }
.jstep.done .js-body b { color: var(--muted); }
.jstep.skipped { opacity: .6; }
.js-actions { justify-content: flex-end; }
@media (max-width: 720px) { .jstep { grid-template-columns: 34px minmax(0, 1fr); } .js-actions { grid-column: 2; justify-content: flex-start; } }
.journey-card { position: relative; display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 14px; border-inline-start: 4px solid var(--blue); }
.journey-card > div { flex: 1; }
.jc-close { position: absolute; top: 6px; inset-inline-start: 6px; font-size: .8rem; }

.g5 { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 720px) { .g5 { grid-template-columns: 1fr 1fr; } }

/* لوحة المنصة: الصحة، الوسوم، الخط الزمني، البحث، الجرس، الصور، الميزات */
.health { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 6px; border-radius: 99px; font-weight: 700; font-size: .85rem; font-family: Montserrat, sans-serif; }
.health.good { background: var(--ok-soft); color: var(--ok); }
.health.fair { background: var(--warn-soft); color: var(--warn); }
.health.poor { background: var(--danger-soft); color: var(--danger); }
.big-total .health { font-size: 1.4rem; height: 40px; min-width: 64px; }
.tag-chip { display: inline-block; font-size: .7rem; padding: 1px 8px; margin: 2px 0 0 4px; border-radius: 99px; background: var(--blue-soft); color: var(--navy); }
.timeline { max-height: 620px; overflow-y: auto; padding: 6px 0; }
.tl-item { display: flex; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border-bottom: 0; }
.tl-ico { width: 26px; text-align: center; flex: none; }
.gsearch { position: relative; flex: 1; max-width: 420px; margin-inline-start: 12px; }
.gsearch input { width: 100%; }
.gsearch .picker-list { position: absolute; top: 100%; inset-inline: 0; z-index: 30; }
.gsearch a.picker-item { color: inherit; text-decoration: none; }
.bell { position: relative; font-size: 1.1rem; }
.bell span:empty { display: none; }
.bell span { position: absolute; top: -2px; inset-inline-end: -4px; background: var(--danger); color: #fff; font-size: .65rem; min-width: 17px; height: 17px; line-height: 17px; border-radius: 99px; text-align: center; padding: 0 4px; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; color: inherit; text-decoration: none; margin-bottom: 6px; border: 1px solid var(--border); }
.notif.danger { background: var(--danger-soft); border-color: transparent; }
.notif.warn { background: var(--warn-soft); border-color: transparent; }
.msg-files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.msg-files img { max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--border); display: block; }
.feat { display: grid; grid-template-columns: 170px minmax(0, 1fr) 46px 30px; gap: 10px; align-items: center; margin: 8px 0; font-size: .9rem; }
.toolbar.wrap { flex-wrap: wrap; }
.chip.disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 720px) { .gsearch { display: none; } .feat { grid-template-columns: 120px minmax(0, 1fr) 40px; } .feat small { display: none; } }

/* مؤشر قوة كلمة المرور */
.pw-meter { margin-top: 6px; }
.pw-meter .pw-bar { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pw-meter .pw-bar span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.pw-meter[data-level=weak] .pw-bar span { width: 33%; background: var(--danger); }
.pw-meter[data-level=medium] .pw-bar span { width: 66%; background: var(--warn); }
.pw-meter[data-level=strong] .pw-bar span { width: 100%; background: var(--ok); }
.pw-meter small { display: block; margin-top: 3px; font-weight: 400; }
.pw-meter[data-level=weak] small { color: var(--danger); }
.pw-meter[data-level=medium] small { color: var(--warn); }
.pw-meter[data-level=strong] small { color: var(--ok); }

/* أكاديمية دان */
.academy-hero { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--navy), #1d3d74); color: #fff; border: 0; }
.academy-hero h1 { margin: 0 0 4px; color: #fff; }
.academy-hero .muted { color: #c9d4e8; margin: 0 0 12px; }
.academy-hero > div:first-child { flex: 1; min-width: 260px; }
.ac-search { width: 100%; max-width: 560px; padding: 12px 14px; font-size: 1rem; border-radius: 10px; border: 0; }
.ac-progress { text-align: center; min-width: 150px; }
.ac-progress b { font-size: 2rem; font-family: Montserrat, sans-serif; display: block; }
.ac-progress small { color: #c9d4e8; display: block; margin-bottom: 8px; }
.ac-progress .jp-bar { background: rgba(255, 255, 255, .15); }
/* الأقسام صفوف كاملة بالترتيب، ودروس كل قسم بطاقات متساوية */
.ac-cats { display: flex; flex-direction: column; gap: 26px; }
.ac-cat-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.ac-cat-head h2 { margin: 0; font-size: 1.15rem; }
.ac-cat-ico { font-size: 1.7rem; width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.ac-count { margin-inline-start: auto; font-size: .8rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 3px 10px; border-radius: 99px; }
.ac-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ac-lesson { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; color: inherit; text-decoration: none; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.ac-lesson:hover { border-color: var(--blue); transform: translateY(-2px); }
.ac-lesson-top { display: flex; gap: 10px; align-items: center; }
.ac-lesson-top b { line-height: 1.5; }
.ac-lesson > small { color: var(--muted); font-size: .82rem; line-height: 1.7; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-meta { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; padding-top: 8px; border-top: 1px dashed var(--border); }
.ac-check { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-size: .8rem; font-weight: 700; font-family: Montserrat, sans-serif; }
.ac-lesson.done .ac-check { background: var(--ok); color: #fff; }
.ac-lesson.done { border-color: var(--ok-soft); }
.ac-steps { display: grid; gap: 14px; }
.ac-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; padding: 18px; align-items: center; }
.ac-steps > .card + .card { margin-top: 0; }
.ac-step:not(:has(.ac-shot)) { grid-template-columns: 1fr; }
.ac-step-text { display: flex; gap: 12px; }
.ac-step-text h3 { margin: 2px 0 6px; }
.ac-step-text p { margin: 0; line-height: 1.8; }
.ac-num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: Montserrat, sans-serif; }
.ac-shot { padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.ac-shot img { display: block; width: 100%; height: auto; }
.ac-zoom img { display: block; max-width: 100%; margin: 0 auto; border-radius: 8px; }
.ac-diff { margin-top: 14px; }
.ac-diff h3 { margin-top: 0; }
.ac-diff-box { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.ac-diff-box b { color: var(--navy); }
.ac-diff-box p { margin: 6px 0 0; line-height: 1.7; }
.ac-tips { border-inline-start: 4px solid var(--ok); }
.ac-mistakes { border-inline-start: 4px solid var(--warn); }
.ac-tips h3, .ac-mistakes h3 { margin-top: 0; }
.ac-tips li, .ac-mistakes li { margin: 6px 0; line-height: 1.7; }
.ac-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 900px) { .ac-step { grid-template-columns: 1fr; } }
.help-btn { margin-inline-end: 8px; white-space: nowrap; }
/* جولة «وريني» */
.tour-layer { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.tour-spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 4px #ff7a1a, 0 0 0 9999px rgba(10, 22, 46, .55); transition: all .25s; }
.tour-bubble { position: fixed; pointer-events: auto; background: var(--surface); color: var(--text); border-radius: 12px; padding: 14px 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); transition: top .25s, left .25s; }
.tour-bubble p { margin: 6px 0 12px; line-height: 1.8; }
.tour-count { font-size: .75rem; color: var(--muted); font-family: Montserrat, sans-serif; }
.tour-actions { display: flex; gap: 8px; align-items: center; }

/* التقارير: الملخص بالفترات */
.sum { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sum .card { box-shadow: none; }
.sum .grid > * { min-width: 0; }
.sum .card + .card, .sum .grid > .card + .card { margin-top: 0; }
.sum-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.sum-card { display: flex; flex-direction: column; justify-content: flex-start; text-align: start; font: inherit; color: inherit; cursor: pointer; padding: 14px 16px; }
.sum-card:hover { border-color: var(--blue); }
.sum-card.active { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.sum-card .value { font-size: 1.35rem; }
.sum-dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--border); font-size: .84rem; }
.sum-dl dt { color: var(--muted); white-space: nowrap; }
.sum-dl dd { margin: 0; text-align: end; }
.delta { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.sum-table td:first-child { white-space: nowrap; }
.sum-table td.num { line-height: 1.35; }
.sum-table tr.strong td { font-weight: 700; background: var(--surface-2); }
.sum-title { margin: 8px 0 0; font-size: 1.1rem; }
.cost-bar { display: flex; height: 22px; border-radius: 99px; overflow: hidden; margin: 12px 0 8px; background: var(--surface-2); }
.cost-bar .c, .cost-legend i.c { background: var(--warn); }
.cost-bar .p, .cost-legend i.p { background: var(--ok); }
.cost-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .88rem; }
.cost-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 4px; }
.pay-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 10px; font-size: .9rem; }
.pay-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pay-bar span { display: block; height: 100%; background: var(--blue); }
@media (max-width: 720px) { .sum-cards { grid-template-columns: 1fr 1fr; gap: 8px; } .sum-card { padding: 10px 12px; } .sum-card .value { font-size: 1.1rem; } .sum-dl { font-size: .74rem; gap: 3px 6px; } }

/* اللغة: زر التبديل، وتعديلات الاتجاه من اليسار لليمين (الإنجليزية) */
.lang-btn { margin-inline-end: 8px; white-space: nowrap; font-family: "IBM Plex Sans Arabic", Montserrat, sans-serif; }
.auth-form { position: relative; }
.auth-lang { position: absolute; top: 16px; inset-inline-end: 16px; margin: 0; }
[dir="ltr"] .auth-side .tagline { text-align: left; }
[dir="ltr"] .nav-sec::after { background: linear-gradient(to right, rgba(180, 195, 222, .28), rgba(180, 195, 222, .04)); }
