:root{
    --green-900:#102b22; --green-700:#1b4d3e; --green-600:#23624f; --green-500:#2f8f6b; --green-100:#e4efe9;
    --gold:#d39327; --gold-deep:#b87d1a; --gold-soft:#f6e6c4;
    --sand:#f4eee1; --card:#ffffff; --ink:#15231d; --muted-s:#6e7c74;
    --line-2:#e2d9c6; --line:#ece4d3; --amber:#bd6f17; --amber-bg:#f7e9d3;
  }
  *{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
  html,body{ margin:0; padding:0; overscroll-behavior:none; }
  body{ font-family:"IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif; color:var(--ink);
    background:radial-gradient(1100px 520px at 50% -8%, #fbf7ee 0%, rgba(251,247,238,0) 60%), linear-gradient(170deg,#f4eee1 0%,#ece2cf 100%);
    min-height:100vh; overflow-x:hidden; }
  .num{ font-family:"Space Mono", ui-monospace, monospace; font-variant-numeric:tabular-nums; letter-spacing:-.5px; }

  .page{ max-width:880px; margin:0 auto; padding:46px 20px 70px; }
  .head{ text-align:center; margin-bottom:26px; }
  .kicker{ display:inline-flex; align-items:center; gap:8px; font-size:12px; font-weight:600; letter-spacing:.5px; color:var(--green-600); background:var(--green-100); border:1px solid #d3e4dc; padding:6px 13px; border-radius:999px; margin-bottom:18px; }
  .kicker .dot{ width:7px; height:7px; border-radius:50%; background:var(--green-500); box-shadow:0 0 0 3px #d6ebe2; }
  .brand{ display:inline-flex; align-items:center; gap:14px; margin-bottom:12px; }
  .brand .logo{ width:46px; height:46px; border-radius:14px; background:linear-gradient(150deg,var(--green-600),var(--green-900)); display:grid; place-items:center; box-shadow:0 10px 22px -10px rgba(16,43,34,.6); }
  .brand h1{ font-size:40px; font-weight:700; margin:0; letter-spacing:-1px; }
  .tag{ font-size:16px; color:var(--muted-s); margin:0 auto; max-width:580px; line-height:1.7; }
  .pills{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:18px; }
  .pill{ font-size:12.5px; font-weight:500; background:#fffdf8; border:1px solid var(--line-2); border-radius:999px; padding:7px 13px; display:inline-flex; align-items:center; gap:7px; }
  .pill svg{ width:14px; height:14px; color:var(--green-500); }

  .stage{ display:flex; flex-wrap:wrap; gap:30px 46px; justify-content:center; align-items:flex-start; margin-top:34px; }
  .device{ display:flex; flex-direction:column; align-items:center; gap:15px; animation:rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .device:nth-child(2){ animation-delay:.08s; }
  @keyframes rise{ from{opacity:0; transform:translateY(22px);} to{opacity:1; transform:translateY(0);} }
  .caption{ text-align:center; }
  .caption .who{ font-weight:700; font-size:15px; display:flex; align-items:center; gap:8px; justify-content:center; }
  .caption .who .av{ width:24px; height:24px; border-radius:50%; display:grid; place-items:center; font-size:10px; color:#fff; font-weight:700; }
  .caption .role{ font-size:12.5px; color:var(--muted-s); margin-top:3px; }

  .phone{ width:336px; padding:11px; background:linear-gradient(160deg,#0c1d17,#21433a 60%,#0c1d17); border-radius:46px; box-shadow:0 34px 60px -22px rgba(16,43,34,.55),0 10px 24px -12px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.06); position:relative; }
  .island{ position:absolute; top:18px; left:50%; transform:translateX(-50%); width:92px; height:25px; background:#05100c; border-radius:999px; z-index:6; }
  .glass{ background:var(--sand); border-radius:35px; overflow:hidden; height:700px; display:flex; flex-direction:column; position:relative; }

  .topbar{ background:linear-gradient(178deg,var(--green-700),var(--green-600)); color:#fff; padding:14px 18px 15px; position:relative; z-index:2; box-shadow:0 6px 14px -8px rgba(16,43,34,.5); }
  .status{ display:flex; align-items:center; justify-content:space-between; font-size:12.5px; font-weight:600; padding-top:6px; }
  .status .sig{ display:flex; align-items:center; gap:5px; opacity:.92; }
  .status .sig svg{ width:16px; height:16px; }
  .appbar{ display:flex; align-items:center; justify-content:space-between; margin-top:14px; }
  .shop{ display:flex; align-items:center; gap:10px; }
  .shop .mark{ width:34px; height:34px; border-radius:11px; background:rgba(255,255,255,.13); display:grid; place-items:center; border:1px solid rgba(255,255,255,.16); }
  .shop .mark svg{ width:18px; height:18px; color:#fff; }
  .shop .nm{ font-weight:700; font-size:15.5px; line-height:1.1; }
  .shop .sub{ font-size:11.5px; opacity:.78; margin-top:2px; }
  .me-av{ width:32px; height:32px; border-radius:50%; display:grid; place-items:center; font-weight:700; font-size:11px; color:#fff; }
  .left-group{ display:flex; align-items:center; gap:9px; }
  .bell{ position:relative; width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.18); display:grid; place-items:center; cursor:pointer; color:#fff; padding:0; }
  .bell svg{ width:17px; height:17px; }
  .bell .badge{ position:absolute; top:-4px; left:-4px; min-width:17px; height:17px; padding:0 4px; border-radius:999px; background:#e0612e; color:#fff; font-size:9.5px; font-weight:700; display:grid; place-items:center; border:2px solid var(--green-700); }
  .sync{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:600; background:rgba(255,255,255,.14); padding:5px 9px; border-radius:999px; border:1px solid rgba(255,255,255,.14); }
  .sync .live{ width:7px; height:7px; border-radius:50%; background:#7be0b3; box-shadow:0 0 0 3px rgba(123,224,179,.25); animation:pulse 2s ease-in-out infinite; }
  @keyframes pulse{ 0%,100%{opacity:1;} 50%{opacity:.35;} }

  .content{ flex:1; overflow-y:auto; overscroll-behavior:contain; padding:16px 16px calc(96px + env(safe-area-inset-bottom, 0px)); scrollbar-width:thin; scrollbar-color:#d8cfbe transparent; }
  .content::-webkit-scrollbar{ width:5px; }
  .content::-webkit-scrollbar-thumb{ background:#dccfba; border-radius:9px; }
  .screen{ display:none; animation:fade .28s ease; }
  .screen.on{ display:block; }
  @keyframes fade{ from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);} }

  .eyebrow{ font-size:12px; color:var(--muted-s); font-weight:600; }
  .h2{ font-size:17px; font-weight:700; margin:0; }
  .row-between{ display:flex; align-items:center; justify-content:space-between; }
  .card{ background:var(--card); border:1px solid var(--line-2); border-radius:18px; padding:15px; margin-top:13px; }

  .hero{ background:linear-gradient(160deg,#ffffff,#fffdf6); border:1px solid var(--line-2); border-radius:20px; padding:17px 18px; box-shadow:0 12px 26px -18px rgba(16,43,34,.28); }
  .hero .lbl{ font-size:12.5px; color:var(--muted-s); font-weight:600; display:flex; align-items:center; gap:7px; }
  .hero .lbl .pin{ width:7px; height:7px; border-radius:50%; background:var(--gold); }
  .amt{ display:flex; align-items:baseline; gap:7px; margin-top:9px; }
  .amt .big{ font-size:39px; font-weight:700; color:var(--gold-deep); }
  .amt .cur{ font-size:16px; font-weight:600; color:var(--muted-s); }
  .delta{ display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; color:var(--green-500); background:var(--green-100); padding:4px 9px; border-radius:999px; margin-top:10px; }
  .delta svg{ width:13px; height:13px; }
  .stat-row{ display:grid; grid-template-columns:1fr 1fr; gap:11px; margin-top:13px; }
  .stat{ background:var(--card); border:1px solid var(--line-2); border-radius:15px; padding:13px 14px; }
  .stat .k{ font-size:11.5px; color:var(--muted-s); font-weight:600; }
  .stat .v{ font-size:21px; font-weight:700; margin-top:5px; }
  .stat .v .cur{ font-size:11.5px; color:var(--muted-s); font-weight:600; }

  .chart{ display:flex; align-items:flex-end; justify-content:space-between; gap:7px; height:96px; margin-top:14px; }
  .bar-wrap{ display:flex; flex-direction:column; align-items:center; gap:7px; flex:1; }
  .bar{ width:100%; max-width:24px; border-radius:7px 7px 4px 4px; background:var(--green-100); }
  .bar.today{ background:linear-gradient(180deg,var(--gold),var(--gold-deep)); }
  .bar-lbl{ font-size:10px; color:var(--muted-s); }

  .alert-card{ display:flex; align-items:center; gap:11px; background:var(--amber-bg); border:1px solid #ecd0a6; border-right:4px solid var(--amber); border-radius:14px; padding:12px 14px; margin-top:13px; cursor:pointer; }
  .alert-card .ai{ width:30px; height:30px; border-radius:9px; background:#f0d6a6; display:grid; place-items:center; color:var(--amber); flex:0 0 auto; }
  .alert-card .at{ font-size:12.5px; font-weight:700; color:#8a5e16; }
  .alert-card .as{ font-size:11.5px; color:#9a702a; margin-top:2px; }
  .alert-card .chev{ margin-right:auto; color:#c19a52; }

  .section-title{ display:flex; align-items:center; justify-content:space-between; margin:18px 2px 10px; }
  .seeall{ font-size:12px; color:var(--green-600); font-weight:600; cursor:pointer; }

  .tx{ background:var(--card); border:1px solid var(--line-2); padding:13px 15px; display:flex; align-items:center; justify-content:space-between; position:relative; }
  .tx:first-child{ border-radius:16px 16px 0 0; }
  .tx:last-child{ border-radius:0 0 16px 16px; }
  .tx + .tx{ border-top:none; }
  .tx + .tx::before{ content:""; position:absolute; top:0; right:14px; left:14px; border-top:1.6px dashed #e4dcca; }
  .tx .l{ display:flex; align-items:center; gap:11px; }
  .tx .ic{ width:34px; height:34px; border-radius:10px; background:var(--green-100); display:grid; place-items:center; }
  .tx .ic svg{ width:17px; height:17px; color:var(--green-600); }
  .nm-line{ font-weight:600; font-size:13.5px; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
  .tx .meta{ font-size:11.5px; color:var(--muted-s); margin-top:2px; display:flex; align-items:center; gap:6px; }
  .by{ display:inline-flex; align-items:center; gap:5px; }
  .by .d{ width:8px; height:8px; border-radius:50%; }
  .tx .amt2{ font-weight:700; font-size:16px; white-space:nowrap; }
  .tx .amt2 .cur{ font-size:11px; color:var(--muted-s); font-weight:600; }
  .tagx{ font-size:9.5px; font-weight:700; padding:2px 7px; border-radius:999px; }
  .tag-cash{ color:var(--green-600); background:var(--green-100); }
  .tag-debt{ color:var(--amber); background:var(--amber-bg); }
  .tag-wt{ color:var(--gold-deep); background:var(--gold-soft); }

  .net{ background:linear-gradient(155deg,var(--green-700),var(--green-900)); color:#fff; border-radius:22px; padding:19px; box-shadow:0 18px 34px -20px rgba(16,43,34,.7); }
  .net .lbl{ font-size:12.5px; opacity:.85; font-weight:500; }
  .net .big{ font-size:37px; font-weight:700; margin-top:7px; }
  .net .cur{ font-size:14px; opacity:.8; font-weight:600; }
  .net .mini{ display:flex; gap:18px; margin-top:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,.16); }
  .net .mini div{ flex:1; }
  .net .mini .mk{ font-size:11px; opacity:.78; }
  .net .mini .mv{ font-size:15px; font-weight:700; margin-top:3px; }
  .net .mini .mv.exp{ color:#f1c39a; }
  .split-bar{ height:15px; border-radius:999px; overflow:hidden; display:flex; gap:3px; margin-top:13px; background:#eee; }
  .seg-a{ background:linear-gradient(90deg,var(--green-500),var(--green-600)); }
  .seg-b{ background:linear-gradient(90deg,var(--gold),var(--gold-deep)); }
  .partners{ display:grid; grid-template-columns:1fr 1fr; gap:11px; margin-top:14px; }
  .pcard{ border:1px solid var(--line-2); border-radius:15px; padding:13px; text-align:center; }
  .pcard .pav{ width:42px; height:42px; border-radius:50%; display:grid; place-items:center; color:#fff; font-weight:700; font-size:13px; margin:0 auto 9px; }
  .pcard .pn{ font-weight:700; font-size:13.5px; }
  .pcard .pr{ font-size:11px; color:var(--muted-s); margin-top:2px; }
  .pcard .pamt{ font-weight:700; font-size:18px; margin-top:9px; }
  .pcard .pamt .cur{ font-size:10.5px; color:var(--muted-s); font-weight:600; }
  .pcard .pct{ font-size:11px; color:var(--muted-s); margin-top:3px; }
  .capital{ background:linear-gradient(160deg,#fffaf0,#fdf2db); border:1px solid #ecd9ad; border-radius:18px; padding:15px; margin-top:13px; }
  .capital .ctop{ display:flex; align-items:center; gap:10px; }
  .capital .ci{ width:34px; height:34px; border-radius:10px; background:#f3e2b6; display:grid; place-items:center; color:var(--gold-deep); }
  .capital .ct{ font-weight:700; font-size:14px; color:#7a5712; }
  .capital .cnote{ font-size:11px; color:#9a7a2c; margin-top:1px; }
  .capital .cbig{ margin-top:12px; font-size:28px; font-weight:700; color:var(--gold-deep); }
  .capital .cbig .cur{ font-size:13px; color:#a07f33; font-weight:600; }
  .capital .crow{ display:flex; gap:10px; margin-top:12px; }
  .capital .crow .cc{ flex:1; background:rgba(255,255,255,.6); border:1px solid #efe0bd; border-radius:12px; padding:10px; }
  .capital .cc .k{ font-size:10.5px; color:#9a7a2c; }
  .capital .cc .v{ font-size:15px; font-weight:700; color:#7a5712; margin-top:4px; }
  .capital .cc .v .cur{ font-size:10px; font-weight:600; }
  .lossnote{ display:flex; gap:9px; background:#f3efe6; border:1px solid var(--line-2); border-radius:13px; padding:11px 13px; margin-top:13px; font-size:11.5px; color:#5d6b62; line-height:1.6; }
  .lossnote svg{ width:16px; height:16px; color:var(--green-500); flex:0 0 auto; margin-top:1px; }
  .mini-due{ display:flex; align-items:center; justify-content:space-between; background:var(--card); border:1px solid var(--line-2); border-radius:13px; padding:12px 14px; margin-top:13px; cursor:pointer; }
  .mini-due .k{ font-size:12px; color:var(--muted-s); font-weight:600; }
  .mini-due .v{ font-size:16px; font-weight:700; }
  .mini-due .v .cur{ font-size:10.5px; color:var(--muted-s); font-weight:600; }
  .lock{ display:flex; align-items:center; justify-content:space-between; background:var(--gold-soft); border:1px solid #ecd6a6; border-radius:14px; padding:12px 15px; margin-top:13px; }
  .lock .lt{ font-size:12px; color:#8a6512; font-weight:600; }
  .lock .lv{ font-size:13px; font-weight:700; color:#6f5210; margin-top:2px; }
  .btn-sm{ background:var(--gold-deep); color:#fff; border:none; font-family:inherit; font-weight:700; font-size:12px; padding:9px 13px; border-radius:11px; cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
  .btn-sm svg{ width:14px; height:14px; }

  /* stock */
  .stocksum{ background:linear-gradient(160deg,#fffaf0,#fdf2db); border:1px solid #ecd9ad; border-radius:18px; padding:16px; }
  .stocksum .k{ font-size:12px; color:#9a7a2c; font-weight:600; }
  .stocksum .v{ font-size:30px; font-weight:700; color:var(--gold-deep); margin-top:5px; }
  .stocksum .v .cur{ font-size:13px; color:#a07f33; font-weight:600; }
  .stocksum .sub{ font-size:11.5px; color:#9a7a2c; margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; }
  .stocksum .sub b{ background:rgba(255,255,255,.6); border:1px solid #efe0bd; padding:3px 9px; border-radius:999px; font-weight:700; }
  .addbtn{ width:100%; margin-top:12px; border:1.5px dashed #cdbd92; background:#fffdf7; color:var(--gold-deep); font-family:inherit; font-weight:700; font-size:13.5px; padding:13px; border-radius:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; }
  .addbtn svg{ width:17px; height:17px; }
  .stocknote{ font-size:11px; color:var(--muted-s); text-align:center; margin:11px 4px 4px; line-height:1.6; }
  .stock-item{ background:var(--card); border:1px solid var(--line-2); border-radius:16px; padding:13px 14px; margin-top:11px; }
  .stock-item .sh{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .stock-item .sl{ display:flex; align-items:center; gap:10px; }
  .stock-item .emo{ width:36px; height:36px; border-radius:10px; background:var(--green-100); display:grid; place-items:center; font-size:18px; }
  .stock-item .snm{ font-weight:700; font-size:13.5px; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
  .ubadge{ font-size:9.5px; font-weight:700; padding:2px 7px; border-radius:999px; background:#eef0e8; color:#5d6b62; }
  .ubadge.w{ background:#f3e9d4; color:var(--gold-deep); }
  .lowchip{ font-size:9.5px; font-weight:700; color:var(--amber); background:var(--amber-bg); padding:2px 7px; border-radius:999px; }
  .stock-item .sprice{ font-size:12.5px; font-weight:700; color:var(--gold-deep); white-space:nowrap; }
  .stock-item .sprice .u{ font-size:10px; color:var(--muted-s); font-weight:600; }
  .sgrid{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-top:12px; }
  .sgrid .sc{ background:#faf7f0; border:1px solid var(--line); border-radius:10px; padding:8px 6px; text-align:center; }
  .sgrid .sc .k{ font-size:9.5px; color:var(--muted-s); }
  .sgrid .sc .v{ font-size:13px; font-weight:700; margin-top:3px; }
  .sgrid .sc .v .u{ font-size:9px; color:var(--muted-s); font-weight:600; }
  .sgrid .sc.val .v{ color:var(--green-600); }

  /* sell */
  .sale-top{ background:var(--card); border:1px solid var(--line-2); border-radius:18px; padding:16px; text-align:center; }
  .sale-top .k{ font-size:12.5px; color:var(--muted-s); font-weight:600; }
  .sale-top .v{ font-size:34px; font-weight:700; margin-top:6px; color:var(--green-700); }
  .sale-top .v .cur{ font-size:14px; color:var(--muted-s); font-weight:600; }
  .sale-top .cnt{ font-size:11.5px; color:var(--muted-s); margin-top:5px; }
  .toggle{ display:flex; gap:8px; background:var(--green-100); padding:5px; border-radius:13px; margin-top:8px; }
  .toggle button{ flex:1; font-family:inherit; font-weight:600; font-size:12px; border:none; background:transparent; padding:9px; border-radius:9px; cursor:pointer; color:var(--green-700); display:flex; align-items:center; justify-content:center; gap:6px; }
  .toggle button.sel{ background:#fff; box-shadow:0 4px 10px -6px rgba(0,0,0,.2); }
  .toggle .d{ width:9px; height:9px; border-radius:50%; }
  .toglbl{ font-size:11px; color:var(--muted-s); font-weight:600; text-align:right; margin:11px 2px 5px; }
  .custfield{ display:none; align-items:center; justify-content:space-between; background:#fff; border:1px dashed #d9b974; border-radius:12px; padding:11px 13px; margin-top:8px; }
  .custfield.on{ display:flex; }
  .custfield .cl{ font-size:12.5px; color:#8a6512; font-weight:600; }
  .custfield .cv{ font-size:12.5px; color:var(--muted-s); }
  .grid-lbl{ font-size:12px; font-weight:600; color:var(--muted-s); margin:14px 2px 10px; display:flex; align-items:center; gap:7px; }
  .pgrid{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:9px; }
  .prod{ background:var(--card); border:1px solid var(--line-2); border-radius:14px; padding:11px 8px; text-align:center; cursor:pointer; transition:transform .12s,border-color .12s,box-shadow .12s; position:relative; }
  .prod:active{ transform:scale(.95); }
  .prod.hit{ border-color:var(--green-500); box-shadow:0 0 0 2px rgba(47,143,107,.18); }
  .prod .emo{ font-size:21px; }
  .prod .pnm{ font-size:11px; font-weight:600; margin-top:6px; line-height:1.25; height:28px; display:flex; align-items:center; justify-content:center; }
  .prod .ppr{ font-size:11.5px; font-weight:700; color:var(--gold-deep); margin-top:3px; }
  .prod .ppr .u{ font-size:9px; color:var(--muted-s); font-weight:600; }
  .prod .wtag{ position:absolute; top:7px; left:7px; font-size:8.5px; font-weight:700; color:var(--gold-deep); background:var(--gold-soft); padding:1px 6px; border-radius:999px; }
  .confirm{ position:absolute; left:16px; right:16px; bottom:84px; }
  .confirm button{ width:100%; border:none; font-family:inherit; font-weight:700; font-size:15px; color:#fff; padding:15px; border-radius:15px; cursor:pointer; background:linear-gradient(180deg,var(--green-600),var(--green-700)); box-shadow:0 14px 26px -12px rgba(16,43,34,.6); display:flex; align-items:center; justify-content:center; gap:9px; }
  .confirm button:disabled{ opacity:.45; }
  .confirm button svg{ width:18px; height:18px; }

  /* debts */
  .seg-ctrl{ display:flex; gap:8px; background:var(--green-100); padding:5px; border-radius:13px; }
  .seg-btn{ flex:1; font-family:inherit; font-weight:600; font-size:12px; border:none; background:transparent; padding:9px; border-radius:9px; cursor:pointer; color:var(--green-700); }
  .seg-btn.on{ background:#fff; box-shadow:0 4px 10px -6px rgba(0,0,0,.2); }
  .segview{ display:none; } .segview.on{ display:block; }
  .sum-card{ border-radius:16px; padding:15px; margin-top:13px; }
  .sum-cust{ background:linear-gradient(155deg,#23624f,#102b22); color:#fff; }
  .sum-supp{ background:linear-gradient(155deg,#8a5e16,#5e3f0e); color:#fff; }
  .sum-card .k{ font-size:12px; opacity:.85; }
  .sum-card .v{ font-size:30px; font-weight:700; margin-top:6px; }
  .sum-card .v .cur{ font-size:13px; opacity:.8; font-weight:600; }
  .sum-card .note{ font-size:11px; opacity:.82; margin-top:9px; line-height:1.55; }
  .debt{ background:var(--card); border:1px solid var(--line-2); padding:12px 14px; display:flex; align-items:center; justify-content:space-between; transition:.35s; }
  .debt:first-child{ border-radius:14px 14px 0 0; } .debt:last-child{ border-radius:0 0 14px 14px; } .debt + .debt{ border-top:none; }
  .debt.gone{ opacity:0; transform:translateX(-20px); }
  .debt .dl{ display:flex; align-items:center; gap:11px; }
  .debt .dic{ width:34px; height:34px; border-radius:50%; background:var(--green-100); display:grid; place-items:center; color:var(--green-600); }
  .debt .dn{ font-weight:600; font-size:13.5px; }
  .debt .dm{ font-size:11px; color:var(--muted-s); margin-top:2px; }
  .debt .ovr{ color:var(--amber); font-weight:700; }
  .debt .dr{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
  .debt .da{ font-weight:700; font-size:15px; } .debt .da .cur{ font-size:10px; color:var(--muted-s); font-weight:600; }
  .collect{ font-family:inherit; font-size:11px; font-weight:700; color:#fff; background:var(--green-600); border:none; border-radius:9px; padding:6px 11px; cursor:pointer; }
  .listhead{ font-size:12px; font-weight:600; color:var(--muted-s); margin:15px 2px 9px; }

  /* more */
  .mlist{ background:var(--card); border:1px solid var(--line-2); border-radius:16px; overflow:hidden; }
  .mrow{ display:flex; align-items:center; gap:12px; padding:14px 15px; cursor:pointer; }
  .mrow + .mrow{ border-top:1px solid var(--line); }
  .mrow .mi{ width:34px; height:34px; border-radius:10px; background:var(--green-100); display:grid; place-items:center; }
  .mrow .mi svg{ width:17px; height:17px; color:var(--green-600); }
  .mrow .mt{ font-weight:600; font-size:13.5px; flex:1; }
  .mrow .ms{ font-size:11.5px; color:var(--muted-s); font-weight:400; }
  .mrow .chev{ color:#c3b89f; }
  .mrow.danger .mi{ background:#f7e2dc; } .mrow.danger .mi svg{ color:#b3502e; } .mrow.danger .mt{ color:#b3502e; }

  .nav{ position:absolute; bottom:0; left:0; right:0; height:calc(74px + env(safe-area-inset-bottom, 0px)); background:rgba(255,255,255,.94); backdrop-filter:blur(12px); border-top:1px solid var(--line-2); display:flex; align-items:center; justify-content:space-around; padding:0 8px calc(8px + env(safe-area-inset-bottom, 0px)); z-index:5; }
  .nav-item{ flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; cursor:pointer; color:#9aa89f; font-size:10.5px; font-weight:600; background:none; border:none; font-family:inherit; padding-top:10px; }
  .nav-item svg{ width:22px; height:22px; }
  .nav-item.active{ color:var(--green-700); }
  .nav-sell{ flex:0 0 auto; transform:translateY(-16px); }
  .nav-sell .fab{ width:54px; height:54px; border-radius:18px; background:linear-gradient(160deg,var(--gold),var(--gold-deep)); display:grid; place-items:center; box-shadow:0 12px 22px -8px rgba(184,125,26,.65); }
  .nav-sell .fab svg{ width:25px; height:25px; color:#fff; }
  .nav-sell span{ color:var(--gold-deep); margin-top:5px; }

  /* sheets */
  .sheet-backdrop{ position:absolute; inset:0; background:rgba(8,16,12,.45); opacity:0; pointer-events:none; transition:.25s; z-index:8; border-radius:35px; }
  .sheet-backdrop.on{ opacity:1; pointer-events:auto; }
  .sheet{ position:absolute; left:0; right:0; bottom:0; background:#fff; border-radius:24px 24px 35px 35px; padding:16px 18px calc(22px + env(safe-area-inset-bottom, 0px)); transform:translateY(115%); transition:transform .3s cubic-bezier(.2,.7,.2,1); z-index:9; box-shadow:0 -12px 32px -10px rgba(0,0,0,.3); max-height:88%; overflow-y:auto; }
  .sheet.on{ transform:translateY(0); }
  .tray{ position:absolute; top:0; left:0; right:0; background:#fff; border-radius:0 0 26px 26px; padding:calc(14px + env(safe-area-inset-top, 0px)) 16px 18px; transform:translateY(-120%); transition:transform .32s cubic-bezier(.2,.7,.2,1); z-index:10; box-shadow:0 14px 34px -10px rgba(0,0,0,.35); max-height:82%; overflow-y:auto; }
  .tray.on{ transform:translateY(0); }
  .tray .th{ display:flex; align-items:center; justify-content:space-between; margin:4px 0 2px; }
  .tray .th .tt{ font-weight:700; font-size:16px; display:flex; align-items:center; gap:8px; }
  .tray .th .clear{ font-size:11.5px; color:var(--green-600); font-weight:600; cursor:pointer; }
  .ngroup{ font-size:11.5px; font-weight:700; color:var(--muted-s); margin:14px 2px 4px; }
  .notif{ display:flex; align-items:center; gap:11px; padding:11px 12px; border-radius:13px; border:1px solid var(--line-2); margin-top:8px; cursor:pointer; }
  .notif.warn{ background:var(--amber-bg); border-color:#ecd0a6; }
  .notif .ni{ width:34px; height:34px; border-radius:10px; display:grid; place-items:center; flex:0 0 auto; }
  .notif.warn .ni{ background:#f0d6a6; color:var(--amber); }
  .notif.debt .ni{ background:#f3e2b6; color:var(--gold-deep); }
  .notif .ntx{ font-size:12.5px; font-weight:700; }
  .notif .nsub{ font-size:11px; color:var(--muted-s); margin-top:2px; }
  .notif .nsub .ovr{ color:var(--amber); font-weight:700; }
  .grab{ width:40px; height:4px; border-radius:9px; background:#e0d8c7; margin:0 auto 14px; }
  .ws-title{ font-weight:700; font-size:15px; display:flex; align-items:center; gap:8px; }
  .ws-sub{ font-size:12px; color:var(--muted-s); margin-top:3px; }
  .ws-disp{ display:flex; align-items:center; justify-content:space-between; background:#faf7f0; border:1px solid var(--line-2); border-radius:14px; padding:14px; margin-top:14px; }
  .ws-disp .wcol{ text-align:center; flex:1; }
  .ws-disp .wcol .k{ font-size:11px; color:var(--muted-s); }
  .ws-disp .wcol .v{ font-size:23px; font-weight:700; margin-top:4px; }
  .ws-disp .wcol .v .u{ font-size:12px; color:var(--muted-s); font-weight:600; }
  .ws-disp .arrow{ color:#c3b89f; font-size:20px; }
  .ws-disp .price .v{ color:var(--gold-deep); }
  .chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
  .chip{ flex:1; min-width:58px; font-family:inherit; font-weight:700; font-size:13px; border:1px solid var(--line-2); background:#fff; color:var(--ink); border-radius:11px; padding:11px 6px; cursor:pointer; }
  .chip:active{ background:var(--green-100); }
  .chip.reset{ color:var(--amber); border-color:#ecd0a6; background:var(--amber-bg); flex:0 0 auto; }
  .ws-actions{ display:flex; gap:10px; margin-top:16px; }
  .ws-actions .primary{ flex:2; border:none; font-family:inherit; font-weight:700; font-size:14px; color:#fff; background:linear-gradient(180deg,var(--green-600),var(--green-700)); border-radius:13px; padding:14px; cursor:pointer; }
  .ws-actions .ghost{ flex:1; border:1px solid var(--line-2); background:#fff; font-family:inherit; font-weight:600; font-size:14px; color:var(--muted-s); border-radius:13px; padding:14px; cursor:pointer; }
  .fld{ margin-top:13px; }
  .fld > .lab{ font-size:12px; color:var(--muted-s); font-weight:600; margin-bottom:6px; display:block; }
  .inp{ background:#faf7f0; border:1px solid var(--line-2); border-radius:12px; padding:12px 13px; font-size:13.5px; }
  .inp.ph{ color:#b3aa97; }
  .row2{ display:flex; gap:10px; } .row2 .fld{ flex:1; margin-top:13px; }
  .hide{ display:none; }

  .toast{ position:absolute; left:50%; transform:translateX(-50%) translateY(14px); bottom:150px; background:var(--green-900); color:#fff; padding:11px 18px; border-radius:13px; font-size:12.5px; font-weight:600; display:flex; align-items:center; gap:9px; opacity:0; pointer-events:none; transition:.3s; z-index:11; box-shadow:0 14px 26px -10px rgba(0,0,0,.4); max-width:80%; text-align:center; }
  .toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
  .toast svg{ width:17px; height:17px; color:#7be0b3; flex:0 0 auto; }

  .footnote{ text-align:center; color:#9c917f; font-size:12.5px; margin-top:42px; line-height:1.8; }
  @media (max-width:520px){ .brand h1{ font-size:33px; } .phone{ transform:scale(.96); } }
  @media (prefers-reduced-motion: reduce){ *{ animation:none !important; transition:none !important; } }

  /* --- interactive additions (v5) --- */
  input.inp{ width:100%; font-family:inherit; color:var(--ink); }
  input.inp::placeholder{ color:#b9b09c; }
  input.inp:focus, select.inp:focus{ border-color:var(--green-500); background:#fff; outline:none; }
  select.inp{ width:100%; font-family:inherit; color:var(--ink); }
  .cart{ margin-top:12px; border-top:1px dashed var(--line-2); padding-top:8px; text-align:right; }
  .cartline{ display:flex; justify-content:space-between; align-items:center; font-size:12.5px; padding:5px 2px; }
  .cartline + .cartline{ border-top:1px dashed #efe7d6; }
  .cartline .num{ font-weight:700; color:var(--green-700); }
  .tag-wd{ color:#c0492a; background:#f7ddd2; } .tag-col{ color:var(--green-600); background:var(--green-100); }
  .amt2.neg{ color:#c0492a; } .amt2.pos{ color:var(--green-600); }
  .wd-card{ background:var(--card); border:1px solid var(--line-2); border-radius:18px; padding:15px; margin-top:13px; }
  .wd-list{ margin-top:11px; }
  .wd-row{ display:flex; align-items:center; justify-content:space-between; font-size:12.5px; padding:8px 0; }
  .wd-row + .wd-row{ border-top:1px dashed #efe7d6; }
  .wd-row .by{ display:inline-flex; align-items:center; gap:6px; } .wd-row .by .d{ width:8px; height:8px; border-radius:50%; }
  .psub{ font-size:10.5px; color:var(--muted-s); margin-top:7px; line-height:1.7; border-top:1px dashed #efe7d6; padding-top:7px; }
  .psub .neg{ color:#c0492a; font-weight:700; } .psub .pos{ color:var(--green-600); font-weight:700; }
  .lognote{ font-size:11px; color:var(--muted-s); text-align:center; margin:11px 4px; line-height:1.6; }


  /* --- v6 additions: edit/restock + weight modes --- */
  .costline{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:9px; padding-top:9px; border-top:1px dashed #efe7d6; font-size:11px; color:var(--muted-s); }
  .costline b{ color:var(--ink); font-weight:700; }
  .editbtn{ flex:none; border:1px solid var(--line-2); background:#fff; color:var(--green-700); font-family:inherit; font-size:11px; font-weight:700; padding:5px 11px; border-radius:9px; cursor:pointer; }
  .editbtn:active{ transform:scale(.97); }
  .ed-sep{ height:1px; background:var(--line-2); margin:14px 0; }
  .ed-h{ font-size:12.5px; font-weight:700; color:var(--ink); margin-bottom:9px; }
  .ed-del{ width:100%; margin-top:10px; border:1px solid #e6b3a3; background:#fff0eb; color:#c0492a; border-radius:12px; padding:12px; font-family:inherit; font-weight:700; font-size:14px; cursor:pointer; }
  .ed-del:active{ transform:scale(.98); }
  .tag-rs{ color:#5a513f; background:#ece3cf; }

  /* ===== تحسينات: وضع ليلي + هياكل تحميل + حالات فارغة + سرعة بيع ===== */
  :root{ --accent:#1b4d3e; --accent-2:#23624f; --accent-soft:#e4efe9; }
  [data-theme="dark"]{
    --sand:#15130e; --card:#201b14; --ink:#efe9dc; --muted-s:#a89e8b;
    --line-2:#332c20; --line:#2a241b; --green-100:#123329; --gold-soft:#3a3016;
    --amber-bg:#3a2c18; --accent-soft:#123329;
  }
  [data-theme="dark"] body{ background:linear-gradient(170deg,#12100b,#0c0a07); }
  [data-theme="dark"] .hero{ background:linear-gradient(160deg,#241f17,#201b14); }
  [data-theme="dark"] input.inp,[data-theme="dark"] select.inp,
  [data-theme="dark"] .login-card input,[data-theme="dark"] .login-card select{ background:#181510; color:var(--ink); border-color:var(--line-2); }
  [data-theme="dark"] input.inp:focus,[data-theme="dark"] select.inp:focus{ background:#211c15; }
  [data-theme="dark"] input.inp::placeholder{ color:#7c7361; }
  [data-theme="dark"] .editbtn,[data-theme="dark"] .prod,[data-theme="dark"] .chip{ background:#201b14; }
  [data-theme="dark"] .net,[data-theme="dark"] .sale-top,[data-theme="dark"] .capital,
  [data-theme="dark"] .stocksum,[data-theme="dark"] .sum-card,[data-theme="dark"] .mini-due,[data-theme="dark"] .lock{ background:var(--card); }
  [data-theme="dark"] .toggle,[data-theme="dark"] .seg-ctrl{ background:#181510; }

  .sk{ border-radius:12px; background:linear-gradient(90deg,rgba(140,130,110,.12) 25%,rgba(140,130,110,.22) 37%,rgba(140,130,110,.12) 63%); background-size:400% 100%; animation:shimmer 1.3s ease infinite; }
  @keyframes shimmer{ 0%{background-position:100% 0} 100%{background-position:-100% 0} }
  .sk-card{ height:78px; margin-bottom:11px; } .sk-row{ height:20px; margin:9px 0; } .sk-hero{ height:120px; margin-bottom:13px; }

  .empty{ text-align:center; padding:34px 18px; color:var(--muted-s); }
  .empty .ei{ width:62px; height:62px; border-radius:20px; background:var(--accent-soft); display:grid; place-items:center; margin:0 auto 12px; color:var(--accent); }
  .empty .ei svg{ width:30px; height:30px; }
  .empty .et{ font-weight:700; font-size:15px; color:var(--ink); }
  .empty .es{ font-size:12.5px; margin-top:5px; line-height:1.6; }
  .empty .eb{ margin-top:14px; border:none; border-radius:12px; padding:11px 18px; font-family:inherit; font-weight:700; font-size:13px; color:#fff; background:var(--accent); cursor:pointer; }

  .pgrid .prod{ min-height:96px; padding:12px 8px; }
  .pgrid .prod .pnm{ font-size:13px; } .pgrid .prod .emo{ font-size:30px; }
  .qstep{ display:inline-flex; align-items:center; border:1px solid var(--line-2); border-radius:10px; overflow:hidden; background:var(--card); }
  .qstep button{ width:30px; height:30px; border:none; background:transparent; color:var(--accent); font-size:19px; font-weight:800; cursor:pointer; display:grid; place-items:center; }
  .qstep button:active{ background:var(--accent-soft); }
  .qstep .qv{ min-width:30px; text-align:center; font-weight:800; font-size:14px; }
  .cartline .clbl{ flex:1; } .cartline .crm{ border:none; background:transparent; color:#c0492a; font-size:16px; cursor:pointer; padding:0 4px; }