@font-face{font-family:Kufi;font-weight:400;font-style:normal;font-display:swap;src:url(/kufi400.ttf) format('truetype')}
@font-face{font-family:Kufi;font-weight:700;font-style:normal;font-display:swap;src:url(/kufi700.ttf) format('truetype')}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
:root{--green:#0F7B6C;--dark:#0B6B5D;--ink:#16302B;--bg:#F4F6F5;--muted:#6B7F7A;--line:#E7EDEB;--red:#C0392B;--amber:#B26A00;--ok:#1FA48F;--soft:#EAF7F3}
html,body{margin:0;padding:0}
body{font-family:Kufi,system-ui,-apple-system,"Segoe UI",sans-serif;background:#DCE5E2;color:var(--ink);direction:rtl;font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased}
button,input,select{font:inherit;color:inherit}
button{border:0;background:none;padding:0;cursor:pointer}
a{color:inherit;text-decoration:none}
#root{max-width:460px;margin:0 auto;min-height:100dvh;background:var(--bg);position:relative;overflow-x:hidden;box-shadow:0 0 24px rgba(10,40,35,.12)}
.screen{min-height:100dvh;display:flex;flex-direction:column;animation:fade .2s ease-out}
@keyframes fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.pb{padding-bottom:92px}

/* auth */
.auth{padding:40px 22px 28px}
.brandmark{width:64px;height:64px;border-radius:20px;background:linear-gradient(150deg,#128A79,#0B6B5D);display:flex;align-items:center;justify-content:center;box-shadow:0 6px 16px rgba(15,123,108,.28)}
.brandmark svg{width:34px;height:34px}
.brandname{font-size:30px;font-weight:700;margin:14px 0 0}
.tagline{font-size:14px;color:var(--muted);margin:6px 0 18px;line-height:1.8}
.seg{display:flex;background:#E3EBE8;border-radius:14px;padding:4px;margin-bottom:16px}
.seg button{flex:1;padding:9px;border-radius:11px;font-weight:700;font-size:14px;color:var(--muted)}
.seg .on{background:#fff;color:var(--green);box-shadow:0 1px 3px rgba(20,60,50,.12)}
.err{background:#FDE3E1;color:var(--red);border-radius:12px;padding:10px 12px;font-size:13px;margin:0 0 12px;line-height:1.8}

/* forms */
.field{margin-bottom:13px}
.field label{display:block;font-size:12.5px;font-weight:700;color:var(--muted);margin-bottom:5px}
.inp{width:100%;background:#fff;border:1.5px solid #DCE6E3;border-radius:13px;padding:12px 14px;font-size:15px;outline:none;direction:rtl;text-align:right}
.inp:focus{border-color:var(--green)}
.inp.ltr{direction:ltr;text-align:right}
.hint{font-size:11.5px;color:var(--muted);margin-top:4px}
.days{display:flex;flex-wrap:wrap;gap:7px}
.day{padding:8px 13px;border-radius:20px;background:#fff;border:1.5px solid #DCE6E3;font-size:13px;font-weight:700;color:var(--muted)}
.day.on{background:var(--green);border-color:var(--green);color:#fff}

/* shell */
.hd{padding:22px 20px 12px}
.h1{font-size:22px;font-weight:700;line-height:1.45}
.sub{font-size:12.5px;color:var(--muted);margin-top:3px}
.toprow{display:flex;align-items:center;gap:10px;padding:14px 16px 4px}
.back{font-size:12.5px;font-weight:700;color:var(--green);background:#fff;border:1px solid #D9E5E2;border-radius:20px;padding:6px 13px}
.sp{flex:1}
.card{background:#fff;border-radius:18px;padding:14px;margin:0 16px 12px;box-shadow:0 1px 3px rgba(20,60,50,.08)}
.card.g{background:linear-gradient(160deg,#128A79,#0B6B5D);color:#fff;box-shadow:0 6px 18px rgba(11,107,93,.22)}
.row{display:flex;align-items:center;gap:10px}
.pill{display:inline-block;font-size:11px;padding:3px 10px;border-radius:20px;font-weight:700;white-space:nowrap}
.pg{background:#DDF3EC;color:#0B6B5D}.pr{background:#FDE3E1;color:#C0392B}.po{background:#FFF0D6;color:#B26A00}.pn{background:#E9EFED;color:#5A6F6A}
.pw{background:rgba(255,255,255,.2);color:#fff}
small{font-size:11px;color:var(--muted)}
.btn{display:block;width:100%;border-radius:14px;padding:14px;font-weight:700;font-size:15px;background:var(--green);color:#fff;text-align:center}
.btn:active{opacity:.9}
.btn.white{background:#fff;color:var(--green)}
.btn.ghost{background:#fff;color:var(--green);border:1.5px solid var(--green)}
.btn.quiet{background:#EDF3F1;color:#0B6B5D}
.btn.danger{background:#fff;color:var(--red);border:1.5px solid #F0C7C2}
.btn.wa{background:#1FA855}
.btn[disabled]{opacity:.55}
.btn.sm{display:inline-block;width:auto;padding:8px 14px;font-size:13px;border-radius:12px}
.mt{margin-top:10px}
.pad{padding:0 16px}
.empty{background:#fff;border:1.5px dashed #CBD9D5;border-radius:18px;padding:22px 16px;text-align:center;margin:6px 16px 12px;color:var(--muted);font-size:13.5px;line-height:1.9}
.empty b{display:block;color:var(--ink);font-size:16px;margin-bottom:4px}
.empty .btn{margin-top:14px}

/* tabbar */
.tabbar{position:fixed;bottom:0;left:0;right:0;max-width:460px;margin:0 auto;height:70px;background:#fff;border-top:1px solid var(--line);display:flex;justify-content:space-around;align-items:center;padding-bottom:env(safe-area-inset-bottom);z-index:5}
.tabbar button{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:10.5px;color:#8A9A96;font-weight:700;flex:1}
.tabbar svg{width:22px;height:22px;stroke:#8A9A96;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tabbar .on{color:var(--green)}
.tabbar .on svg{stroke:var(--green)}

/* lists */
.list{background:#fff;border-radius:18px;margin:0 16px 12px;overflow:hidden;box-shadow:0 1px 3px rgba(20,60,50,.08)}
.srow{display:flex;align-items:center;gap:11px;padding:11px 14px;border-bottom:1px solid var(--line);width:100%;text-align:right;background:#fff}
.srow:last-child{border-bottom:0}
.srow .nm{display:block;font-size:14.5px;font-weight:700}
.srow .st{display:block;font-size:11.5px;color:var(--muted);margin-top:1px}
.srow.abs{background:#FFF5F4}
.srow.abs .st{color:var(--red)}
.av{width:42px;height:42px;border-radius:50%;overflow:hidden;flex:0 0 auto;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:17px}
.av img{width:100%;height:100%;object-fit:cover;display:block}
.av.big{width:64px;height:64px;font-size:26px}
.chk{width:26px;height:26px;border-radius:50%;flex:0 0 auto;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700}
.chk.in{background:#DDF3EC;color:#0B6B5D}.chk.out{background:#FDE3E1;color:#C0392B}
.stats{display:flex;gap:8px;padding:0 16px 10px}
.stat{background:#fff;border-radius:16px;padding:10px 6px;text-align:center;flex:1;box-shadow:0 1px 3px rgba(20,60,50,.08)}
.stat.g{background:linear-gradient(160deg,#128A79,#0B6B5D);color:#fff}
.stat b{display:block;font-size:21px;font-weight:700;line-height:1.3}
.stat span{font-size:11px;color:var(--muted)}
.stat.g span{color:#CDEFE6}
.undo{display:flex;align-items:center;gap:10px;background:var(--ink);color:#fff;border-radius:14px;padding:11px 14px;margin:0 16px 10px;font-size:12.5px}
.undo b{color:#7FE0C8}
.undo button{color:#7FE0C8;font-weight:700;font-size:13px;padding:2px 6px;margin-inline-start:auto}
.confirmbar{position:fixed;bottom:0;left:0;right:0;max-width:460px;margin:0 auto;background:#fff;border-top:1px solid var(--line);padding:12px 16px calc(16px + env(safe-area-inset-bottom));z-index:6}
.confirmbar .note{text-align:center;font-size:11.5px;color:var(--muted);margin-top:7px}
.lock{display:flex;gap:10px;align-items:center;background:#EAF7F3;border:1px solid #BFE6DD;color:#0B6B5D;border-radius:16px;padding:12px 14px;margin:0 16px 12px;font-size:13px;line-height:1.8}
.bar{flex:1;height:7px;background:#E8EEEC;border-radius:4px;overflow:hidden}
.bar i{display:block;height:7px;border-radius:4px}
.num{font-size:13px;font-weight:700;min-width:44px;text-align:left}
.mnav{display:flex;align-items:center;justify-content:center;gap:14px;padding:4px 16px 12px}
.mnav b{font-size:16px;min-width:130px;text-align:center}
.mnav button{width:36px;height:36px;border-radius:50%;background:#fff;border:1px solid #D9E5E2;font-size:18px;color:var(--green);font-weight:700}
.chips{display:flex;gap:7px;overflow-x:auto;padding:0 16px 12px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;font-size:12.5px;padding:7px 14px;border-radius:18px;background:#fff;color:var(--muted);border:1px solid #D9E5E2;font-weight:700}
.chip.on{background:var(--green);border-color:var(--green);color:#fff}
.sechead{font-size:12.5px;font-weight:700;color:var(--muted);padding:4px 20px 8px}

/* messages */
.mcard{background:#fff;border-radius:18px;margin:0 16px 10px;padding:12px 14px;box-shadow:0 1px 3px rgba(20,60,50,.08)}
.mtext{background:#EFE7DC;border-radius:4px 14px 14px 14px;padding:9px 12px;font-size:12.5px;line-height:1.9;white-space:pre-line;margin:9px 0}
.mcard.done{background:#F7FBFA}

/* overlay sheet */
.overlay{position:fixed;inset:0;background:rgba(8,26,23,.55);z-index:40;display:flex;align-items:flex-end;justify-content:center;animation:fade .15s ease-out}
.sheet{background:var(--bg);border-radius:24px 24px 0 0;width:100%;max-width:460px;max-height:92dvh;overflow-y:auto;padding:18px 18px calc(22px + env(safe-area-inset-bottom))}
.sheet h2{margin:0 0 14px;font-size:18px}
.photoRow{display:flex;align-items:center;gap:12px}
.toast{pointer-events:none;position:fixed;bottom:96px;left:50%;transform:translateX(-50%) translateY(10px);background:#16302B;color:#fff;font-size:12.5px;padding:10px 16px;border-radius:14px;z-index:60;opacity:0;transition:opacity .2s,transform .2s;max-width:86%;text-align:center;line-height:1.7}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.loading{padding:60px 20px;text-align:center;color:var(--muted);font-size:13px}
.printonly{display:none}
table.pt{width:100%;border-collapse:collapse;font-size:13px}
table.pt th,table.pt td{border-bottom:1px solid var(--line);padding:8px 6px;text-align:right}
table.pt th{color:var(--muted);font-size:11.5px}

@media print{
  body{background:#fff}
  #root{box-shadow:none;max-width:none}
  .tabbar,.noprint,.toprow,.confirmbar,.mnav,.chips,.toast{display:none!important}
  .printonly{display:block}
  .card,.list{box-shadow:none;border:1px solid #ddd;margin-inline:0}
  .screen{min-height:0}
  .pb{padding-bottom:0}
}
