/* ==========================================================================
   DataGris Store — هوية «غرفة القياس»: إطار أخضر عميق + لوحة فاتحة عائمة + ليموني للتمييز.
   الإطار والمنصة (المحلات) + شاشة الدخول بالأدوار + لوحة مالك النظام + نقطة البيع.
   ========================================================================== */

/* ---------- الإطار: التطبيق كله على إطار أخضر، والمحتوى في لوحة فاتحة ---------- */
/* على الفون مفيش إطار: الخلفية فاتحة والتنقل في شريط سفلي */
@media (max-width: 699px) { body.in-app, body.in-owner { background: var(--canvas); } }
/* الإطار: تدرّج أخضر من فوق لتحت + إضاءة ليموني خفيفة ناحية القائمة (يمين في العربي، شمال في الإنجليزي) */
@media (min-width: 700px) {
  body.in-app, body.in-owner {
    background:
      radial-gradient(560px 460px at 100% -6%, var(--rail-glow), transparent 70%),
      linear-gradient(180deg, var(--rail-2) 0%, var(--rail) 46%, var(--rail-3) 100%);
    background-attachment: fixed;
  }
  [dir="ltr"] body.in-app, [dir="ltr"] body.in-owner {
    background:
      radial-gradient(560px 460px at 0% -6%, var(--rail-glow), transparent 70%),
      linear-gradient(180deg, var(--rail-2) 0%, var(--rail) 46%, var(--rail-3) 100%);
    background-attachment: fixed;
  }
}
.gate {
  background:
    radial-gradient(900px 600px at 100% -10%, var(--rail-glow), transparent 64%),
    linear-gradient(180deg, var(--rail-2) 0%, var(--rail) 46%, var(--rail-3) 100%);
}
::selection { background: #D9F7A8; color: #101828; }
* { scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }

@media (min-width: 700px) {
  .app { padding: 10px; gap: 4px; }
  .rail { background: transparent; border-radius: 0; padding: 14px 8px 12px; transition: none; }
  .main {
    background: var(--canvas); border-radius: 28px; padding: 20px 22px 0;
    height: calc(100vh - 20px); height: calc(100dvh - 20px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 40px 80px -40px rgba(0, 0, 0, .55);
  }
  :root[data-theme="dark"] .main { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 40px 80px -40px rgba(0, 0, 0, .7); }
  .app.cashier .main { height: calc(100vh - 20px); height: calc(100dvh - 20px); }
  .topbar { padding: 0 2px 14px; }
  .tabs { padding-inline: 2px; }
  .content { padding: 4px 2px 20px; }
}
@media (max-height: 520px) and (min-width: 700px) {
  .main { padding-top: 12px; height: calc(100dvh - 20px); }
}

/* رأس القائمة: هوية المحل المفتوح */
.rail .logo, .nav-drawer .logo { min-width: 0; }
.logo-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rail-head { padding-bottom: 18px; }
.nav-item { transition: background var(--t-fast), color var(--t-fast), transform 160ms var(--ease-out); }
.nav-item:active { transform: scale(.98); }
.nav-item[aria-current="page"] { box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .55); }
.logo-mark { box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .55); }
.rail-foot { border-top-color: rgba(255, 255, 255, .08); }
.nav-item:hover { background: rgba(255, 255, 255, .07); }
.rail-user { background: rgba(255, 255, 255, .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }

/* ---------- علامة المحل (لوجو أو أول حرفين على لون الهوية) ---------- */
.smark {
  width: 40px; height: 40px; border-radius: 13px; flex: none; position: relative; overflow: hidden;
  display: grid; place-items: center; background: var(--sm-bg); color: var(--sm-fg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 18px -10px rgba(0, 0, 0, .55);
}
.smark b { font: 700 15px/1 "IBM Plex Sans Arabic", "Google Sans", sans-serif; letter-spacing: -.02em; }
.smark img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.smark.xs { width: 20px; height: 20px; border-radius: 7px; box-shadow: none; }
.smark.xs b { font-size: 9.5px; }
.smark.sm { width: 28px; height: 28px; border-radius: 9px; box-shadow: none; }
.smark.sm b { font-size: 11px; }
.smark.md { width: 48px; height: 48px; border-radius: 15px; }
.smark.md b { font-size: 17px; }
.smark.lg { width: 72px; height: 72px; border-radius: 22px; }
.smark.lg b { font-size: 26px; }
.store-line .smark { margin-inline-end: 2px; }

/* زر الرجوع للوحة المالك (لما المالك يفتح محل كمدير) */
.owner-back {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding-inline: 14px 16px;
  border-radius: var(--r-full); background: var(--ink); color: #fff; font-weight: 600; font-size: 13px;
  transition: transform 160ms var(--ease-out), background var(--t-fast);
}
.owner-back .ic { color: var(--primary-fill); }
.owner-back:hover { background: var(--rail-2); }
.owner-back:active { transform: scale(.97); }
@media (max-width: 1099px) { .owner-back span { display: none; } .owner-back { width: 44px; padding: 0; justify-content: center; } }

/* ======================= شاشة الدخول بالأدوار ======================= */
#welcome { background: transparent; }
.gate { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4px; padding: 10px; }
.gate-brand {
  position: relative; overflow: hidden; border-radius: 28px; min-height: calc(100dvh - 20px);
  display: flex; flex-direction: column; justify-content: space-between; padding: 28px; color: #fff; background: var(--rail-2);
}
.gb-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: gbzoom 1400ms var(--ease-out) both; }
.gb-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 22, 17, .42) 0%, rgba(13, 22, 17, .06) 34%, rgba(13, 22, 17, .30) 58%, rgba(13, 22, 17, .86) 100%); }
.gb-head, .gb-foot { position: relative; z-index: 1; }
.gb-plat {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding-inline: 12px 14px; border-radius: var(--r-full);
  background: rgba(13, 22, 17, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font-size: 13px; font-weight: 600;
}
.gb-plat .ic { color: var(--primary-fill); }
.gb-foot { display: flex; align-items: center; gap: 16px; animation: rise 520ms var(--ease-out) 120ms both; }
.gb-logo { width: 72px; height: 72px; border-radius: 22px; flex: none; display: grid; place-items: center; background: #C4F279; color: #101828; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6); }
.gb-logo .ic { width: 34px; height: 34px; }
.gb-id { min-width: 0; }
.gb-id h1 { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.gb-id p { margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, .82); }

.gate-panel { position: relative; border-radius: 28px; background: var(--canvas); display: grid; place-items: center; padding: 72px 24px 32px; }
.gate-tools { position: absolute; top: 16px; inset-inline-end: 16px; display: flex; gap: 8px; }
.gate-box { width: 100%; max-width: 448px; display: flex; flex-direction: column; animation: rise 420ms var(--ease-out) both; }
.gate-box.shake { animation: shake 360ms; }
.gate-box h2 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.gate-sub { color: var(--muted); font-size: 14px; margin: 4px 0 16px; }

.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.role {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; row-gap: 1px; align-items: center; text-align: start;
  padding: 12px; min-height: 72px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform 160ms var(--ease-out);
}
.role:hover { border-color: var(--faint); }
.role:active { transform: scale(.98); }
.role-ic { grid-row: span 2; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--canvas); color: var(--text-2); transition: background var(--t-fast), color var(--t-fast); }
.role b { font-size: 14px; font-weight: 600; line-height: 1.3; }
.role small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.role[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), 0 10px 22px -16px rgba(21, 33, 27, .6); }
.role[aria-checked="true"] .role-ic { background: var(--primary-fill); color: var(--on-primary); }
:root[data-theme="dark"] .role[aria-checked="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }

.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-form .fld .field { height: 50px; }
.gate-form .btn-lg { margin-top: 4px; }
.gate-err { margin: 0; color: var(--danger-text); font-size: 13px; font-weight: 600; }
.gate-err:empty { display: none; }
.gate-match { display: flex; align-items: center; gap: 6px; margin: -4px 0 0; font-size: 13px; color: var(--ok-text); }
.gate-match:empty { display: none; }
.gate-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding-inline: 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 13px; transition: background var(--t-fast); }
.gate-link:hover { background: var(--surface); }
.gate-link.danger { color: var(--danger-text); justify-content: flex-start; padding-inline: 4px; }
.gate-hint { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--border); font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.gate-hint b { color: var(--text-2); }
.cred { display: inline-block; unicode-bidi: isolate; font: 600 12.5px "Google Sans", monospace; padding: 0 6px; border-radius: 6px; background: var(--surface); }
.store-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-item { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding-inline: 6px 14px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.sp-item:hover { border-color: var(--faint); }
.sp-item[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
:root[data-theme="dark"] .sp-item[aria-checked="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }

@media (max-width: 899px) {
  .gate { grid-template-columns: 1fr; padding: 0; gap: 0; background: var(--canvas); }
  .gate-brand { min-height: 248px; border-radius: 0 0 28px 28px; padding: max(16px, env(safe-area-inset-top)) 20px 22px; }
  .gb-id h1 { font-size: 26px; }
  .smark.lg, .gb-logo { width: 60px; height: 60px; border-radius: 18px; }
  .gate-panel { border-radius: 0; place-items: start center; padding: 24px 16px max(32px, env(safe-area-inset-bottom)); }
  .gate-tools { position: fixed; top: max(12px, env(safe-area-inset-top)); inset-inline-end: 16px; z-index: 5; }
  .gate-tools .circle-btn { background: rgba(13, 22, 17, .5); border-color: rgba(255, 255, 255, .16); color: #fff; }
  .gate-box h2 { font-size: 26px; }
}
@media (max-width: 380px) { .role small { display: none; } .role { min-height: 60px; } .role-ic { grid-row: auto; } }

/* ======================= لوحة مالك النظام ======================= */
.owner { display: flex; height: 100vh; height: 100dvh; padding: 10px; gap: 4px; }
.o-rail { width: 236px; flex: none; display: flex; flex-direction: column; padding: 14px 8px 12px; color: var(--rail-text); }
.o-logo { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; color: #fff; font-weight: 700; font-size: 17px; white-space: nowrap; }
.o-logo small { display: block; font-size: 11px; font-weight: 500; color: var(--rail-text); }
.o-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.o-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.o-main { flex: 1; min-width: 0; overflow-y: auto; background: var(--canvas); border-radius: 28px; padding: 24px 28px 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 40px 80px -40px rgba(0, 0, 0, .55); scrollbar-width: thin; }
.o-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.o-top h1 { font-size: 30px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.o-top p { margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.o-actions { display: flex; gap: 8px; }
.o-body { padding-bottom: 32px; }
.o-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.o-toolbar .grow { flex: 1; min-width: 220px; height: 44px; }
.o-list { display: flex; flex-direction: column; gap: 8px; }
.o-store {
  display: grid; grid-template-columns: 48px minmax(160px, 1fr) minmax(0, 1.5fr) auto 150px auto; align-items: center; gap: 16px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  transition: border-color var(--t-fast), box-shadow 220ms var(--ease-out);
  animation: rise 360ms var(--ease-out) both;
}
.o-store:nth-child(2) { animation-delay: 40ms; } .o-store:nth-child(3) { animation-delay: 80ms; } .o-store:nth-child(4) { animation-delay: 120ms; }
.o-store:hover { border-color: var(--faint); box-shadow: var(--shadow-card); }
.o-store.off { background: var(--surface-2); }
.o-store.off .smark { filter: grayscale(1); opacity: .55; }
.os-id { min-width: 0; }
.os-id b { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-id small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-cats { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding-inline: 10px 4px; border-radius: var(--r-full); background: var(--canvas); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tchip .ic { width: 14px; height: 14px; color: var(--muted); }
.tchip i { font-style: normal; min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; font: 700 11px/1 "Google Sans", sans-serif; }
.tchip.more { padding-inline: 10px; }
.os-login { display: grid; grid-template-columns: auto auto; gap: 2px 10px; align-items: baseline; font-size: 12px; white-space: nowrap; }
.os-login .lbl { color: var(--muted); }
.os-login code { font: 600 12.5px "Google Sans", monospace; direction: ltr; text-align: start; color: var(--text); }
.os-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.os-meta small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.os-acts { display: flex; align-items: center; gap: 2px; }
.os-acts .btn-sm { margin-inline-end: 6px; height: 36px; }
.icon-btn.danger { color: var(--danger-text); }
.icon-btn.danger:hover { background: var(--danger-soft); }

@media (max-width: 1399px) {
  .o-store { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "m id acts" "m cats cats" "m login meta"; row-gap: 10px; }
  .o-store > .smark { grid-area: m; align-self: start; }
  .os-id { grid-area: id; } .os-cats { grid-area: cats; } .os-login { grid-area: login; } .os-acts { grid-area: acts; }
  .os-meta { grid-area: meta; flex-direction: row; align-items: center; justify-content: flex-end; gap: 10px; }
}

/* محرر المحل + المعاينة الحيّة */
.o-editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.oe-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.oe-sec { display: flex; flex-direction: column; gap: 16px; }
.oe-h { display: flex; align-items: flex-start; gap: 12px; }
.oe-n { width: 36px; height: 36px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.oe-h h2 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.oe-h p { font-size: 13px; color: var(--muted); }
.oe-identity { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; }
.oe-id-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.logo-drop {
  position: relative; width: 120px; height: 120px; border-radius: 28px; overflow: hidden; cursor: pointer;
  display: grid; place-items: center; text-align: center; color: var(--muted);
  background: var(--surface-2); border: 1.5px dashed var(--faint); transition: border-color var(--t-fast), background var(--t-fast);
}
.logo-drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.logo-drop:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.logo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.logo-drop img { width: 100%; height: 100%; object-fit: contain; padding: 10px; background: #fff; }
.logo-drop span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; }
.logo-drop span b { color: var(--text); font-size: 13px; margin-top: 4px; }

.tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tpl {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: start; min-height: 116px; padding: 14px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform 160ms var(--ease-out);
}
.tpl:hover { border-color: var(--faint); }
.tpl:active { transform: scale(.98); }
.tpl-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--canvas); color: var(--text-2); margin-bottom: 2px; }
.tpl b { font-size: 14px; font-weight: 600; }
.tpl small { font-size: 12px; line-height: 1.45; color: var(--muted); }
.tpl[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tpl[aria-checked="true"] .tpl-ic { background: var(--primary-fill); color: var(--on-primary); }
:root[data-theme="dark"] .tpl[aria-checked="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }

.cat-rows { display: flex; flex-direction: column; gap: 8px; }
.cat-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 168px 44px; gap: 8px; align-items: center; animation: rise 260ms var(--ease-out) both; }
.cat-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--canvas); color: var(--text-2); }
.cat-row .field { height: 44px; }
.cat-row .icon-btn { width: 44px; height: 44px; }
.cat-none { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.oe-sec > .btn-secondary { align-self: flex-start; }

.oe-preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.oe-pv-head b { display: block; font-size: 14px; font-weight: 700; }
.oe-pv-head small { font-size: 12px; color: var(--muted); }
.pv-login { position: relative; height: 150px; border-radius: 18px; overflow: hidden; background: var(--rail-2); }
.pv-login img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-id { position: absolute; inset-inline: 14px; bottom: 12px; z-index: 1; display: flex; align-items: center; gap: 10px; color: #fff; }
.pv-id b { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; }
.pv-id small { font-size: 12px; color: rgba(255, 255, 255, .82); }
.pv-pos { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 18px; background: var(--canvas); }
.pv-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-tab { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding-inline: 10px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border); font-size: 11.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pv-tab .ic { width: 13px; height: 13px; }
.pv-tab i { font-style: normal; color: var(--muted); }
.pv-tab.on { background: var(--pv-bg); color: var(--pv-fg); border-color: transparent; }
.pv-tab.on i { color: inherit; opacity: .75; }
.pv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pv-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv-ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--stage); color: var(--faint); }
.pv-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-card b { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-card span { font-size: 11px; font-weight: 700; }
.pv-empty { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pv-login-data { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; border: 1px dashed var(--border); font-size: 12.5px; }
.pv-login-data div { display: flex; justify-content: space-between; gap: 8px; }
.pv-login-data dt { color: var(--muted); }
.pv-login-data dd { margin: 0; font-weight: 600; }
.pv-login-data code { font: 600 12.5px "Google Sans", monospace; direction: ltr; }
.oe-bar { grid-column: 1 / -1; position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; padding: 16px 0 20px; background: linear-gradient(to top, var(--canvas) 62%, transparent); }
.oe-bar .btn { height: 48px; padding-inline: 22px; }
.o-account { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }

@media (max-width: 1180px) {
  .o-editor { grid-template-columns: minmax(0, 1fr); }
  .oe-preview { position: static; }
}

/* لوحة المالك على الفون: شريط علوي بدل القائمة الجانبية */
@media (max-width: 699px) {
  .owner { flex-direction: column; height: auto; min-height: 100dvh; padding: 0; gap: 0; }
  .o-rail { width: auto; flex-direction: row; align-items: center; gap: 4px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; position: sticky; top: 0; z-index: 20; background: var(--rail); }
  .o-logo { flex: 1; padding: 0; min-width: 0; font-size: 15px; }
  .o-logo .logo-mark { width: 36px; height: 36px; border-radius: 12px; }
  .o-nav, .o-foot { flex-direction: row; flex: none; gap: 2px; border: 0; padding: 0; }
  .o-rail .nav-label { display: none; }
  .o-rail .nav-item { width: 44px; padding: 0; justify-content: center; }
  .o-main { overflow: visible; border-radius: 24px 24px 0 0; padding: 20px 16px 0; box-shadow: none; }
  .o-top h1 { font-size: 24px; }
  .o-actions .btn { height: 44px; }
  .o-store { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "m id" "cats cats" "login meta" "acts acts"; padding: 14px; }
  .os-acts { justify-content: flex-end; flex-wrap: wrap; }
  .os-acts .btn-sm { height: 44px; margin-inline-end: auto; }
  .oe-identity { grid-template-columns: 1fr; }
  .tpls { grid-template-columns: 1fr 1fr; }
  .cat-row { grid-template-columns: 40px minmax(0, 1fr) 44px; }
  .cat-row .field.sel { grid-column: 2 / 3; grid-row: 2; }
  .oe-bar { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .oe-bar .btn { flex: 1; }
}

/* ---------- حركة ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gbzoom { from { transform: scale(1.06); } to { transform: none; } }

/* ======================= نقطة البيع: واجهة المحل ======================= */
.pos { grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 420px); gap: 18px; }
.pos-left { gap: 14px; }
.pos-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cat-tabs { flex: 1 1 420px; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.ctab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding-inline: 16px 6px;
  border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast), transform 160ms var(--ease-out);
}
.ctab:not(:has(i)) { padding-inline: 14px 16px; }
.ctab .ic { color: var(--muted); }
.ctab i { font-style: normal; min-width: 32px; height: 32px; padding-inline: 8px; border-radius: 16px; display: grid; place-items: center; background: var(--canvas); color: var(--text-2); font: 600 12px/1 "Google Sans", sans-serif; transition: background var(--t-fast), color var(--t-fast); }
.ctab:hover { border-color: var(--faint); }
.ctab:active { transform: scale(.97); }
.ctab[aria-selected="true"] { color: var(--text); font-weight: 600; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ctab[aria-selected="true"] .ic { color: var(--text); }
.ctab[aria-selected="true"] i { background: var(--primary-fill); color: var(--on-primary); }
:root[data-theme="dark"] .ctab[aria-selected="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.pos-find { flex: 0 1 340px; min-width: 240px; display: flex; gap: 8px; }
.pos-find .field { flex: 1; height: 44px; border-radius: var(--r-full); padding-inline: 16px 12px; }
.pos-tools .scan-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; flex: none; }
:root[data-theme="dark"] .pos-tools .scan-btn { background: var(--primary-fill); color: var(--on-primary); }

/* كارت المنتج: الصورة هي الكارت — على «ستيدج» فاتح، شارة مخزون داكنة، وزر إضافة */
/* contain:paint بيخلي الحد الأدنى للكارت صفر، فالصفوف لازم تاخد ارتفاع محتواها */
.pgrid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); grid-auto-rows: max-content; gap: 14px; padding: 4px 2px 16px; }
.pc-ph, .pc-body { flex: none; }
.pcard {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 0; padding: 8px; text-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  transition: border-color var(--t-fast), box-shadow 240ms var(--ease-out), transform 160ms var(--ease-out);
}
.pcard:hover:not(:disabled) { border-color: var(--faint); box-shadow: 0 16px 30px -22px rgba(21, 33, 27, .5); }
.pcard:active:not(:disabled) { transform: scale(.985); }
.pcard.in { background: var(--surface); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
:root[data-theme="dark"] .pcard.in { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.pcard:disabled { opacity: 1; cursor: not-allowed; }
.pcard:disabled .pc-add { opacity: .45; }
.pcard.is-out .pc-ph img { filter: grayscale(1); opacity: .5; }
.pc-ph { position: relative; aspect-ratio: 5 / 4; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--stage); color: var(--tint-fg); }
.pc-ph > .ic { width: 44px; height: 44px; stroke-width: 1.4; opacity: .8; }
.pc-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.pcard:hover:not(:disabled) .pc-ph img { transform: scale(1.045); }
.pc-tag { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 1; height: 24px; padding-inline: 10px; border-radius: 12px; background: var(--ink); color: #fff; font: 600 11.5px/24px "Google Sans", "IBM Plex Sans Arabic", sans-serif; }
.is-low .pc-tag { background: #F0B03F; color: #3A2400; }
.is-out .pc-tag { background: var(--danger); color: #fff; }
.pc-qty { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 1; min-width: 34px; height: 26px; padding-inline: 8px; border-radius: 13px; background: var(--primary-fill); color: var(--on-primary); font: 700 12px/26px "Google Sans", sans-serif; text-align: center; animation: rise 220ms var(--ease-out); }
.pc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 6px 4px; }
.pc-nm { font-size: 14.5px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-meta { display: flex; align-items: center; gap: 6px; min-height: 18px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.pc-meta .sep { color: var(--faint); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); }
.pc-pr { margin-top: 2px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.pc-pr small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.pc-add { margin-top: 8px; height: 40px; border-radius: var(--r-full); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.pcard:hover:not(:disabled) .pc-add { background: var(--primary-fill); border-color: var(--primary-fill); color: var(--on-primary); }
.pcard.in .pc-add { background: var(--primary-soft); border-color: transparent; color: var(--primary); }

/* الفاتورة */
.cart-head h2 { font-size: 18px; }
.cart-head .inv { display: block; margin-top: 1px; }
.reset-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 10px 14px; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface); color: var(--danger-text); font-size: 12.5px; font-weight: 600; transition: background var(--t-fast), border-color var(--t-fast); }
.reset-btn:hover:not(:disabled) { background: var(--danger-soft); border-color: transparent; }
.reset-btn:disabled { color: var(--faint); }
.cart-who { padding: 0 16px 4px; }
.cart-who .field { height: 42px; border-radius: 14px; background: var(--surface-2); }
.lines { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; }
.line { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: stretch; padding: 10px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.line:last-child { border-bottom: 1px solid var(--border); }
.ln-ph { position: relative; width: 84px; min-height: 92px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--stage); color: var(--tint-fg); }
.ln-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ln-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ln-top { display: flex; align-items: flex-start; gap: 8px; }
.ln-top b { flex: 1; min-width: 0; padding-top: 4px; font-size: 14px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-del { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--danger); color: #fff; transition: background var(--t-fast), transform 160ms var(--ease-out); }
.ln-del:hover { background: #B42318; }
.ln-del:active { transform: scale(.92); }
.ln-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ln-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding-inline: 10px; border-radius: var(--r-full); border: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--text-2); }
.ln-chip.sel { padding-inline: 10px 6px; }
.ln-chip.sel > span { color: var(--muted); }
.ln-chip select { appearance: none; border: 0; background: transparent; padding-inline-end: 16px; font: 600 12px "Google Sans", "IBM Plex Sans Arabic", sans-serif; color: var(--text); cursor: pointer; }
.ln-chip select { align-self: stretch; display: flex; align-items: center; font-variant-numeric: tabular-nums; line-height: 1; }
.ln-chip.sel .ic { position: absolute; inset-inline-end: 8px; width: 12px; height: 12px; color: var(--muted); pointer-events: none; }
.ln-bot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.line .stepper { margin-top: 0; padding: 0; gap: 6px; background: transparent; }
.line .stepper button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); }
.line .stepper button:hover { background: var(--surface-2); }
.line .stepper button.plus { background: var(--primary-fill); border-color: var(--primary-fill); color: var(--on-primary); }
.line .stepper button.plus:hover { background: var(--primary-hover); }
.line .stepper b { min-width: 24px; font-size: 14px; }
.ln-total { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.ln-total small { font-size: 12px; color: var(--muted); }
.ln-total b { font-size: 15px; font-weight: 700; }
.cart-empty .tile { background: var(--stage); color: var(--text-2); }

.sum { background: var(--surface); border-top: 1px solid var(--border); gap: 10px; }
.promo { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 6px 6px 10px; border-radius: 16px; background: var(--surface-2); border: 1px dashed var(--border); }
[dir="rtl"] .promo { padding: 6px 10px 6px 6px; }
.promo-ic { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--primary-fill); color: var(--on-primary); }
.promo-lbl { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-lbl .disc { color: var(--ok-text); }
.promo .disc-box .field { width: 72px; height: 34px; background: var(--surface); }
.promo .disc-chips button { height: 34px; }
.sum-rows { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); gap: 6px; font-size: 13.5px; }
.sum-toggle { color: var(--text-2); font-weight: 600; }
.total b { font-size: 30px; }
.pay-methods button { border-radius: 14px; }
.pay-methods button[aria-pressed="true"] { background: var(--surface); border-color: var(--ink); color: var(--text); box-shadow: inset 0 0 0 1px var(--ink); }
.pay-methods button[aria-pressed="true"] .ic { color: var(--primary); }
:root[data-theme="dark"] .pay-methods button[aria-pressed="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.sum .btn-lg { height: 56px; border-radius: var(--r-full); font-size: 16px; box-shadow: 0 12px 24px -14px rgba(122, 170, 40, .8), inset 0 1px 0 rgba(255, 255, 255, .45); }
.sum .btn-lg:disabled { box-shadow: none; }

@media (min-width: 1000px) {
  .cart { border-radius: 26px; }
  .cart-head { border-bottom: 0; padding: 18px 18px 12px; border-radius: 26px 26px 0 0; }
  .sum { border-radius: 0 0 26px 26px; padding: 12px 16px 16px; }
}
/* الفاتورة على الشاشات القصيرة أو الضيقة: الملخص أخف عشان سطور الفاتورة تفضل باينة */
@media (min-width: 1000px) and (max-height: 820px), (min-width: 1000px) and (max-width: 1279px) {
  .line { grid-template-columns: 68px minmax(0, 1fr); padding: 8px; gap: 10px; }
  .ln-main { gap: 6px; }
  .ln-ph { width: 68px; min-height: 72px; }
  .lines { min-height: 200px; padding-block: 6px; gap: 6px; }
  .cart-head { padding-block: 14px 8px; }
  .cart-who .field { height: 38px; }
  .sum { gap: 6px; padding-block: 8px 12px; }
  .sum-toggle { min-height: 28px; }
  .total b { font-size: 24px; }
  .promo { min-height: 40px; padding-block: 4px; }
  .promo-ic { width: 28px; height: 28px; }
  .promo .disc-box .field, .promo .disc-chips button { height: 30px; }
  .pay-methods button { height: 40px; }
  .cash-row .quick.num { display: none; }
  .sum .btn-lg { height: 48px; }
  .cart-who { padding-bottom: 0; }
}

/* لابتوب صغير/تابلت بالعرض: عمود الفاتورة أضيق، فزر المسح أيقونة بس */
@media (max-width: 1279px) {
  .cart-head h2 { white-space: nowrap; }
  .reset-btn { width: 36px; padding: 0; justify-content: center; }
  .reset-btn span { display: none; }
}

/* تابلت وفون: نفس الكروت بالصور، والفاتورة شيت من تحت */
@media (max-width: 999px) {
  .pos-tools { flex-direction: column-reverse; align-items: stretch; }
  .pos-left, .pos-tools { min-width: 0; width: 100%; }
  .pos-find { flex: none; min-width: 0; width: 100%; }
  .pos-find .field { min-width: 0; }
  .cat-tabs { flex: none; }
  .cartbar { border-radius: var(--r-full); padding-inline: 10px 20px; }
  .line { grid-template-columns: 76px minmax(0, 1fr); }
  .ln-ph { width: 76px; }
}
@media (max-width: 699px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard { padding: 6px; border-radius: 20px; }
  .pc-ph { border-radius: 15px; aspect-ratio: 1; }
  .pc-body { padding: 10px 4px 2px; }
  .pc-nm { font-size: 14px; }
  .pc-pr { font-size: 16px; }
  .pc-add { height: 44px; }
  .ln-chip { height: 32px; }
  .cart-head h2 { white-space: nowrap; }
  .reset-btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .reset-btn span { display: none; }
}
@media (pointer: coarse) {
  .line .stepper button, .ln-del { width: 40px; height: 40px; }
}

/* ---------- أسهم تقليب الأقسام (للماوس) — تظهر بس لو فيه أقسام مستخبية ناحيتها ---------- */
.tabs-scroller { position: relative; flex: 1 1 420px; min-width: 0; display: flex; }
.tabs-scroller .cat-tabs { flex: 1; scroll-behavior: smooth; }
.tabs-scroller::before, .tabs-scroller::after { content: ""; position: absolute; top: 0; bottom: 0; width: 56px; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 160ms var(--ease-out); }
.tabs-scroller::before { inset-inline-start: 0; background: linear-gradient(to left, transparent, var(--canvas) 70%); }
.tabs-scroller::after { inset-inline-end: 0; background: linear-gradient(to right, transparent, var(--canvas) 70%); }
[dir="rtl"] .tabs-scroller::before { background: linear-gradient(to right, transparent, var(--canvas) 70%); }
[dir="rtl"] .tabs-scroller::after { background: linear-gradient(to left, transparent, var(--canvas) 70%); }
.tabs-scroller.fade-start::before, .tabs-scroller.fade-end::after { opacity: 1; }
.tabs-arrow {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 8px 18px -10px rgba(21, 33, 27, .55);
  transition: background var(--t-fast), border-color var(--t-fast), transform 160ms var(--ease-out);
}
.tabs-arrow.prev { inset-inline-start: 0; }
.tabs-arrow.next { inset-inline-end: 0; }
.tabs-arrow:hover { border-color: var(--ink); }
.tabs-arrow:active { transform: scale(.92); }
/* على اللمس بتسحب بصباعك — الأسهم للماوس بس */
@media (hover: none) and (pointer: coarse) { .tabs-arrow { display: none !important; } }
@media (max-width: 999px) { .tabs-scroller { flex: none; } }

/* نقط الألوان على كارت المنتج */
.dots { display: inline-flex; flex: none; }
.dots .dot + .dot { margin-inline-start: -3px; box-shadow: 0 0 0 1.5px var(--surface), inset 0 0 0 1px rgba(0, 0, 0, .16); }

/* ---------- اختيار اللون والمقاس قبل الإضافة للسلة ---------- */
.vp { display: flex; flex-direction: column; gap: 18px; }
.vp-prod { display: flex; align-items: center; gap: 14px; }
.vp-ph { position: relative; width: 84px; height: 84px; flex: none; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: var(--stage); color: var(--tint-fg); }
.vp-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vp-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vp-id b { font-size: 16px; font-weight: 700; }
.vp-pr { font-size: 18px; font-weight: 700; }
.vp-pr small { font-size: 12px; font-weight: 500; color: var(--muted); }
.vp-id > small { font-size: 12.5px; color: var(--muted); }
#vpBody { display: flex; flex-direction: column; gap: 18px; }
.vp-sec { display: flex; flex-direction: column; gap: 10px; }
.vp-sec .fld-lbl b { color: var(--text); }
.vp-sec .fld-lbl em { font-style: normal; font-weight: 500; color: var(--warn-text); }
.vp-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.vp-color {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding-inline: 6px 14px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.vp-color i { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); }
.vp-color:hover { border-color: var(--faint); }
.vp-color[aria-checked="true"] { color: var(--text); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.vp-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.vp-size {
  height: 48px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  font-size: 15px; font-weight: 600; color: var(--text); transition: border-color var(--t-fast), background var(--t-fast);
}
.vp-size:hover { border-color: var(--faint); }
.vp-size[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
:root[data-theme="dark"] .vp-color[aria-checked="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
:root[data-theme="dark"] .vp-size[aria-checked="true"] { background: var(--primary-fill); border-color: var(--primary-fill); color: var(--on-primary); }
.vp-row { flex-direction: row; align-items: center; justify-content: space-between; }
.vp-step { margin: 0; padding: 0; gap: 8px; background: transparent; }
.vp-step button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); }
.vp-step button.plus { background: var(--primary-fill); border-color: var(--primary-fill); color: var(--on-primary); }
.vp-step button:disabled { opacity: .4; }
.vp-step b { min-width: 28px; font-size: 16px; }
.vp-incart { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.vp-incart > span { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.is-picker .modal-foot .btn-primary { flex: 1; height: 48px; border-radius: var(--r-full); }
.is-picker .modal-foot .btn-secondary { height: 48px; border-radius: var(--r-full); }

/* ---------- القائمة المنسدلة بتصميم النظام (الموظف / العميل) ---------- */
.combo-btn { width: 100%; cursor: pointer; text-align: start; color: var(--text); font-weight: 500; }
.combo-btn > span:not(.avatar) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.combo-btn .ph { color: var(--muted); font-weight: 400; }
.combo-btn > .ic:last-child { color: var(--muted); transition: transform 180ms var(--ease-out); }
.combo-btn[aria-expanded="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.combo-btn[aria-expanded="true"] > .ic:last-child { transform: rotate(180deg); }
.combo-btn .avatar { flex: none; }
.combo-btn.invalid { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.combo-pop {
  position: fixed; z-index: 95; overflow-y: auto; overscroll-behavior: contain; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 24px 48px -20px rgba(21, 33, 27, .45), 0 2px 8px -4px rgba(21, 33, 27, .12);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center;
  transition: opacity 140ms var(--ease-out), transform 180ms var(--ease-out);
  scrollbar-width: thin;
}
.combo-pop.up { transform: translateY(6px) scale(.98); transform-origin: bottom center; }
.combo-pop.open { opacity: 1; transform: none; }
:root[data-theme="dark"] .combo-pop { box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .7); }
.cb-head { padding: 6px 10px 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cb-opt {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border-radius: 12px;
  text-align: start; color: var(--text); transition: background 120ms;
}
.cb-opt + .cb-opt { margin-top: 2px; }
.cb-opt:hover, .cb-opt.active { background: var(--surface-2); }
.cb-opt.active { box-shadow: inset 0 0 0 1px var(--border); }
.cb-opt[aria-selected="true"] { background: var(--primary-soft); }
.cb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cb-txt b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-txt small { font-size: 12px; color: var(--muted); direction: ltr; text-align: end; unicode-bidi: plaintext; }
[dir="rtl"] .cb-txt small { text-align: right; }
.cb-check { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--primary-fill); color: var(--on-primary); }
.cb-badge { flex: none; height: 22px; padding-inline: 8px; border-radius: 11px; background: var(--canvas); font-size: 11px; font-weight: 600; line-height: 22px; color: var(--text-2); }
.cb-badge.warn { background: var(--warn-soft); color: var(--warn-text); }
.cb-plus { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--primary-fill); color: var(--on-primary); }
.cb-opt.is-new { border: 1px dashed var(--border); }
.cb-empty { display: flex; align-items: center; gap: 8px; padding: 14px 12px; font-size: 13px; color: var(--muted); }
.avatar { background: var(--av-bg, var(--primary-soft)); color: var(--av-fg, var(--primary)); }

/* باقي القوائم في النظام (المقاس، اللون، الفلاتر، الإعدادات): قائمة بتصميم النظام في المتصفحات اللي بتدعمها */
@supports (appearance: base-select) {
  .field select, .ln-chip select, .disc-box select { appearance: base-select; }
  .field select::picker(select), .ln-chip select::picker(select) {
    appearance: base-select; padding: 6px; margin-block: 6px; min-width: 160px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: 0 24px 48px -20px rgba(21, 33, 27, .45);
  }
  .field select::picker-icon, .ln-chip select::picker-icon { display: none; }
  .field select option, .ln-chip select option { min-height: 40px; padding: 8px 12px; border-radius: 10px; font: 500 13.5px "Google Sans", "IBM Plex Sans Arabic", sans-serif; }
  .field select option:hover, .ln-chip select option:hover { background: var(--surface-2); }
  .field select option:checked, .ln-chip select option:checked { background: var(--primary-soft); font-weight: 600; }
  .field select option::checkmark, .ln-chip select option::checkmark { color: var(--primary); }
  .ln-chip select { padding-block: 0; border: 0; background: transparent; }
}

/* ---------- القائمة الجانبية: اللوجو بيفتحها، والتوجل بيقفلها، وبتزق المحتوى (مش فوقه) ---------- */
button.logo { background: none; border: 0; padding: 4px; margin: -4px; border-radius: 16px; text-align: start; cursor: default; color: #fff; min-width: 0; }
.rail.collapsed .logo { cursor: pointer; margin: 0 auto; }
.rail.collapsed .logo .smark { transition: box-shadow var(--t-fast), transform 160ms var(--ease-out); }
.rail.collapsed .logo:hover .smark { box-shadow: 0 0 0 3px rgba(255, 255, 255, .16); }
.rail.collapsed .logo:active .smark { transform: scale(.94); }
.rail.collapsed .rail-toggle { display: none; }
.rail.collapsed .rail-head { justify-content: center; padding-inline: 0; }
@media (min-width: 700px) and (max-width: 1099px) {
  body.rail-full .rail { width: 248px; }
  body.rail-full .rail .nav-label, body.rail-full .rail .logo-text { display: inline; }
  body.rail-full .rail .badge-dot { display: grid; }
  body.rail-full .rail .rail-toggle { display: grid; }
  body.rail-full .rail .rail-head { justify-content: space-between; padding-inline: 8px; }
  body.rail-full .rail .nav-item { padding-inline: 14px; justify-content: flex-start; }
  body.rail-full .rail-user { justify-content: flex-start; padding: 8px; background: rgba(255, 255, 255, .07); }
}
.menu-btn, .rail-menu { display: none !important; }

/* ---------- الفون: الإشعارات وتسجيل الخروج دايمًا فوق جنب البحث ---------- */
.only-phone-btn { display: none; }
@media (max-width: 699px) {
  .only-phone-btn { display: grid; }
  .tools { gap: 6px; }
  .tools .circle-btn { width: 44px; height: 44px; }
  .logout-btn { color: var(--danger-text); }
  .logout-btn:hover { background: var(--danger-soft); border-color: transparent; }
  .shift-chip { display: inline-flex; height: 44px; padding-inline: 10px; font-size: 12.5px; }
  .shift-chip .ic { display: none; }
  .bottomnav[hidden] + * { --bn-h: 0px; }
}
.shift-chip { border: 0; cursor: pointer; transition: background var(--t-fast); }
.shift-chip:hover { background: color-mix(in srgb, var(--ok-soft) 70%, var(--ok) 12%); }
.tile.tone-info { background: var(--primary-soft); color: var(--primary); }
.tile.tone-primary { background: var(--primary-fill); color: var(--on-primary); }

/* إشعارات الموظف/الكاشير */
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.al-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.al-row .tile { width: 36px; height: 36px; border-radius: 12px; }
.al-row b { display: block; font-size: 13.5px; font-weight: 600; }
.al-row p { margin-top: 2px; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.al-row small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }

/* ---------- صلاحيات الموظف ---------- */
.perm-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 10px 6px; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 600; transition: border-color var(--t-fast); }
.perm-btn:hover { border-color: var(--ink); color: var(--text); }
.perm-btn i { font-style: normal; min-width: 24px; height: 24px; padding-inline: 6px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-fill); color: var(--on-primary); font: 700 11px/1 "Google Sans", sans-serif; }
@media (max-width: 699px) { .perm-btn { height: 44px; } }
.pp-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pp-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pp-group { padding: 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.pp-group h4 { display: flex; align-items: center; gap: 6px; margin: 2px 4px 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pp-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding-inline: 8px; border-radius: 12px; cursor: pointer; font-size: 13.5px; font-weight: 500; }
.pp-row:hover { background: var(--surface); }
.pp-row input { position: absolute; opacity: 0; pointer-events: none; }
.pp-row input:checked + .tgl-ui { background: var(--primary-fill); box-shadow: inset 0 0 0 1px var(--primary-bright); }
.pp-row input:checked + .tgl-ui::after { inset-inline-start: 21px; }
.pp-row input:focus-visible + .tgl-ui { outline: 2px solid var(--primary); outline-offset: 2px; }
.pp-preview { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.pp-phone { padding: 10px; border-radius: 22px; background: var(--rail); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.pp-bar { display: grid; gap: 4px; padding: 6px; border-radius: 16px; background: var(--surface); }
.pp-bar span { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-bar i { display: grid; place-items: center; width: 44px; height: 26px; border-radius: 13px; }
.pp-bar span.on { color: var(--primary); font-weight: 600; }
.pp-bar span.on i { background: var(--primary-soft); }
.pp-none { margin: 0; padding: 12px; text-align: center; color: rgba(255, 255, 255, .78); font-size: 13px; }
.pp-note { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- معاينة الطباعة (فاتورة A4 / حرارية 58مم / تقارير) ---------- */
.print-prev { background: var(--stage); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; display: flex; justify-content: center; }
.print-prev iframe { width: 100%; height: min(62vh, 720px); border: 0; border-radius: 8px; background: #fff; box-shadow: var(--shadow-card); }
.print-prev.thermal iframe { width: 250px; max-width: 100%; }
.dropzone.over { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- قص صورة الموظف (دائري: سحب + تكبير) ---------- */
.cropper { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.crop-view { width: 240px; height: 240px; position: relative; overflow: hidden; border-radius: 50%; background: var(--stage); box-shadow: 0 0 0 1px var(--border); touch-action: none; cursor: grab; }
.crop-view:active { cursor: grabbing; }
.crop-view img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.cropper input[type=range] { width: 240px; accent-color: var(--primary); }

/* ---------- طرق الدفع: 4 أزرار (كاش / كارت / محفظة / آجل) ---------- */
.pay-methods { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pay-methods button { font-size: 12.5px; gap: 5px; padding: 0 4px; white-space: nowrap; }

/* ---------- لوجو DataGris Store: نسخة فاتحة ونسخة داكنة حسب الثيم ---------- */
/* الملفين علامة شفافة (من غير خلفية): logo-light للأسطح الفاتحة، logo-dark للأسطح الداكنة. */
.blogo { overflow: hidden; padding: 0; display: block; flex: none; }
.blogo img { width: 100%; height: 100%; object-fit: contain; display: block; transform: scale(1.22); }
.blogo .bl-d { display: none; }
:root[data-theme="dark"] .blogo .bl-l { display: none; }
:root[data-theme="dark"] .blogo .bl-d { display: block; }
/* على الإطار الأخضر (داكن في الوضعين الفاتح والليلي) العلامة الداكنة دايمًا، جوه بلاطة زجاجية من نفس الإطار */
.gate-brand .blogo .bl-l, .o-rail .blogo .bl-l, .rail .blogo .bl-l, .nav-drawer .blogo .bl-l { display: none; }
.gate-brand .blogo .bl-d, .o-rail .blogo .bl-d, .rail .blogo .bl-d, .nav-drawer .blogo .bl-d { display: block; }
.blogo.gb-logo, .blogo.logo-mark { display: block; color: inherit; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 14px 30px -16px rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.blogo.sm { width: 20px; height: 20px; display: inline-block; vertical-align: middle; overflow: visible; }
.blogo.sm img { transform: scale(1.35); }

/* ---------- الماسح المستمر جوه شاشة البيع (شريط فوق المنتجات، مش نافذة) ---------- */
.scan-dock { display: flex; align-items: center; gap: 14px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); flex: none; }
.scan-dock[hidden] { display: none; }
.scan-dock .scan-frame { width: 190px; max-width: 42%; border-radius: 14px; flex: none; }
.scan-dock .sd-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.scan-dock .sd-info b { font-size: 14px; }
.scan-dock .sd-info span { font-size: 12.5px; color: var(--muted); }
.scan-dock .sd-info small { font-size: 12.5px; font-weight: 600; color: var(--primary); min-height: 1.4em; }
.pos-tools .scan-btn[aria-pressed="true"] { background: var(--primary-fill); color: var(--on-primary); box-shadow: 0 0 0 3px var(--primary-soft); }
/* زرار المسح جوه خانة الباركود في فورم المنتج */
.field-scan { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background var(--t-fast), color var(--t-fast); }
.field-scan:hover { background: var(--canvas); color: var(--text); }

/* ---------- المرتجع: الفاتورة كورقة (ألوان الورق ثابتة في الوضعين الفاتح والليلي) ---------- */
.rcpt-stage { background: var(--stage); border-radius: var(--r-md); padding: 18px 14px 28px; }
.rcpt { position: relative; width: 100%; max-width: 430px; margin: 0 auto; padding: 20px 16px 16px; background: #fff; color: #15211B; border-radius: 6px 6px 0 0; box-shadow: 0 12px 26px -18px rgba(21, 33, 27, .55), 0 0 0 1px rgba(21, 33, 27, .06); font-size: 13px; }
/* حافة الورقة المقطوعة من تحت */
.rcpt::after { content: ""; position: absolute; inset-inline: 0; top: 100%; height: 9px; background: linear-gradient(135deg, #fff 50%, transparent 50%) 0 0 / 12px 9px repeat-x, linear-gradient(225deg, #fff 50%, transparent 50%) 0 0 / 12px 9px repeat-x; filter: drop-shadow(0 3px 2px rgba(21, 33, 27, .08)); }
.rc-head { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.rc-head b { font-size: 17px; font-weight: 700; } .rc-head small { color: #5D6962; font-size: 12px; }
.rc-title { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding: 10px 0 8px; border-top: 1px dashed #B9C2BB; font-weight: 600; }
.rc-title b { font-size: 15px; }
.rc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding-bottom: 12px; border-bottom: 1px dashed #B9C2BB; }
.rc-meta div { display: flex; flex-direction: column; min-width: 0; } .rc-meta span { font-size: 11px; color: #5D6962; } .rc-meta b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-cols { display: grid; grid-template-columns: 1fr 104px 76px; gap: 8px; padding: 8px 6px 4px; font-size: 11px; font-weight: 600; color: #5D6962; }
.rc-cols span:nth-child(2) { text-align: center; } .rc-cols span:last-child { text-align: end; }
.rc-lines { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed #B9C2BB; }
.rl { display: grid; grid-template-columns: 1fr 104px 76px; gap: 8px; align-items: center; padding: 7px 6px; border-radius: 10px; transition: background var(--t-fast); }
.rl.on { background: #F2FBE1; box-shadow: inset 0 0 0 1px #C4F279; }
.rl-pick { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 40px; cursor: pointer; }
.rl-pick input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid #97A199; border-radius: 7px; background: #fff center / 14px no-repeat; cursor: pointer; transition: background-color var(--t-fast), border-color var(--t-fast); }
.rl-pick input:checked { border-color: #15211B; background-color: #15211B; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C4F279' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.rl-pick input:focus-visible { outline: 2px solid #4A7A0C; outline-offset: 2px; }
.rl-pick input:disabled { background-color: #ECEFE8; border-color: #D5DBD3; cursor: not-allowed; }
.rl-name { display: flex; flex-direction: column; min-width: 0; } .rl-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rl-name small { font-size: 11.5px; color: #5D6962; }
.rl.done .rl-name b { text-decoration: line-through; color: #97A199; } .rl.done .rl-pick { cursor: default; }
.rl-qty { display: flex; align-items: center; justify-content: center; gap: 4px; visibility: hidden; }
.rl.on .rl-qty { visibility: visible; }
.rl-qty button { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid #D5DBD3; background: #fff; color: #15211B; }
.rl-qty button:last-child { background: #C4F279; border-color: #C4F279; color: #101828; }
.rl-qty button:disabled { opacity: .4; }
.rl-qty input { width: 34px; height: 28px; padding: 0; border: 0; background: none; color: #15211B; text-align: center; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.rl-qty input::-webkit-outer-spin-button, .rl-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rl-total { text-align: end; font-weight: 600; }
.rc-row { display: flex; justify-content: space-between; padding: 4px 6px 0; color: #33403A; } .rc-row:first-of-type { padding-top: 8px; }
.rc-row.strong { font-weight: 700; color: #15211B; padding-top: 6px; }
.rc-return { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #15211B; color: #fff; font-weight: 600; }
.rc-return small { font-weight: 500; color: rgba(255, 255, 255, .7); } .rc-return b { font-size: 17px; color: #C4F279; }
.rc-bc { margin-top: 14px; text-align: center; direction: ltr; } .rc-bc svg { width: 150px; max-width: 70%; height: auto; }
@media (max-width: 420px) { .rc-cols, .rl { grid-template-columns: 1fr 96px 64px; gap: 6px; } }

/* ---------- القوائم الطويلة على دفعات ---------- */
.pg-more { grid-column: 1 / -1; height: 1px; }
.tbl-more { display: block; width: 100%; margin-top: 10px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--r-md); color: var(--muted); font-weight: 600; font-size: 13px; text-align: center; }
.tbl-more:hover { color: var(--text); border-color: var(--faint); }

/* ربط موبايل الموظف: كود QR (أبيض دايمًا عشان الكاميرا تقراه في الوضع الليلي) */
.pair-box { align-items: center; text-align: center; }
.pair-qr { background: #fff; padding: 12px; border-radius: 16px; line-height: 0; border: 1px solid var(--line, rgba(0,0,0,.08)); }
.pair-qr svg { width: min(260px, 64vw); height: auto; }
/* قسم الأجهزة */
.dv-row { align-items: center; }
.dv-row > div { flex: 1; min-width: 0; }
.dv-row .acts { margin-inline-start: auto; display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; justify-content: flex-end; }
@media (max-width: 699px) { .dv-row { grid-template-columns: 36px 1fr auto; } .dv-row .acts { grid-column: 1 / -1; } }
.dv-row.off { opacity: .6; }

/* ===== شاشة الدخول: 3 أدوار في صف واحد ===== */
.roles.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.roles.n3 .role { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 8px; }
.roles.n3 .role-ic { grid-row: auto; }
@media (max-width: 520px) { .roles.n3 .role small { display: none; } .roles.n3 .role { padding: 12px 6px; } }
.gate-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 14px; }
.gate-more .gate-link { display: inline-flex; align-items: center; gap: 6px; }

/* ===== قبل الدخول: صفحة التعريف · التفعيل · الاشتراك المنتهي ===== */
.lp { min-height: 100vh; min-height: 100dvh; background: var(--canvas); color: var(--text); display: flex; flex-direction: column; gap: 28px; padding: 14px 16px 40px; }
.lp > * { width: 100%; max-width: 1080px; margin-inline: auto; }
.lp-narrow { align-items: stretch; }
.lp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.lp-tools { display: flex; align-items: center; gap: 8px; }
.lp-hero { background: var(--rail); color: #F2F4EF; border-radius: var(--r-rail); padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px); display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.lp-hero::after { content: ''; position: absolute; inset-inline-end: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(196, 242, 121, .22), transparent); pointer-events: none; }
.lp-hero h1 { font-size: clamp(28px, 4.4vw, 48px); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; max-width: 18ch; text-wrap: balance; }
.lp-hero p { font-size: clamp(15px, 1.6vw, 18px); color: rgba(242, 244, 239, .78); max-width: 52ch; line-height: 1.7; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; position: relative; z-index: 1; }
.lp-cta .btn-secondary { background: rgba(255, 255, 255, .08); color: #F2F4EF; border-color: rgba(255, 255, 255, .18); }
.lp-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 899px) { .lp-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lp-feats { grid-template-columns: 1fr; } }
.lp-feat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.lp-feat-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 4px; }
.lp-feat h3 { font-size: 16px; font-weight: 700; }
.lp-feat p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.lp-plans { display: flex; flex-direction: column; gap: 14px; }
.lp-plans h2 { font-size: 24px; font-weight: 700; }
.lp-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.lp-plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.lp-plan h3 { font-size: 17px; font-weight: 700; }
.lp-price b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.lp-price small { color: var(--muted); font-size: 14px; }
.lp-plan ul { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); flex: 1; }
.lp-plan li { display: flex; align-items: center; gap: 8px; }
.lp-plan .btn { justify-content: center; }
.lp-foot { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 14px; }
.lp-card { max-width: 440px !important; margin-block: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px 22px; display: flex; flex-direction: column; gap: 12px; text-align: center; box-shadow: var(--shadow-float); }
.lp-card h1 { font-size: 24px; font-weight: 700; line-height: 1.35; text-wrap: balance; }
.lp-card-sub { color: var(--muted); line-height: 1.7; }
.lp-card-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 4px; background: var(--primary-fill); color: var(--on-primary); }
.lp-card-ic.warn { background: var(--warn-soft); color: var(--warn-text); }
.lp-card .btn { justify-content: center; }
.lp-code input { text-align: center; font: 600 18px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .06em; }

/* ===== لوحة المالك: الصلاحيات والأجهزة ===== */
.ac { display: flex; flex-direction: column; gap: 16px; }
.ac-list { display: flex; flex-direction: column; }
.ac-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ac-row:last-child { border-bottom: 0; }
.ac-row.off { opacity: .6; }
.ac-main { display: flex; flex-direction: column; min-width: 0; }
.ac-main small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.ac-row .acts { display: flex; gap: 4px; align-items: center; }
@media (max-width: 699px) { .ac-row { grid-template-columns: auto minmax(0, 1fr) auto; } .ac-row .acts { grid-column: 1 / -1; justify-content: flex-end; } }
.ac-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ac-plan { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ac-code { background: var(--primary-soft); border-radius: var(--r-md); padding: 16px; text-align: center; }
.ac-code code { font: 700 clamp(16px, 4.6vw, 22px)/1.4 ui-monospace, Consolas, monospace; letter-spacing: .04em; color: var(--text); user-select: all; overflow-wrap: anywhere; }
.lp-cta .btn { width: auto; }
@media (max-width: 520px) { .lp-cta .btn { width: 100%; justify-content: center; } }
/* صفحة عميل واحد في لوحة المالك */
button.ac-main.ac-open { all: unset; display: flex; flex-direction: column; min-width: 0; cursor: pointer; border-radius: 8px; }
button.ac-main.ac-open:hover b { text-decoration: underline; text-underline-offset: 3px; }
button.ac-main.ac-open:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.ac-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.ac-fact { background: var(--canvas); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ac-fact span { color: var(--muted); font-size: 13px; }
.ac-fact b { font-weight: 600; overflow-wrap: anywhere; }
.ac-acts { margin-top: 14px; flex-wrap: wrap; }
.o-top h1 .smark { vertical-align: middle; margin-inline-end: 6px; }

/* ===== صفحة التعريف: أول شاشة بنموذج حي ===== */
.lp-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 48px); isolation: isolate; }
.lp-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(196, 242, 121, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(196, 242, 121, .06) 1px, transparent 1px);
  background-size: 32px 32px; mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%); }
.lp-hero-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: relative; z-index: 1; animation: rise 640ms var(--ease-out) both; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 13px; color: rgba(242, 244, 239, .8); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; padding: 5px 12px; }
.lp-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #C4F279; box-shadow: 0 0 0 0 rgba(196, 242, 121, .6); animation: lpPulse 1.8s infinite; }
.lp-hero h1 { max-width: none; font-size: clamp(30px, 4.6vw, 54px); line-height: 1.18; }
.lp-hero h1 em { font-style: normal; display: block; color: #C4F279; }
.lp-proof { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: rgba(242, 244, 239, .72); }
.lp-proof li { display: inline-flex; align-items: center; gap: 6px; }
.lp-proof .ic { color: #C4F279; }

.lp-demo { position: relative; min-height: 360px; display: grid; place-items: center; animation: rise 760ms var(--ease-out) 120ms both; }
.lp-pos { width: min(100%, 340px); background: #F6F8F3; color: #121A15; border-radius: 22px; padding: 14px; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 10px; transform: rotate(-2deg); }
.lp-pos-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #5D6962; }
.lp-pos-head b { color: #121A15; }
.lp-live { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #067647; }
.lp-live i { width: 7px; height: 7px; border-radius: 50%; background: #10B981; animation: lpPulse 1.6s infinite; }
.lp-scan { position: relative; height: 64px; border-radius: 12px; background: #fff; border: 1px solid #E2E7DF; overflow: hidden; display: grid; place-items: center; }
.lp-bars { width: 72%; height: 34px; background: repeating-linear-gradient(90deg, #121A15 0 2px, transparent 2px 4px, #121A15 4px 5px, transparent 5px 8px, #121A15 8px 11px, transparent 11px 13px); opacity: .85; }
.lp-scan small { position: absolute; bottom: 3px; font-size: 10px; letter-spacing: .12em; color: #5D6962; }
.lp-beam { position: absolute; inset-inline: 8px; top: 50%; height: 2px; background: #E5484D; box-shadow: 0 0 10px 2px rgba(229, 72, 77, .55); opacity: 0; }
.lp-scan.hit .lp-beam { animation: lpBeam 650ms ease-in-out; }
.lp-scan.hit { animation: lpHit 650ms ease-out; }
.lp-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-height: 150px; }
.lp-lines li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid #E2E7DF; border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.lp-lines li span { display: flex; flex-direction: column; min-width: 0; }
.lp-lines li small { color: #5D6962; font-size: 11.5px; }
.lp-lines li.in { animation: lpIn 420ms var(--ease-out) both; }
.lp-pos-total { display: flex; justify-content: space-between; align-items: baseline; background: #16241D; color: #F2F4EF; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.lp-pos-total b { font-size: 22px; color: #C4F279; }
.lp-phone { position: absolute; inset-inline-start: -6px; bottom: -10px; width: 150px; background: #0B120E; color: #F2F4EF; border-radius: 26px; padding: 22px 14px 14px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .8); display: flex; flex-direction: column; gap: 2px; transform: rotate(4deg); animation: lpFloat 5s ease-in-out infinite; }
.lp-phone-notch { position: absolute; top: 8px; inset-inline: 0; margin-inline: auto; width: 46px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .16); }
.lp-phone small { font-size: 11px; color: rgba(242, 244, 239, .6); }
.lp-phone > b { font-size: 26px; color: #C4F279; line-height: 1.2; }
.lp-phone > span { font-size: 11px; color: rgba(242, 244, 239, .6); }
.lp-sync { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #101828; background: #C4F279; border-radius: 999px; padding: 3px 8px; align-self: flex-start; opacity: .35; }
.lp-sync.on { animation: lpSync 1.4s ease-out both; }

.lp-marquee { overflow: hidden; border-block: 1px solid var(--border); padding-block: 12px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.lp-marquee > div { display: flex; gap: 28px; width: max-content; animation: lpMarq 38s linear infinite; }
.lp-marquee span { font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 28px; }
.lp-marquee span::after { content: '✦'; color: var(--primary-bright); font-size: 11px; }
.lp-feat, .lp-plan { transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms; }
.lp-feat:hover, .lp-plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); border-color: var(--primary-bright); }
.lp-feat.pre, .lp-plan.pre { opacity: 0; transform: translateY(18px); }
.lp-feat:not(.pre), .lp-plan:not(.pre) { transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out), box-shadow 220ms, border-color 220ms; }
.lp-dock { display: none; }

@keyframes lpPulse { 0% { box-shadow: 0 0 0 0 rgba(196, 242, 121, .55); } 100% { box-shadow: 0 0 0 9px rgba(196, 242, 121, 0); } }
@keyframes lpBeam { 0% { opacity: 1; top: 10%; } 50% { opacity: 1; top: 90%; } 100% { opacity: 0; top: 50%; } }
@keyframes lpHit { 60% { box-shadow: 0 0 0 3px rgba(196, 242, 121, .9); } 100% { box-shadow: none; } }
@keyframes lpIn { from { opacity: 0; transform: translateY(-10px) scale(.97); background: #F2FBE1; } to { opacity: 1; transform: none; } }
@keyframes lpSync { 0% { opacity: .35; transform: scale(.9); } 25% { opacity: 1; transform: scale(1.06); } 60%, 100% { opacity: 1; transform: none; } }
@keyframes lpFloat { 50% { transform: rotate(4deg) translateY(-8px); } }
@keyframes lpMarq { to { transform: translateX(50%); } }

@media (max-width: 899px) {
  .lp-hero { grid-template-columns: 1fr; }
  .lp-demo { min-height: 330px; margin-top: 4px; }
}
@media (max-width: 560px) {
  .lp { padding-bottom: 96px; }
  .lp-demo { min-height: 300px; }
  .lp-pos { width: min(100%, 300px); margin-inline-start: 40px; }
  .lp-phone { width: 128px; inset-inline-start: -4px; }
  .lp-phone > b { font-size: 22px; }
  .lp-dock { display: flex; gap: 8px; position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 20; padding: 8px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow-float); border: 1px solid var(--border); }
  .lp-dock .btn { flex: 1; justify-content: center; }
}
.lp-hero { background: #16241D; } /* لون الهوية الأصلي دايمًا، مش لون آخر محل اتفتح على الجهاز */
/* صفحة التعريف بلون DataGris دايمًا (مش لون آخر محل اتفتح على الجهاز) */
.lp { --primary: #4A7A0C; --primary-fill: #C4F279; --on-primary: #101828; --primary-hover: #B4E863; --primary-bright: #65A30D; --primary-soft: #F2FBE1; --primary-shadow: 0 8px 20px -10px rgba(101, 163, 13, .55); }
[data-theme="dark"] .lp { --primary: #C4F279; --primary-hover: #D4F79A; --primary-bright: #C4F279; --primary-soft: rgba(196, 242, 121, .12); --primary-shadow: 0 8px 22px -12px rgba(196, 242, 121, .45); }
.lp > .lp-dock { width: auto; max-width: none; margin: 0; }
@media (max-width: 560px) {
  .lp-demo { display: flex; flex-direction: column; align-items: center; min-height: 0; }
  .lp-pos { margin-inline-start: 0; }
  .lp-phone { position: relative; inset: auto; bottom: auto; align-self: flex-end; margin-top: -10px; margin-inline-end: 4px; width: 150px; }
}

/* ===== الأسعار ===== */
.lp-plans { gap: 22px; }
.lp-plans-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.lp-kicker { font-size: 13px; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 4px 12px; letter-spacing: .02em; }
.lp-plans-head h2 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.lp-plans-head p { color: var(--muted); }
.lp-plan-grid { display: grid; gap: 14px; align-items: stretch; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding-top: 14px; }
.lp-plan-grid.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-plan-grid.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lp-plan { position: relative; padding: 26px 22px 22px; gap: 12px; border-radius: 26px; }
.lp-plan h3 { font-size: 18px; }
.lp-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; line-height: 1; }
.lp-price b { font-size: 44px; font-weight: 700; letter-spacing: -.03em; }
.lp-price span { font-size: 16px; font-weight: 600; }
.lp-price small { color: var(--muted); font-size: 14px; }
.lp-plan-sub { font-size: 13.5px; color: var(--muted); margin-top: -2px; }
.lp-plan-sub b { color: var(--text); }
.lp-plan ul { gap: 9px; margin: 6px 0 4px; padding-top: 14px; border-top: 1px dashed var(--border); color: var(--text); }
.lp-plan li { align-items: flex-start; }
.lp-plan li .ic { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); margin-top: 1px; }
.lp-plan .btn-lg { width: 100%; }
.lp-plan-badge { position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(50%); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--primary-fill); color: var(--on-primary); box-shadow: 0 6px 16px -8px rgba(101, 163, 13, .8); }
.lp-plan-badge.save { background: var(--surface); color: var(--primary); border: 1px solid var(--primary-bright); box-shadow: none; }
[dir="ltr"] .lp-plan-badge { transform: translateX(-50%); }
.lp-plan.free .lp-price b { font-size: 36px; }
/* الباقة المميزة: نفس أخضر أول الصفحة وليمونيها */
.lp-plan.featured { background: #16241D; color: #F2F4EF; border-color: rgba(196, 242, 121, .45); box-shadow: 0 24px 50px -24px rgba(22, 36, 29, .75), 0 0 0 1px rgba(196, 242, 121, .25); overflow: visible; isolation: isolate; }
.lp-plan.featured::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 70% at 50% 0%, rgba(196, 242, 121, .18), transparent 60%), linear-gradient(rgba(196, 242, 121, .05) 1px, transparent 1px) 0 0 / 100% 28px; }
.lp-plan.featured .lp-price b, .lp-plan.featured .lp-price span { color: #C4F279; }
.lp-plan.featured .lp-price small, .lp-plan.featured .lp-plan-sub { color: rgba(242, 244, 239, .7); }
.lp-plan.featured .lp-plan-sub b, .lp-plan.featured ul { color: #F2F4EF; }
.lp-plan.featured ul { border-top-color: rgba(255, 255, 255, .14); }
.lp-plan.featured li .ic { background: rgba(196, 242, 121, .16); color: #C4F279; }
.lp-plan.featured:hover { border-color: #C4F279; box-shadow: 0 28px 60px -24px rgba(22, 36, 29, .85), 0 0 0 1px rgba(196, 242, 121, .5); }
@media (min-width: 900px) { .lp-plan.featured { transform: translateY(-12px); } .lp-plan.featured:hover { transform: translateY(-15px); } .lp-plan.featured.pre { transform: translateY(8px); } }
@media (max-width: 899px) { .lp-plan-grid.n3, .lp-plan-grid.n4 { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; width: 100%; gap: 22px; } }
@media (max-width: 899px) { .lp-plan.featured { order: -1; } } /* على الموبايل الباقة المميزة الأول */

/* ===== شريط صفحة التعريف: سطر واحد ثابت فوق وإنت بتنزل ===== */
.lp-top { position: sticky; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 30; flex-wrap: nowrap; gap: 8px;
  padding: 7px 8px 7px 8px; border-radius: 20px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 10px 30px -22px rgba(21, 33, 27, .5); }
.lp-brand { all: unset; display: inline-flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; border-radius: 14px; padding-inline-end: 4px; }
.lp-brand:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lp-logo { width: 40px; height: 40px; border-radius: 12px; background: #16241D; box-shadow: inset 0 0 0 1px rgba(196, 242, 121, .25); }
.lp-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.lp-name b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.lp-name small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lp-tools { gap: 6px; flex: none; }
.lp-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
.lp-icon:hover { border-color: var(--faint); }
.lp-icon .lang-tag { font-size: 12px; font-weight: 700; }
.lp-login { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 12px; border: 0; cursor: pointer;
  background: #16241D; color: #F2F4EF; font: inherit; font-size: 14px; font-weight: 600; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.lp-login .ic { color: #C4F279; }
.lp-login:hover { box-shadow: 0 8px 18px -10px rgba(22, 36, 29, .8); transform: translateY(-1px); }
[data-theme="dark"] .lp-login { background: #C4F279; color: #101828; }
[data-theme="dark"] .lp-login .ic { color: #101828; }
@media (max-width: 560px) {
  .lp { padding-top: 10px; }
  .lp-top { top: calc(6px + env(safe-area-inset-top, 0px)); padding: 6px; border-radius: 18px; }
  .lp-logo { width: 36px; height: 36px; border-radius: 11px; }
  .lp-name b { font-size: 15px; }
  .lp-icon { width: 34px; height: 34px; border-radius: 10px; }
  .lp-login { height: 34px; padding: 0 11px; border-radius: 10px; font-size: 13px; }
}
@media (max-width: 380px) {
  .lp-name small { display: none; }
  .lp-login span { display: none; }
  .lp-login { width: 34px; padding: 0; justify-content: center; }
}
.lp-login .lp-short { display: none; }
@media (max-width: 380px) {
  .lp-login .lp-long { display: none; }
  .lp-login .lp-short, .lp-login span.lp-short { display: inline; }
  .lp-login { width: auto; padding: 0 11px; }
  .lp-icon[data-act="lang"] { display: none; }
  .lp-name small { display: block; }
}

/* الشريط: نَفَس أوسع، واللوجو بنسخته الفاتحة على المربع الغامق (كان بيبان أسود على أسود) */
.lp-logo .bl-l { display: none !important; }
.lp-logo .bl-d { display: block !important; }
.lp-logo { width: 42px; height: 42px; border-radius: 13px; }
.lp-top { padding: 10px 12px; gap: 16px; border-radius: 22px; }
.lp-brand { gap: 12px; }
.lp-tools { gap: 8px; }
.lp-name { gap: 2px; }
@media (max-width: 560px) {
  .lp { gap: 22px; padding-top: 12px; }
  .lp-top { padding: 8px 10px; gap: 12px; border-radius: 20px; }
  .lp-icon { display: none !important; } /* اللغة والوضع الليلي: على الكمبيوتر بس — الموبايل بيفضل فاضي */
  .lp-logo { width: 40px; height: 40px; }
  .lp-name small { display: block; }
  .lp-login { height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; }
  .lp-login .lp-long { display: none; }
  .lp-login .lp-short { display: inline; }
}

/* ===== الفوتر ===== */
.lp-footer { background: #16241D; color: rgba(242, 244, 239, .78); border-radius: var(--r-rail); padding: clamp(26px, 4vw, 44px) clamp(20px, 4vw, 44px) 18px; display: flex; flex-direction: column; gap: 28px; position: relative; overflow: hidden; isolation: isolate; }
.lp-footer::before { content: ''; position: absolute; inset-inline-start: -140px; bottom: -160px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(closest-side, rgba(196, 242, 121, .14), transparent); z-index: -1; pointer-events: none; }
.lp-fgrid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr); gap: 28px 40px; }
.lp-fbrand { display: flex; flex-direction: column; gap: 12px; }
.lp-fname { display: flex; align-items: center; gap: 12px; }
.lp-fname b { font-size: 18px; color: #F2F4EF; }
.lp-fbrand p { font-size: 14px; line-height: 1.75; max-width: 40ch; }
.lp-social { display: flex; gap: 8px; margin-top: 4px; }
.lp-social a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #F2F4EF; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.lp-social a:hover { background: #C4F279; color: #101828; transform: translateY(-2px); }
.lp-fcol { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.lp-fcol h4 { font-size: 14px; font-weight: 700; color: #C4F279; margin-bottom: 2px; letter-spacing: .01em; }
.lp-fcol a, .lp-fcol button, .lp-fcol > span { all: unset; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(242, 244, 239, .82); cursor: pointer; }
.lp-fcol > span { cursor: default; }
.lp-fcol a:hover, .lp-fcol button:hover { color: #C4F279; }
.lp-fcol a:focus-visible, .lp-fcol button:focus-visible, .lp-social a:focus-visible { outline: 2px solid #C4F279; outline-offset: 3px; border-radius: 6px; }
.lp-fcol .ic { color: #C4F279; opacity: .9; }
.lp-fbottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 16px; display: flex; justify-content: center; text-align: center; font-size: 13px; color: rgba(242, 244, 239, .6); }
.lp-fbottom b { color: #F2F4EF; font-weight: 600; }
@media (max-width: 899px) { .lp-fgrid { grid-template-columns: 1fr 1fr; } .lp-fbrand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .lp-fgrid { grid-template-columns: 1fr; } }
.lp-maker { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; padding-inline-start: 12px; border-radius: 12px; background: #fff; color: #5D6962; font-size: 12.5px; font-weight: 600; text-decoration: none; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.lp-maker img { width: 104px; height: 30px; object-fit: cover; object-position: center 52%; display: block; }
.lp-maker:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .7); }
.lp-maker:focus-visible { outline: 2px solid #C4F279; outline-offset: 3px; }

/* الفوتر: شريط عريض لآخر الصفحة (مش بوكس زي كروت الأسعار) */
.lp > .lp-footer { width: auto; max-width: none; margin: 36px -16px -40px; border-radius: 32px 32px 0 0; background: #0D1611; border-top: 1px solid rgba(196, 242, 121, .18); padding-inline: max(16px, calc((100% - 1080px) / 2 + 16px)); padding-block: clamp(30px, 5vw, 52px) calc(20px + env(safe-area-inset-bottom, 0px)); }
.lp-footer::before { inset-inline-start: auto; inset-inline-end: -120px; bottom: auto; top: -180px; background: radial-gradient(closest-side, rgba(196, 242, 121, .10), transparent); }
.lp-fbottom { align-items: center; gap: 10px; flex-wrap: wrap; }
.lp-fbottom .lp-maker { padding: 5px 10px; border-radius: 10px; }
.lp-fbottom .lp-maker img { width: 96px; height: 26px; }
@media (max-width: 560px) { .lp > .lp-footer { margin-bottom: -96px; padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); } }
.lp-co { color: #F2F4EF; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(196, 242, 121, .5); padding-bottom: 1px; transition: color var(--t-fast), border-color var(--t-fast); }
.lp-co:hover { color: #C4F279; border-color: #C4F279; }
.lp-co:focus-visible { outline: 2px solid #C4F279; outline-offset: 3px; border-radius: 4px; }
.lp-fbottom { gap: 6px; }

/* ===== تقرير صافي الربح ===== */
.pf { display: flex; flex-direction: column; gap: 16px; }
.pf-dates { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-dates .field { width: 190px; }
.pf-range { margin-top: -6px; }
.pf-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pf-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.pf-kpi > span { color: var(--muted); font-size: 14px; font-weight: 600; }
.pf-kpi b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.pf-kpi b small { font-size: 14px; font-weight: 600; color: var(--muted); }
.pf-kpi > small { color: var(--muted); font-size: 13px; }
.pf-kpi.good { background: var(--rail); border-color: transparent; color: #F2F4EF; }
.pf-kpi.good > span, .pf-kpi.good > small, .pf-kpi.good b small { color: rgba(242, 244, 239, .72); }
.pf-kpi.good b { color: var(--primary-fill); }
.pf-kpi.bad { background: var(--danger-soft); border-color: var(--danger); }
.pf-kpi.bad b { color: var(--danger-text); }
.pf-stmt { display: flex; flex-direction: column; }
.pf-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.pf-line > span { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pf-line small { color: var(--muted); font-size: 12.5px; width: 100%; padding-inline-start: 26px; margin-top: -2px; }
.pf-op { width: 18px; flex: none; font-style: normal; font-weight: 700; color: var(--muted); text-align: center; }
.pf-line b { font-weight: 600; white-space: nowrap; }
.pf-line.sub > span { padding-inline-start: 0; color: var(--muted); }
.pf-line.total { border-bottom: 0; border-top: 2px solid var(--text); margin-top: 2px; padding-top: 11px; font-weight: 700; }
.pf-line.total b { font-size: 18px; font-weight: 700; }
.pf-line.cm { background: var(--primary-soft); border-radius: 10px; padding-inline: 10px; border-top: 0; margin-block: 4px; }
.pf-line.net b { color: var(--ok-text); font-size: 22px; }
.pf-line.loss b { color: var(--danger-text); font-size: 22px; }
.pf-labor { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pf-tbl { width: 100%; }
@media (max-width: 699px) { .pf-kpis { grid-template-columns: 1fr; } .pf-kpi b { font-size: 26px; } }
/* ظبط حساب الربح */
.pf-cfg h3 { font-size: 15px; font-weight: 700; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.pf-cfg h3:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.pf-cfg-rows { display: flex; flex-direction: column; gap: 8px; }
.pf-cfg-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
.pf-cats { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pf-cats .check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.pf-line.cm { background: var(--primary-soft); border-radius: 10px; padding-inline: 10px; margin-block: 4px; }
.tbl-wrap { overflow-x: auto; }
