:root{
  --paper:#f5f3f0; --surface:#fff; --ink:#1d1d1d; --muted:#5e5a55; --line:#cccccc; --line-soft:#e7e4e0;
  --tide:#1d1d1d; --tide-ink:#000; --tide-soft:#ece8e3;
  --gold:#bdb4ab; --gold-deep:#6f665c;
  --brass:#bdb4ab; --brass-soft:#f1eeea;
  --ok:#1b7a4d; --ok-soft:#dff1e7;
  --warn:#9a5d00; --warn-soft:#fbecd0;
  --bad:#b3392f; --bad-soft:#f8e1de;
  --off:#4a5553; --off-soft:#e4e8e7;
  --font:"Segoe UI","Noto Sans Arabic","Noto Kufi Arabic",Tahoma,"DejaVu Sans",system-ui,sans-serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
h1,h2,h3,p{margin:0}
.ltr{direction:ltr;text-align:left;unicode-bidi:plaintext}
.num{font-variant-numeric:tabular-nums}
:focus-visible{outline:3px solid var(--gold-deep);outline-offset:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ---------- أزرار ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 20px;border:0;border-radius:10px;background:var(--tide);color:#fff;font-weight:700;text-decoration:none;transition:background .15s}
.btn:hover{background:var(--tide-ink)}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.btn.block{width:100%}
.btn.sm{min-height:38px;padding:0 14px;font-size:14px}
.btn.line{background:transparent;color:var(--tide);box-shadow:inset 0 0 0 1.5px var(--tide)}
.btn.line:hover{background:var(--tide-soft)}
.btn.bad{background:var(--bad)}
.btn.bad:hover{background:#8f2c24}
.btn.bad.line{background:transparent;color:var(--bad);box-shadow:inset 0 0 0 1.5px var(--bad)}
.btn.bad.line:hover{background:var(--bad-soft)}
.link{background:none;border:0;padding:6px 2px;color:var(--tide);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.link[disabled]{color:var(--muted);text-decoration:none;cursor:default}

/* ---------- حقول ---------- */
.field{display:block;margin-bottom:16px}
.field>span{display:block;margin-bottom:6px;font-size:14px;font-weight:600;color:var(--muted)}
.field small{display:block;margin-top:5px;font-size:13px;color:var(--muted)}
.input{width:100%;min-height:48px;padding:10px 14px;border:1.5px solid var(--line);border-radius:10px;background:#fff}
.input:focus{outline:none;border-color:var(--tide);box-shadow:0 0 0 3px rgba(189,180,171,.45)}
.pw{position:relative}
.pw .input{padding-left:72px}
.pw .link{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:14px}
.otp{letter-spacing:.5em;text-align:center;font-size:26px;font-weight:700;direction:ltr}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.check{display:flex;gap:10px;align-items:center;margin:4px 0 16px;font-size:15px}
.check input{width:20px;height:20px;accent-color:var(--tide)}
.err{margin:-6px 0 14px;padding:10px 12px;border-radius:8px;background:var(--bad-soft);color:#7d2119;font-size:14px}
.note{margin:0 0 16px;padding:10px 12px;border-radius:8px;background:var(--brass-soft);color:#4a4339;font-size:14px}

/* ---------- الدخول ---------- */
.auth{min-height:100dvh;display:grid;grid-template-rows:auto 1fr}
.auth-brand{background:var(--tide);color:#fff;padding:28px 24px 34px;position:relative;overflow:hidden}
.auth-brand .plate{display:inline-flex;align-items:center;gap:10px;font-weight:800;font-size:20px}
.mark{width:34px;height:34px;flex:none;object-fit:contain}
.auth-brand .mark{width:64px;height:64px}
.auth-brand .plate{flex-direction:column;align-items:flex-start;gap:14px;color:var(--gold)}
.auth-brand .en{display:block;font-size:13px;font-weight:600;letter-spacing:.35em;color:var(--gold);opacity:.8;margin-top:2px}
.auth-brand::after{content:"";position:absolute;inset-inline-end:-40px;bottom:-40px;width:200px;height:200px;background:url(/brand/logo-mark.png) center/contain no-repeat;opacity:.07;pointer-events:none}
.auth-brand p{margin-top:14px;max-width:26ch;font-size:15px;color:#ccc}
.auth-body{padding:24px 20px 40px;width:100%;max-width:440px;margin:0 auto}
.auth-body h1{font-size:24px;margin-bottom:6px}
.auth-body .sub{color:var(--muted);margin-bottom:22px}
@media(min-width:880px){
  .auth{grid-template-rows:none;grid-template-columns:minmax(360px,5fr) 6fr}
  .auth-brand{padding:56px 48px;display:flex;flex-direction:column;justify-content:flex-end}
  .auth-brand p{font-size:18px;max-width:22ch}
  .auth-body{align-self:center;padding:40px}
}

/* ---------- الهيكل ---------- */
.shell{min-height:100dvh;padding-bottom:84px}
.topbar{position:sticky;top:0;z-index:20;background:#1d1d1d;border-bottom:1px solid #000}
.topbar-in{max-width:980px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;gap:14px}
.brand{display:flex;align-items:center;gap:9px;font-weight:800;color:var(--gold)}
.brand .mark{width:28px;height:28px}
.who{margin-inline-start:auto;display:flex;align-items:center;gap:10px;font-size:14px;color:#ccc}
.who .link{color:var(--gold)}
.tabs{display:none}
.bottomnav{position:fixed;inset-inline:0;bottom:0;z-index:20;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
.bottomnav button{border:0;background:none;padding:12px 4px;font-size:13px;font-weight:600;color:var(--muted);border-top:3px solid transparent}
.bottomnav button[aria-current=page]{color:var(--tide);border-top-color:var(--gold-deep)}
@media(min-width:720px){
  .shell{padding-bottom:40px}
  .bottomnav{display:none}
  .tabs{display:flex;gap:4px;margin-inline-start:12px}
  .tabs button{border:0;background:none;padding:8px 14px;border-radius:8px;font-weight:600;color:#ccc}
  .tabs button[aria-current=page]{background:rgba(189,180,171,.18);color:var(--gold)}
}
.page{max-width:980px;margin:0 auto;padding:22px 16px}
.page>h1{font-size:24px;margin-bottom:4px}
.page>.sub{color:var(--muted);margin-bottom:20px}
.sect{margin-top:30px}
.sect>h2{font-size:17px;margin-bottom:12px;display:flex;align-items:baseline;gap:10px}
.sect>h2 small{font-size:13px;font-weight:500;color:var(--muted)}

/* ---------- شريط الأرقام ---------- */
.stats{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}
.stat{padding:16px 16px 14px;border-inline-start:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}
.stat:nth-child(odd){border-inline-start:0}
.stat:nth-last-child(-n+2){border-bottom:0}
.stat b{display:block;font-size:30px;line-height:1.1;font-weight:800}
.stat span{display:block;margin-top:4px;font-size:13px;color:var(--muted)}
.stat em{font-style:normal;font-size:15px;font-weight:600;color:var(--muted)}
.stat.warn b{color:var(--warn)} .stat.bad b{color:var(--bad)}
@media(min-width:720px){
  .stats{grid-template-columns:repeat(4,1fr)}
  .stat,.stat:nth-child(odd){border-inline-start:1px solid var(--line-soft);border-bottom:0}
  .stat:first-child{border-inline-start:0}
}

/* ---------- لوحة المفاتيح ---------- */
.keys{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.key{position:relative;text-align:start;border:0;background:var(--surface);padding:14px 12px 10px;border-radius:4px 4px 12px 12px;box-shadow:inset 0 0 0 1px var(--line);min-height:92px;display:flex;flex-direction:column;gap:2px}
.key::before{content:"";position:absolute;top:8px;inset-inline-end:10px;width:10px;height:10px;border-radius:50%;background:var(--paper);box-shadow:inset 0 0 0 1.5px var(--line)}
.key:hover{box-shadow:inset 0 0 0 1.5px var(--tide)}
.key b{font-size:15px;padding-inline-end:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.key span{font-size:13px;color:var(--muted)}
.key .band{margin-top:auto;padding-top:8px;font-size:13px;font-weight:700}
.key[data-s=active]{border-bottom:5px solid var(--ok)} .key[data-s=active] .band{color:var(--ok)}
.key[data-s=expiring]{border-bottom:5px solid var(--brass)} .key[data-s=expiring] .band{color:var(--warn)}
.key[data-s=expired]{border-bottom:5px solid var(--bad)} .key[data-s=expired] .band{color:var(--bad)}
.key[data-s=suspended],.key[data-s=upcoming],.key[data-s=none]{border-bottom:5px solid #9aa6a3} .key[data-s=suspended] .band,.key[data-s=upcoming] .band,.key[data-s=none] .band{color:var(--off)}

/* ---------- قوائم ---------- */
.list{background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.item{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;border:0;background:none;text-align:start;border-bottom:1px solid var(--line-soft)}
.item:last-child{border-bottom:0}
button.item:hover{background:var(--paper)}
.item .main{flex:1;min-width:0}
.item .main b{display:block;font-size:16px}
.item .main span{display:block;font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}
.item .side{text-align:end;font-size:13px;color:var(--muted);white-space:nowrap}
.badge{display:inline-block;padding:2px 10px;border-radius:999px;font-size:12.5px;font-weight:700;white-space:nowrap}
.badge.active{background:var(--ok-soft);color:var(--ok)}
.badge.expiring{background:var(--warn-soft);color:var(--warn)}
.badge.expired{background:var(--bad-soft);color:var(--bad)}
.badge.suspended,.badge.upcoming,.badge.none{background:var(--off-soft);color:var(--off)}
.empty{padding:34px 20px;text-align:center;color:var(--muted)}
.empty b{display:block;color:var(--ink);font-size:17px;margin-bottom:4px}
.empty .btn{margin-top:14px}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.toolbar .input{flex:1 1 200px}
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;margin-bottom:14px;scrollbar-width:none}
.chip{flex:none;border:1.5px solid var(--line);background:var(--surface);padding:6px 14px;border-radius:999px;font-size:14px;font-weight:600;color:var(--muted)}
.chip[aria-pressed=true]{background:var(--tide);border-color:var(--tide);color:#fff}

/* ---------- نافذة سفلية ---------- */
.scrim{position:fixed;inset:0;z-index:50;background:rgba(7,28,26,.5);display:flex;align-items:flex-end;justify-content:center}
.sheet{width:100%;max-width:560px;max-height:92dvh;overflow-y:auto;background:var(--surface);border-radius:18px 18px 0 0;padding:20px 20px calc(24px + env(safe-area-inset-bottom));animation:up .18s ease-out}
.sheet-h{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.sheet-h h2{font-size:19px}
.x{border:0;background:var(--paper);width:36px;height:36px;border-radius:50%;font-size:20px;line-height:1;color:var(--muted)}
@keyframes up{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
@media(min-width:720px){.scrim{align-items:center}.sheet{border-radius:16px}}
@media(prefers-reduced-motion:reduce){.sheet{animation:none}}
.kv{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:0 0 18px;font-size:15px}
.kv dt{color:var(--muted)} .kv dd{margin:0;font-weight:600}
.actions{display:grid;gap:10px;margin-top:6px}
.cred{margin:14px 0;padding:14px;border-radius:10px;background:var(--paper);border:1px dashed var(--line)}
.cred div{display:flex;justify-content:space-between;gap:10px;padding:4px 0}
.cred b{font-size:18px;letter-spacing:.04em}
.divider{height:1px;background:var(--line-soft);margin:18px 0}

/* ---------- المالك ---------- */
.plan{border-radius:14px;padding:22px 20px;background:var(--tide);color:#fff}
.plan[data-s=expiring]{background:#7d5410}
.plan[data-s=expired],.plan[data-s=suspended]{background:#5c2420}
.plan .badge{background:rgba(255,255,255,.18);color:#fff}
.plan .big{margin:14px 0 2px;font-size:44px;font-weight:800;line-height:1}
.plan .big small{font-size:18px;font-weight:600;opacity:.85;margin-inline-start:6px}
.plan p{opacity:.88;font-size:15px}
.meter{height:8px;border-radius:99px;background:rgba(255,255,255,.2);overflow:hidden;margin:18px 0 6px}
.meter i{display:block;height:100%;background:var(--brass-soft);border-radius:99px}
.plan .use{font-size:14px;opacity:.9}
.soon .item{cursor:default}
.soon .item .side{font-weight:600}

/* ---------- إشعارات ---------- */
#toasts{position:fixed;z-index:80;inset-inline:0;top:calc(env(safe-area-inset-top) + 12px);display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none;padding:0 16px}
.toast{max-width:420px;padding:11px 16px;border-radius:10px;background:var(--ink);color:#fff;font-size:15px;box-shadow:0 6px 20px rgba(0,0,0,.2)}
.toast.bad{background:var(--bad)}
.loading{padding:60px 20px;text-align:center;color:var(--muted)}

/* ---------- المصادقة والحساب ---------- */
.steps{margin:0 0 14px;padding-inline-start:20px;color:var(--muted);font-size:15px}
.steps li{margin-bottom:6px}
.qr{display:flex;justify-content:center;margin:6px 0 12px}
.qr img{width:220px;height:220px;border:1px solid var(--line);border-radius:12px;background:#fff}
.keytext{display:block;padding:12px;border-radius:10px;background:var(--paper);border:1px dashed var(--line);font-weight:700;letter-spacing:.08em;text-align:center;word-break:break-all;margin-bottom:14px}
.codes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0;padding:14px;border-radius:10px;background:var(--paper);border:1px dashed var(--line)}
.codes b{font-size:17px;letter-spacing:.06em;text-align:center;padding:4px 0}
.banner{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:0 0 16px;padding:12px 14px;border-radius:12px;background:var(--brass-soft);color:#4a4339;font-size:14.5px}
.banner .btn{flex:none}
.banner.info{background:var(--tide-soft);color:var(--tide-ink)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px;margin-bottom:12px}
.card h3{font-size:16px;margin-bottom:4px}
.card p{color:var(--muted);font-size:14.5px;margin-bottom:12px}
.card .state{display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:14px;margin-bottom:8px}
.dot{width:9px;height:9px;border-radius:50%;background:var(--off)} .dot.on{background:var(--ok)}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
.grid3 .btn{padding:0 6px}

/* ---------- مالية ---------- */
.bars{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;align-items:end;height:190px;padding:14px 12px 8px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.bars>div{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;gap:4px;min-width:0}
.bars small{font-size:11.5px;color:var(--muted);white-space:nowrap}
.bars b{font-size:12px}
.bars i{display:block;width:70%;max-width:38px;min-height:3px;border-radius:5px 5px 2px 2px;background:var(--tide)}
.bars>div:last-child i{background:var(--gold-deep)}
.money{font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap}
.row-del{border:0;background:var(--bad-soft);color:var(--bad);border-radius:8px;padding:6px 10px;font-size:13px;font-weight:600}
.linkrow{display:flex;flex-wrap:wrap;gap:10px}
.linkrow .btn{flex:1 1 230px}
.ann{display:flex;gap:10px;align-items:flex-start;padding:12px 16px;border-bottom:1px solid var(--line-soft)}
.ann:last-child{border-bottom:0}
.ann p{flex:1;margin:0;color:var(--ink)}
.announce{margin:0 0 14px;padding:12px 14px;border-radius:12px;background:var(--tide-soft);color:var(--tide-ink);display:flex;gap:10px}
.announce b{flex:none}

/* ---------- أوقات الدوام ---------- */
.hrow{display:grid;grid-template-columns:minmax(96px,1fr) minmax(0,2fr);gap:10px;align-items:center;padding:10px 16px;border-bottom:1px solid var(--line-soft)}
.hrow:last-child{border-bottom:0}
.hrow .check{margin:0}
.times{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:6px;align-items:center;direction:ltr}
.times .input{min-width:0;min-height:42px;padding:6px 8px;font-size:15px}
.times span{color:var(--muted)}
.times .input{font-size:14px;padding:6px 4px;text-align:center}
.times input[type=time]::-webkit-calendar-picker-indicator{display:none}

/* ---------- المرحلة ٣: حجوزات، مهام، محادثة، ضيف، عامل ---------- */
.bell{position:relative;border:0;background:none;font-size:20px;padding:4px 6px;color:#fff}
.bell-n{position:absolute;top:-4px;inset-inline-start:-4px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:var(--bad);color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}
.item.unread{background:var(--brass-soft)}
.item .when{font-size:12px;color:var(--muted)}
.item[disabled]{opacity:.55;cursor:not-allowed}
.bigbtn{min-height:64px;font-size:20px}
.vid{width:100%;max-height:340px;border-radius:10px;background:#000;margin-bottom:10px}
.strip{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:8px 8px 6px}
.strip-row{display:grid;grid-template-columns:72px repeat(14,minmax(18px,1fr));gap:3px;align-items:center;margin-bottom:4px;min-width:420px}
.strip-row .un{font-size:12px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.strip-row.head span{font-size:10px;text-align:center;color:var(--muted);line-height:1.2}
.strip-row.head b{display:block;font-size:11px;color:var(--ink)}
.strip-row i{display:block;height:22px;border-radius:5px;background:var(--line-soft)}
.strip-row i.bk{background:#2f6f9f}.strip-row i.blk{background:#8d8d8d}.strip-row i.conf{background:var(--bad)}
.chat{display:flex;flex-direction:column;gap:10px}
.msgs{height:min(56vh,460px);overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.msg{max-width:82%;padding:8px 12px;border-radius:14px;font-size:15px;word-break:break-word;white-space:pre-wrap}
.msg small{display:block;margin-top:2px;font-size:11px;opacity:.65}
.msg.mine{align-self:flex-start;background:var(--tide);color:#fff;border-end-start-radius:4px}
.msg.theirs{align-self:flex-end;background:var(--tide-soft);border-end-end-radius:4px}
.msg em{font-style:normal;opacity:.85}
.photo{border:0;background:rgba(0,0,0,.06);border-radius:10px;padding:10px 12px;font-weight:700;text-align:start}
.photo small{display:block;font-weight:400;opacity:.7}
.composer{display:flex;gap:8px;align-items:center}
.composer .input{flex:1;min-height:42px}
.viewer{position:fixed;inset:0;z-index:100;background:#000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:12px}
.viewer img{max-width:100%;max-height:78vh;object-fit:contain;border-radius:8px}
.viewer-bar{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}

/* ---------- صور الوحدة، الشعار، إثبات التنظيف ---------- */
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
.pitem{margin:0;border:1px solid var(--line-soft);border-radius:10px;overflow:hidden;background:var(--surface);display:flex;flex-direction:column}
.pitem img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.pitem figcaption{padding:6px 8px;font-size:13px;display:flex;flex-direction:column;gap:2px}
.pitem figcaption span{color:var(--muted)}
.pitem .btn{margin:0 8px 8px}
.thumb{width:56px;height:56px;border-radius:10px;object-fit:cover;flex:none;background:var(--tide-soft)}
.thumb.ph{display:grid;place-items:center;font-size:22px}
.logo-prev{min-height:96px;display:grid;place-items:center;background:var(--paper);border:1px dashed var(--line);border-radius:10px;margin-top:8px;padding:10px}
.logo-prev img{max-width:200px;max-height:110px;object-fit:contain}
.logo-prev span{color:var(--muted)}
.mark.owner-logo{object-fit:contain;border-radius:8px}
.proof{margin:0 0 12px}
.proof figcaption{font-size:14px;margin-bottom:4px}
.chat-policy{margin:0 0 8px;font-size:13px}
.msg.auto{border:1px dashed var(--line)}
.autotag{display:block;font-size:11px;color:var(--muted);margin-bottom:2px}
.viewer video{max-width:100%;max-height:78vh;border-radius:8px}
.lang-switch{position:fixed;top:10px;inset-inline-start:10px;z-index:50}
.lang-switch button{min-height:34px;padding:0 12px;border-radius:999px;border:1.5px solid var(--tide);background:var(--surface);font-weight:700;font-size:13px}
.lang-btn{min-height:34px;padding:0 12px;border-radius:999px;border:1.5px solid var(--line);background:var(--surface);font-weight:700;font-size:13px}
.lang-btn:hover{background:var(--tide-soft)}
.lang-fixed{position:fixed;top:10px;inset-inline-end:10px;z-index:60}
html[dir=ltr] body{font-family:"Segoe UI",system-ui,-apple-system,Roboto,"Noto Sans","DejaVu Sans",Arial,sans-serif}
.who .link,.who .lang-btn{white-space:nowrap}

/* ===== 1.2 ===== */
.stars{display:flex;gap:6px;justify-content:center;direction:ltr}
.star{border:0;background:none;font-size:38px;line-height:1;color:var(--line);padding:2px 4px;cursor:pointer}
.star.on{color:#d9a400}
.stars-s{font-size:14px;color:#b88700;white-space:nowrap;direction:ltr}

/* ===== 1.3 ===== */
.page.narrow{max-width:560px;margin-inline:auto}
.btn.wa{background:#1fa855;color:#fff;border-color:#1fa855}
.btn.wa:hover{background:#188a45}
.chip.alert{border-color:var(--warn);background:var(--warn-soft);color:var(--warn)}
.chip.alert.bad{border-color:var(--bad);background:var(--bad-soft);color:var(--bad)}
.swatches{display:flex;flex-wrap:wrap;gap:8px}
.swatch{display:flex;align-items:center;gap:6px;border:2px solid var(--line);border-radius:999px;padding:6px 12px;font-size:13px;font-weight:600;color:#1d1d1d;cursor:pointer}
.swatch i{width:16px;height:16px;border-radius:50%;display:inline-block}
.swatch[aria-pressed=true]{outline:3px solid var(--tide);outline-offset:2px}

/* صفحة الضيف باسم المالك */
.gwrap{min-height:100vh;background:var(--paper)}
.preview-bar{position:sticky;top:0;z-index:40;display:flex;justify-content:space-between;align-items:center;gap:8px;background:#1d1d1d;color:#fff;padding:8px 14px;font-size:13px}
.socials{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.soc{display:inline-flex;align-items:center;min-height:38px;padding:0 14px;border-radius:999px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);font-weight:600;font-size:14px;text-decoration:none}
.ginfo{display:grid;gap:8px;margin:10px 0}
.gfoot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding:18px 16px 90px;font-size:13px;color:var(--muted);border-top:1px solid var(--line-soft);margin-top:24px}
.a2hs{border:1.5px dashed var(--g-accent,var(--gold));background:var(--surface);border-radius:14px;padding:14px;margin-bottom:14px}
.agreement-text,.agreement-doc{white-space:pre-wrap;line-height:1.9;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px;max-height:40vh;overflow:auto}
.sigpad{display:block;width:100%;height:160px;touch-action:none;background:#fff;border:1.5px solid var(--line);border-radius:12px}
.sigimg{max-width:100%;border:1px solid var(--line);border-radius:10px;background:#fff}

/* الصفحة التعريفية والتسجيل */
.lhero{padding:56px 20px 44px;text-align:center;background:var(--tide);color:#fff}
.lhero h1{font-size:clamp(26px,6vw,42px);margin:0 0 12px;color:#fff}
.lhero p{max-width:620px;margin:0 auto 20px;color:#ddd;line-height:1.8}
.lcontact{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.lsec{max-width:960px;margin:0 auto;padding:36px 20px}
.lsec h2{margin:0 0 14px}
.lead{line-height:1.9;font-size:17px;max-width:720px}
.lgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.lcard{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px}
.lcard h3{margin:0 0 6px}.lcard p{margin:0;color:var(--muted);line-height:1.7}
details.faq{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:8px}
details.faq summary{cursor:pointer;font-weight:700}
details.faq p{margin:8px 0 0;color:var(--muted);line-height:1.8}
.lcta{text-align:center}
.lfoot{background:#1d1d1d;color:#ddd;margin-top:30px;padding:30px 20px 20px}
.lfoot a,.lfoot .link{color:#bdb4ab}
.lfoot-in{max-width:960px;margin:0 auto;display:grid;gap:16px}
.lfoot-links{display:flex;flex-wrap:wrap;gap:14px}
.lcopy{font-size:13px;color:#999;border-top:1px solid #333;padding-top:12px}
.wa-float{position:fixed;inset-inline-end:16px;bottom:20px;width:54px;height:54px;border-radius:50%;background:#1fa855;color:#fff;display:flex;align-items:center;justify-content:center;font-size:26px;text-decoration:none;box-shadow:0 4px 14px rgba(0,0,0,.25);z-index:30}
.authlinks{display:flex;flex-wrap:wrap;gap:14px;justify-content:center;margin-top:14px}

/* طباعة الاتفاقية */
@media print{
  body.printing > *:not(.scrim){display:none!important}
  body.printing .scrim{position:static!important;background:none!important}
  body.printing .no-print,body.printing .sheet-close,body.printing .actions{display:none!important}
  body.printing .sheet{position:static!important;box-shadow:none!important;max-height:none!important;overflow:visible!important}
}

/* الفاتورة */
.inv-page{max-width:760px;margin:0 auto;padding:18px 16px 40px;background:#fff;color:#1d1d1d}
.inv-head{text-align:center;border-bottom:3px solid #1d1d1d;padding-bottom:14px;margin-bottom:14px}
.inv-head h1{margin:6px 0 2px;font-size:22px}.inv-logo{max-height:84px;max-width:220px;object-fit:contain}
.inv-sub{color:#555;font-size:14px;margin-top:2px}.inv-title{text-align:center;font-size:22px;margin:10px 0}
.inv-page h2{font-size:17px;margin:18px 0 8px}.inv-table{width:100%;border-collapse:collapse}
.inv-table th,.inv-table td{border:1px solid #333;padding:8px 10px;text-align:start;font-size:15px}.inv-table th{background:#f3f1ee;width:46%}
.inv-banner{border-radius:12px;padding:12px;text-align:center;font-weight:700;margin:10px 0}
.inv-banner.ok{background:#e7f5ec;color:#1b6b3a}.inv-banner.warn{background:#fff4e0;color:#8a5a00}.inv-banner.bad{background:#fde8e8;color:#a12020}
.inv-note{color:#555;font-size:14px}.inv-foot{display:flex;gap:16px;align-items:center;border-top:2px solid #1d1d1d;margin-top:22px;padding-top:14px}
.inv-qr{width:110px;height:110px}.inv-ok{color:#1b6b3a}.inv-bad{color:#a12020}
.inv-terms .agreement-text{font-size:13px;line-height:1.8}
@media print{.inv-page .no-print{display:none!important}.inv-page{padding:0}}
.inv-table td{unicode-bidi:plaintext}
.inv-terms .agreement-text{max-height:none!important;overflow:visible!important}

/* ===== 1.7: الصفحة الرئيسية للموقع ===== */
.kl-head{position:sticky;top:0;z-index:30;background:#1d1d1dee;backdrop-filter:blur(8px);border-bottom:1px solid #ffffff1a}
.kl-head-in{max-width:1080px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.kl-brand{display:flex;align-items:center;gap:10px;color:#fff;font-weight:800;font-size:20px;text-decoration:none}
.kl-head-act{display:flex;align-items:center;gap:10px}
.kl-login{background:#bdb4ab;color:#1d1d1d;font-weight:800}
.kl-burger{width:44px;height:44px;border:1px solid #ffffff33;background:none;border-radius:12px;display:grid;place-content:center;gap:5px;cursor:pointer}
.kl-burger i{display:block;width:22px;height:2px;background:#fff;border-radius:2px}
.kl-scrim{position:fixed;inset:0;background:#0007;opacity:0;pointer-events:none;transition:opacity .2s;z-index:40}
.kl-scrim.on{opacity:1;pointer-events:auto}
.kl-drawer{position:fixed;top:0;bottom:0;inset-inline-end:0;width:min(86vw,330px);background:#fff;z-index:41;transform:translateX(110%);transition:transform .25s;box-shadow:-8px 0 30px #0004;display:flex;flex-direction:column}
[dir=rtl] .kl-drawer{transform:translateX(-110%);box-shadow:8px 0 30px #0004}
.kl-drawer.on{transform:none}
.kl-drawer-h{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;background:#1d1d1d;color:#fff}
.kl-drawer-h .x{background:none;border:0;color:#fff;font-size:28px;cursor:pointer}
.kl-mi{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line-soft);color:var(--ink);text-decoration:none;font-weight:700;font-size:17px}
.kl-mi:hover{background:var(--tide-soft)}
.kl-hero{position:relative;color:#fff;text-align:center;background:linear-gradient(135deg,#1d1d1d 0%,#2c2824 55%,#4a423a 100%);background-size:cover;background-position:center;overflow:hidden}
.kl-hero::before{content:"";position:absolute;inset:0;background:var(--hero,none) center/cover;opacity:.45}
.kl-hero::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 80% 10%,#bdb4ab33,transparent 55%)}
.kl-hero-in{position:relative;z-index:1;max-width:760px;margin:0 auto;padding:72px 20px 80px}
.kl-pill{display:inline-block;padding:6px 14px;border:1px solid #bdb4abaa;border-radius:999px;color:#e6e0d9;font-size:13px;margin-bottom:18px}
.kl-hero h1{font-size:clamp(30px,7vw,52px);line-height:1.25;margin:0 0 14px;color:#fff}
.kl-hero p{font-size:clamp(16px,3.5vw,19px);line-height:1.9;color:#ddd6cd;margin:0 auto 26px;max-width:620px}
.kl-cta{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.kl-btn{background:#bdb4ab;color:#1d1d1d;font-weight:800;min-height:50px;padding:0 28px;font-size:17px;border-radius:14px}
.kl-cta .kl-btn2{border:2px solid #ffffff88;color:#fff;min-height:50px;padding:0 24px;border-radius:14px;background:transparent}
.kl-sec{max-width:1040px;margin:0 auto;padding:46px 18px}
.kl-sec>h2{font-size:clamp(22px,5vw,30px);margin:0 0 22px;text-align:center}
.kl-sec>h2::after{content:"";display:block;width:54px;height:3px;background:#bdb4ab;border-radius:3px;margin:10px auto 0}
.kl-alt{max-width:none;background:#ece8e3}
.kl-alt>*{max-width:1040px;margin-inline:auto}
.kl-lead{font-size:18px;line-height:2;color:var(--muted);text-align:center;max-width:760px}
.kl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}
.kl-card{background:#fff;border:1px solid var(--line-soft);border-radius:18px;padding:22px 18px;box-shadow:0 4px 18px #0000000d;transition:transform .15s}
.kl-card:hover{transform:translateY(-3px)}
.kl-card img{width:100%;height:150px;object-fit:cover;border-radius:12px;margin-bottom:12px}
.kl-ic{display:grid;place-content:center;width:54px;height:54px;border-radius:16px;background:#1d1d1d;font-size:26px;margin-bottom:12px}
.kl-card h3{margin:0 0 6px;font-size:18px}.kl-card p{margin:0;color:var(--muted);line-height:1.8}
.kl-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px}
.kl-steps li{display:flex;gap:14px;align-items:flex-start;background:#fff;border-radius:16px;padding:18px}
.kl-n{flex:0 0 40px;height:40px;border-radius:50%;background:#1d1d1d;color:#bdb4ab;display:grid;place-content:center;font-size:18px}
.kl-steps h3{margin:0 0 4px}.kl-steps p{margin:0;color:var(--muted);line-height:1.7}
.kl-banners{padding-top:26px;padding-bottom:6px}
.kl-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:0;border-radius:20px;scrollbar-width:none}
.kl-track::-webkit-scrollbar{display:none}
.kl-slide{flex:0 0 100%;scroll-snap-align:start;min-height:230px;background:#2c2824 center/cover;color:#fff;display:flex;align-items:flex-end;padding:26px}
.kl-slide h2{margin:0 0 6px;font-size:26px;color:#fff;text-align:start}.kl-slide p{margin:0 0 12px;color:#eee;max-width:520px;line-height:1.8}
.kl-dots{display:flex;gap:8px;justify-content:center;margin-top:12px}
.kl-dots button{width:10px;height:10px;border-radius:50%;border:0;background:#ccc;padding:0;cursor:pointer}.kl-dots button.on{background:#1d1d1d;width:26px;border-radius:6px}
.kl-hours{text-align:center;color:var(--muted)}
.kl-contact{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:14px}
.kl-ctasec{text-align:center}
@media (max-width:420px){.bottomnav button{font-size:11.5px;padding:12px 1px}}
@media (max-width:560px){.kl-grid{grid-template-columns:1fr 1fr;gap:10px}.kl-card{padding:14px 12px}.kl-card h3{font-size:15px}.kl-card p{font-size:13px;line-height:1.7}.kl-ic{width:44px;height:44px;font-size:22px}}

/* ===== 1.7.1: مستند A4 وجرس الضيف ===== */
.kl-docwrap{position:fixed;inset:0;z-index:80;background:#e4e0da;overflow:auto}
.kl-doctools{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 14px;background:#1d1d1d;color:#fff}
.kl-paper{max-width:794px;margin:16px auto;background:#fff;color:#111;padding:36px 32px;border-radius:6px;box-shadow:0 6px 24px #0003;line-height:2;font-size:15px}
.kl-paper h1{text-align:center;font-size:24px;margin:0 0 4px;border-bottom:3px double #1d1d1d;padding-bottom:10px}
.kl-sub{text-align:center;color:#555;margin:8px 0 18px}
.kl-clause{margin:0 0 8px;text-align:justify}
.kl-party{margin-top:22px;padding-top:14px;border-top:1px solid #ccc}.kl-party p{margin:2px 0}
.kl-sign{max-width:220px;border-bottom:1px solid #999;margin-top:8px}
@media print{body>*:not(.kl-docwrap){display:none!important}.kl-docwrap{position:static;background:#fff;overflow:visible}.kl-doctools{display:none}.kl-paper{box-shadow:none;margin:0;max-width:none;padding:0}}

/* ===== 1.7.2: بطاقة دفع التمديد ===== */
.kl-extcard{border:2px solid #2e7d4f;background:#f6fbf8}
.kl-exthead{display:flex;gap:12px;align-items:center;margin-bottom:10px}.kl-exthead small{display:block;color:var(--muted)}
.kl-ok{width:38px;height:38px;border-radius:50%;background:#2e7d4f;color:#fff;display:grid;place-content:center;font-size:20px}
.kl-prow{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 0;border-bottom:1px dashed #0002}
.kl-total b{font-size:22px;color:#1d1d1d}
