/* منصة ياسمين للتدريب */
:root{
  /* هوية ياسمين: كحلي، مرجاني، تركوازي، أبيض */
  --navy:#1E1A4D; --navy-2:#2d2870; --navy-wash:#eeedf6;
  --coral:#F2603E; --coral-ink:#c4401f; --coral-wash:#fdece6;
  --teal:#13A89E; --teal-ink:#0b7a72; --teal-deep:#08605a; --teal-wash:#e1f4f2;
  --ink:#1E1A4D; --muted:#625e7e; --line:#e3e1ee; --bg:#f6f5fa; --card:#fff;
  --red:#c2413b; --red-wash:#fdeceb; --green:#0b7a72;
  --r:12px; --r-sm:8px;
  --f:'Cairo',Tahoma,'Segoe UI',Arial,sans-serif;
  --f-brand:'Aref Ruqaa','Cairo',serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--f);font-size:15px;line-height:1.65;color:var(--ink);background:var(--bg)}
a{color:var(--coral-ink);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{line-height:1.35;margin:0 0 .5em;font-weight:700}
h1{font-size:1.75rem;font-weight:800}
h2{font-size:1.18rem}
h3{font-size:1rem;color:var(--muted);font-weight:600;margin-top:1.4em}
p{margin:0 0 .8em}
small{font-size:.82em}
code{background:var(--teal-wash);padding:0 .35em;border-radius:4px}
img{max-width:100%}
.muted{color:var(--muted)}
.hint{color:var(--muted);font-size:.85rem;margin-top:.4rem}
.break{word-break:break-all}
.ltr-r{text-align:right}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;right:-999px;top:0;background:var(--ink);color:#fff;padding:.5rem 1rem;z-index:99}
.skip:focus{right:0}
:focus-visible{outline:3px solid var(--coral);outline-offset:2px}
[hidden]{display:none!important}

/* ---------- الشعار ---------- */
.brand{display:flex;align-items:center;text-decoration:none!important}
.brand-img{display:block;height:auto}
.topbar .brand-dark{height:52px;width:auto}
.pub-head .brand-full{width:150px}
.auth-card .brand-full{width:min(230px,70%);margin:0 auto 1rem}
img.result-mark{width:76px;height:auto;margin-bottom:.6rem}

/* ---------- الأزرار والحقول ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;font:inherit;font-weight:700;font-size:.95rem;
  padding:.62rem 1.15rem;border-radius:var(--r-sm);border:1.5px solid var(--navy);background:var(--navy);color:#fff;cursor:pointer;
  text-decoration:none!important;line-height:1.3;transition:background .15s,border-color .15s}
.btn:hover{background:var(--navy-2);border-color:var(--navy-2)}
.btn.accent,.public .btn.lg,.public .btn.xl{background:var(--coral);border-color:var(--coral);font-size:1.2rem}
.btn.accent:hover,.public .btn.lg:hover,.public .btn.xl:hover{background:var(--coral-ink);border-color:var(--coral-ink)}
.btn.ghost{background:#fff;color:var(--navy);border-color:var(--line)}
.btn.ghost:hover{border-color:var(--navy);background:var(--navy-wash)}
.btn.danger{color:var(--red)}
.btn.danger:hover{border-color:var(--red);background:var(--red-wash)}
.btn.danger-link{background:none;border:0;color:var(--red);padding:.3rem 0;font-weight:600}
.btn.sm{padding:.38rem .8rem;font-size:.85rem}
.btn.lg{padding:.85rem 1.4rem;font-size:1.05rem}
.btn.xl{padding:1.1rem 1.4rem;font-size:1.2rem}
.btn.block{width:100%}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-top:.8rem}
form.inline{display:inline}

input,select,textarea{font:inherit;color:var(--ink);width:100%;padding:.62rem .8rem;border:1.5px solid var(--line);border-radius:var(--r-sm);background:#fff;transition:border-color .15s}
input:focus,select:focus,textarea:focus{border-color:var(--teal);outline:none;box-shadow:0 0 0 3px rgba(19,168,158,.22)}
textarea{resize:vertical;min-height:2.6rem}
input[type=checkbox],input[type=radio]{width:auto}
label{display:block;font-weight:600;font-size:.92rem}
.stack{display:grid;gap:.9rem}
.stack label input,.stack label select,.stack label textarea{margin-top:.3rem;font-weight:400}
.label{display:block;font-weight:600;font-size:.92rem;margin-bottom:.35rem}
.mini{font-size:.82rem;color:var(--muted);font-weight:600}
.mini input,.mini select,.mini textarea{margin-top:.25rem;color:var(--ink)}
.err{color:var(--red);font-size:.84rem;margin:.3rem 0 0}
.has-err input,.has-err select,.has-err textarea{border-color:var(--red)}
.switch{display:flex;align-items:center;gap:.5rem;font-weight:500;cursor:pointer}
.switch input{width:1.1rem;height:1.1rem;accent-color:var(--teal)}

/* ---------- تنبيهات وشارات ---------- */
.alert{padding:.75rem 1rem;border-radius:var(--r-sm);margin:0 0 1rem;border:1px solid;font-size:.93rem}
.alert-success{background:var(--teal-wash);border-color:#b5e3de;color:var(--teal-deep)}
.alert-error{background:var(--red-wash);border-color:#f3c4c1;color:#8f2a25}
.alert-warn{background:var(--coral-wash);border-color:#f8cbbd;color:var(--coral-ink)}
.badge{display:inline-block;padding:.1rem .6rem;border-radius:99px;font-size:.78rem;font-weight:700;white-space:nowrap}
.st-draft{background:#eef1f2;color:var(--muted)}
.st-pending{background:var(--coral-wash);color:var(--coral-ink)}
.st-approved{background:var(--teal-wash);color:var(--teal-deep)}
.st-rejected{background:var(--red-wash);color:var(--red)}
.role-admin{background:var(--navy);color:#fff}
.role-manager{background:var(--coral-wash);color:var(--coral-ink)}
.role-employee{background:#eef1f2;color:var(--muted)}
.dot{font-size:.78rem;font-weight:600;color:var(--muted);display:inline-flex;align-items:center;gap:.3rem;margin-inline-start:.4rem;vertical-align:middle}
.dot::before{content:"";width:8px;height:8px;border-radius:50%;background:#b7c1c4}
.dot.on{color:var(--green)}
.dot.on::before{background:var(--green)}
.toast{position:fixed;bottom:1.5rem;left:50%;transform:translate(-50%,20px);background:var(--ink);color:#fff;padding:.5rem 1.1rem;border-radius:99px;opacity:0;transition:.2s;z-index:100;pointer-events:none}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- هيكل لوحة التحكم ---------- */
.topbar{position:sticky;top:0;z-index:30;height:68px;display:flex;align-items:center;gap:1rem;padding:0 1.2rem;background:var(--navy);color:#fff}
.topbar .who{margin-inline-start:auto;text-align:left;display:flex;flex-direction:column;line-height:1.3}
.who-name{font-weight:700;font-size:.9rem}
.who-role{font-size:.75rem;color:#b9b6d6}
.menu-btn{display:none;width:40px;height:40px;border:0;background:none;padding:9px;cursor:pointer}
.menu-btn span{display:block;height:2px;background:#fff;margin:5px 0;border-radius:2px}
.sidebar{position:fixed;top:68px;right:0;bottom:0;width:230px;background:#fff;border-left:1px solid var(--line);padding:1.2rem .8rem;display:flex;flex-direction:column;z-index:25}
.sidebar nav{display:grid;gap:2px}
.sidebar a{display:flex;align-items:center;justify-content:space-between;padding:.6rem .9rem;border-radius:var(--r-sm);color:var(--ink);font-weight:600;text-decoration:none}
.sidebar a:hover{background:var(--bg)}
.sidebar a.active{background:var(--navy-wash);color:var(--navy);box-shadow:inset -3px 0 0 var(--coral)}
.sidebar .count{background:var(--coral);color:#fff;font-size:.75rem;border-radius:99px;padding:0 .5rem;min-width:1.5rem;text-align:center}
.sidebar .logout{margin-top:auto;color:var(--muted);font-weight:500}
.main{margin-right:230px;padding:1.8rem 2rem 4rem;max-width:1240px}
.scrim{position:fixed;inset:0;background:rgba(30,26,77,.4);z-index:20}

.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1.4rem}
.page-head h1{margin:0}
.page-head p{margin:.2rem 0 0}
.head-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.crumbs{font-size:.85rem;margin:0 0 .2rem!important}
.crumbs a{color:var(--muted)}
.meta-line{display:flex;flex-wrap:wrap;gap:.4rem .9rem;align-items:center;color:var(--muted);font-size:.9rem}

.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:1.3rem 1.4rem;margin-bottom:1.2rem}
.panel>h2:first-child{margin-bottom:.8rem}
.cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:1.2rem;align-items:start}
.cols>.panel{margin-bottom:0}
.cols+.panel,.cols+section{margin-top:1.2rem}
.empty{text-align:center;padding:3rem 1rem;color:var(--muted)}
.empty.sm{padding:1.5rem 1rem}
.empty h1{color:var(--ink)}

/* الرئيسية */
.callout{display:flex;align-items:center;gap:.6rem;background:var(--coral-wash);border:1px solid #f8cbbd;border-radius:var(--r);padding:.9rem 1.2rem;margin-bottom:1.2rem;color:var(--coral-ink);text-decoration:none!important}
.callout strong{font-size:1.4rem;color:var(--navy)}
.callout .go{margin-inline-start:auto;font-weight:700}
.tally{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:var(--r);background:#fff;margin-bottom:1.2rem;overflow:hidden}
.tally>*{padding:1rem 1.2rem;border-left:1px solid var(--line);color:var(--ink);text-decoration:none!important;display:flex;flex-direction:column}
.tally>*:last-child{border-left:0}
.tally a:hover{background:var(--bg)}
.tally b{font-size:1.9rem;font-weight:800;line-height:1.2}
.tally span{color:var(--muted);font-size:.85rem}
.ev-line{display:flex;align-items:center;gap:.9rem;padding:.75rem 0;border-top:1px solid var(--line);color:var(--ink);text-decoration:none!important}
.ev-line:first-of-type{border-top:0}
.ev-date{width:52px;text-align:center;font-size:.72rem;color:var(--muted);line-height:1.2;flex:none}
.ev-date b{display:block;font-size:1.45rem;color:var(--coral);font-weight:800}
.ev-body{flex:1;min-width:0;display:flex;flex-direction:column}
.ev-body small{color:var(--muted)}
.ev-num{font-weight:700;font-size:.9rem;color:var(--muted)}
.meter{display:block;height:5px;border-radius:9px;background:#e9eff0;overflow:hidden;margin-top:.35rem}
.meter i{display:block;height:100%;background:var(--teal);border-radius:9px}
.row-link{display:flex;justify-content:space-between;gap:.8rem;align-items:center;padding:.6rem 0;border-top:1px solid var(--line);color:var(--ink)}
.row-link:first-of-type{border-top:0}

/* قائمة الفعاليات */
.toolbar{display:flex;flex-wrap:wrap;gap:.8rem;justify-content:space-between;align-items:center;margin-bottom:1rem}
.tabs{display:flex;gap:.25rem;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.tabs.wrap{flex-wrap:wrap;margin-bottom:1rem}
.tabs a{padding:.45rem .9rem;border-radius:99px;color:var(--muted);font-weight:600;font-size:.9rem;white-space:nowrap;border:1px solid transparent}
.tabs a:hover{background:#fff;text-decoration:none}
.tabs a.on{background:#fff;border-color:var(--line);color:var(--ink)}
.search input{min-width:260px}
.table-wrap{overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:var(--r)}
.panel .table-wrap{border-radius:var(--r-sm)}
.table{width:100%;border-collapse:collapse;font-size:.92rem}
.table th{text-align:right;font-weight:700;color:var(--muted);font-size:.8rem;padding:.7rem .9rem;background:#f8fafa;border-bottom:1px solid var(--line);white-space:nowrap}
.table td{padding:.75rem .9rem;border-bottom:1px solid var(--line);vertical-align:middle}
.table tr:last-child td{border-bottom:0}
.table tbody tr[onclick]{cursor:pointer}
.table tbody tr[onclick]:hover{background:#f8fbfb}

/* نموذج الفعالية */
.form-grid fieldset{border:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:1rem 1.2rem;margin:0 0 1.2rem;min-width:0}
.form-grid legend{font-weight:800;font-size:1.05rem;padding:0 .4rem;float:right;width:100%;grid-column:1/-1;margin-bottom:.2rem}
.form-grid legend small{color:var(--muted);font-weight:500}
.field{min-width:0}
.field>label{margin-bottom:.35rem}
.span2{grid-column:1/-1}
.note{background:var(--coral-wash);color:var(--coral-ink);border-radius:var(--r-sm);padding:.7rem .9rem;font-size:.88rem;margin:0}
.note-cap{display:flex;align-items:flex-end}
.seg{display:inline-flex;border:1.5px solid var(--line);border-radius:var(--r-sm);overflow:hidden;background:#fff}
.seg label{margin:0;cursor:pointer}
.seg input{position:absolute;opacity:0;pointer-events:none}
.seg span{display:block;padding:.55rem 1.6rem;font-weight:700;color:var(--muted)}
.seg input:checked+span{background:var(--navy);color:#fff}
.seg input:focus-visible+span{outline:3px solid var(--coral);outline-offset:-3px}
.form-actions{display:flex;flex-wrap:wrap;gap:.6rem}
.sticky-actions{position:sticky;bottom:0;background:linear-gradient(transparent,var(--bg) 30%);padding:1.2rem 0 .8rem;z-index:5}

/* ---------- صفحة الفعالية: مسار العمل ---------- */
.ev-layout{display:grid;grid-template-columns:300px 1fr;gap:1.4rem;align-items:start}
.ev-facts{position:sticky;top:86px}
.ev-facts h3{margin-top:1rem}
.facts{margin:0;display:grid;gap:.55rem}
.facts div{display:grid;grid-template-columns:96px 1fr;gap:.6rem}
.facts dt{color:var(--muted);font-size:.85rem}
.facts dd{margin:0;font-weight:600;min-width:0}
.facts+.facts{margin-top:.55rem;padding-top:.55rem;border-top:1px dashed var(--line)}
.map-link{display:block;font-weight:500;font-size:.85rem}
.instr{margin:0;padding-inline-start:1.1rem;font-size:.9rem}
.danger-zone{margin-top:1.2rem;padding-top:.8rem;border-top:1px solid var(--line)}

.flow{list-style:none;margin:0;padding:0;counter-reset:step}
.step{position:relative;padding:0 3.4rem 1.6rem 0;counter-increment:step}
.step::before{content:counter(step);position:absolute;right:0;top:0;width:2.3rem;height:2.3rem;border-radius:50%;display:grid;place-items:center;font-weight:800;
  background:#fff;border:2px solid var(--line);color:var(--muted);z-index:1}
.step::after{content:"";position:absolute;right:calc(1.15rem - 1px);top:2.3rem;bottom:0;width:2px;background:var(--line)}
.step:last-child::after{display:none}
.step>h2{display:flex;flex-wrap:wrap;align-items:center;min-height:2.3rem;margin:0 0 .5rem}
.step.done::before{content:"✓";background:var(--teal);border-color:var(--teal);color:#fff}
.step.done::after{background:var(--teal)}
.step.current::before{border-color:var(--coral);color:var(--ink);box-shadow:0 0 0 4px var(--coral-wash)}
.step.locked{opacity:.5}
.step>*:not(h2){max-width:760px}
.waiting{background:var(--coral-wash);color:var(--coral-ink);padding:.7rem 1rem;border-radius:var(--r-sm)}
.review{display:grid;gap:.4rem;max-width:520px}
.review textarea{margin-top:.3rem;font-weight:400}
.cap-line{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}
.cap-line .meter{flex:1;max-width:260px;margin:0;height:7px}
.days{display:flex;gap:.5rem;overflow-x:auto;padding:.2rem 0 .6rem}
.day{flex:none;border:1px solid var(--line);border-radius:var(--r-sm);padding:.5rem .8rem;text-align:center;display:flex;flex-direction:column;background:#fff;min-width:96px}
.day b{font-size:1.4rem;color:var(--teal-ink);line-height:1.2}
.day small{color:var(--muted);font-size:.72rem}
.day.today{border-color:var(--coral);background:var(--coral-wash)}

.linkpanel{display:grid;grid-template-columns:1fr 150px;gap:1rem;border:1px solid var(--line);border-radius:var(--r);padding:1rem;background:#fbfdfd;margin:.6rem 0}
.lp-links{display:grid;gap:.5rem;align-content:start;min-width:0}
.lp-row{display:grid;grid-template-columns:52px 1fr auto;gap:.5rem;align-items:center}
.lp-k{font-size:.8rem;color:var(--muted);font-weight:600}
.lp-row input{font-size:.85rem;padding:.45rem .6rem;background:#fff;text-align:left}
.lp-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.2rem}
.lp-qr{display:flex;flex-direction:column;gap:.5rem;align-items:stretch}
.qr{background:#fff;border:1px solid var(--line);border-radius:var(--r-sm);padding:8px;aspect-ratio:1}
.qr img,.qr canvas{width:100%!important;height:auto!important;display:block}
.qr canvas{display:none!important}

/* ---------- معالج الأسئلة ---------- */
.qlist{display:grid;gap:.8rem;margin-bottom:1rem}
.qcard{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:1rem 1.1rem;display:grid;gap:.6rem;border-inline-start:4px solid var(--coral)}
.qcard header{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.qnum{width:1.9rem;height:1.9rem;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;font-weight:800;font-size:.85rem;flex:none}
.qcard header select{width:auto;flex:1;min-width:180px;padding:.4rem .6rem;font-size:.88rem}
.qtools{display:flex;gap:.25rem}
.qtools button{font:inherit;font-size:.78rem;border:1px solid var(--line);background:#fff;border-radius:var(--r-sm);padding:.3rem .55rem;cursor:pointer;color:var(--muted)}
.qtools button:hover:not(:disabled){border-color:var(--teal-ink);color:var(--teal-ink)}
.qtools button:disabled{opacity:.35;cursor:default}
.qtools .del:hover{border-color:var(--red)!important;color:var(--red)!important}
.qtext{font-size:1.05rem;font-weight:600}
.qhelp{font-size:.88rem}
.scale-cfg{display:grid;grid-template-columns:70px 70px 1fr 1fr;gap:.6rem}
.adder .label{margin-bottom:.6rem}
.type-grid{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.9rem}
.tchip{font:inherit;font-size:.85rem;font-weight:600;border:1.5px dashed #bfd0d2;background:#fff;color:var(--ink);border-radius:99px;padding:.35rem .85rem;cursor:pointer}
.tchip:hover{border-color:var(--teal);border-style:solid;background:var(--teal-wash)}
.chip{font:inherit;font-size:.8rem;border:1px solid var(--line);background:#fff;border-radius:99px;padding:.1rem .6rem;margin:.15rem;cursor:pointer;color:var(--teal-ink)}
.dlg{border:0;border-radius:var(--r);padding:0;width:min(640px,94vw);max-height:88vh}
.dlg::backdrop{background:rgba(30,26,77,.45)}
.dlg-head{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.2rem;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff}
.dlg-head h2{margin:0}
.form-preview{padding:1.2rem}

/* ---------- عناصر الأسئلة (عامة) ---------- */
.qfield{margin-bottom:1.35rem}
.q-label{font-size:1rem;font-weight:700;margin-bottom:.4rem;display:block}
.q-help{color:var(--muted);font-size:.86rem;margin:-.2rem 0 .5rem}
.req{color:var(--red)}
.choices{display:grid;gap:.4rem}
.choice{display:flex;align-items:center;gap:.6rem;border:1.5px solid var(--line);border-radius:var(--r-sm);padding:.6rem .8rem;font-weight:500;cursor:pointer;background:#fff}
.choice input{accent-color:var(--teal);width:1.1rem;height:1.1rem;flex:none}
.choice:has(input:checked){border-color:var(--teal);background:var(--teal-wash)}
.pills{display:flex;flex-wrap:wrap;gap:.4rem}
.pill{cursor:pointer;margin:0}
.pill input{position:absolute;opacity:0;pointer-events:none}
.pill span{display:block;min-width:2.8rem;text-align:center;padding:.55rem .8rem;border:1.5px solid var(--line);border-radius:var(--r-sm);font-weight:700;background:#fff}
.pill.wide span{min-width:5.5rem}
.pill input:checked+span{background:var(--navy);border-color:var(--navy);color:#fff}
.pill input:focus-visible+span{outline:3px solid var(--coral);outline-offset:2px}
.pills.agree .pill span{font-weight:600;font-size:.88rem}
.scale-ends{display:flex;justify-content:space-between;font-size:.8rem;color:var(--muted);margin-bottom:.3rem}
.stars{display:flex;gap:.2rem;direction:rtl}
.star{cursor:pointer;margin:0;font-size:2.2rem;line-height:1;color:#dcdae8;transition:color .1s,transform .1s}
.star input{position:absolute;opacity:0;pointer-events:none}
.star.on{color:var(--coral)}
.star:has(input:focus-visible){outline:3px solid var(--coral);border-radius:4px}
.star:active{transform:scale(.9)}

/* ---------- الصفحات العامة ---------- */
body.public{font-size:16px;background:radial-gradient(90% 360px at 85% -60px,var(--coral-wash),transparent 70%) no-repeat,var(--bg);min-height:100vh;display:flex;flex-direction:column}
.pub-head{display:flex;justify-content:center;padding:1.4rem 1rem .2rem}
.pub-main{width:100%;max-width:680px;margin:0 auto;padding:1rem 1rem 3rem;flex:1}
.pub-main.narrow{max-width:460px}
.pub-foot{text-align:center;color:var(--muted);font-size:.8rem;padding:1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom))}
.ev-hero{padding:1.2rem 0 1.4rem}
.ev-hero h1{font-size:clamp(1.6rem,6vw,2.3rem);margin:.5rem 0 1rem;font-weight:800;line-height:1.3}
.ev-hero.compact h1{font-size:clamp(1.35rem,5vw,1.8rem);margin-bottom:.4rem}
.type-tag{display:inline-block;background:var(--coral-wash);color:var(--coral-ink);font-weight:700;font-size:.85rem;padding:.2rem .8rem;border-radius:99px}
.ev-hero .facts{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:1rem 1.1rem}
.seats{margin:.9rem 0 0;color:var(--muted)}
.seats b{color:var(--coral);font-size:1.2rem}
.pub-form{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:1.4rem 1.3rem}
.pub-form>h2{font-size:1.2rem;margin-bottom:1rem}
.narrow-form{text-align:center}
.narrow-form input{text-align:center;font-size:1.25rem;letter-spacing:.06em;margin:.4rem 0 1rem;padding:.8rem}
.checkin h2{font-size:1.5rem;margin:.2rem 0 1.4rem}
.not-me{display:inline-block;margin-top:1rem;color:var(--muted);font-size:.9rem}
.result{text-align:center;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:2rem 1.3rem}
.result-mark{width:72px;height:72px;margin-bottom:.6rem}
.result.ok{border-top:4px solid var(--teal)}
.result.closed{border-top:4px solid var(--coral)}
.result .btn{margin-top:.5rem}
.notice-card,.auth-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:1.8rem 1.5rem;margin-top:1rem}
.auth-card{text-align:center}
.auth-card form{text-align:right;margin-top:1.2rem}
.auth-mark{width:64px;height:64px;margin-bottom:.4rem}
.login-page .pub-head{display:none}
.login-page .pub-main{display:flex;flex-direction:column;justify-content:center}

/* ---------- صفحة الترحيب (أول تحضير) ---------- */
body.welcome-page{background:radial-gradient(110% 60% at 50% 0,var(--coral-wash) 0,#fff 62%) no-repeat,#fff}
.welcome{text-align:center;padding:2.4rem .4rem 1rem}
.bloom{width:120px;margin:0 auto 1.1rem}
.bloom img{width:100%;height:auto;display:block;animation:bloom 1.1s cubic-bezier(.2,.8,.2,1) both}
@keyframes bloom{from{opacity:0;transform:rotate(-70deg) scale(.3)}to{opacity:1;transform:none}}
.w-hello{color:var(--teal-ink);font-weight:700;font-size:1.05rem;margin:0}
.w-name{font-family:var(--f-brand);font-size:clamp(2.4rem,11vw,3.8rem);font-weight:700;margin:.1rem 0 .5rem;line-height:1.35;color:var(--navy)}
.w-lead{color:var(--muted);margin:0}
.w-title{font-size:clamp(1.25rem,5vw,1.6rem);color:var(--coral);font-weight:800;margin:.2rem auto 1rem;max-width:30ch}
.w-check{display:inline-block;background:var(--teal-wash);color:var(--teal-deep);font-weight:700;font-size:.9rem;border-radius:99px;padding:.3rem 1rem;margin-bottom:1.6rem}
.w-cards{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;text-align:right;margin-bottom:1rem}
.w-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:1rem;display:flex;flex-direction:column;gap:.2rem}
.w-card.hall{background:var(--navy);border-color:var(--navy);color:#fff}
.w-card.hall .w-k{color:#b9b6d6}
.w-card.hall a:not(.btn){color:#ffb39f;font-weight:700}
.w-card.hall .btn{background:var(--coral);border-color:var(--coral)}
.w-card strong{font-size:1.2rem;line-height:1.35}
.w-card span:not(.w-k){color:var(--muted);font-size:.88rem}
.w-k{font-size:.8rem;color:var(--muted);font-weight:700}
.w-card .btn{margin-top:.4rem}
.w-instr{text-align:right;background:var(--teal-wash);border-radius:var(--r);padding:1.1rem 1.2rem;margin-bottom:1.4rem}
.w-instr h3{margin:0 0 .5rem;color:var(--teal-deep);font-size:1rem}
.w-instr ul{margin:0;padding:0;list-style:none;display:grid;gap:.45rem}
.w-instr li{display:flex;align-items:flex-start;gap:.7rem;line-height:1.7}
.w-instr li::before{content:"";flex:none;width:.55rem;height:.55rem;margin-top:.6em;border-radius:50% 0 50% 0;background:var(--teal)}
.w-sign{color:var(--muted);font-size:.92rem}
.w-sign span{color:var(--navy);font-weight:700}

/* ---------- الرسائل ---------- */
.msg-cols{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}
.msg-cols textarea{margin:.3rem 0 .2rem;font-size:.95rem}
.phone-preview{background:#efe7dd}
.wa-bubble{background:#dcf8c6;border-radius:10px 0 10px 10px;padding:.7rem .9rem;font-size:.92rem;line-height:1.6;box-shadow:0 1px 1px rgba(0,0,0,.1);max-width:340px;margin-inline-start:auto;word-break:break-word}
.progress .bar{height:10px;background:#e9eff0;border-radius:9px;overflow:hidden;margin-top:1rem}
.progress .bar i{display:block;height:100%;width:0;background:var(--teal);transition:width .3s}
.progress .pt{font-weight:700;margin-top:.4rem}
.sendlog{list-style:none;padding:0;margin:.5rem 0 0;max-height:220px;overflow:auto;font-size:.85rem}
.sendlog li{padding:.2rem 0;border-bottom:1px dashed var(--line)}
.sendlog li.fail{color:var(--red)}

/* ---------- التقرير ---------- */
.r-title{font-size:1.25rem;font-weight:800;color:var(--coral-ink);margin:.3rem 0 .1rem!important}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:0;background:#fff;border:1px solid var(--line);border-radius:var(--r);margin-bottom:1.2rem;overflow:hidden}
.kpis>div{padding:1.1rem 1.2rem;border-left:1px solid var(--line);display:flex;flex-direction:column}
.kpis>div:last-child{border-left:0}
.kpis span{font-size:.85rem;color:var(--muted);font-weight:600}
.kpis b{font-size:2.1rem;font-weight:800;line-height:1.25}
.kpis small{color:var(--muted)}
.kpis .sat b{color:var(--coral)}
.cols-chart{display:flex;align-items:flex-end;gap:6px;height:150px;padding:1.2rem 0 0;overflow-x:auto;border-bottom:1px solid var(--line)}
.cc{flex:1 0 34px;max-width:60px;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;font-size:.72rem;color:var(--muted)}
.cc b{color:var(--ink);font-size:.78rem}
.cc i{display:block;width:70%;background:var(--teal);border-radius:4px 4px 0 0;min-height:4px}
.rq-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:1rem}
.rq{border:1px solid var(--line);border-radius:var(--r-sm);padding:1rem;break-inside:avoid}
.rq h4{font-size:.98rem;margin-bottom:.2rem}
.rq-n{color:var(--muted);font-size:.84rem}
.rq-n b{color:var(--teal-ink);font-size:1rem}
.bars{display:grid;gap:.4rem}
.bar-row{display:grid;grid-template-columns:minmax(70px,34%) 1fr 72px;gap:.6rem;align-items:center;font-size:.86rem}
.bl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bt{height:12px;background:#eef3f3;border-radius:9px;overflow:hidden}
.bt i{display:block;height:100%;background:var(--teal);border-radius:9px}
.bv{font-weight:700;text-align:left}
.bv small{color:var(--muted);font-weight:500}
.texts{margin:0;padding:0;list-style:none;max-height:300px;overflow:auto;font-size:.88rem}
.texts li{padding:.45rem .1rem;border-bottom:1px dashed var(--line)}
.inline-bar{display:inline-block;width:90px;height:8px;background:#eef3f3;border-radius:9px;overflow:hidden;vertical-align:middle}
.inline-bar i{display:block;height:100%;background:var(--coral-ink)}
.menu{position:relative}
.menu summary{list-style:none}
.menu summary::-webkit-details-marker{display:none}
.menu>div{position:absolute;left:0;top:calc(100% + 6px);background:#fff;border:1px solid var(--line);border-radius:var(--r-sm);min-width:200px;z-index:10;padding:.3rem;box-shadow:0 8px 24px rgba(30,26,77,.12)}
.menu>div a{display:block;padding:.5rem .8rem;border-radius:4px;color:var(--ink)}
.menu>div a:hover{background:var(--bg);text-decoration:none}
.print-foot{display:none}

/* المستخدمون والإعدادات */
.user-row{border-top:1px solid var(--line);padding:.6rem 0}
.user-row:first-of-type{border-top:0}
.user-row summary{display:flex;align-items:center;gap:.5rem;cursor:pointer;list-style:none}
.user-row summary::-webkit-details-marker{display:none}
.user-row summary>span:first-child{flex:1;display:flex;flex-direction:column;min-width:0}
.user-row summary small{color:var(--muted);text-align:right}
.user-row form{padding:.8rem 0 .4rem}
.user-row.inactive summary{opacity:.55}
.inline-test{display:flex;gap:.5rem;margin-top:1rem;padding-top:1rem;border-top:1px dashed var(--line)}
.inline-test input{flex:1}
.type-list{display:grid;gap:.5rem}
.type-row{display:flex;gap:.6rem;align-items:center}
.type-row .switch{flex:none;font-size:.85rem}
.logo-prev{display:flex;align-items:center;gap:1rem}
.logo-prev img{max-height:56px;border:1px solid var(--line);border-radius:6px;padding:4px;background:#fff}
.approve-card header{display:flex;justify-content:space-between}
.approve-card .facts{margin-bottom:.6rem}

/* ---------- الشهادة ---------- */
body.cert-page{background:#e8e7f0;font-size:16px}
.cert-tools{display:flex;flex-wrap:wrap;gap:.8rem;align-items:center;justify-content:center;padding:1rem}
.cert-page .pub-main{max-width:1180px}
.cert-fit{width:100%;overflow:hidden}
.cert{width:297mm;height:210mm;background:#fff;transform-origin:top right;padding:9mm;box-shadow:0 10px 40px rgba(30,26,77,.15)}
.cert-frame{height:100%;border:3px solid var(--navy);padding:9mm 22mm 11mm;display:flex;flex-direction:column;align-items:center;text-align:center;position:relative;
  background:radial-gradient(55% 45% at 50% 0,var(--coral-wash),transparent 70%)}
.cert-frame::before{content:"";position:absolute;width:26mm;height:26mm;background:url(brand/flower.png) center/contain no-repeat;opacity:.9}
.cert-frame::before{top:9mm;right:11mm}
.cert-top{display:flex;flex-direction:column;align-items:center;gap:2mm;margin-bottom:2mm}
.cert-top .brand-full{height:30mm;width:auto}
.cert-logo{max-height:22mm;max-width:60mm;object-fit:contain}
.cert-org{font-weight:700;color:var(--muted);font-size:13pt}
.cert-title{font-size:30pt;font-weight:800;color:var(--navy);margin:1mm 0 4mm}
.cert-line{font-size:14pt;margin:1mm 0;color:var(--ink)}
.cert-name{font-family:var(--f);font-size:28pt;font-weight:800;color:var(--navy);margin:1mm 0 2mm;padding:0 12mm 1mm;border-bottom:2px solid var(--coral);line-height:1.45;white-space:nowrap}
.cert-event{font-size:19pt;font-weight:800;color:var(--coral);margin:2mm 0 3mm;max-width:220mm;line-height:1.35}
.cert-wish{font-size:12pt;color:var(--teal-ink);margin-top:2mm;font-weight:600}
.cert-sign{margin-top:auto;width:100%;display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:10mm}
.cert-sign div{display:flex;flex-direction:column;gap:1mm}
.cert-sign span{font-size:10pt;color:var(--muted)}
.cert-sign strong{font-size:13pt;border-top:1px solid var(--line);padding-top:2mm;min-width:55mm;color:var(--navy)}
.cert-no strong{border:0;font-size:10pt;color:var(--muted);font-weight:600}

/* ---------- الجوال ---------- */
@media (max-width:980px){
  .ev-layout{grid-template-columns:1fr}
  .ev-facts{position:static}
  .msg-cols{grid-template-columns:1fr}
}
@media (max-width:860px){
  .menu-btn{display:block}
  .topbar{padding:0 .6rem;gap:.4rem}
  .topbar .brand-dark{height:46px}
  .who-role{display:none}
  .sidebar{transform:translateX(100%);transition:transform .25s ease;width:260px;box-shadow:none;padding-bottom:calc(1.2rem + env(safe-area-inset-bottom))}
  body.nav-open .sidebar{transform:none;box-shadow:-10px 0 30px rgba(30,26,77,.15)}
  .main{margin-right:0;padding:1.2rem 1rem 4rem}
  h1{font-size:1.45rem}
  .tally,.kpis{grid-template-columns:1fr 1fr}
  .tally>*:nth-child(2),.kpis>div:nth-child(2){border-left:0}
  .tally>*:nth-child(-n+2),.kpis>div:nth-child(-n+2){border-bottom:1px solid var(--line)}
  .search,.search input{width:100%;min-width:0}
  .form-grid fieldset{grid-template-columns:1fr;padding:1rem}
  .table.rows thead{display:none}
  .table.rows,.table.rows tbody,.table.rows tr,.table.rows td{display:block;width:100%}
  .table.rows tr{padding:.6rem .9rem;border-bottom:1px solid var(--line)}
  .table.rows td{border:0;padding:.15rem 0;display:flex;gap:.6rem;justify-content:space-between;text-align:left}
  .table.rows td::before{content:attr(data-l);color:var(--muted);font-size:.8rem;font-weight:600;text-align:right}
  .table.rows td.ltr-r{text-align:left}
  .linkpanel{grid-template-columns:1fr}
  .lp-qr{flex-direction:row;align-items:center}
  .lp-qr .qr{width:120px;flex:none}
  .step{padding-right:2.9rem}
  .scale-cfg{grid-template-columns:1fr 1fr}
  .page-head .head-actions{width:100%}
  .page-head .head-actions .btn{flex:1}
  .sticky-actions .btn{flex:1}
}
@media (max-width:480px){
  .w-cards{grid-template-columns:1fr}
  .facts div{grid-template-columns:80px 1fr}
  .pub-form{padding:1.2rem 1rem}
  .bar-row{grid-template-columns:1fr 64px}
  .bl{grid-column:1/-1;white-space:normal}
  .pills.agree{flex-direction:column}
  .pills.agree .pill span{text-align:right}
  .lp-row{grid-template-columns:1fr auto}
  .lp-k{grid-column:1/-1}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}

/* ---------- الطباعة ---------- */
@media print{
  body{background:#fff!important}
  .topbar,.sidebar,.scrim,.no-print,.pub-head,.pub-foot,.toast{display:none!important}
  .main{margin:0;padding:0;max-width:none}
  .panel,.kpis,.table-wrap{border-color:#ccc;break-inside:auto}
  .panel{padding:0 0 1rem;border:0;border-bottom:1px solid #ccc;border-radius:0}
  .print-foot{display:block;color:#777;font-size:.8rem;margin-top:1rem}
  .texts{max-height:none;overflow:visible}
  .bt i,.cc i,.inline-bar i,.meter i{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .table.rows thead{display:table-header-group}
}
@media print{
  body.cert-page .pub-main{padding:0;max-width:none}
  body.cert-page .cert-fit{height:auto!important;overflow:visible}
  body.cert-page .cert{box-shadow:none;transform:none!important;width:297mm;height:209mm}
  body.cert-page *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
@page{margin:12mm}

/* ---------- الختم ورمز التحقق ---------- */
.cert-verify{align-items:center;text-align:center}
.cert-verify span{font-size:8.5pt}
.cert-verify strong{border:0!important;min-width:0!important;padding-top:0!important;font-size:9.5pt!important;color:var(--muted)!important;font-weight:600!important}
.cert-qr{display:block;width:24mm;height:24mm;padding:1.2mm;background:#fff;border:1px solid var(--line);border-radius:2mm;cursor:pointer;transition:transform .15s}
.cert-qr:hover{transform:scale(1.06)}
.cert-qr img,.cert-qr canvas{width:100%!important;height:100%!important;display:block}
.cert-qr canvas{display:none!important}
.cert-signer{position:relative}
.cert-stamp{position:absolute;left:-4mm;bottom:-6mm;width:36mm;height:36mm;pointer-events:none;mix-blend-mode:multiply}
.cert-stamp img{width:100%;height:100%;object-fit:contain;opacity:.9}
.stamp-svg{width:100%;height:100%;color:#24379a;opacity:.88;font-family:var(--f);overflow:visible}
.verify-card h1{font-size:1.5rem;margin-bottom:.2rem}
.verify-badge{width:64px;height:64px;border-radius:50%;background:var(--teal);color:#fff;font-size:2rem;font-weight:800;display:grid;place-items:center;margin:0 auto .8rem}
.verify-facts{text-align:right;margin:1.2rem 0;background:var(--bg);border-radius:var(--r-sm);padding:1rem}

/* ---------- هيرو صفحات التسجيل ---------- */
.hero{position:relative;overflow:hidden;background:var(--navy);color:#fff;text-align:center;
  padding:2.2rem 1.2rem 5.2rem;
  background-image:radial-gradient(70% 90% at 100% 0,rgba(242,96,62,.28),transparent 60%),radial-gradient(60% 80% at 0 100%,rgba(19,168,158,.22),transparent 60%)}
.hero-in{position:relative;z-index:1;max-width:640px;margin:0 auto}
.hero .brand-dark{height:64px;width:auto;margin:0 auto 1.2rem}
.hero-title{font-family:var(--f-brand);font-weight:700;font-size:clamp(2.1rem,9vw,3.3rem);line-height:1.3;margin:0}
.hero-title::after{content:"";display:block;width:56px;height:3px;border-radius:3px;background:var(--coral);margin:.7rem auto .7rem}
.hero-sub{color:#cfcde6;font-size:1.02rem;margin:0}
.hero-bloom{position:absolute;width:220px;top:-50px;left:-60px;opacity:.16;transform:rotate(-20deg);pointer-events:none;animation:drift 18s ease-in-out infinite alternate}
.hero-bloom.sm{width:90px;top:auto;bottom:40px;left:auto;right:-18px;opacity:.22;transform:rotate(35deg);animation-duration:14s}
@keyframes drift{to{translate:0 12px;rotate:12deg}}
.has-hero .pub-main{position:relative;margin-top:-3.6rem}
.has-hero .ev-hero{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:1.3rem 1.3rem 1.1rem;box-shadow:0 14px 36px rgba(30,26,77,.12);margin-bottom:1rem}
.has-hero .ev-hero h1{margin-top:.6rem}
.has-hero .ev-hero .facts{border:0;padding:0;background:none;border-top:1px dashed var(--line);padding-top:.9rem;border-radius:0}
.has-hero .ev-hero .seats{margin-top:.8rem}
@media (min-width:700px){.hero{padding:3rem 1.5rem 6rem}.hero-bloom{width:300px}}

/* الإطار الداخلي (بديل outline ليظهر في ملف PDF) */
.cert-frame::after{content:"";position:absolute;inset:4px;border:1px solid var(--coral);pointer-events:none}
.cert-frame>*{position:relative}
/* وضع الإنشاء الخفي داخل صفحة الرسائل */
body.cert-embed{background:#fff}
body.cert-embed .pub-main{padding:0;max-width:none}
body.cert-embed .cert-fit{overflow:visible;height:auto!important}
body.cert-embed .cert{box-shadow:none;transform:none!important}
.cert-tools .btn.accent{font-size:1rem}