/* واجهة منظومة بيت الألفة. منقولة من النسخة المرجعية (reference/react-src/styles.css): كحلي #192e48 وذهبي،
   قائمة جانبية داكنة، شريط علوي، شريط وصول سريع. ألوان الحالة (متاح، محجوز، مبدئي) منفصلة عن ألوان الهوية. */
@font-face{font-family:"IBM Plex Sans Arabic";font-weight:400;font-display:swap;src:url("../fonts/plex-ar-400.4fa3d81d41ab.woff2") format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:"IBM Plex Sans Arabic";font-weight:400;font-display:swap;src:url("../fonts/plex-lat-400.4767e1197706.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Sans Arabic";font-weight:500;font-display:swap;src:url("../fonts/plex-ar-500.106892212ea7.woff2") format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:"IBM Plex Sans Arabic";font-weight:500;font-display:swap;src:url("../fonts/plex-lat-500.80ebc672c915.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Sans Arabic";font-weight:600;font-display:swap;src:url("../fonts/plex-ar-600.64891a810259.woff2") format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:"IBM Plex Sans Arabic";font-weight:600;font-display:swap;src:url("../fonts/plex-lat-600.f417eeb0d15e.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Sans Arabic";font-weight:700;font-display:swap;src:url("../fonts/plex-ar-700.a4390abc98c2.woff2") format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:"IBM Plex Sans Arabic";font-weight:700;font-display:swap;src:url("../fonts/plex-lat-700.8d04403cf599.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Reem Kufi";font-weight:700;font-display:swap;src:url("../fonts/reem-kufi-700.475bb60d3ef1.woff2") format("woff2")}
:root{
  --bg:#f5f5f2; --surface:#ffffff; --ink:#1a2330; --muted:#62665f; --line:#e0e0d8;
  --accent:#192e48; --accent-ink:#ffffff; --accent-soft:#e7ecf3; --gold:#857c48;
  --ok:#17794a; --ok-bg:#e1f4ea; --ok-edge:#8fd0ad;
  --bk:#b3312c; --bk-bg:#fbe3e1; --bk-edge:#eba39f;
  --tn:#8a5a00; --tn-bg:#fcecc4; --tn-edge:#e5c36c;
  --mt:#565f6b; --mt-bg:#e8ebef; --mt-edge:#bfc6cf;
  --side-bg:#192e48; --side-ink:#f3f5f8; --side-muted:#aab7c8; --side-hover:#25405f; --side-on:#a8a068;
  --f-body:"IBM Plex Sans Arabic",Tahoma,"Segoe UI",sans-serif; --f-brand:"Reem Kufi","IBM Plex Sans Arabic",Tahoma,sans-serif;
}
@media (prefers-color-scheme: dark){
  :root{
    color-scheme:dark;
    --bg:#0f151d; --surface:#18202a; --ink:#e9edf2; --muted:#9fa8b3; --line:#2a3542;
    --accent:#9db8dc; --accent-ink:#0b1c2b; --accent-soft:#1b2a3d; --gold:#c9c08a;
    --ok:#74d8a3; --ok-bg:#153324; --ok-edge:#2c6a4a;
    --bk:#ff958c; --bk-bg:#45201e; --bk-edge:#7d3a36;
    --tn:#f1c45f; --tn-bg:#3d3011; --tn-edge:#75601f;
    --mt:#aab3bf; --mt-bg:#2a2f37; --mt-edge:#4a525d;
  }
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:15px;line-height:1.6}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--accent)}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.ltr{direction:ltr;unicode-bidi:isolate;display:inline-block}

/* ---- الهيكل: قائمة جانبية + المحتوى ---- */
.shell{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:100vh}
.mainc{display:flex;flex-direction:column;min-width:0}
.wrap{max-width:1120px;width:100%;margin:0 auto;padding:20px 16px 56px}
.col{display:flex;flex-direction:column;gap:18px}
.side{background:var(--side-bg);color:var(--side-ink);padding:20px 14px;display:flex;flex-direction:column;gap:18px;position:sticky;top:0;align-self:start;height:100vh;overflow-y:auto}
.side :focus-visible{outline-color:var(--side-on)}
.brand{display:flex;align-items:center;gap:12px}
.brand h1{font-family:var(--f-brand);font-size:20px;font-weight:700;margin:0;line-height:1.2;color:var(--side-ink)}
.brand p{margin:0;color:var(--side-muted);font-size:12px;letter-spacing:.04em}
.logo{width:46px;background:#fff;border-radius:10px;padding:5px 7px;display:block}
.menu{display:flex;flex-direction:column;gap:4px}
.menu-g{font-size:11px;font-weight:700;letter-spacing:.02em;color:var(--side-on);padding:12px 12px 4px;border-top:1px solid var(--side-hover);margin-top:8px}
.menu-g:first-child{border-top:0;margin-top:0;padding-top:2px}
.menu a{display:flex;align-items:center;justify-content:space-between;gap:8px;border-radius:12px;padding:9px 12px;color:var(--side-ink);text-decoration:none}
.menu a:hover{background:var(--side-hover)}
.menu a.on{background:#e7ecf3;color:#192e48;box-shadow:inset -4px 0 0 var(--side-on)}
.ml{display:flex;flex-direction:column;line-height:1.35}
.ml b{font-weight:600} .ml small{font-size:11.5px;color:var(--side-muted);font-weight:400}
.menu a.on .ml small{color:#192e48;opacity:.75}
.side .demo{margin-top:auto;font-size:12.5px}
.ghost{display:inline-block;border:1px solid var(--side-hover);border-radius:999px;padding:4px 12px;color:var(--side-ink);text-decoration:none}
.ghost:hover{border-color:var(--side-on)}

.bar-top{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;justify-content:space-between;background:var(--surface);border-bottom:1px solid var(--line);padding:12px 20px}
.bar-top .ttl{flex:1;min-width:200px}
.bar-top h2{font-size:18px;font-weight:700;margin:0}
.crumb{font-size:12.5px;color:var(--muted)}
.pdesc{margin:2px 0 0;font-size:13px;color:var(--muted);max-width:70ch}
.who{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:13px;color:var(--muted)}
.who form{margin:0} .whoami{color:var(--ink)}
.bell{border:1px solid var(--bk-edge);background:var(--bk-bg);color:var(--bk);border-radius:999px;padding:4px 12px;font-size:13px;font-weight:600;text-decoration:none}
.bell b{font-variant-numeric:tabular-nums}
.burger{display:none;border:1px solid var(--line);background:var(--surface);border-radius:8px;width:40px;height:40px;font-size:20px}
.scrim{display:none}

/* ---- شريط الوصول السريع ---- */
.qbar{position:sticky;top:0;z-index:30;display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 20px;background:var(--surface);border-bottom:1px solid var(--line);box-shadow:0 2px 8px rgba(0,0,0,.05)}
.qfind{position:relative;flex:1;min-width:230px;max-width:420px;margin-inline-start:auto}
.qfind input{width:100%;font-size:14px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}
.qdrop{position:absolute;inset-inline:0;top:calc(100% + 4px);background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);overflow:hidden;z-index:40}
.qhit{padding:8px 12px;border-bottom:1px solid var(--line)} .qhit:last-child{border-bottom:0}
.qdrop small{color:var(--muted)}
.qempty{padding:10px 12px;color:var(--muted)}

/* ---- القطع المشتركة ---- */
.btn{display:inline-block;border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:8px 16px;color:var(--ink);text-decoration:none}
.btn:hover{border-color:var(--accent)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}
.btn.danger{border-color:var(--bk);color:var(--bk)}
.btn.sm{padding:5px 12px;font-size:13px}
.btn.wa{background:var(--ok);border-color:var(--ok);color:#fff;font-weight:600;text-decoration:none}
.cta{border:0;border-radius:8px;background:var(--accent);color:var(--accent-ink);font-weight:600;font-size:15px;padding:12px 22px}
.cta:hover{filter:brightness(1.1)}
.msg{border-radius:12px;padding:10px 14px;font-size:14px;font-weight:500}
.msg.good{background:var(--ok-bg);color:var(--ok)} .msg.bad{background:var(--bk-bg);color:var(--bk)} .msg.warn{background:var(--tn-bg);color:var(--tn)}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:18px}
.panel>p{margin:0 0 12px}
.q{font-size:16px;font-weight:700;margin:0 0 14px;text-wrap:balance}
.note{font-size:13px;color:var(--muted)}
.empty{margin:0;color:var(--muted)}
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px 16px;border-inline-start:4px solid var(--tone,var(--accent))}
.tile span{display:block;font-size:12.5px;color:var(--muted)}
.tile b{font-size:26px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums}
.tile small{font-size:13px;color:var(--muted);font-weight:500}
.rows{display:flex;flex-direction:column;gap:8px}
.rowi{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;border:1px solid var(--line);border-radius:10px;padding:10px 14px;background:var(--surface);color:inherit;text-decoration:none}
.rowi.link:hover{background:var(--bg);border-color:var(--accent)}
.rowi .grow{flex:1 1 200px;min-width:0} .rowi small{color:var(--muted)}
.rowi b{font-variant-numeric:tabular-nums}
.rowi.alert{border-inline-start-width:5px}
.rowi.alert.bk{border-inline-start-color:var(--bk)} .rowi.alert.tn{border-inline-start-color:var(--tn)} .rowi.alert.ok{border-inline-start-color:var(--ok)}

/* ---- الدخول ---- */
.login{min-height:100vh;display:grid;place-items:center;background:#192e48;padding:20px}
.login-card{background:var(--surface);border-radius:14px;padding:32px 28px;width:min(380px,100%);display:grid;gap:14px;justify-items:center;text-align:center;box-shadow:0 10px 40px rgba(0,0,0,.3)}
.login-card img{width:84px;height:84px;object-fit:contain;background:#fff;border-radius:12px;padding:6px}
.login-card h1{margin:0;font-size:21px}
.login-card p{margin:0;color:var(--muted)}
.login-card .cta,.login-card .msg{width:100%}
.lg-f{display:grid;gap:4px;width:100%;text-align:start;font-size:14px;color:var(--muted)}
.lg-f input{width:100%;font-size:17px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);direction:ltr;text-align:start}

/* ---- النماذج ---- */
.fields{display:flex;flex-wrap:wrap;gap:12px} .fields.mid{align-items:center}
.fld{flex:1 1 200px;display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
.fld.w1{flex:0 1 120px} .fld.w2{flex:0 1 180px} .fld.w3{flex:1 1 280px}
.fld input,.fld select,.fld textarea,.search{font-size:15px;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:10px 12px;width:100%}
.fld input:focus,.fld select:focus,.fld textarea:focus,.search:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.search{flex:1 1 220px;min-width:0;width:auto}
.chk{display:flex;gap:8px;align-items:center;font-size:14px}
.seg{display:inline-flex;flex-wrap:wrap;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:3px;gap:3px}
.seg a,.seg label span{display:block;border-radius:6px;padding:6px 14px;font-size:13.5px;color:var(--muted);text-decoration:none;cursor:pointer}
.seg a.on,.seg input:checked+span{background:var(--surface);color:var(--ink);font-weight:600;box-shadow:0 1px 3px rgba(30,24,48,.15)}
.seg input{position:absolute;opacity:0;pointer-events:none} .seg input:focus-visible+span{outline:3px solid var(--accent)}
.sec-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-bottom:12px}
.sec-head .q,.q.nom{margin:0}
.btns{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.viewbar{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap}
.btn.print{display:inline-flex;align-items:center;gap:7px;border-color:var(--gold)}
.flash{margin-bottom:14px} .flash-top{margin-top:14px}
.pill{display:inline-block;border-radius:999px;padding:1px 12px;font-size:13px;font-weight:600;vertical-align:middle}
.pill.bk{background:var(--bk-bg);color:var(--bk)} .pill.tn{background:var(--tn-bg);color:var(--tn)} .pill.mt{background:var(--mt-bg);color:var(--mt)} .pill.ok{background:var(--ok-bg);color:var(--ok)}
b.out{color:var(--bk)} b.in{color:var(--ok)}

/* ---- فحص التوفر ---- */
.dates{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch}
.date{flex:1 1 220px;display:flex;flex-direction:column;gap:2px;background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:8px 14px}
.date label{font-size:12.5px;color:var(--muted)}
.date input{font-weight:600;font-size:16px;background:transparent;border:0;padding:0;min-width:0;width:100%}
.date input:focus{outline:none} .date:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.stay{flex:1 1 200px;display:flex;flex-direction:column;justify-content:center;background:var(--accent-soft);border-radius:10px;padding:8px 16px}
.stay b{font-size:18px;color:var(--accent);font-variant-numeric:tabular-nums} .stay span{font-size:13px;color:var(--muted)}
.quick{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:12px}
.vlegend{margin:16px 0 0;font-size:13px;color:var(--muted);display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}
.vlegend .nt{width:16px;height:16px;min-width:0}
.vrows{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.vrow{display:grid;grid-template-columns:auto 1fr auto;column-gap:14px;align-items:center;border:1px solid var(--edge);border-inline-start-width:5px;background:var(--tint);border-radius:12px;padding:14px 16px}
.vrow.ok{--edge:var(--ok-edge);--tint:var(--ok-bg);--tone:var(--ok)}
.vrow.bk{--edge:var(--bk-edge);--tint:var(--bk-bg);--tone:var(--bk)}
.vrow.tn{--edge:var(--tn-edge);--tint:var(--tn-bg);--tone:var(--tn)}
.vrow.mt{--edge:var(--mt-edge);--tint:var(--mt-bg);--tone:var(--mt)}
.vrow.part{--edge:var(--tn-edge);--tint:var(--surface);--tone:var(--tn)}
.vrow.idle{--edge:var(--line);--tint:var(--bg);--tone:var(--muted)}
.vrow.on{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.vrow .num{font-size:30px;font-weight:700;color:var(--tone);width:52px;height:52px;border-radius:10px;background:var(--surface);display:grid;place-items:center}
.vmain{display:flex;flex-direction:column;gap:6px;min-width:0}
.vrow .state{font-size:17px;font-weight:700;color:var(--tone)} .vrow .det{font-size:13px}
.vact{display:flex;flex-direction:column;gap:6px;align-items:stretch;text-align:center}
.nts{display:flex;flex-wrap:wrap;gap:4px}
.nt{display:inline-grid;place-items:center;min-width:28px;height:28px;border-radius:6px;font-style:normal;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;border:1px solid transparent}
.nt.ok{background:var(--ok-bg);color:var(--ok);border-color:var(--ok-edge)} .nt.bk{background:var(--bk);color:#fff}
.nt.tn{background:var(--tn-bg);color:var(--tn);border-color:var(--tn-edge)} .nt.mt{background:var(--mt-bg);color:var(--mt);border-color:var(--mt-edge)}
.verdict{margin-top:16px;border-radius:10px;padding:12px 16px;background:var(--accent-soft);font-weight:600}
.verdict.none{background:var(--bk-bg);color:var(--bk)}
.together{margin-top:14px;border:1px dashed var(--line);border-radius:12px;padding:12px 14px}
.together .note{margin:4px 0 8px}
.multi{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.chip{border-radius:999px;padding:6px 14px;font-size:13.5px;font-weight:600;border:1.5px solid var(--ok-edge);background:var(--ok-bg);color:var(--ok);text-decoration:none}
.chip:hover{border-color:var(--ok)} .chip.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.chip.off{background:var(--surface);color:var(--ink);border-color:var(--line);font-weight:500} .chip.dim{opacity:.6}
.book{margin-top:18px;border-top:1px dashed var(--line);padding-top:18px;display:flex;flex-direction:column;gap:12px}
.book h2{font-size:17px;font-weight:700;margin:0} .book .note{margin:0}
.colg{display:flex;flex-direction:column;gap:12px}
.book[data-mode=block] .only-booking,.book[data-mode=booking] .only-block,.book:not([data-mode]) .only-block,
.book[data-cust=old] .only-new,.book[data-other="0"] .only-other,.book[data-cc="0"] .only-cc,.book[data-bank="0"] .only-bank{display:none}
.book:not([data-ins="1"]) .only-ins,.book:not([data-other="1"]) .only-other{display:none}
/* أقسام ملف الحجز القابلة للطي */
details.panel>summary{cursor:pointer;list-style:none;margin:0}
details.panel>summary::-webkit-details-marker{display:none}
details.panel>summary::before{content:"▸ ";color:var(--gold)} details.panel[open]>summary::before{content:"▾ "}
details.panel[open]>summary{margin-bottom:4px}
.dt details{display:inline-block;margin:4px 0 4px 8px;vertical-align:top} .dt details[open]{display:block}
.dt details>summary{list-style:none} .dt details>summary::-webkit-details-marker{display:none}
.dt details .book{margin-top:8px;text-align:start}
.hand-g{display:grid;gap:10px}
.vcals{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px;margin-top:12px}
.vcal{border:1px solid var(--line);border-radius:12px;padding:12px}
.vcal-h{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:8px}
.vcal-h b{font-size:16px} .vcal-h span{font-size:12.5px;color:var(--muted)}
.vgrid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.vw{text-align:center;font-size:11.5px;color:var(--muted);padding-bottom:2px}
.vd{aspect-ratio:1;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;display:grid;place-items:center;font-style:normal;text-decoration:none}
a.vd.free:hover{border-color:var(--accent);background:var(--accent-soft)}
.vd.bk{background:var(--bk);border-color:var(--bk);color:#fff}
.vd.tn{background:var(--tn-bg);border:1.5px dashed var(--tn);color:var(--tn)}
.vd.mt{background:var(--mt-bg);border-color:var(--mt-edge);color:var(--mt)}
.vd.past{opacity:.45} .vd.today{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--gold)}
.vd.sel{outline:3px solid var(--accent);outline-offset:-1px}
.vd.sample{display:inline-grid;width:26px;font-size:12px}

/* ---- القوائم: بطاقات أو جدول ---- */
.blist{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.bcard{background:var(--surface);border:1px solid var(--line);border-top:4px solid var(--edge,var(--line));border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:6px}
.bcard.bk{--edge:var(--bk-edge)} .bcard.tn{--edge:var(--tn-edge)} .bcard.mt{--edge:var(--mt-edge)}
.bhead{display:flex;justify-content:space-between;gap:8px;align-items:center}
.bmeta{font-size:13px;color:var(--muted)}
.mrow{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:13px;color:var(--muted);border-top:1px dashed var(--line);padding-top:8px;margin-top:2px}
.mrow b{color:var(--ink);font-variant-numeric:tabular-nums} .mrow b.out{color:var(--bk)} .mrow b.in{color:var(--ok)}
.dt-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.dt{width:100%;border-collapse:collapse;font-size:14px}
.dt th{background:var(--bg);text-align:start;font-weight:700;color:var(--muted);font-size:12.5px;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
.dt td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:middle;white-space:nowrap}
.dt tr:last-child td{border-bottom:0}
.dt td.num,.dt th.num{text-align:end;font-variant-numeric:tabular-nums}
.dt td.act{text-align:end}
.dt tr.voided td{opacity:.55;text-decoration:line-through}
.dt tr.click{cursor:pointer} .dt tr.click:hover td{background:var(--bg)}
.dt tr.foot td{font-weight:700;background:var(--bg)}
.screen-hide{display:none}
.print-only{display:none}

/* ---- ملف الحجز ---- */
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px 18px;margin:0 0 12px}
.facts dt{font-size:12.5px;color:var(--muted)} .facts dd{margin:0;font-weight:600}
.st-h{font-weight:700;color:var(--accent);margin-top:14px;padding-bottom:4px;border-bottom:2px solid var(--line)}
.st-r,.st-t{display:flex;justify-content:space-between;gap:16px;padding:7px 4px;border-bottom:1px solid var(--line)}
.st-r span{color:var(--muted)} .st-r b{font-weight:500;font-variant-numeric:tabular-nums}
.st-t{font-weight:700;background:var(--bg)}
.st-t.big{font-size:17px;margin-top:8px;border:0;border-radius:8px;padding:10px 8px}
.qhit{display:block;color:inherit;text-decoration:none} .qhit:hover{background:var(--bg)}
@media (max-width:700px){.vrow{grid-template-columns:auto 1fr} .vact{grid-column:1 / -1;margin-top:10px}}

/* ---- الشاشات الضيقة: القائمة تبقى جانبية، وعلى الهاتف تنزلق ---- */
@media (max-width:860px){
  .shell{grid-template-columns:176px minmax(0,1fr)}
  .side{padding:16px 10px;gap:14px}
  .menu a{padding:9px 10px;font-size:14px}
  .brand h1{font-size:17px}
}
@media (max-width:560px){
  .shell{grid-template-columns:minmax(0,1fr)}
  .side{position:fixed;inset-block:0;inset-inline-start:0;width:240px;z-index:50;transform:translateX(100%);transition:transform .2s ease}
  .menu-open .side{transform:none}
  .menu-open .scrim{display:block;position:fixed;inset:0;z-index:49;background:rgba(0,0,0,.4);border:0}
  .burger{display:block}
  .bar-top,.qbar{padding-inline:12px}
}
@media (prefers-reduced-motion: reduce){.side{transition:none}}
@media print{
  .screen-hide{display:block !important}          /* الكشف المطبوع جدول دائماً، مهما كان العرض على الشاشة */
  .side,.scrim,.no-print,.print-hide,.flash{display:none !important}
  .shell{display:block} html,body{background:#fff !important;color:#000}
  .wrap{max-width:none;padding:0}
  .dt-wrap{border:0;overflow:visible} .dt{font-size:11.5px} .dt th,.dt td{padding:5px 6px;border:1px solid #999;white-space:normal}
  .print-only{display:flex;justify-content:space-between;align-items:center;border-bottom:3px solid #192e48;padding-bottom:10px;margin-bottom:8px}
  .print-only img{height:60px} .print-only div{text-align:end} .print-only b{display:block;font-size:20px;color:#192e48} .print-only span{font-size:13px;color:#444}
  @page{size:A4 landscape;margin:12mm}
}

/* المرحلتان 5 و6: نماذج المال (الدولار والمصرف)، الكشوف، المصروفات، الرواتب */
.mform[data-bank="0"] .only-bank,.mform:not([data-usd="1"]) .only-usd,.mform[data-usd="1"] .only-lyd{display:none}
.fx-eq{align-self:end;padding:10px 0;font-size:13.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.stage{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12.5px;color:var(--muted)} .stage b{color:var(--ink);font-weight:600}
.pend{border:1px solid var(--bk);border-radius:10px;padding:12px 14px;background:var(--bk-bg)}
.pend ol{margin:8px 0 0;padding-inline-start:22px} .pend li{margin:6px 0}
.sumgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.rowi.voided{opacity:.6} .rowi.voided b{text-decoration:line-through}
.inline{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center}
.inline input,.inline select{font-size:14px;border:1px solid var(--line);border-radius:8px;padding:6px 8px;background:var(--bg);color:var(--ink)}

/* مراحل الحجز في ملف الحجز (كالمرجع): ما تمّ والحالية تُفتح بالضغط */
.steps{list-style:none;margin:14px 0 4px;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.steps li{flex:1 1 110px;display:flex;border:1px solid var(--line);border-radius:10px;font-size:13px;color:var(--muted)}
.steps li a,.steps li span.st{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;color:inherit;text-decoration:none;border-radius:10px}
.steps i{font-style:normal;flex:0 0 24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--bg);font-weight:700;font-size:12px}
.steps li.done{border-color:var(--ok-edge);color:var(--ok)} .steps li.done i{background:var(--ok);color:var(--surface)}
.steps li.now{border-color:var(--accent);color:var(--ink);font-weight:600;background:var(--accent-soft)} .steps li.now i{background:var(--accent);color:var(--accent-ink)}
.steps li a:hover{background:var(--accent-soft)} .steps li.open{box-shadow:0 0 0 2px var(--accent)}
.stagebox{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:8px 0 10px;background:var(--bg)}
.stars{font-size:18px;color:var(--gold);letter-spacing:2px}
.norent{border:2px solid var(--bk);background:var(--bk-bg);color:var(--bk);border-radius:12px;padding:12px 14px;font-weight:600}
.norent .chk{color:var(--ink);font-weight:500;margin-top:8px}
@media print{.steps,.stagebox{display:none}}
/* قائمة المراجعة عند الاستلام: سليم / تالف / مفقود لكل أصل */
.ckst{display:inline-flex;gap:0}
.ckst label{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;font-size:13px;cursor:pointer;white-space:nowrap}
.ckst input{margin:0}
table.ck tr.hit td{background:var(--bk-bg)}
table.ck input[type=text]{font:inherit;border:1px solid var(--line);border-radius:8px;padding:5px 8px;background:var(--bg);color:var(--ink)}

/* التقارير (كالمرجع styles.css: الأشرطة، بطاقات الفلل، جداول المقارنة، قائمة الدخل) */
.bars{display:flex;flex-direction:column;gap:10px}
.barrow{display:grid;grid-template-columns:minmax(120px,190px) 1fr auto;gap:12px;align-items:center;font-size:14px}
.barrow b{font-variant-numeric:tabular-nums}
.track{height:12px;border-radius:6px;background:var(--bg);overflow:hidden}
.track i{display:block;height:100%;border-radius:6px;background:var(--accent)}
.vcards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.vcard{border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.vcard h3{margin:0;font-size:15px}
.vnet{font-size:24px;font-weight:700;font-variant-numeric:tabular-nums;margin:4px 0 8px}
.vnet small{display:block;font-size:12.5px;font-weight:500;color:var(--muted)}
.vcard dl{display:grid;grid-template-columns:1fr auto;gap:4px 12px;margin:0 0 10px;font-size:13.5px}
.vcard dt{color:var(--muted)} .vcard dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums}
.occ{display:flex;align-items:center;gap:10px;font-size:12.5px;color:var(--muted)} .occ .track{flex:1}
.pos{color:var(--ok)} .negv{color:var(--bk)}
.stmt{display:flex;flex-direction:column;max-width:760px;font-variant-numeric:tabular-nums}
.st-h{font-weight:700;color:var(--accent);margin-top:14px;padding-bottom:4px;border-bottom:2px solid var(--line)}
.st-r,.st-t,.stmt details>summary{display:flex;justify-content:space-between;gap:16px;padding:7px 4px;border-bottom:1px solid var(--line)}
.st-r span{color:var(--muted)} .st-r b,.stmt details>summary b{font-weight:500}
.st-t{font-weight:700;background:var(--bg)}
.st-t.big{font-size:17px;margin-top:8px;border:0;border-radius:8px;padding:10px 8px}
.stmt details>summary{cursor:pointer;list-style:none} .stmt details>summary::-webkit-details-marker{display:none}
.stmt details>summary::before{content:"◂ ";color:var(--gold)} .stmt details[open]>summary::before{content:"▾ "}
.stmt details>summary span{flex:1} .stmt details>summary small{color:var(--muted)}
.stmt details>summary:hover,.stmt details[open]>summary{background:var(--accent-soft)}
.st-d{display:flex;flex-direction:column;gap:6px;padding:10px 0 12px;margin-inline-start:18px;border-inline-start:3px solid var(--accent);padding-inline-start:12px}
.chg{font-size:12.5px;margin:4px 0 0;padding:0;list-style:none} .chg li{margin:2px 0} .chg del{color:var(--bk)} .chg ins{color:var(--ok);text-decoration:none}
@media (max-width:640px){.barrow{grid-template-columns:1fr auto} .barrow .track{grid-column:1 / -1;order:3}}
@media print{.stmt details{break-inside:avoid} .stmt details>summary::before{content:""}}
