:root{
  --espresso:#2b1b14; --espresso-deep:#1f140e; --espresso-soft:#3e2a1f;
  --cream:#f6efe6; --cream-soft:#fbf7f0; --paper:#fffdf8;
  --taupe:#8b7762; --taupe-deep:#5c4c3c; --line:#2b1b141f; --line-strong:#2b1b1438;
  --saffron:#e8a33d; --saffron-soft:#e8a33d29;
  --cta:#f26b0f; --cta-deep:#c4590c; --cta-ink:#fff6ee;
  --ok:#3e7a5a; --ok-soft:#3e7a5a1f; --danger:#b23a2e; --danger-soft:#b23a2e1a;
  --font-head:"Readex Pro","Cairo",system-ui,sans-serif;
  --font-body:"Cairo",system-ui,sans-serif;
  --r-sm:10px; --r-md:16px; --r-lg:22px; --r-xl:28px; --pill:999px;
  --sh-sm:0 1px 2px #2b1b1412, 0 2px 8px #2b1b140f;
  --sh-md:0 2px 6px #2b1b141a, 0 12px 30px #2b1b141a;
  --sh-lg:0 8px 20px #2b1b1424, 0 30px 60px #2b1b1424;
  --pad:16px; --maxw:1080px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:var(--font-body); background:var(--cream); color:var(--espresso);
  -webkit-font-smoothing:antialiased; font-size:15px; line-height:1.6; padding-bottom:env(safe-area-inset-bottom)}
h1,h2,h3,h4{font-family:var(--font-head); margin:0; line-height:1.3; letter-spacing:-.2px}
a{color:inherit; text-decoration:none}
button{font-family:inherit; cursor:pointer}
input,select,textarea{font-family:inherit; font-size:15px}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 18px}
.hide{display:none !important}
.muted{color:var(--taupe)}
.small{font-size:13px}
.tiny{font-size:11.5px}
.center{text-align:center}
.row{display:flex; align-items:center; gap:10px}
.between{justify-content:space-between}
.grow{flex:1}
.stack{display:flex; flex-direction:column; gap:12px}
.stack-6{gap:6px}
.grid{display:grid; gap:12px}
.g2{grid-template-columns:repeat(2,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
@media(max-width:720px){ .g3,.g4{grid-template-columns:repeat(2,1fr)} }

.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; border:0;
  background:var(--cta); color:var(--cta-ink); font-weight:700; font-size:15px;
  padding:13px 20px; border-radius:var(--pill); box-shadow:0 6px 16px #f26b0f38;
  transition:transform .15s ease, box-shadow .2s ease, background .2s}
.btn:active{transform:translateY(1px) scale(.995)}
.btn.ghost{background:transparent; color:var(--espresso); box-shadow:none; border:1.5px solid var(--line-strong)}
.btn.dark{background:var(--espresso); color:var(--cream); box-shadow:0 6px 16px #2b1b1430}
.btn.soft{background:#fff; color:var(--espresso); box-shadow:var(--sh-sm); border:1px solid var(--line)}
.btn.sm{padding:9px 14px; font-size:13.5px}
.btn.xs{padding:6px 11px; font-size:12px; border-radius:10px}
.btn.block{width:100%}
.btn[disabled]{opacity:.55; pointer-events:none}
.link{color:var(--cta-deep); font-weight:700}

.card{background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); padding:18px; box-shadow:var(--sh-sm)}
.card.flat{box-shadow:none}
.card.dark{background:var(--espresso); color:var(--cream); border-color:#00000000}
.card-title{font-family:var(--font-head); font-weight:700; font-size:16px; display:flex; align-items:center; gap:8px}
.chip{display:inline-flex; align-items:center; gap:6px; padding:5px 11px; border-radius:var(--pill);
  background:var(--saffron-soft); color:#8a5a10; font-size:12px; font-weight:700}
.chip.ok{background:var(--ok-soft); color:var(--ok)}
.chip.bad{background:var(--danger-soft); color:var(--danger)}
.chip.grey{background:#2b1b1410; color:var(--taupe-deep)}

.field{display:flex; flex-direction:column; gap:6px}
.field label{font-size:13px; font-weight:700; color:var(--taupe-deep)}
.input{width:100%; padding:12px 14px; border-radius:var(--r-sm); border:1.5px solid var(--line-strong);
  background:#fff; color:var(--espresso); outline:none; transition:border .15s, box-shadow .15s}
.input:focus{border-color:var(--cta); box-shadow:0 0 0 4px #f26b0f1f}
.seg{display:inline-flex; background:#2b1b140d; border-radius:var(--pill); padding:4px; gap:2px}
.seg button{border:0; background:transparent; padding:8px 14px; border-radius:var(--pill); font-weight:700; font-size:13px; color:var(--taupe-deep)}
.seg button.on{background:#fff; color:var(--espresso); box-shadow:var(--sh-sm)}

.landing{background:var(--espresso); color:var(--cream); min-height:100vh; overflow-x:hidden; position:relative}
.landing .glow{position:absolute; top:0; left:-10%; right:-10%; height:70vh;
  background:radial-gradient(60% 60% at 50% 20%, #f26b0f2e 0%, #e8a33d14 40%, transparent 70%); pointer-events:none}
.nav{display:flex; align-items:center; justify-content:space-between; padding:18px 0; position:relative; z-index:2}
.brand{display:flex; align-items:center; gap:10px; font-family:var(--font-head); font-weight:800; font-size:20px; letter-spacing:-.4px}
.brand .mark{width:38px; height:38px; border-radius:12px; display:grid; place-items:center;
  background:linear-gradient(140deg,var(--cta),#e8a33d); color:#2b1b14; font-weight:900; font-family:var(--font-head); font-size:17px;
  box-shadow:0 6px 18px #f26b0f45}
.hero{position:relative; z-index:2; padding:26px 0 10px}
.hero h1{font-size:clamp(30px,6.6vw,52px); font-weight:800; letter-spacing:-1.2px; margin:14px 0 12px}
.hero h1 em{font-style:normal; color:var(--saffron)}
.hero p.lead{font-size:clamp(15px,2.4vw,18px); color:#e7d9c9; max-width:620px; line-height:1.75; margin:0}
.hero-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:22px}
.hero-actions .btn.ghost{color:var(--cream); border-color:#f6efe63d}
.mock{margin:34px 0 10px; border-radius:26px; background:linear-gradient(160deg,#3a261b,#241610);
  border:1px solid #ffffff14; padding:14px; box-shadow:var(--sh-lg)}
.mock .bar{display:flex; gap:6px; padding:2px 4px 12px}
.mock .bar i{width:9px; height:9px; border-radius:50%; background:#ffffff2b; display:block}
.mock .screen{background:var(--cream); border-radius:18px; padding:14px; color:var(--espresso)}
.mk-kpis{display:grid; grid-template-columns:repeat(3,1fr); gap:8px}
.mk-kpi{background:#fff; border-radius:14px; padding:10px; border:1px solid var(--line)}
.mk-kpi b{display:block; font-family:var(--font-head); font-size:17px; letter-spacing:-.5px; direction:ltr; text-align:right}
.mk-kpi span{font-size:10.5px; color:var(--taupe)}
.mk-bars{display:flex; align-items:flex-end; gap:5px; height:74px; margin-top:12px}
.mk-bars i{flex:1; background:linear-gradient(180deg,var(--cta),#f26b0f55); border-radius:5px 5px 3px 3px; display:block}
.features{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:40px 0 10px}
@media(max-width:860px){.features{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.features{grid-template-columns:1fr}}
.feat{background:#ffffff0a; border:1px solid #ffffff14; border-radius:var(--r-lg); padding:18px}
.feat h3{font-size:16px; margin-bottom:6px}
.feat p{margin:0; font-size:13.5px; color:#d8c8b8; line-height:1.7}
.feat .ico{width:40px; height:40px; border-radius:12px; background:#f26b0f24; color:var(--saffron); display:grid; place-items:center; margin-bottom:12px}
.section{padding:34px 0}
.sec-title{font-size:clamp(22px,4vw,30px); font-weight:800; letter-spacing:-.8px; margin-bottom:8px}
.steps{display:grid; grid-template-columns:repeat(4,1fr); gap:12px}
@media(max-width:820px){.steps{grid-template-columns:1fr 1fr}}
.step{background:#ffffff08; border:1px solid #ffffff12; border-radius:var(--r-md); padding:16px}
.step b{font-family:var(--font-head); color:var(--saffron); font-size:13px; letter-spacing:1px}
.step h4{font-size:15px; margin:6px 0 4px}
.step p{margin:0; font-size:13px; color:#cdbdad}
.footer{border-top:1px solid #ffffff14; padding:22px 0 34px; color:#b9a898; font-size:13px; display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap}

.shell{min-height:100vh; background:var(--cream); display:flex; flex-direction:column}
.topbar{position:sticky; top:0; z-index:20; background:#f6efe6f2; backdrop-filter:blur(14px); border-bottom:1px solid var(--line)}
.topbar .in{max-width:var(--maxw); margin:0 auto; padding:10px 18px; display:flex; align-items:center; gap:12px}
.topbar .brand{font-size:17px}
.topbar .brand .mark{width:32px;height:32px;border-radius:10px;font-size:15px}
.tabs{display:flex; gap:4px; overflow-x:auto; padding:0 12px 8px; max-width:var(--maxw); margin:0 auto; scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{border:0; background:transparent; padding:9px 14px; border-radius:var(--pill); font-weight:700; font-size:13.5px; color:var(--taupe-deep); white-space:nowrap; display:flex; align-items:center; gap:7px}
.tab.on{background:var(--espresso); color:var(--cream)}
.page{flex:1; max-width:var(--maxw); width:100%; margin:0 auto; padding:18px 18px 90px}
.bottomnav{position:fixed; bottom:0; left:0; right:0; z-index:30; background:#fffdf8f5; backdrop-filter:blur(12px); border-top:1px solid var(--line);
  display:none; padding:6px 6px calc(6px + env(safe-area-inset-bottom))}
.bottomnav a{flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:10.5px; font-weight:700; color:var(--taupe); padding:6px 2px; border-radius:12px}
.bottomnav a.on{color:var(--cta-deep); background:#f26b0f14}
@media(max-width:820px){.bottomnav{display:flex} .tabs{display:none}}

.kpi{background:var(--paper); border:1px solid var(--line); border-radius:var(--r-md); padding:14px; box-shadow:var(--sh-sm)}
.kpi .lbl{font-size:12px; color:var(--taupe); font-weight:700; display:flex; align-items:center; gap:6px}
.kpi .val{font-family:var(--font-head); font-size:clamp(20px,4.4vw,26px); font-weight:800; letter-spacing:-.8px; margin-top:4px; direction:ltr; text-align:right}
.kpi .sub{font-size:11.5px; color:var(--taupe)}
.kpi.hero-kpi{background:linear-gradient(150deg,#332116,#241610); color:var(--cream); border-color:#00000000}
.kpi.hero-kpi .lbl{color:#d9c7b6}
.kpi.hero-kpi .val{color:var(--saffron)}

.chart{display:flex; align-items:flex-end; gap:4px; height:130px; padding-top:8px}
.chart .col{flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:4px; min-width:0}
.chart .bar{width:100%; background:linear-gradient(180deg,var(--cta),#f26b0f4d); border-radius:6px 6px 2px 2px; min-height:3px; transition:height .4s ease}
.chart .col.zero .bar{background:#2b1b1412}
.chart .lb{font-size:9.5px; color:var(--taupe)}

.list{display:flex; flex-direction:column}
.li{display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--line)}
.li:last-child{border-bottom:0}
.avatar{width:38px; height:38px; border-radius:12px; background:var(--saffron-soft); color:#8a5a10; display:grid; place-items:center; font-weight:800; font-family:var(--font-head); flex:0 0 auto}
.avatar.dark{background:var(--espresso); color:var(--saffron)}
.li .main{flex:1; min-width:0}
.li .main b{font-size:14px; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.li .main span{font-size:12px; color:var(--taupe)}
.li .end{text-align:left; flex:0 0 auto}

.tbl{width:100%; border-collapse:collapse; font-size:13.5px}
.tbl th{text-align:right; font-size:11.5px; color:var(--taupe); font-weight:700; padding:8px 6px; border-bottom:1px solid var(--line)}
.tbl td{padding:10px 6px; border-bottom:1px solid var(--line)}
.tbl tr:last-child td{border-bottom:0}

.sheet-bg{position:fixed; top:0; left:0; right:0; bottom:0; background:#2b1b1466; z-index:60; display:flex; align-items:flex-end; justify-content:center}
@media(min-width:700px){.sheet-bg{align-items:center}}
.sheet{background:var(--paper); width:100%; max-width:520px; border-radius:24px 24px 0 0; padding:20px; max-height:88vh; overflow:auto; box-shadow:var(--sh-lg)}
@media(min-width:700px){.sheet{border-radius:24px}}
.sheet h3{font-size:18px; margin-bottom:4px}
.sheet .x{width:34px;height:34px;border-radius:50%;border:0;background:#2b1b140f;color:var(--taupe-deep);font-size:16px}
.toast{position:fixed; bottom:22px; left:50%; transform:translate(-50%,20px); background:var(--espresso); color:var(--cream);
  padding:11px 18px; border-radius:var(--pill); font-size:13.5px; font-weight:700; opacity:0; pointer-events:none; transition:all .25s; z-index:90; box-shadow:var(--sh-md); max-width:90vw; text-align:center}
.toast.on{opacity:1; transform:translate(-50%,0)}

.menu-head{background:var(--espresso); color:var(--cream); padding:22px 0 26px; border-radius:0 0 26px 26px}
.menu-head .logo{width:56px;height:56px;border-radius:16px;background:linear-gradient(140deg,var(--cta),#e8a33d);display:grid;place-items:center;font-family:var(--font-head);font-weight:900;font-size:22px;color:#2b1b14}
.menu-cats{display:flex; gap:8px; overflow-x:auto; padding:14px 0 4px; scrollbar-width:none}
.menu-cats::-webkit-scrollbar{display:none}
.menu-cats button{border:1.5px solid var(--line-strong); background:#fff; padding:8px 14px; border-radius:var(--pill); font-weight:700; font-size:13px; white-space:nowrap; color:var(--taupe-deep)}
.menu-cats button.on{background:var(--espresso); color:var(--cream); border-color:var(--espresso)}
.mi{display:flex; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line)}
.mi .main{flex:1; min-width:0}
.mi b{display:block; font-size:14.5px}
.mi .p{color:var(--cta-deep); font-weight:800; font-size:13.5px; direction:ltr; text-align:right}
.qty{display:flex; align-items:center; gap:8px}
.qty button{width:30px;height:30px;border-radius:10px;border:1.5px solid var(--line-strong);background:#fff;font-size:16px;font-weight:800;color:var(--espresso);display:grid;place-items:center}
.qty span{min-width:18px; text-align:center; font-weight:800}
.cartbar{position:fixed; bottom:0; left:0; right:0; background:var(--espresso); color:var(--cream); padding:12px 16px calc(12px + env(safe-area-inset-bottom));
  display:flex; align-items:center; justify-content:space-between; gap:12px; z-index:40; box-shadow:0 -10px 30px #2b1b1433}

.cashier{background:#1b110c; color:#f6efe6; min-height:100vh}
.cashier .card{background:#2b1b14; border-color:#ffffff14; color:#f6efe6}
.cashier .input{background:#3a261b; border-color:#ffffff1f; color:#f6efe6}
.cashier .input::placeholder{color:#a89383}
.timer{font-family:var(--font-head); font-size:34px; font-weight:800; letter-spacing:-1px; direction:ltr}
.timer.warn{color:#ffb4a8}

.att{background:var(--cream); min-height:100vh}
.att-card{background:var(--paper); border:1px solid var(--line); border-radius:20px; padding:16px; display:flex; align-items:center; gap:12px; box-shadow:var(--sh-sm); width:100%; text-align:right}
.att-card.in{background:var(--ok-soft); border-color:#3e7a5a40}
.big-ok{width:64px;height:64px;border-radius:20px;background:var(--ok);color:#fff;display:grid;place-items:center;margin:0 auto 12px;font-size:28px}

.divider{height:1px; background:var(--line); margin:14px 0}
.month-nav{display:inline-flex; align-items:center; gap:6px; background:#fff; border:1px solid var(--line); border-radius:var(--pill); padding:4px}
.month-nav button{border:0;background:transparent;width:30px;height:30px;border-radius:50%;font-size:15px;color:var(--taupe-deep)}
.month-nav b{font-size:13px; padding:0 8px; min-width:96px; text-align:center}
.stat-strip{display:flex; gap:18px; flex-wrap:wrap; color:#d8c8b8; font-size:13px}
.stat-strip b{color:var(--cream); font-family:var(--font-head); font-size:16px; display:block}
.qr-box{background:#fff; padding:12px; border-radius:16px; display:inline-block; border:1px solid var(--line)}
.qr-box img{display:block; width:180px; height:180px; image-rendering:pixelated}
.loader{width:26px;height:26px;border-radius:50%;border:3px solid #2b1b1420;border-top-color:var(--cta);animation:sp .8s linear infinite;margin:30px auto}
@keyframes sp{to{transform:rotate(360deg)}}

.grid > *, .row > *, .card, .li .main{min-width:0}
.kpi .val{overflow-wrap:anywhere}
@media(max-width:760px){
  .page .grid{grid-template-columns:1fr !important}
  .page .grid.g4{grid-template-columns:repeat(2,1fr) !important}
  .page .grid.g2{grid-template-columns:repeat(2,1fr) !important}
  .hero-actions .btn{flex:1}
}
.att-card .main{flex:1;min-width:0;text-align:right}
.att-card .chip{flex:0 0 auto;white-space:nowrap}
.att-card b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
