/* مركز النهج — Designed by IQ */
/* =============================================================
   مركز النهج — نظام التصميم
   الألوان مأخوذة من شعار المركز: كحلي النواة وتركوازي الحلقات.
   مبادئ Apple HIG: لون مميز واحد للتفاعل، تسلسل بصري بالحجم والوزن،
   قوائم مجمّعة، أوراق (Sheets) للمهام القصيرة، أهداف لمس 44px.
   ============================================================= */
:root{
  --navy-950:#081E33; --navy-900:#0D2A45; --navy-800:#123758; --navy-700:#1B4A70;
  --teal-700:#1F6469; --teal-600:#2A7A80; --teal-500:#3A9097; --teal-200:#B5DADC; --teal-100:#D6EBEC; --teal-50:#EBF5F5;
  --label:#08131D; --label-2:#2E3C49; --label-3:#4D5B67; --label-4:#A3AEB8;
  --bg:#F2F4F6; --surface:#FFFFFF; --fill:#F4F6F8; --fill-2:#EAEEF1;
  --sep:#E3E8EC; --sep-strong:#D3DAE0;
  --green:#1D7A4B; --green-bg:#E3F2EA; --orange:#965A0C; --orange-bg:#FBEFDA; --red:#AE3327; --red-bg:#F8E3E0; --blue:#2A5C97; --blue-bg:#E4ECF7;
  --r-sm:8px; --r-md:12px; --r-lg:16px;
  --font:"Amiri","Traditional Arabic","Simplified Arabic","Times New Roman",serif;
  --shadow-sheet:0 24px 60px rgba(8,30,51,.22),0 2px 8px rgba(8,30,51,.10);
  --hit:40px;
}
@media (pointer:coarse){:root{--hit:44px}}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{font-family:var(--font);background:var(--bg);color:var(--label);font-size:18px;line-height:1.7;-webkit-font-smoothing:auto;-webkit-text-stroke:.25px currentColor;text-rendering:optimizeLegibility}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--teal-700);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{margin:0;font-weight:700;letter-spacing:0;line-height:1.4}
.num{direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums lining-nums;white-space:nowrap}
.dt{white-space:nowrap}
.code{white-space:nowrap;direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums;color:var(--label-2)}
.muted{color:var(--label-3)}
.small{font-size:16px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
svg.i{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
svg.i.sm{width:17px;height:17px}
svg.i.lg{width:24px;height:24px}
:focus-visible{outline:2.5px solid var(--teal-600);outline-offset:2px;border-radius:6px}

/* ---------- الهيكل ---------- */
.app{display:grid;grid-template-columns:264px minmax(0,1fr);min-height:100vh}
.side{background:var(--navy-900);color:#C6D3E0;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto;z-index:40}
.brand{display:flex;align-items:center;gap:12px;padding:20px 18px;border-bottom:1px solid rgba(255,255,255,.07)}
.brand img{width:48px;height:48px;border-radius:50%;flex:none;box-shadow:0 0 0 2px rgba(181,218,220,.35)}
.brand b{display:block;color:#fff;font-size:19px;line-height:1.35}
.brand span{display:block;font-size:15px;color:#9DB2C6;line-height:1.4}
.nav{padding:10px 0 16px;flex:1}
.nav-g{padding:16px 24px 4px;font-size:15px;color:#8AA1B8}
.nav a{display:flex;align-items:center;gap:12px;min-height:44px;margin:2px 12px;padding:0 12px;border-radius:10px;color:#D3DEE9;font-size:18px;cursor:pointer;text-decoration:none}
.nav a:hover{background:rgba(255,255,255,.06);color:#fff}
.nav a.on{background:var(--teal-600);color:#fff}
.nav a .cnt{margin-inline-start:auto;font-size:15px;background:rgba(255,255,255,.14);border-radius:10px;padding:0 8px;line-height:22px}
.side-foot{padding:14px 16px;border-top:1px solid rgba(255,255,255,.07)}
.who{display:flex;align-items:center;gap:10px}
.avatar{width:36px;height:36px;border-radius:50%;background:#1E4C74;color:#fff;display:grid;place-items:center;font-weight:700;flex:none}
.who b{display:block;color:#fff;font-size:17px;line-height:1.3}
.who span{display:block;font-size:15px;color:#9DB2C6;line-height:1.3}
.role-sel{margin-top:10px;width:100%;height:38px;border-radius:8px;background:#0B2238;border:1px solid #23486E;color:#DCE6F0;padding:0 8px;font-size:16px}
.btn-link{margin-top:8px;color:#A9BCCE;background:none;border:0;display:flex;gap:8px;align-items:center;cursor:pointer;padding:4px 0;font-size:16px}
.main{min-width:0;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:30;background:rgba(242,244,246,.96);border-bottom:1px solid var(--sep);display:flex;align-items:center;gap:14px;padding:12px 32px;min-height:72px}
.topbar h1{font-size:27px}
.topbar .sub{font-size:16px;color:var(--label-3);line-height:1.3}
.topbar .grow{flex:1}
.menu-btn{display:none}
.page{padding:24px 32px 64px;max-width:1360px;width:100%}

/* ---------- الأزرار والحقول ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--hit);padding:0 16px;border-radius:10px;border:0;background:var(--fill-2);color:var(--label);font-weight:700;font-size:17px;cursor:pointer;white-space:nowrap;transition:background .12s,transform .06s;text-decoration:none}
.btn:hover{background:#E1E6EA;text-decoration:none}
.btn:active{transform:scale(.98)}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}
.btn.primary{background:var(--teal-600);color:#fff}
.btn.primary:hover{background:var(--teal-700)}
.btn.tinted{background:var(--teal-50);color:var(--teal-700)}
.btn.tinted:hover{background:var(--teal-100)}
.btn.danger{background:var(--red-bg);color:var(--red)}
.btn.danger.solid{background:var(--red);color:#fff}
.btn.plain{background:transparent;color:var(--teal-700);padding:0 8px}
.btn.plain:hover{background:var(--teal-50)}
.btn.sm{min-height:34px;padding:0 12px;font-size:16px;border-radius:8px}
.btn.icon{width:var(--hit);padding:0}
.btn.sm.icon{width:34px}
.input,.select{min-height:var(--hit);border:1px solid transparent;border-radius:10px;background:var(--fill);padding:0 12px;width:100%;font-size:18px;transition:border-color .12s,background .12s}
textarea.input{min-height:76px;padding:8px 12px;resize:vertical;line-height:1.6}
.input:hover,.select:hover{background:var(--fill-2)}
.input:focus,.select:focus{outline:none;border-color:var(--teal-600);background:#fff;box-shadow:0 0 0 3px var(--teal-100)}
.input.num-in{direction:ltr;text-align:right;font-variant-numeric:tabular-nums}
.input[aria-invalid=true]{border-color:var(--red);background:#fff}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field>label{font-size:16px;font-weight:700;color:var(--label-2)}
.field .hint{font-size:15px;color:var(--label-3)}
.search{position:relative}
.search svg{position:absolute;inset-inline-start:12px;top:50%;transform:translateY(-50%);color:var(--label-3)}
.search .input{padding-inline-start:40px}
.seg{display:inline-flex;background:var(--fill-2);border-radius:10px;padding:3px;gap:2px;max-width:100%;overflow-x:auto}
.seg button{border:0;background:transparent;min-height:34px;padding:0 14px;border-radius:8px;font-weight:700;font-size:16px;color:var(--label-2);cursor:pointer;white-space:nowrap}
.seg button.on{background:var(--surface);color:var(--label);box-shadow:0 1px 3px rgba(16,33,49,.14)}
.seg.wide{display:flex}
.seg.wide button{flex:1;min-height:40px;font-size:17px}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.row.between{justify-content:space-between}
.grid{display:grid;gap:20px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g-main{grid-template-columns:minmax(0,1.75fr) minmax(0,1fr)}
.g-today{grid-template-columns:minmax(0,2.1fr) minmax(300px,1fr)}
.stack{display:flex;flex-direction:column;gap:20px}

/* ---------- مجموعات وقوائم (نمط القوائم المجمّعة) ---------- */
.sec-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 4px 8px}
.sec-title h2,.sec-title h3{font-size:21px}
.sec-title .note{font-size:16px;color:var(--label-3)}
.group{background:var(--surface);border-radius:var(--r-md);box-shadow:0 1px 2px rgba(16,33,49,.05);min-width:0;overflow:hidden}
.group-h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--sep);flex-wrap:wrap}
.group-h h3{font-size:20px}
.group-h .note{font-size:16px;color:var(--label-3)}
.group-b{padding:16px 18px}
.list-row{display:flex;align-items:center;gap:14px;padding:12px 18px;position:relative;min-height:56px}
.list-row+.list-row::before{content:"";position:absolute;top:0;inset-inline-start:18px;inset-inline-end:0;border-top:1px solid var(--sep)}
.list-row .grow{flex:1;min-width:0}
.list-row .t{font-weight:700;font-size:18px;line-height:1.4}
.list-row .s{font-size:16px;color:var(--label-3);line-height:1.4}
.list-row .v{font-weight:700;font-size:19px}
.list-row.click{cursor:pointer}
.list-row.click:hover{background:var(--fill)}
.kv-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:10px 18px;position:relative}
.kv-row+.kv-row::before{content:"";position:absolute;top:0;inset-inline:18px 0;border-top:1px solid var(--sep)}
.kv-row .l{color:var(--label-2)}
.kv-row .v{font-weight:700}
.kv-row.total{background:var(--teal-50)}
.kv-row.total .l,.kv-row.total .v{color:var(--teal-700);font-weight:700}

/* أرقام اليوم */
.summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.summary>div{padding:18px 20px;position:relative}
.summary>div+div::before{content:"";position:absolute;inset-block:18px;inset-inline-start:0;border-inline-start:1px solid var(--sep)}
.summary .l{font-size:17px;color:var(--label-2);font-weight:700}
.summary .v{font-size:32px;font-weight:700;line-height:1.3;margin-top:2px}
.summary .v small{font-size:16px;color:var(--label-3);font-weight:400;margin-inline-start:6px}
.summary .d{font-size:15.5px;color:var(--label-3);line-height:1.5}
.summary .accent .v{color:var(--teal-700)}

/* الجداول */
.tbl-wrap{overflow-x:auto}
.tbl{width:100%;border-collapse:separate;border-spacing:0}
.tbl th{background:var(--surface);text-align:start;font-size:16px;font-weight:700;color:var(--label-3);padding:10px 16px;border-bottom:1px solid var(--sep);white-space:nowrap}
.tbl td{padding:11px 16px;border-bottom:1px solid var(--sep);vertical-align:middle}
.tbl tr:last-child td{border-bottom:0}
.tbl .n{text-align:left;font-variant-numeric:tabular-nums}
.tbl th.n{text-align:left}
.tbl tbody tr.click{cursor:pointer}
.tbl tbody tr.click:hover td{background:var(--fill)}
.tbl tfoot td{background:var(--fill);font-weight:700;border-bottom:0}
.tbl .name{font-weight:700;white-space:nowrap}
.tbl .sub{display:block;font-size:15.5px;color:var(--label-3)}
.tbl tr.cancelled td{color:var(--label-4)}
.tbl tr.cancelled .name{text-decoration:line-through}
.money{font-weight:700;font-variant-numeric:tabular-nums}
.money.pos{color:var(--green)} .money.neg{color:var(--red)}
.opno{display:inline-flex;align-items:center;justify-content:center;min-width:64px;height:30px;padding:0 10px;border-radius:8px;background:var(--teal-50);color:var(--teal-700);font-weight:700;font-variant-numeric:tabular-nums;direction:ltr;font-size:17px}
.pager{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-top:1px solid var(--sep);font-size:16px;color:var(--label-3)}

/* الشارات (نص + لون، لا لون وحده) */
.badge{display:inline-flex;align-items:center;gap:6px;min-height:26px;padding:0 10px;border-radius:13px;font-size:15.5px;font-weight:700;white-space:nowrap;background:var(--fill-2);color:var(--label-2)}
.b-ok{background:var(--green-bg);color:var(--green)} .b-warn{background:var(--orange-bg);color:var(--orange)} .b-danger{background:var(--red-bg);color:var(--red)}
.b-info{background:var(--blue-bg);color:var(--blue)} .b-teal{background:var(--teal-50);color:var(--teal-700)} .b-gray{background:var(--fill-2);color:var(--label-3)}
.chip{white-space:nowrap;display:inline-flex;align-items:center;gap:4px;min-height:24px;padding:0 9px;border-radius:12px;font-size:15px;background:var(--fill-2);color:var(--label-2)}

.empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:40px 20px;color:var(--label-3)}
.empty svg{width:36px;height:36px;color:var(--label-4);stroke-width:1.4}
.empty b{color:var(--label);font-size:19px}
.skeleton{background:linear-gradient(90deg,var(--fill-2),#F7F9FB,var(--fill-2));background-size:200% 100%;animation:sk 1.2s infinite;border-radius:6px;height:16px}
@keyframes sk{to{background-position:-200% 0}}

/* الأجهزة في لوحة اليوم */
.dev{display:flex;align-items:center;gap:14px}
.dev .ico{width:44px;height:44px;border-radius:10px;background:var(--navy-900);display:grid;place-items:center;flex:none}
.dev .ico svg{width:28px;height:28px;stroke:#CFE3EF;fill:none;stroke-width:1.5}
.bar{height:6px;border-radius:3px;background:var(--fill-2);overflow:hidden;margin-top:6px}
.bar i{display:block;height:100%;background:var(--teal-600);border-radius:3px}

/* ---------- الأجهزة ---------- */
.eq-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.eq-pick{display:flex;align-items:center;gap:12px;padding:12px 14px;border:0;border-radius:var(--r-md);background:var(--surface);cursor:pointer;text-align:start;box-shadow:0 1px 2px rgba(16,33,49,.05);outline:2px solid transparent;transition:outline-color .12s}
.eq-pick:hover{outline-color:var(--sep-strong)}
.eq-pick.on{outline-color:var(--teal-600)}
.eq-pick .ico{width:48px;height:48px;border-radius:10px;background:var(--navy-900);display:grid;place-items:center;flex:none}
.eq-pick .ico svg{width:30px;height:30px;stroke:#CFE3EF;fill:none;stroke-width:1.5}
.eq-pick b{display:block;font-size:18px;line-height:1.35}
.eq-pick span{display:block;font-size:15.5px;color:var(--label-3);line-height:1.4}
.stage{position:relative;background:var(--navy-900);border-radius:var(--r-md);overflow:hidden;height:420px;color:#DCE6F0}
.stage .grid-bg{position:absolute;inset:0;background-image:linear-gradient(rgba(124,201,198,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(124,201,198,.06) 1px,transparent 1px);background-size:32px 32px;background-position:center}
.stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block;cursor:grab}
.stage canvas:active{cursor:grabbing}
.stage .fallback{position:absolute;inset:70px 0 60px;display:grid;place-items:center}
.stage .fallback svg{width:auto;height:64%;max-width:60%;stroke:#9FC3D6;fill:none;stroke-width:1.2;stroke-linejoin:round;stroke-linecap:round}
.stage .cap{position:absolute;top:16px;inset-inline-start:20px;z-index:2}
.stage .cap b{display:block;font-size:22px;color:#fff}
.stage .cap span{font-size:16px;color:#9DB2C6}
.stage .ctl{position:absolute;bottom:14px;inset-inline-start:14px;display:flex;gap:6px;z-index:2}
.stage .ctl button{min-height:36px;padding:0 12px;display:inline-flex;align-items:center;gap:6px;border-radius:9px;border:1px solid rgba(255,255,255,.14);background:rgba(8,30,51,.6);color:#DCE6F0;font-size:16px;cursor:pointer}
.stage .ctl button:hover{background:rgba(8,30,51,.85)}
.stage .state{position:absolute;top:20px;inset-inline-end:20px;max-width:42%;text-align:end;font-size:15px;line-height:1.5;color:#9DB2C6;z-index:2}

/* ---------- الأوراق (Sheets) ---------- */
.scrim{position:fixed;inset:0;background:rgba(8,30,51,.38);z-index:80;display:flex;align-items:center;justify-content:center;padding:24px;animation:fade .15s ease}
.sheet{width:min(620px,100%);max-height:calc(100vh - 48px);background:var(--bg);border-radius:var(--r-lg);display:flex;flex-direction:column;box-shadow:var(--shadow-sheet);animation:rise .2s ease;overflow:hidden}
.sheet.wide{width:min(820px,100%)}
.sheet.narrow{width:min(480px,100%)}
.sheet-h{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;padding:12px 14px;background:var(--surface);border-bottom:1px solid var(--sep)}
.sheet-h .lead{justify-self:start}
.sheet-h .trail{justify-self:end}
.sheet-h .ttl{text-align:center;min-width:0}
.sheet-h .ttl h3{font-size:20px}
.sheet-h .ttl div{font-size:15px;color:var(--label-3);line-height:1.3}
.sheet-b{padding:18px 18px 22px;overflow-y:auto;flex:1}
.sheet-f{display:flex;gap:10px;justify-content:flex-end;align-items:center;padding:12px 18px;border-top:1px solid var(--sep);background:var(--surface)}
.sheet-f .grow{flex:1}
@keyframes fade{from{opacity:0}}
@keyframes rise{from{transform:translateY(14px);opacity:0}}
/* نموذج بنمط القوائم المجمّعة */
.fsec{margin-top:18px}
.fsec:first-child{margin-top:0}
.fsec>.fl{font-size:16px;color:var(--label-3);margin:0 6px 6px;font-weight:700}
.fgroup{background:var(--surface);border-radius:var(--r-md);overflow:visible}
.frow{display:grid;grid-template-columns:130px minmax(0,1fr);align-items:center;gap:12px;padding:8px 14px;position:relative;min-height:56px}
.frow+.frow::before{content:"";position:absolute;top:0;inset-inline:14px 0;border-top:1px solid var(--sep)}
.frow>label,.frow>.lbl{font-weight:700;color:var(--label)}
.frow .help{font-size:15px;color:var(--label-3);margin-top:4px;line-height:1.4}
.frow.full{grid-template-columns:minmax(0,1fr)}
.suggest{position:absolute;top:calc(100% - 4px);inset-inline:144px 14px;background:var(--surface);border-radius:10px;box-shadow:var(--shadow-sheet);z-index:5;overflow:hidden}
.suggest button{display:flex;justify-content:space-between;width:100%;border:0;background:none;padding:10px 14px;cursor:pointer;text-align:start;font-size:17px;gap:10px}
.suggest button:hover,.suggest button.on{background:var(--teal-50)}
.picked{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--teal-50);border-radius:10px;padding:6px 6px 6px 12px;padding-inline-start:12px}
.alert{display:flex;gap:10px;align-items:flex-start;padding:10px 14px;border-radius:10px;font-size:16.5px;line-height:1.55}
.alert.warn{background:var(--orange-bg);color:#6F4207}
.alert.danger{background:var(--red-bg);color:#85251C}
.alert.ok{background:var(--green-bg);color:#145534}
.alert.info{background:var(--blue-bg);color:#234D80}
/* تأكيد انتقال المعلومات */
.done-hero{text-align:center;padding:6px 0 16px}
.done-hero .tick{width:56px;height:56px;border-radius:50%;background:var(--green-bg);color:var(--green);display:grid;place-items:center;margin:0 auto 8px}
.done-hero .tick svg{width:30px;height:30px;stroke-width:2.2}
.done-hero .no{font-size:16px;color:var(--label-3)}
.done-hero .no b{display:block;font-size:34px;color:var(--teal-700);line-height:1.2;direction:ltr}
.flow-row{display:flex;gap:12px;align-items:flex-start;padding:11px 16px;position:relative}
.flow-row+.flow-row::before{content:"";position:absolute;top:0;inset-inline:52px 0;border-top:1px solid var(--sep)}
.flow-row .ico{width:28px;height:28px;border-radius:8px;background:var(--teal-50);color:var(--teal-700);display:grid;place-items:center;flex:none;margin-top:2px}
.flow-row .ico svg{width:17px;height:17px}
.flow-row b{display:block;font-size:17.5px;line-height:1.4}
.flow-row .desc{display:block;font-size:16px;color:var(--label-3);line-height:1.5}
.toasts{position:fixed;bottom:20px;inset-inline-end:20px;z-index:120;display:flex;flex-direction:column;gap:8px;max-width:min(440px,calc(100vw - 40px))}
.toast{display:flex;gap:10px;align-items:flex-start;background:var(--navy-900);color:#fff;padding:12px 16px;border-radius:12px;box-shadow:var(--shadow-sheet);font-size:17px;animation:rise .16s ease}
.toast.err{background:#5E1D16}

/* دفتر اليومية */
.daybook{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:20px}
.je-lines{display:flex;flex-direction:column;gap:2px}
.je-lines div{display:flex;gap:8px;align-items:baseline;font-size:16.5px;min-width:170px}
.je-lines .acc-c{color:var(--label-3);font-size:15.5px}
.tag-dr,.tag-cr{font-size:15px;font-weight:700;width:26px;flex:none}
.tag-dr{color:var(--navy-700)} .tag-cr{color:var(--teal-700)}
.balance-ok{display:inline-flex;align-items:center;gap:8px;color:var(--green);font-weight:700}
.balance-bad{color:var(--red);font-weight:700}

/* الدخول */
.login{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);min-height:100vh;background:var(--surface)}
.login-form{display:flex;flex-direction:column;justify-content:center;padding:40px clamp(24px,6vw,88px);max-width:560px;width:100%;justify-self:center}
.login-form .logo{width:170px;height:auto;align-self:center;margin-bottom:10px}
.login-form h1{font-size:28px;text-align:center}
.login-form p{color:var(--label-2);margin:4px 0 24px;text-align:center}
.login-stage{position:relative;background:var(--navy-900);overflow:hidden;color:#fff}
.login-stage .stage{height:100%;border-radius:0}
.login-stage .over{position:absolute;inset-inline-start:40px;bottom:40px;z-index:3;max-width:440px}
.login-stage .over b{font-size:24px;display:block;line-height:1.5}
.login-stage .over span{color:#A9BCCE;font-size:17px}
.vrow-pass{color:var(--green)} .vrow-fail{color:var(--red)}
.score{display:flex;align-items:baseline;gap:12px}
.score b{font-size:34px}

/* الطباعة */
#print-area{display:none}
@media print{
  body{background:#fff}
  body>*:not(#print-area){display:none!important}
  #print-area{display:block;color:#000;font-size:15px}
  @page{size:A4;margin:14mm}
}
.doc{max-width:760px;margin:0 auto;font-size:16px;font-family:var(--font)}
.doc-head{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid var(--navy-900);padding-bottom:10px;margin-bottom:14px;gap:16px}
.doc-head img{width:86px;height:auto}
.doc-head b{font-size:21px;display:block}
.doc-foot{margin-top:18px;font-size:14px;color:#555;display:flex;justify-content:space-between}
.receipt{max-width:420px;margin:0 auto}
.receipt .kv-row{padding:7px 0}
.receipt .kv-row+.kv-row::before{inset-inline:0}

/* الاستجابة */
@media (max-width:1100px){
  .g-main,.g3,.g-today{grid-template-columns:minmax(0,1fr)}
  .daybook{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:960px){
  .app{grid-template-columns:minmax(0,1fr)}
  .side{position:fixed;inset-block:0;inset-inline-start:0;width:280px;transform:translateX(100%);transition:transform .2s ease}
  .side.open{transform:none;box-shadow:var(--shadow-sheet)}
  .menu-btn{display:inline-flex}
  .topbar{padding:10px 16px;min-height:64px}
  .topbar h1{font-size:23px}
  .page{padding:16px 16px 56px}
  .g2{grid-template-columns:minmax(0,1fr)}
  .summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .summary>div:nth-child(3)::before{display:none}
  .summary>div:nth-child(n+3){border-top:1px solid var(--sep)}
  .eq-picker{grid-template-columns:minmax(0,1fr)}
  .login{grid-template-columns:minmax(0,1fr)}
  .login-stage{height:240px;order:-1}
  .login-stage .over{inset-inline-start:20px;bottom:16px}
}
@media (max-width:640px){
  body{font-size:18px}
  .summary .v{font-size:26px}
  .topbar .sub{display:none}
  .hide-sm{display:none!important}
  .scrim{padding:0;align-items:flex-end}
  .sheet,.sheet.wide,.sheet.narrow{width:100%;max-height:94vh;border-radius:16px 16px 0 0}
  .frow{grid-template-columns:minmax(0,1fr);gap:4px;padding:10px 14px}
  .suggest{inset-inline:14px}
  .stage{height:320px}
  .stage .state{display:none}
  .tbl.cards thead{display:none}
  .tbl.cards,.tbl.cards tbody{display:block}
  .tbl.cards tbody tr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"no pt val" "no type st" "no time paid";gap:0 12px;padding:12px 16px;border-bottom:1px solid var(--sep);align-items:center}
  .tbl.cards tbody tr:last-child{border-bottom:0}
  .tbl.cards td{border:0;padding:0;background:none!important}
  .tbl.cards .c-no{grid-area:no;align-self:start}.tbl.cards .c-pt{grid-area:pt}.tbl.cards .c-type{grid-area:type;white-space:normal!important;font-size:16.5px}.tbl.cards .c-type .sub{display:inline;margin-inline-start:6px}
  .tbl.cards .c-time{grid-area:time;font-size:15px;color:var(--label-3)}.tbl.cards .c-val{grid-area:val}.tbl.cards .c-st{grid-area:st;justify-self:end}.tbl.cards .c-paid{grid-area:paid;font-size:15px;color:var(--label-3)}.tbl.cards .c-doc{display:none}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ===== الصور ===== */
.drop{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:12px 14px;border:1.5px dashed var(--sep-strong);border-radius:12px;transition:background .12s,border-color .12s}
.drop.over{border-color:var(--teal-600);background:var(--teal-50)}
.drop .help{margin:0}
.drop input:focus-visible+label{outline:2px solid var(--teal-600);outline-offset:2px}
.drop label{cursor:pointer}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px;margin:2px 0 10px}
.thumb{position:relative;display:flex;flex-direction:column;padding:0;border:1px solid var(--sep);border-radius:10px;overflow:hidden;background:var(--surface);cursor:pointer;text-align:start;font:inherit;color:inherit}
.thumb:hover{border-color:var(--teal-600)}
.thumb:focus-visible{outline:2px solid var(--teal-600);outline-offset:2px}
.thumb img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#04070B}
.thumb .pdf{display:grid;place-items:center;align-content:center;gap:2px;aspect-ratio:4/3;background:var(--fill);color:var(--label-2);font-weight:700}
.thumb .cap{display:flex;flex-direction:column;padding:6px 8px;font-size:14px;line-height:1.35;color:var(--label-2);overflow:hidden}
.thumb .cap>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thumbs.edit .thumb{cursor:default}
.thumb .rm{position:absolute;top:6px;inset-inline-end:6px;width:30px;height:30px;border-radius:50%;border:0;background:rgba(4,7,11,.72);color:#fff;display:grid;place-items:center;cursor:pointer}
.thumb .rm::after{content:"";position:absolute;inset:-7px}
.imgc{display:inline-flex;align-items:center;gap:3px;margin-inline-start:8px;font-size:14px;color:var(--teal-700);vertical-align:middle;white-space:nowrap}
.imgc .i{width:15px;height:15px}
.viewer{display:grid;place-items:center;min-height:320px;background:#04070B;border-radius:12px;overflow:hidden}
.viewer img{display:block;max-width:100%;max-height:66vh;object-fit:contain}
.viewer iframe{width:100%;height:66vh;border:0;background:#fff}
.viewer .pdf.big{display:grid;place-items:center;gap:8px;color:#CFE3EF;padding:60px}
/* ===== إدارة الأجهزة وأنواع التصوير ===== */
.eq-pick.add{background:transparent;outline:1.5px dashed var(--sep-strong);box-shadow:none}
.eq-pick.add:hover{outline-color:var(--teal-600);background:var(--teal-50)}
.eq-pick.add .ico{background:var(--teal-50)}
.eq-pick.add .ico svg{stroke:var(--teal-700);width:26px;height:26px;stroke-width:2}
.type-head,.type-row{display:grid;grid-template-columns:minmax(0,1fr) 150px 120px 44px;gap:8px;align-items:center;padding:8px 14px}
.type-head{padding-bottom:0;font-size:14px;font-weight:700;color:var(--label-3)}
.type-row+.type-row{border-top:1px solid var(--sep)}
tr.inactive td{color:var(--label-3)}
tr.inactive .name{color:var(--label-2)}
@media (max-width:640px){
  .type-head{display:none}
  .type-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px}
  .type-row [data-f="name"]{grid-column:1/-1}
  .thumbs{grid-template-columns:repeat(auto-fill,minmax(96px,1fr))}
}
.unit-in{position:relative}
.unit-in .input{padding-left:62px}
.unit-in span{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:14px;color:var(--label-3);pointer-events:none}

/* ===== السياق في القائمة الجانبية ===== */
.ctx{display:flex;align-items:center;gap:10px;margin:12px 12px 2px;padding:10px 10px;border-radius:12px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.07)}
.ctx .ico{position:relative;overflow:hidden;width:42px;height:42px;border-radius:10px;background:var(--navy-950);display:grid;place-items:center;flex:none}
.ctx .ico svg{width:28px;height:28px;stroke:#CFE3EF;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.ctx .ico.cl{background:var(--teal-700)}
.ctx .grow{min-width:0;flex:1}
.ctx span{display:block;font-size:14px;color:#8AA1B8;line-height:1.3}
.ctx b{display:block;color:#fff;font-size:16px;line-height:1.35}
.ctx-sw{display:inline-flex;flex-direction:column;align-items:center;gap:1px;border:0;background:rgba(255,255,255,.08);color:#DCE6F0;border-radius:9px;padding:5px 8px;cursor:pointer;font:inherit;font-size:13px}
.ctx-sw span{color:inherit;font-size:13px}
.ctx-sw:hover{background:var(--teal-600);color:#fff}
.nav a.sub{min-height:38px;margin-inline-start:30px;font-size:16.5px;color:#B9C9D8}
.nav a.sub.off{opacity:.55}
.hub-link{display:flex;align-items:center;gap:8px;margin-bottom:12px;padding:8px 10px;border-radius:9px;background:rgba(58,144,151,.18);color:#D6EBEC;font-size:15.5px;cursor:pointer;text-decoration:none!important}
.hub-link:hover{background:var(--teal-600);color:#fff}
.kv-row.me{background:var(--teal-50)}
.dev-mini{width:38px;height:38px;border-radius:9px;background:var(--navy-900);display:grid;place-items:center;flex:none}
.dev-mini svg{width:26px;height:26px;stroke:#CFE3EF;fill:none;stroke-width:1.5}
.sn-in{display:flex;align-items:center;gap:6px}
.sn-in .pfx{font-weight:700;color:var(--teal-700);font-size:18px}
.sn-in .pfx:empty{display:none}
.sn-in .input{max-width:200px}
.err{color:var(--red)}
.split{display:flex;flex-wrap:wrap;gap:4px 16px}
.fileno{display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:28px;padding:0 9px;border-radius:8px;background:var(--navy-900);color:#E6F0F7;font-weight:700;font-size:15.5px;vertical-align:middle}
.chip.u-eq{background:var(--blue-bg);color:var(--blue)} .chip.u-cl{background:var(--teal-50);color:var(--teal-700)} .chip.u-gen{background:var(--fill-2);color:var(--label-2)}
.agv{font-weight:700;color:var(--teal-700)} .agv.none{font-weight:400;color:var(--label-3)}
.rep-tabs{max-width:100%}
.pf{position:relative}
.pf .suggest.pf-sg{inset-inline:0;top:46px}

/* ===== واجهة الأقسام (بعد الدخول) ===== */
.hub{min-height:100vh;display:flex;flex-direction:column;background:radial-gradient(1200px 600px at 85% -10%,rgba(58,144,151,.28),transparent 60%),radial-gradient(900px 500px at 0% 110%,rgba(58,144,151,.18),transparent 60%),var(--navy-950);color:#fff;position:relative;overflow:hidden}
.hub::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(124,201,198,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(124,201,198,.05) 1px,transparent 1px);background-size:44px 44px;pointer-events:none;mask-image:linear-gradient(180deg,#000 30%,transparent)}
.hub>*{position:relative}
.hub-h{display:flex;align-items:center;gap:14px;padding:18px clamp(16px,4vw,48px)}
.hub-brand{display:flex;align-items:center;gap:12px;min-width:0}
.hub-brand img{width:52px;height:52px;border-radius:50%;box-shadow:0 0 0 2px rgba(181,218,220,.35);flex:none}
.hub-brand b{display:block;font-size:19px;line-height:1.35}
.hub-brand span{display:block;font-size:15px;color:#9DB2C6;line-height:1.35}
.hub-h .grow{flex:1}
.hub-user{display:flex;align-items:center;gap:10px}
.hub-user b{display:block;font-size:16.5px;line-height:1.3}
.hub-user span{display:block;font-size:14px;color:#9DB2C6}
.hub-role{height:36px;border-radius:9px;background:#0B2238;border:1px solid #23486E;color:#DCE6F0;padding:0 8px;font-size:15px}
.hub-out{background:rgba(255,255,255,.08);color:#DCE6F0}
.hub-out:hover{background:rgba(255,255,255,.16)}
.hub-main{flex:1;width:100%;max-width:1180px;margin:0 auto;padding:clamp(16px,4vw,40px) clamp(16px,4vw,48px) 40px}
.hub-hello{margin-bottom:26px}
.hub-hello>span{color:#9DD3D0;font-size:18px}
.hub-hello h1{font-size:clamp(28px,4vw,40px);line-height:1.3;margin-top:2px}
.hub-hello .back{display:inline-flex;align-items:center;gap:4px;color:#9DD3D0;font-size:16.5px;margin-bottom:4px;cursor:pointer}
.hub-hello .muted{color:#9DB2C6}
.hub-f{text-align:center;color:#6F88A0;font-size:14px;padding:14px}
.pgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
@property --ang{syntax:'<angle>';initial-value:0deg;inherits:false}
.pcard{position:relative;display:block;border-radius:24px;padding:2px;color:var(--label);text-decoration:none!important;isolation:isolate;transition:transform .25s cubic-bezier(.2,.7,.2,1);background:rgba(255,255,255,.12)}
.pcard::before{content:"";position:absolute;inset:0;border-radius:24px;background:conic-gradient(from var(--ang),transparent 0 55%,#7CC9C6 70%,var(--teal-500) 80%,transparent 92%);opacity:0;transition:opacity .3s;z-index:-1;animation:spin 3.2s linear infinite}
.pcard:hover{transform:translateY(-4px)}
.pcard:hover::before,.pcard:focus-visible::before{opacity:1}
@keyframes spin{to{--ang:360deg}}
.pcard-in{display:flex;flex-direction:column;align-items:flex-start;gap:6px;border-radius:22px;background:var(--surface);padding:26px 26px 22px;height:100%;box-shadow:0 24px 60px rgba(0,0,0,.28)}
.aic-box{width:96px;height:96px;border-radius:24px;display:grid;place-items:center;background:var(--navy-900);color:#BFE3E1;margin-bottom:10px;position:relative;overflow:hidden}
.pcard.cl .aic-box{background:var(--teal-700);color:#E7F5F4}
.pc-t{font-size:27px;font-weight:700;line-height:1.35}
.pc-d{color:var(--label-2);font-size:17px;line-height:1.65}
.pstats{display:flex;gap:10px;margin-top:10px;flex-wrap:wrap}
.pstats>span{display:flex;flex-direction:column;background:var(--fill);border-radius:12px;padding:8px 14px;font-size:15px;color:var(--label-3);line-height:1.4}
.pstats b{font-size:24px;color:var(--label)}
.pcard .go{margin-top:14px;display:inline-flex;align-items:center;gap:6px;font-weight:700;color:var(--teal-700);background:var(--teal-50);border-radius:10px;padding:8px 16px;transition:gap .2s}
.pcard:hover .go{gap:12px;background:var(--teal-600);color:#fff}
/* أيقونات متحركة */
.aic{width:64px;height:64px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
.aic [pathLength]{stroke-dasharray:1;stroke-dashoffset:0;animation:draw 1.3s .15s cubic-bezier(.65,0,.35,1) both}
.pcard:hover .aic [pathLength]{animation:draw 1s cubic-bezier(.65,0,.35,1)}
.aic .ecg{animation:ecg 2.6s linear infinite!important;stroke:#7CF0D8}
.aic .scan{fill:rgba(124,201,198,.38);stroke:none;animation:scan 2.8s ease-in-out infinite}
@keyframes draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes ecg{0%{stroke-dashoffset:1}55%,100%{stroke-dashoffset:0}}
@keyframes scan{0%,100%{transform:translateY(0)}50%{transform:translateY(42px)}}
.hub-cash{margin-top:22px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:22px;align-items:center;border-radius:20px;padding:20px 24px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1)}
.hc-l span{display:block;color:#9DB2C6;font-size:16px}
.hc-l b{display:block;font-size:34px;line-height:1.3}
.hc-l small{font-size:16px;color:#9DB2C6;font-weight:400}
.hc-row{display:grid;grid-template-columns:150px minmax(0,1fr) 110px;align-items:center;gap:12px;font-size:16px;color:#DCE6F0;padding:3px 0}
.hc-row .bar{margin:0;background:rgba(255,255,255,.1)}
.hc-row .bar i{background:linear-gradient(90deg,var(--teal-500),#7CC9C6)}
.hc-row b{text-align:left}
/* بطاقات الأجهزة */
.dgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:18px}
.dcard{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:start;border:0;border-radius:20px;background:var(--surface);color:var(--label);padding:20px;cursor:pointer;font:inherit;box-shadow:0 18px 48px rgba(0,0,0,.25);transition:transform .25s cubic-bezier(.2,.7,.2,1),box-shadow .25s;outline:2px solid transparent;outline-offset:3px}
.dcard:hover{transform:translateY(-4px);outline-color:#7CC9C6}
.dcard.cur{outline-color:rgba(124,201,198,.5)}
.dcard.down{opacity:.75}
.dglyph{position:relative;overflow:hidden;width:84px;height:84px;border-radius:18px;background:var(--navy-900);display:grid;place-items:center;margin-bottom:10px}
.dglyph svg{width:56px;height:56px;stroke:#CFE3EF;fill:none;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.beam{position:absolute;inset-inline:0;top:-40%;height:40%;background:linear-gradient(180deg,transparent,rgba(124,201,198,.5),transparent);opacity:0;pointer-events:none}
.dcard:hover .beam{opacity:1;animation:beam 1.6s ease-in-out infinite}
.ctx .beam{opacity:.7;animation:beam 4.5s ease-in-out infinite}
@keyframes beam{from{top:-40%}to{top:100%}}
.dc-name{font-size:21px;font-weight:700;line-height:1.35}
.dc-desc{color:var(--label-3);font-size:16px;line-height:1.5}
.dc-st{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}
.dnums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;margin-top:8px;border-top:1px solid var(--sep);padding-top:12px}
.dnums>span{display:flex;flex-direction:column;font-size:14px;color:var(--label-3);line-height:1.35}
.dnums b{font-size:20px;color:var(--label)}
.dcard.add{background:rgba(255,255,255,.05);color:#fff;box-shadow:none;outline:1.5px dashed rgba(255,255,255,.3);justify-content:center;align-items:center;text-align:center;min-height:250px}
.dcard.add .dglyph{background:rgba(124,201,198,.16);color:#9DD3D0}
.dcard.add .dglyph svg{width:36px;height:36px;stroke:currentColor;stroke-width:2}
.dcard.add .dc-desc{color:#9DB2C6}
.dcard.add:hover{outline-color:#7CC9C6;background:rgba(124,201,198,.1)}

/* ===== الأطباء المقيمون ===== */
.dcgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:18px}
.dcoc{display:flex;flex-direction:column;gap:12px;background:var(--surface);border-radius:var(--r-lg);padding:18px;box-shadow:0 1px 2px rgba(16,33,49,.05);transition:box-shadow .2s,transform .2s}
.dcoc:hover{box-shadow:0 10px 30px rgba(8,30,51,.10);transform:translateY(-2px)}
.dcoc.off{opacity:.65}
.dc-top{display:flex;align-items:center;gap:12px}
.dc-top h3{font-size:20px}
.dc-av{position:relative;width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,var(--teal-600),var(--navy-800));color:#fff;display:grid;place-items:center;font-weight:700;font-size:18px;flex:none}
.dc-av::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid var(--teal-200);opacity:0;animation:ring 2.8s ease-out infinite}
.dcoc:hover .dc-av::after{opacity:1}
@keyframes ring{0%{transform:scale(.9);opacity:.9}100%{transform:scale(1.25);opacity:0}}
.dc-av.lg{width:76px;height:76px;font-size:26px}
.dc-av.sm{width:36px;height:36px;font-size:14px}
.dc-av.sm::after{display:none}
.dc-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.dc-stats>div{background:var(--fill);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column}
.dc-stats b{font-size:21px;line-height:1.3}
.dc-stats span{font-size:14px;color:var(--label-3)}
.dc-next{display:flex;align-items:center;gap:8px;font-size:16px;min-height:30px}
.dc-terms{font-size:15px;color:var(--label-3);border-top:1px solid var(--sep);padding-top:10px}
.dc-act{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}
.dcoc.add{align-items:center;justify-content:center;text-align:center;border:1.5px dashed var(--sep-strong);background:transparent;box-shadow:none;cursor:pointer;font:inherit;color:var(--label);min-height:240px}
.dcoc.add .ico{width:56px;height:56px;border-radius:50%;background:var(--teal-50);color:var(--teal-700);display:grid;place-items:center}
.dcoc.add b{font-size:19px}
.dcoc.add span{color:var(--label-3);font-size:15.5px}
.dcoc.add:hover{border-color:var(--teal-600);background:var(--teal-50)}
.doc-hero{display:flex;align-items:center;gap:18px;background:var(--surface);border-radius:var(--r-lg);padding:20px 22px;flex-wrap:wrap}
.doc-hero h2{font-size:25px}
.terms{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.term{display:inline-flex;align-items:baseline;gap:8px;background:var(--fill);border-radius:10px;padding:4px 12px;font-size:15px;color:var(--label-3)}
.term b{color:var(--label);font-size:17px}
.file-head{display:flex;align-items:center;gap:12px;background:var(--surface);border-radius:var(--r-md);padding:12px 14px;margin-bottom:14px}
.file-head .fileno{min-width:64px;height:40px;font-size:20px}
.file-head b{display:block;font-size:19px}

/* ===== المواعيد ===== */
.ap-sum{display:flex;gap:8px;flex-wrap:wrap}
.ap-sum span{display:inline-flex;align-items:baseline;gap:6px;background:var(--surface);border-radius:10px;padding:4px 12px;font-size:15px;color:var(--label-3)}
.ap-sum b{font-size:18px;color:var(--label)}
.ap-sum .s-booked b{color:var(--blue)} .ap-sum .s-arrived b{color:var(--orange)} .ap-sum .s-done b{color:var(--green)} .ap-sum .s-noshow b{color:var(--red)}
.board{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px;align-items:start}
.col{background:var(--fill-2);border-radius:var(--r-lg);padding:8px;display:flex;flex-direction:column;gap:8px}
.col header{display:flex;align-items:center;gap:10px;padding:6px 6px 4px}
.col header b{display:block;font-size:17px;line-height:1.3}
.col header span{display:block;font-size:14px;color:var(--label-3)}
.col header .cnt{background:var(--surface);border-radius:10px;padding:0 9px;font-weight:700;color:var(--label)}
.col-b{display:flex;flex-direction:column;gap:6px}
.apc{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"t nm" "t meta";gap:2px 12px;align-items:center;text-align:start;border:0;border-inline-start:4px solid var(--blue);border-radius:10px;background:var(--surface);padding:9px 12px;cursor:pointer;font:inherit;color:var(--label);transition:transform .15s,box-shadow .15s}
.apc:hover{transform:translateX(-2px);box-shadow:0 4px 14px rgba(8,30,51,.10)}
.apc .t{grid-area:t;font-weight:700;font-size:18px}
.apc .nm{grid-area:nm;font-weight:700;font-size:16.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.apc .meta{grid-area:meta;display:flex;gap:8px;align-items:center;font-size:14px}
.apc .meta .badge{min-height:22px;font-size:14px;padding:0 8px}
.s-arrived.apc,.ap-row.s-arrived{border-inline-start-color:var(--orange)} .s-done.apc,.ap-row.s-done{border-inline-start-color:var(--green)} .s-noshow.apc,.ap-row.s-noshow{border-inline-start-color:var(--red)} .s-cancelled.apc,.ap-row.s-cancelled{border-inline-start-color:var(--label-4);opacity:.6}
.add-ap{justify-content:center}
.ap-list{display:flex;flex-direction:column}
.ap-row{display:flex;align-items:center;gap:14px;padding:12px 16px;border-inline-start:4px solid var(--blue);flex-wrap:wrap}
.ap-row+.ap-row{border-top:1px solid var(--sep)}
.ap-time{display:flex;flex-direction:column;align-items:center;min-width:64px;line-height:1.3}
.ap-time b{font-size:19px} .ap-time span{font-size:14px;color:var(--label-3)}
.ap-main{cursor:pointer;min-width:180px}
.ap-main .t{font-weight:700} .ap-main .s{font-size:15.5px;color:var(--label-3)}
.ap-act{display:flex;gap:6px;flex-wrap:wrap}
.slots{display:flex;flex-wrap:wrap;gap:6px}
.slot{border:1px solid var(--sep-strong);background:var(--surface);border-radius:9px;min-height:36px;padding:0 10px;cursor:pointer;font:inherit;font-size:16px}
.slot:hover{border-color:var(--teal-600)}
.slot.on{background:var(--teal-600);border-color:var(--teal-600);color:#fff}
.slot.busy{text-decoration:line-through;color:var(--label-4);background:var(--fill);cursor:not-allowed}

@media (max-width:960px){
  .pgrid{grid-template-columns:minmax(0,1fr)}
  .hub-cash{grid-template-columns:minmax(0,1fr)}
  .hub-brand span{display:none}
}
@media (max-width:640px){
  .hub-h{flex-wrap:wrap}
  .hub-brand b{font-size:16px}
  .hc-row{grid-template-columns:100px minmax(0,1fr) 90px;font-size:15px}
  .pc-t{font-size:23px}
  .aic-box{width:76px;height:76px}
  .aic{width:52px;height:52px}
  .dcgrid,.dgrid{grid-template-columns:minmax(0,1fr)}
  .doc-hero{padding:16px}
  .ap-row{gap:10px}
}
@media print{ .tbl .n{text-align:left} #print-area h3{font-size:17px} }
/* ===== تحسين وضوح النص (الأساسي) ===== */
:root{--label:#050E17;--label-2:#1F2C38;--label-3:#3F4D59}
.nav-g{color:#AFC2D4!important;font-weight:700}
.nav a{color:#EEF3F8}
.nav a.sub{color:#D2DEE9}
.brand span,.who span,.ctx span{color:#B8C9D8!important}
.hub-brand span,.hub-user span,.hub-hello .muted,.hc-l span{color:#C2D2E0!important}
.hub-f{color:#9AB0C4}
.tbl th{color:var(--label-2)}
.summary .l{color:var(--label)}
/* ===== شرائح التصنيفات ===== */
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.chips button{border:1px solid var(--sep-strong);background:var(--surface);color:var(--label-2);border-radius:20px;min-height:36px;padding:0 14px;cursor:pointer;font:inherit;font-size:16px;font-weight:700;display:inline-flex;align-items:center;gap:6px}
.chips button .num{font-size:14px;color:var(--label-3);font-weight:400}
.chips button.on{background:var(--teal-600);border-color:var(--teal-600);color:#fff}
.chips button.on .num{color:#E3F2F2}
.chips .mng{border-style:dashed;color:var(--teal-700)}
.cat-b{min-height:22px;font-size:14px;padding:0 8px}
.act-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}
@media (max-width:640px){.act-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* ===== اختيار المظهر ===== */
.looks{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.look{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:start;border:2px solid var(--sep);background:var(--surface);border-radius:14px;padding:12px;cursor:pointer;font:inherit;color:var(--label)}
.look.on{border-color:var(--teal-600);box-shadow:0 0 0 3px var(--teal-100)}
.look b{font-size:17px} .look span{font-size:14.5px;color:var(--label-3);line-height:1.45}
.sw{display:flex;gap:4px;margin-bottom:6px}.sw i{width:26px;height:26px;border-radius:7px;display:block}
.sw-navy i:nth-child(1){background:#0D2A45}.sw-navy i:nth-child(2){background:#2A7A80}.sw-navy i:nth-child(3){background:#F2F4F6;border:1px solid #ddd}
.sw-light i:nth-child(1){background:#fff;border:1px solid #ccc}.sw-light i:nth-child(2){background:#2A7A80}.sw-light i:nth-child(3){background:#F2F4F6;border:1px solid #ddd}
.sw-contrast i:nth-child(1){background:#000}.sw-contrast i:nth-child(2){background:#0E474B}.sw-contrast i:nth-child(3){background:#fff;border:1px solid #999}
.fs{font-size:19px;margin-bottom:4px;color:var(--label)}
.fs-amiri{font-family:Amiri,serif}.fs-plex{font-family:"IBM Plex Sans Arabic",sans-serif}.fs-cairo{font-family:Cairo,sans-serif}.fs-tajawal{font-family:Tajawal,sans-serif}
/* الخطوط */
[data-font=plex]{--font:"IBM Plex Sans Arabic","Segoe UI",Tahoma,sans-serif}
[data-font=cairo]{--font:"Cairo","Segoe UI",Tahoma,sans-serif}
[data-font=tajawal]{--font:"Tajawal","Segoe UI",Tahoma,sans-serif}
[data-font=plex] body,[data-font=cairo] body,[data-font=tajawal] body{-webkit-text-stroke:0;font-size:17px;line-height:1.65}
[data-font=cairo] body{font-size:16.5px}
/* الثيم الفاتح (الافتراضي): نص أسود للوضوح */
[data-theme=light]{--label:#000;--label-2:#0D1114;--label-3:#2A3138;--label-4:#7A838B}
[data-theme=light] body{-webkit-text-stroke:.3px currentColor}
[data-theme=light] .nav a,[data-theme=light] .nav a.sub,[data-theme=light] .brand b,[data-theme=light] .who b{color:#000!important}
[data-theme=light] .nav a.on{color:#fff!important}
[data-theme=light] .muted,[data-theme=light] .help,[data-theme=light] .tbl .sub{color:#2A3138}
[data-theme=light] .side{background:#fff;color:var(--label-2);border-inline-start:1px solid var(--sep)}
[data-theme=light] .brand{border-bottom-color:var(--sep)}
[data-theme=light] .brand b,[data-theme=light] .who b,[data-theme=light] .ctx b{color:var(--label)}
[data-theme=light] .brand span,[data-theme=light] .who span,[data-theme=light] .ctx span,[data-theme=light] .nav-g{color:var(--label-3)!important}
[data-theme=light] .nav a,[data-theme=light] .nav a.sub{color:var(--label-2)}
[data-theme=light] .nav a:hover{background:var(--fill);color:var(--label)}
[data-theme=light] .nav a.on{background:var(--teal-600);color:#fff}
[data-theme=light] .nav a .cnt{background:var(--fill-2);color:var(--label)}
[data-theme=light] .nav a.on .cnt{background:rgba(255,255,255,.22);color:#fff}
[data-theme=light] .ctx{background:var(--fill);border-color:var(--sep)}
[data-theme=light] .ctx-sw{background:#fff;color:var(--teal-700)}
[data-theme=light] .side-foot{border-top-color:var(--sep)}
[data-theme=light] .role-sel{background:var(--fill);border-color:var(--sep-strong);color:var(--label)}
[data-theme=light] .btn-link{color:var(--label-2)}
[data-theme=light] .hub-link{background:var(--teal-50);color:var(--teal-700)}
[data-theme=light] .topbar{background:rgba(255,255,255,.97)}
/* التباين العالي */
[data-theme=contrast]{--label:#000;--label-2:#0B1620;--label-3:#24313C;--label-4:#6B7782;--teal-600:#12555A;--teal-700:#0B3F43;--teal-50:#E0EFEF;--sep:#C3CDD5;--sep-strong:#A9B5BF;--bg:#ECEFF2;--fill:#E9EDF0;--fill-2:#DDE3E8;--navy-900:#061A2C}
[data-theme=contrast] body{-webkit-text-stroke:.35px currentColor}
[data-theme=contrast] .nav a{color:#fff}
[data-theme=contrast] .badge{font-weight:700;border:1px solid currentColor}

/* ===== علامة IQ ===== */
.iq-mark{cursor:pointer;display:inline-flex;align-items:baseline;gap:5px;font-family:"Segoe UI",Tahoma,sans-serif;font-size:13px;letter-spacing:.3px;color:var(--label-3);text-decoration:none!important;-webkit-text-stroke:0}
.iq-mark b{font-size:15px;font-weight:800;color:var(--teal-700);letter-spacing:1px}
.iq-mark.dark{color:#B8C9D8}.iq-mark.dark b{color:#7CC9C6}
.iq-mark.big{font-size:14px;margin-bottom:4px}.iq-mark.big b{font-size:17px}
.iq-mark:hover b{text-decoration:underline}
.iq-mark.login{align-self:center;margin-top:22px}
.app-foot{padding:0 32px 22px;display:flex;justify-content:center}
.side-iq{text-align:center;margin-bottom:10px}
[data-theme=light] .iq-mark.dark{color:var(--label-3)}[data-theme=light] .iq-mark.dark b{color:var(--teal-700)}
.hub-f{display:flex;flex-direction:column;align-items:center;gap:2px}
#print-area .iq-mark{color:#333}
/* إضافات نسخة الخادم */
#lg-err:empty{display:none}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:960px){.g3{grid-template-columns:minmax(0,1fr)}}
