/* ═══════════════════════════════════════════════
   ZONETIQ Sell — لوحة التاجر
   نفس رموز الهوية المستخدمة بالكاشير — مصدر واحد.
   ═══════════════════════════════════════════════ */
:root{
  --zq:#00A88F; --zq-deep:#00806D; --zq-dark:#006553; --zq-soft:#E6F6F3;
  --zq-ring:rgba(0,168,143,.28);
  --ink:#0D1620; --ink-2:#16232F; --ink-3:#22323F;
  --bg:#F2F6F5; --surface:#FFFFFF; --surface-2:#F8FAFA;
  --border:#DCE7E4; --border-2:#C7D8D4;
  --tx:#0D1620; --tx-2:#4A5C63; --tx-3:#7A8C92;
  --ok:#12A150; --ok-soft:#E7F7EE;
  --warn:#B7791F; --warn-soft:#FDF6E3;
  --danger:#C62828; --danger-soft:#FDECEC;
  --r:12px; --r-lg:16px; --r-xl:22px;
  --sh-1:0 1px 2px rgba(13,22,32,.06),0 1px 3px rgba(13,22,32,.05);
  --sh-3:0 18px 48px rgba(13,22,32,.22);
  --font:"IBM Plex Sans Arabic","Inter",-apple-system,"Segoe UI",Tahoma,sans-serif;
  --mono:"IBM Plex Mono","SF Mono",Menlo,monospace;
}
*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{ margin:0; font-family:var(--font); background:var(--bg); color:var(--tx);
  -webkit-font-smoothing:antialiased; }
button,input,select,textarea{ font-family:inherit; font-size:inherit; color:inherit; }
button{ cursor:pointer; border:0; background:none; }
button:disabled{ cursor:not-allowed; opacity:.5; }
a{ color:var(--zq-deep); }
.num{ font-family:var(--mono); font-variant-numeric:tabular-nums; }
.hide{ display:none !important; }

/* ───── الهيكل ───── */
.shell{ display:grid; grid-template-columns:250px 1fr; min-height:100dvh; }

.side{ background:var(--ink); color:#fff; display:flex; flex-direction:column;
  position:sticky; top:0; height:100dvh; }
.side .brand{ display:flex; align-items:center; gap:10px; padding:20px 20px 16px;
  font-weight:700; letter-spacing:.14em; font-size:15px; }
.side .brand svg{ width:26px; height:26px; }
.side .brand small{ display:block; letter-spacing:0; font-size:10.5px; opacity:.5; font-weight:500; }
.side nav{ padding:8px 12px; display:flex; flex-direction:column; gap:2px; flex:1; overflow-y:auto; }
.side nav a{ display:flex; align-items:center; gap:11px; padding:11px 13px; border-radius:10px;
  color:rgba(255,255,255,.72); text-decoration:none; font-size:14px; font-weight:600; }
.side nav a svg{ width:18px; height:18px; flex:0 0 auto; }
.side nav a:hover{ background:rgba(255,255,255,.07); color:#fff; }
.side nav a.on{ background:var(--zq); color:#fff; }
.side .foot{ padding:14px; border-top:1px solid rgba(255,255,255,.08); }
.who{ display:flex; align-items:center; gap:10px; font-size:13px; }
.who .av{ width:34px; height:34px; border-radius:50%; background:var(--zq); display:flex;
  align-items:center; justify-content:center; font-weight:800; flex:0 0 auto; }
.who b{ display:block; font-size:13.5px; }
.who small{ opacity:.5; font-size:11.5px; }
.side .out{ margin-top:10px; width:100%; padding:9px; border-radius:9px; font-size:13px;
  font-weight:600; background:rgba(255,255,255,.08); color:#fff; }
.side .out:hover{ background:rgba(198,40,40,.35); }

.main{ min-width:0; display:flex; flex-direction:column; }
.top{ display:flex; align-items:center; gap:14px; padding:20px 26px 0; }
.top h1{ margin:0; font-size:23px; font-weight:800; flex:1; }
.top .sub{ font-size:13px; color:var(--tx-3); font-weight:500; margin-top:3px; }
.page{ padding:20px 26px 40px; }

/* ───── شرائط ───── */
.banner{ display:flex; align-items:center; gap:12px; padding:13px 16px; border-radius:var(--r);
  margin-bottom:18px; font-size:14px; font-weight:600; }
.banner svg{ width:19px; height:19px; flex:0 0 auto; }
.banner.warn{ background:var(--warn-soft); color:#7A5210; border:1px solid #F0DFB4; }
.banner.bad{ background:var(--danger-soft); color:#8E1F1F; border:1px solid #F5C6C6; }
.banner.info{ background:var(--zq-soft); color:var(--zq-dark); border:1px solid #BDE7DF; }
.banner .sp{ flex:1; }
.banner .act{ padding:7px 14px; border-radius:9px; background:currentColor; font-size:13px; font-weight:700; }
.banner .act span{ color:#fff; mix-blend-mode:normal; }

/* ───── بطاقات إحصائية ───── */
.tiles{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin-bottom:20px; }
.tile{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg);
  padding:16px 18px; box-shadow:var(--sh-1); }
.tile .k{ font-size:12.5px; color:var(--tx-2); font-weight:600; display:flex; align-items:center; gap:6px; }
.tile .v{ font-size:29px; font-weight:800; margin-top:6px; letter-spacing:-.02em; }
.tile .d{ font-size:12.5px; font-weight:700; margin-top:5px; display:inline-flex; align-items:center; gap:4px; }
.tile .d.up{ color:var(--ok); } .tile .d.dn{ color:var(--danger); } .tile .d.flat{ color:var(--tx-3); }
.tile.hero{ background:var(--ink); border-color:var(--ink); color:#fff; }
.tile.hero .k{ color:rgba(255,255,255,.6); }
.tile.hero .v{ color:#fff; }

/* ───── لوحات ───── */
.panel{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg);
  box-shadow:var(--sh-1); margin-bottom:18px; overflow:hidden; }
.panel-head{ display:flex; align-items:center; gap:12px; padding:15px 18px; border-bottom:1px solid var(--border); }
.panel-head h3{ margin:0; font-size:15.5px; font-weight:700; flex:1; }
.panel-body{ padding:16px 18px; }
.panel-body.flush{ padding:0; }

/* ───── جداول ───── */
.tbl{ width:100%; border-collapse:collapse; font-size:13.5px; }
.tbl th{ text-align:start; font-size:11.5px; letter-spacing:.04em; text-transform:uppercase;
  color:var(--tx-3); font-weight:700; padding:11px 18px; background:var(--surface-2);
  border-bottom:1px solid var(--border); white-space:nowrap; }
.tbl td{ padding:13px 18px; border-bottom:1px solid var(--surface-2); }
.tbl tr:last-child td{ border-bottom:0; }
.tbl tbody tr:hover{ background:var(--surface-2); }
.tbl .end{ text-align:end; }
.muted{ color:var(--tx-3); }

.tag{ display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px;
  font-size:11.5px; font-weight:700; white-space:nowrap; }
.tag .dot{ width:7px; height:7px; border-radius:50%; background:currentColor; }
.tag.ok{ background:var(--ok-soft); color:#0B7038; }
.tag.warn{ background:var(--warn-soft); color:var(--warn); }
.tag.bad{ background:var(--danger-soft); color:var(--danger); }
.tag.mute{ background:var(--surface-2); color:var(--tx-3); }

/* ───── الرسم ───── */
.chart{ width:100%; height:190px; display:block; }
.chart .grid-l{ stroke:var(--border); stroke-width:1; }
.chart .bar{ fill:var(--zq); }
.chart .bar:hover{ fill:var(--zq-dark); }
.chart .lbl{ font-size:10.5px; fill:var(--tx-3); font-family:var(--font); }
.chart .val{ font-size:11px; fill:var(--tx-2); font-family:var(--mono); font-weight:600; }

/* ───── أزرار وحقول ───── */
.btn{ height:44px; padding:0 18px; border-radius:var(--r); font-weight:700; font-size:14px;
  display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.btn.pri{ background:var(--zq); color:#fff; }
.btn.pri:hover:not(:disabled){ background:#00b89d; }
.btn.dark{ background:var(--ink); color:#fff; }
.btn.dark:hover:not(:disabled){ background:var(--ink-2); }
.btn.ghost{ background:var(--surface); border:1px solid var(--border-2); }
.btn.ghost:hover:not(:disabled){ border-color:var(--ink-3); }
.btn.danger{ background:var(--danger); color:#fff; }
.btn.sm{ height:34px; padding:0 13px; font-size:13px; border-radius:9px; }
.btn.full{ width:100%; }

.field{ margin-bottom:15px; }
.field label{ display:block; font-size:13px; font-weight:600; color:var(--tx-2); margin-bottom:6px; }
.field input,.field select,.field textarea{ width:100%; height:46px; padding:0 14px;
  border:1px solid var(--border-2); border-radius:var(--r); outline:0; background:var(--surface); font-size:15px; }
.field textarea{ height:84px; padding:12px 14px; resize:none; }
.field input:focus,.field select:focus,.field textarea:focus{
  border-color:var(--zq); box-shadow:0 0 0 4px var(--zq-ring); }
.field .hint{ font-size:12px; color:var(--tx-3); margin-top:5px; }
.field .hint.bad{ color:var(--danger); font-weight:600; }
.field .hint.ok{ color:var(--ok); font-weight:600; }
.two{ display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }

/* ───── نوافذ ───── */
.scrim{ position:fixed; inset:0; background:rgba(13,22,32,.55); backdrop-filter:blur(3px);
  display:flex; align-items:center; justify-content:center; padding:20px; z-index:100; }
.modal{ background:var(--surface); border-radius:var(--r-xl); box-shadow:var(--sh-3);
  width:100%; max-width:520px; max-height:92dvh; display:flex; flex-direction:column;
  animation:pop .16s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop{ from{ opacity:0; transform:translateY(14px) scale(.97) } }
.modal-head{ display:flex; align-items:center; gap:12px; padding:18px 20px 14px; }
.modal-head h3{ margin:0; font-size:18px; font-weight:800; flex:1; }
.modal-head .x{ width:34px; height:34px; border-radius:9px; color:var(--tx-3); font-size:19px; }
.modal-head .x:hover{ background:var(--surface-2); color:var(--ink); }
.modal-body{ padding:0 20px; overflow-y:auto; }
.modal-foot{ padding:16px 20px 20px; display:grid; gap:9px; }
.modal-foot.two{ grid-template-columns:1fr 1fr; }

/* ───── كود الإقران ───── */
.code{ font-family:var(--mono); font-size:15px; font-weight:700; letter-spacing:.04em;
  background:var(--ink); color:#7BE3C8; padding:14px 16px; border-radius:var(--r);
  display:flex; align-items:center; gap:12px; word-break:break-all; }
.code button{ margin-inline-start:auto; color:#fff; background:rgba(255,255,255,.12);
  padding:7px 12px; border-radius:8px; font-size:12.5px; font-weight:700; flex:0 0 auto; }

/* ───── شاشة الدخول ───── */
.auth{ min-height:100dvh; display:grid; grid-template-columns:1fr 1fr; }
.auth .pitch{ background:var(--ink); color:#fff; padding:56px 48px; display:flex;
  flex-direction:column; justify-content:center; gap:20px; }
.auth .pitch .brand{ display:flex; align-items:center; gap:10px; font-weight:700;
  letter-spacing:.16em; font-size:17px; }
.auth .pitch .brand svg{ width:30px; height:30px; }
.auth .pitch h2{ margin:0; font-size:34px; line-height:1.35; font-weight:800; letter-spacing:-.02em; }
.auth .pitch p{ margin:0; opacity:.62; font-size:15px; line-height:1.85; max-width:420px; }
.auth .pitch ul{ margin:6px 0 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:11px; }
.auth .pitch li{ display:flex; gap:11px; align-items:flex-start; font-size:14.5px; opacity:.85; }
.auth .pitch li svg{ width:19px; height:19px; color:var(--zq); flex:0 0 auto; margin-top:2px; }
.auth .form{ display:flex; align-items:center; justify-content:center; padding:40px 28px; }
.auth .form .box{ width:100%; max-width:400px; }
.auth .form h1{ margin:0 0 6px; font-size:26px; font-weight:800; }
.auth .form .lede{ margin:0 0 26px; color:var(--tx-2); font-size:14.5px; }
.auth .swap{ text-align:center; margin-top:18px; font-size:13.5px; color:var(--tx-2); }
.auth .swap button{ color:var(--zq-deep); font-weight:700; }

/* ───── توست ───── */
#toasts{ position:fixed; bottom:20px; inset-inline-start:20px; z-index:120;
  display:flex; flex-direction:column; gap:8px; pointer-events:none; }
.toast{ background:var(--ink); color:#fff; padding:12px 16px; border-radius:var(--r);
  font-size:14px; font-weight:600; box-shadow:var(--sh-3); max-width:400px; }
.toast.ok{ background:#0B7038; } .toast.bad{ background:var(--danger); }

/* ───── صغيرة ───── */
@media (max-width:900px){
  .shell{ grid-template-columns:1fr; }
  .side{ position:static; height:auto; }
  .side nav{ flex-direction:row; overflow-x:auto; padding:6px 10px 10px; }
  .side nav a span{ display:none; }
  .side .foot{ display:none; }
  .auth{ grid-template-columns:1fr; }
  .auth .pitch{ display:none; }
  .page,.top{ padding-inline:16px; }
  .two{ grid-template-columns:1fr; }
}

/* ───── بوابات الدفع ───── */
.gws{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:10px; }
.gw{ text-align:start; border:1.5px solid var(--border); border-radius:var(--r);
  padding:14px; background:var(--surface); display:flex; flex-direction:column; gap:5px; }
.gw:hover{ border-color:var(--border-2); background:var(--surface-2); }
.gw.sel{ border-color:var(--zq); background:var(--zq-soft); }
.gw .n{ font-weight:700; font-size:14.5px; }
.gw .m{ font-size:12px; color:var(--tx-2); line-height:1.6; }

/* ───── مفاتيح تبديل ───── */
.lbl{ display:block; font-size:13px; font-weight:700; color:var(--tx-2);
  margin:20px 0 10px; }
.tog{ display:flex; align-items:flex-start; gap:11px; padding:11px 0;
  border-bottom:1px solid var(--surface-2); cursor:pointer; }
.tog:last-of-type{ border-bottom:0; }
.tog input{ width:19px; height:19px; margin-top:2px; flex:0 0 auto; accent-color:var(--zq); }
.tog b{ display:block; font-size:14px; font-weight:600; }
.tog small{ display:block; font-size:12.5px; color:var(--tx-3); margin-top:2px; }

/* شريط الدخول الانتحالي */
.impbar{ position:fixed; inset-inline:0; top:0; z-index:200; background:#B7791F; color:#1A1200;
  padding:9px 16px; font-size:13.5px; font-weight:700; display:flex; align-items:center;
  gap:12px; justify-content:center; }
.impbar button{ background:rgba(0,0,0,.24); color:#fff; padding:4px 12px;
  border-radius:7px; font-size:12.5px; font-weight:700; }
