/* Prime Shield admin — v12 layer (ADMIN12): passkey / PIN / recovery sign-in, setup checklist, Security page, announcements,
   documents + flipbook pipeline, certificates, site texts & contact, feature switches, the «نشر التحديثات» button.
   Riyadh Night tokens from admin-v11.css; RTL first (logical properties); touch targets ≥ 44 px; no inline styles (CSP). */

/* ---------- login additions */
.method--pk .pk-btn { min-height: 64px; justify-content: flex-start; gap: 14px; padding-inline: 18px; text-align: start;
  background: var(--g-lime); color: var(--ps-on-lime); border-color: transparent; box-shadow: var(--sh-lime); }
.method--pk .pk-btn:hover { filter: brightness(1.04); }
.method--pk .pk-btn:disabled { opacity: .7; }
.method--pk .pk-btn svg { width: 28px; height: 28px; }
.pk-t { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.pk-t b { font-size: 16.5px; }
.pk-t small { font-size: 12.5px; font-weight: 600; opacity: .78; }
.alt-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin: 14px 0 0 !important; }
.linkish { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 4px; border: 0; background: none; color: var(--ps-lime); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(225, 228, 40, .45); }
.linkish:hover { text-decoration-color: currentColor; }
.linkish svg { width: 18px; height: 18px; }
.setup-box { border: 1px solid rgba(225, 228, 40, .45); background: linear-gradient(135deg, rgba(225, 228, 40, .09), rgba(47, 211, 198, .05)); border-radius: var(--r-m); padding: 16px; margin: 0 0 18px; }
.setup-box h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 17px; }
.setup-box h2 svg { width: 20px; height: 20px; color: var(--ps-lime); }
.setup-box p { margin: 0 0 12px !important; color: var(--ps-lead) !important; }
.pin-input, .rec-input { font-family: var(--f-mono); font-size: 24px !important; letter-spacing: .32em; text-align: center; min-height: 56px; }
.rec-input { font-size: 20px !important; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Security page */
.sec-sum { margin-bottom: 14px; }
.sec-methods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.sec-methods li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-height: 52px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: rgba(255, 255, 255, .025); min-width: 0; }
.sec-methods li .pill { white-space: normal; max-width: 100%; }
.sec-methods li > svg { width: 20px; height: 20px; color: var(--ps-lime); flex: none; }
.sec-methods li b { flex: 1 1 140px; min-width: 0; font-size: 14px; font-weight: 600; }
.sec-methods li.soon { color: var(--muted); border-style: dashed; }
.sec-methods li.soon > svg { color: var(--muted); }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.sec-grid .panel + .panel { margin-top: 0; }
.sec-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sec-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: rgba(255, 255, 255, .02); }
.sec-li-main { display: flex; align-items: flex-start; gap: 10px; min-width: 0; flex: 1 1 220px; }
.sec-li-main > svg { width: 22px; height: 22px; color: var(--ps-sky); flex: none; margin-top: 2px; }
.sec-li-main b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; }
.sec-li-main small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.sec-acts { margin-top: 12px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-l); }
.sec-table { min-width: 520px; }
.sec-table tbody tr { cursor: default; }
.rc-list { margin: 0; padding: 14px 18px; columns: 2; column-gap: 28px; background: var(--ps-stone-0); color: var(--ps-ink); border-radius: var(--r-s); font-size: 16px; line-height: 2.1; }
.rc-list li { break-inside: avoid; }
.rc-list code { font-size: 15.5px; letter-spacing: .06em; color: var(--ps-ink); }
@media (max-width: 420px) { .rc-list { columns: 1; } }
@media print {
  body > *:not(dialog) { display: none !important; }
  dialog.rc-dlg { position: static; border: 0; box-shadow: none; background: #fff; color: #000; }
  dialog.rc-dlg .d-foot, dialog.rc-dlg .row, dialog.rc-dlg .switch, dialog.rc-dlg .icon-btn { display: none !important; }
}

/* ---------- setup checklist (#/welcome) */
.wz { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; counter-reset: wz; }
.wz-step { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--glass-bd); border-radius: var(--r-l); background: var(--glass-bg), #0E1C33; }
.wz-step.done { border-color: rgba(123, 224, 160, .45); }
.wz-n { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 16px/1 var(--f-mono); border: 1px solid var(--ps-lime); color: var(--ps-lime); }
.wz-step.done .wz-n { background: var(--ok); border-color: var(--ok); color: var(--ps-on-lime); }
.wz-n svg { width: 20px; height: 20px; }
.wz-b { flex: 1; min-width: 0; }
.wz-b h2 { margin: 4px 0 2px; font-size: 17px; }
.wz-b .row { margin-top: 10px; }
.wz-end { justify-content: flex-end; }

/* ---------- publish button (top bar) + live progress */
.pub-btn { position: relative; }
.pub-btn .pub-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font: 700 12px/1 var(--f-mono); background: var(--ps-on-lime); color: var(--ps-lime); }
.pub-pop { display: grid; gap: 12px; }
.pub-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pub-steps li { display: flex; align-items: center; gap: 10px; min-height: 30px; color: var(--muted); font-size: 14px; }
.pub-steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.pub-steps li.on { color: var(--fg); font-weight: 600; }
.pub-steps li.on::before { border-color: var(--ps-lime); border-top-color: transparent; animation: pub-spin .9s linear infinite; }
.pub-steps li.done { color: var(--fg-2); }
.pub-steps li.done::before { background: var(--ok); border-color: var(--ok); }
.pub-steps li.fail::before { background: var(--bad); border-color: var(--bad); }
.pub-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pub-bar > i { display: block; height: 100%; width: 0; background: var(--g-lime); border-radius: inherit; transition: width .5s var(--ease); }
@keyframes pub-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pub-steps li.on::before { animation: none; border-top-color: var(--ps-lime); } .pub-bar > i { transition: none; } }

/* ---------- managers (announcements, documents, certificates, site texts, switches) */
.mgr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mgr-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--glass-bd); border-radius: var(--r-m); background: var(--glass-bg), #0E1C33; }
.mgr-item.off { opacity: .72; }
.mgr-item .mi-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(225, 228, 40, .12); color: var(--ps-lime); }
.mgr-item .mi-ic svg { width: 22px; height: 22px; }
.mgr-item .mi-b { min-width: 0; }
.mgr-item .mi-b b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.mgr-item .mi-b small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.mgr-item .mi-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .mgr-item { grid-template-columns: auto minmax(0, 1fr); } .mgr-item .mi-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.tone-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-inline-end: 6px; border: 1px solid rgba(255, 255, 255, .3); }
.tone-dot.lime { background: var(--ps-lime); } .tone-dot.teal { background: var(--ps-teal); } .tone-dot.amber { background: var(--ps-amber); } .tone-dot.night { background: var(--ps-night-3); }
.an-preview { border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); }
.an-bar { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; font-weight: 600; font-size: 14.5px; }
.an-bar svg { width: 18px; height: 18px; flex: none; }
.an-bar .an-cta { margin-inline-start: auto; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.an-bar.lime { background: var(--g-lime); color: var(--ps-on-lime); }
.an-bar.teal { background: linear-gradient(90deg, #1FB5AA, #2FD3C6); color: #04201E; }
.an-bar.amber { background: linear-gradient(90deg, #F2A23A, #FFB547); color: #241400; }
.an-bar.night { background: linear-gradient(90deg, #10203A, #182D4E); color: var(--ps-text); border-top: 1px solid rgba(225, 228, 40, .4); }
.fgrid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.seg2 { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg2 button { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg-2); cursor: pointer; font-weight: 600; }
.seg2 button[aria-pressed="true"] { background: rgba(225, 228, 40, .16); border-color: var(--ps-lime); color: var(--fg); }
.sw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sw-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: rgba(255, 255, 255, .02); }
.sw-list li .sw-t { min-width: 0; }
.sw-list li .sw-t b { display: block; font-size: 14.5px; }
.sw-list li .sw-t small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.prog { display: grid; gap: 8px; }
.prog-bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.prog-bar > i { display: block; height: 100%; width: 0; background: var(--g-lime); transition: width .4s var(--ease); }
.prog small { color: var(--muted); }
.doc-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.doc-thumbs img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #0E1C33; }
.txt-row { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.txt-row:last-child { border-bottom: 0; }
.txt-row .txt-k { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.txt-row .txt-k b { font-size: 14px; }
.txt-row .txt-k code { color: var(--faint); font-size: 11.5px; }
.txt-row .txt-def { color: var(--muted); font-size: 12.5px; margin: 0; }
.txt-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 8px; }
.txt-pair textarea { min-height: 64px; }
.badge-ov { color: var(--ps-on-lime); background: var(--ps-lime); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; }

/* ---------- client / partner logos */
.lg-grid { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.lg-card { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px solid var(--glass-bd); border-radius: var(--r-m); background: var(--glass-bg), #0E1C33; }
.lg-card.off { opacity: .7; }
.lg-card b { font-size: 14px; overflow-wrap: anywhere; }
.lg-chip { height: 76px; display: grid; place-items: center; border-radius: 12px; background: #0A1424; border: 1px solid var(--line); padding: 10px; }
.lg-chip img { max-width: 100%; max-height: 52px; width: auto; height: auto; object-fit: contain; }
.cert-prev { display: block; max-width: 200px; height: auto; border-radius: 10px; border: 1px solid var(--line); margin: 10px 0; }
.cin-cur { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cin-cur img, .cin-th { width: 100%; max-width: 320px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #0A1424; }
/* Updates composer: ready hashtags (admin-social.js tagChips) */
.tag-pick .tag-grp { margin-top: 10px; }
.tag-pick .tag-grp h4 { margin: 0 0 6px; font-size: .86rem; color: var(--muted, #9FB0C4); font-weight: 600; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chips .chip-b { min-height: 36px; padding: 0 12px; font-size: .9rem; max-width: 100%; overflow-wrap: anywhere; }
/* login: with the passkey button shown, the password «دخول» is the secondary (outlined lime) action */
.btn.btn--pw2 { background: transparent; border: 1.5px solid var(--ps-lime); color: var(--ps-lime); box-shadow: none; }
.btn.btn--pw2:hover { background: rgba(225, 228, 40, .1); }
