/* 📘 شرح للدراسة:
   تصميم صفحة الحساب (account.html).
*/
/* Account portal — compatibility layer for the v4.6 portal markup on the v5 design */
:root { --gold-light: var(--gold-hi); --gold-dark: var(--gold-lo); --gray: var(--text-2); --gray-dark: var(--muted); --white: var(--text); --navy-card: var(--surface-solid); --blue-light: var(--blue-hi); --shadow-gold: 0 10px 40px rgba(217,169,62,.12); }
body[dir="ltr"] .hide-ltr { display: none !important; }
body[dir="rtl"] .hide-rtl { display: none !important; }
body[data-lang="fr"] .hide-fr { display: none !important; }
body[data-lang="en"] .hide-en { display: none !important; }
body[data-lang="ar"] .hide-ar { display: none !important; }
#account { padding-top: calc(var(--header-h) + 40px); min-height: 100vh; }
.reveal { opacity: 1; transform: none; }
.section-header { text-align: center; max-width: 820px; margin: 0 auto 36px; }
.section-tag { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(217,169,62,.06); color: var(--gold); font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.section-title { font-size: clamp(28px, 4vw, 46px); font-weight: 800; }
.section-desc { color: var(--text-2); max-width: 680px; margin: 0 auto; }
.text-gold { color: var(--gold); }
.acc-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 auto 26px; }
.acc-b { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; color: var(--text-2); line-height: 1.7; }
.acc-b b { display: block; color: var(--gold-hi); font-size: 15px; margin-bottom: 4px; }
.calc-card { max-width: 960px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(18px, 3vw, 36px); box-shadow: var(--shadow-2); backdrop-filter: blur(12px); }
.calc-step { margin-bottom: 18px; }
.calc-step label { display: block; color: var(--gold-hi); font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.calc-card input[type="email"], .calc-card input[type="text"], .calc-card input[type="tel"], .calc-card input[type="number"], .calc-card select, .calc-card textarea { min-height: 48px; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(0,0,0,.2); color: var(--text); padding: 10px 14px; font-size: 15.5px; }
#account .btn { min-height: 48px; padding: 0 22px; border-radius: 999px; font-size: 15px; }
.btn-primary { background: var(--grad-gold); color: var(--on-gold); box-shadow: 0 10px 30px rgba(217,169,62,.25); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-secondary { background: rgba(255,255,255,.03); color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: rgba(217,169,62,.55); background: rgba(217,169,62,.08); }
.btn-whatsapp { background: #1faa59; color: #fff; }
.btn-lg { min-height: 54px; }
.btn-note { color: var(--muted); font-size: 13px; line-height: 1.8; text-align: center; margin-top: 10px; }
.role-banner { display: flex; align-items: center; gap: 12px; border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 20px; font-weight: 800; font-size: 16px; }
.role-banner small { display: block; font-weight: 600; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.role-client { background: rgba(47,143,230,.08); border: 1px solid rgba(47,143,230,.35); color: var(--blue-hi); }
.role-tech { background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.35); color: var(--success); }
.role-admin { background: rgba(217,169,62,.08); border: 1px solid rgba(217,169,62,.4); color: var(--gold-hi); }
.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.p-card { background: rgba(255,255,255,.025); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 18px 20px; transition: border-color .3s; }
.p-card:hover { border-color: rgba(217,169,62,.3); }
.p-card > h4 { color: var(--gold-hi); font-size: 15px; font-weight: 800; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.p-card.wide { grid-column: 1 / -1; }
.st-chip { display: inline-block; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 800; }
.st-new { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #f87171; }
.st-prog { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); color: #fbbf24; }
.st-done { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4); color: var(--success); }
.portal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.portal-table th { color: var(--gold); text-align: start; padding: 8px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.portal-table td { padding: 8px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); }
.v2card { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; margin-top: 16px; }
.v2card h4 { color: var(--gold-hi); font-size: 15px; margin: 0 0 12px; }
.v2row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; flex-wrap: wrap; }
.v2btn { background: rgba(47,143,230,.12); border: 1px solid rgba(47,143,230,.4); color: var(--blue-hi); border-radius: 10px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 800; min-height: 34px; }
.v2btn.red { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.35); color: #f87171; }
.v2in { width: 100%; background: rgba(0,0,0,.2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 14px; color: var(--text); font-size: 15px; outline: none; margin: 4px 0; }
.v2in:focus { border-color: var(--gold); }
.svc-off { opacity: .42; filter: grayscale(.65); pointer-events: none; }
.svc-badge { display: inline-block; margin-top: 6px; background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.4); color: #f87171; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 7px; }
#fatalErr { display: none; position: fixed; bottom: 12px; inset-inline: 12px; z-index: 3000; white-space: pre-wrap; font: 12px/1.5 monospace; background: #2a0b0b; color: #fca5a5; border: 1px solid #7f1d1d; border-radius: 12px; padding: 10px 14px; max-height: 30vh; overflow: auto; }
.acc-hero-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 26px; }
@media (max-width: 480px) { .header-tools .btn span { display: none; } .header-tools .btn { padding: 0 12px; } }

.back-ico { transform: scaleX(-1); } [dir="rtl"] .back-ico { transform: none; }

/* ═════════ v9 access control: activation codes · agents · control centre ═════════
   Industrial panel language: amber = running/waiting, green = done, red = stopped, grey = off */
.role-agent { background: rgba(167,139,250,.08); border: 1px solid rgba(167,139,250,.38); color: #c4b5fd; }
.acx-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 18px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); }
.acx-tabs button { min-height: 46px; border-radius: 10px; font-weight: 800; font-size: 14.5px; color: var(--text-2); transition: background .25s, color .25s, box-shadow .25s; }
.acx-tabs button.on { background: linear-gradient(180deg, #f3d27a, #c9962f); color: #1a1205; box-shadow: 0 6px 18px rgba(217,169,62,.28); }
.acx-tabs.small { display: flex; flex-wrap: wrap; }
.acx-tabs.small button { flex: 1 1 auto; min-height: 40px; padding: 0 14px; font-size: 13.5px; }
.acx-code-in { width: 100%; min-height: 54px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(217,169,62,.45); background: #05070c; color: #f6e7bf;
  font: 800 22px/1 "Inter", ui-monospace, monospace; letter-spacing: .14em; text-align: center; direction: ltr; text-transform: uppercase; }
.acx-code-in:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,169,62,.2); }
.acx-welcome { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.35); font-size: 14px; }
/* status LED */
.acx-led { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 999px; font: 800 11px/1.6 "Inter", sans-serif; letter-spacing: .06em;
  border: 1px solid currentColor; white-space: nowrap; vertical-align: middle; }
.acx-led i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.acx-led.run { color: #ffb648; } .acx-led.run i { animation: acxBlink 1s steps(2) infinite; }
.acx-led.ok { color: #39e58c; } .acx-led.fault { color: #f87171; } .acx-led.off { color: #8b97ad; } .acx-led.off i { box-shadow: none; }
@keyframes acxBlink { 50% { opacity: .3; } }
.acx-center > h4 { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.acx-gen { padding: 16px; border-radius: 14px; background: linear-gradient(180deg, rgba(217,169,62,.06), transparent 70%); border: 1px solid rgba(217,169,62,.25); margin-bottom: 16px; }
.acx-row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.acx-row3 label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); font-weight: 700; }
.acx-row3 .v2in, .acx-gen > .v2in { margin: 0; }
.acx-row3.tight { gap: 8px; margin: 8px 0; }
.acx-go { width: 100%; justify-content: center; margin-top: 12px; }
.acx-issued { margin-top: 14px; padding: 14px; border-radius: 12px; background: #05070c; border: 1px solid rgba(57,229,140,.35); }
.acx-issued-h { font-size: 13.5px; color: var(--text-2); }
.acx-code { margin: 10px 0; text-align: center; font: 900 clamp(24px, 6vw, 34px)/1.2 "Inter", ui-monospace, monospace; letter-spacing: .16em; color: #f6e7bf; text-shadow: 0 0 18px rgba(255,200,110,.35); }
.acx-share { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.acx-share .v2btn { text-decoration: none; display: inline-flex; align-items: center; }
.v2btn.wa { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.4); color: #4ade80; }
.acx-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.acx-filters button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--text-2); }
.acx-filters button.on { border-color: var(--gold); color: var(--gold-hi); background: rgba(217,169,62,.1); }
.acx-filters .v2in { flex: 1 1 200px; margin: 0; }
.acx-item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.02); margin-bottom: 8px; }
.acx-item-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; }
.acx-item-b { margin-top: 6px; font-size: 13.5px; color: var(--text-2); line-height: 1.8; }
.acx-mono { font-family: "Inter", ui-monospace, monospace; letter-spacing: .08em; color: #f6e7bf; }
.acx-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(47,143,230,.1); border: 1px solid rgba(47,143,230,.3); color: var(--blue-hi); }
.acx-empty, .acx-warn { padding: 16px; text-align: center; color: var(--muted); font-size: 13.5px; border: 1px dashed var(--line); border-radius: 12px; }
.acx-warn { color: #fbbf24; border-color: rgba(251,191,36,.4); }
.acx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.acx-kpi { padding: 12px; border-radius: 12px; text-align: center; background: rgba(217,169,62,.05); border: 1px solid rgba(217,169,62,.2); }
.acx-kpi b { display: block; font: 900 20px/1.3 "Inter", sans-serif; color: var(--gold-hi); direction: ltr; }
.acx-kpi span { font-size: 12px; color: var(--text-2); }
.acx-kpi.ok b { color: #39e58c; } .acx-kpi.run b { color: #ffb648; } .acx-kpi.fault b { color: #f87171; }
.acx-rules { padding: 14px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 14px; font-size: 13.5px; }
.acx-rules > b { display: block; margin-bottom: 8px; color: var(--gold-hi); }
.acx-rules small { display: block; margin-top: 8px; color: var(--muted); line-height: 1.7; }
.acx-h5 { margin: 16px 0 8px; font-size: 14px; color: var(--gold-hi); }
.acx-agents { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.acx-agent { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-soft); font-size: 14px; }
.acx-agent small { display: block; margin-top: 4px; color: var(--text-2); }
.acx-comm { min-height: 44px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; font-size: 13px; color: var(--text); }
/* GRAFCET-like stage bar */
.acx-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 10px 0 4px; }
.acx-steps span { position: relative; padding: 6px 4px; border-radius: 8px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); }
.acx-steps b { display: block; font: 800 10px/1.4 "Inter", monospace; opacity: .7; }
.acx-steps .done { color: #39e58c; border-color: rgba(57,229,140,.35); background: rgba(57,229,140,.06); }
.acx-steps .cur { color: #1a1205; background: linear-gradient(180deg, #f3d27a, #c9962f); border-color: transparent; box-shadow: 0 4px 14px rgba(217,169,62,.3); }
.acx-steps.lost span { color: #f87171; border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.05); }
.acx-ul { margin: 0; padding-inline-start: 18px; font-size: 14px; line-height: 1.9; color: var(--text-2); }
.acx-log { font-size: 13px; line-height: 2; max-height: 420px; overflow: auto; }
.acx-log > div { border-bottom: 1px solid var(--line-soft); }
.acx-log span[dir] { color: var(--muted); font-family: "Inter", monospace; font-size: 12px; margin-inline-end: 6px; }
.acx-toast { position: fixed; z-index: 9999; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 12px 20px; border-radius: 12px;
  background: #0b1222; border: 1px solid rgba(57,229,140,.45); color: #eef2fb; font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.45); transition: opacity .35s, transform .35s; max-width: calc(100vw - 32px); }
.acx-toast.bad { border-color: rgba(248,113,113,.5); }
.acx-toast.out { opacity: 0; transform: translate(-50%, 10px); }
@media (prefers-reduced-motion: reduce) { .acx-led.run i { animation: none; } }

/* v12 — client documents */
.docs-list { display: grid; gap: 8px; }
.doc-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(217,169,62,.16); }
.doc-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(217,169,62,.1); font-size: 18px; }
.doc-meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.doc-meta b { color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta small { color: var(--muted, #8b97ad); font-size: 12px; }
.doc-act { display: flex; gap: 6px; }
.doc-act button, .doc-act a { border: 1px solid rgba(217,169,62,.45); background: rgba(217,169,62,.1); color: var(--gold-hi, #f2cf7a); border-radius: 9px; padding: 6px 12px; font: 700 12.5px inherit; font-family: inherit; cursor: pointer; text-decoration: none; }
.doc-act .del { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.08); color: #f87171; padding: 6px 9px; }
.doc-make { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.doc-make a { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid rgba(148,163,184,.18); color: #e5e9f2; font-size: 12.5px; font-weight: 700; text-decoration: none; transition: border-color .2s, transform .2s; }
.doc-make a:hover { border-color: rgba(217,169,62,.55); transform: translateY(-1px); }
.doc-make a.hot { grid-column: 1 / -1; justify-content: center; background: linear-gradient(135deg, #f6d98a, #d9a93e 55%, #a8781f); color: #0a0f1c; border: 0; font-size: 14px; padding: 11px; }
.doc-viewer { position: fixed; inset: 0; z-index: 6000; background: rgba(5,7,13,.92); display: flex; flex-direction: column; }
.dv-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #0d1426; border-bottom: 1px solid rgba(217,169,62,.3); color: #fff; }
.dv-bar b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-bar button, .dv-bar a { border: 1px solid rgba(217,169,62,.45); background: rgba(217,169,62,.1); color: #f2cf7a; border-radius: 9px; padding: 7px 12px; font-family: inherit; font-weight: 700; cursor: pointer; text-decoration: none; font-size: 13px; }
.doc-viewer iframe { flex: 1; border: 0; background: #e9edf3; width: 100%; }
.adm-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: -4px 0 1rem; }
.adm-quick a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(148,163,184,.18); background: rgba(255,255,255,.03); color: inherit; text-decoration: none; font-weight: 700; font-size: 13.5px; transition: border-color .2s, transform .2s; }
.adm-quick a:hover { border-color: rgba(217,169,62,.55); transform: translateY(-1px); }
.adm-quick a.hot { grid-column: 1 / -1; justify-content: center; background: linear-gradient(135deg, #f6d98a, #d9a93e 55%, #a8781f); color: #0a0f1c; border: 0; font-size: 15px; }

/* v15 — paste the login code */
.otp-row { display: flex; gap: 8px; align-items: stretch; }
.otp-row input { flex: 1; min-width: 0; }
.otp-paste { flex: none; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(217,169,62,.45); background: rgba(217,169,62,.12); color: var(--gold-hi, #f2cf7a); font: 700 14px/1 inherit; font-family: inherit; cursor: pointer; }
/* v15 — client documents are view-only */
.dv-ask { background: #1faa59 !important; border-color: #1faa59 !important; color: #fff !important; }
.dv-note { padding: 8px 14px; background: rgba(217,169,62,.1); border-bottom: 1px solid rgba(217,169,62,.25); color: #f2cf7a; font-size: 13px; font-weight: 700; text-align: center; }
.dv-ro iframe { -webkit-user-select: none; user-select: none; }
@media print {
  body.dv-lock > * { display: none !important; }
  body.dv-lock::after { content: "SALAASA TECH — للحصول على نسخة رسمية من الوثيقة، اطلبها من الإدارة · Copie officielle sur demande"; display: block; padding: 40px; font: 700 18px/1.6 sans-serif; text-align: center; }
}

/* v15.2 — document sending (management) */
.doc-row { flex-wrap: wrap; }
.doc-send { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; margin-top: 4px; border-top: 1px dashed rgba(148,163,184,.18); }
.doc-send .ds { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.ds-draft { background: rgba(148,163,184,.14); color: #cbd5e1; }
.ds-on { background: rgba(34,197,94,.14); color: #4ade80; }
.ds-paper { background: rgba(255,182,72,.14); color: #ffb648; }
.doc-send button { border: 1px solid rgba(148,163,184,.3); background: rgba(255,255,255,.04); color: #e5e9f2; border-radius: 9px; padding: 6px 10px; font: 700 12px inherit; font-family: inherit; cursor: pointer; }
.doc-send button.send { border-color: rgba(217,169,62,.6); background: rgba(217,169,62,.14); color: #f2cf7a; }

/* v16: per-document permissions */
.dperm-ov { position: fixed; inset: 0; z-index: 9999; background: rgba(5,8,15,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.dperm { width: min(520px, 100%); max-height: 90vh; overflow: auto; background: linear-gradient(180deg, #121a2c, #0b111e); border: 1px solid rgba(217,169,62,.35); border-radius: 18px; padding: 1.2rem 1.2rem 1rem; color: #e8edf5; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.dperm h3 { margin: 0 0 .2rem; color: var(--gold-light, #f0c85a); font-size: 1.1rem; }
.dperm p { margin: 0 0 .6rem; color: #94a3b8; font-size: .82rem; }
.dperm .dp-note { color: #cbd5e1; }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin: .4rem 0 1rem; }
.dp-it { display: flex; align-items: center; gap: .5rem; border: 1px solid rgba(148,163,184,.25); border-radius: 12px; padding: .55rem .7rem; cursor: pointer; font-size: .85rem; transition: .15s; }
.dp-it input { accent-color: #d9a93e; width: 18px; height: 18px; }
.dp-it.on { border-color: rgba(217,169,62,.6); background: rgba(217,169,62,.12); color: #fff; font-weight: 700; }
.dp-act { display: flex; gap: .5rem; flex-wrap: wrap; }
.dp-msg { color: #fca5a5 !important; margin-top: .6rem !important; }
#stDocsCard .doc-make { display: flex; flex-wrap: wrap; gap: .5rem; }
.ds-wa { background: rgba(37,211,102,.14); color: #6ee7a0; }
.doc-send button.wa { border-color: rgba(37,211,102,.55); background: rgba(37,211,102,.14); color: #8ff0b6; }

/* v16.7: fault-code assistant */
.fx-ov { position: fixed; inset: 0; z-index: 9000; background: rgba(4,7,14,.78); backdrop-filter: blur(8px); display: grid; place-items: start center; overflow-y: auto; padding: 4vh 12px; }
.fx-box { width: min(760px, 100%); background: linear-gradient(180deg, #121a2c, #0a101d); border: 1px solid rgba(217,169,62,.35); border-radius: 20px; padding: 18px; color: #e8edf5; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.fx-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.fx-head h3 { margin: 0; color: #f0c85a; font-size: 1.15rem; }
.fx-head p { margin: 4px 0 0; color: #94a3b8; font-size: .85rem; }
.fx-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.05); color: #cbd5e1; font-size: 20px; cursor: pointer; flex: none; }
.fx-form { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 10px; margin-top: 14px; align-items: end; }
.fx-form label, .fx-edit label { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; color: #cbd5e1; }
.fx-form .fx-wide { grid-column: 1 / -1; }
.fx-form input, .fx-edit input, .fx-edit textarea { font: inherit; font-size: .95rem; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(148,163,184,.3); background: rgba(255,255,255,.05); color: #fff; width: 100%; }
.fx-form input:focus, .fx-edit input:focus, .fx-edit textarea:focus { outline: 2px solid #d9a93e; border-color: transparent; }
.fx-go { grid-column: 1 / -1; height: 46px; border: 0; border-radius: 99px; background: linear-gradient(135deg, #f6d98a, #d9a93e 55%, #a8781f); color: #0a0f1c; font: 800 1rem inherit; cursor: pointer; }
.fx-out { margin-top: 14px; display: grid; gap: 10px; }
.fx-scope { font-size: .85rem; color: #94a3b8; }
.fx-scope b { color: #f0c85a; }
.fx-none, .fx-wait, .fx-err { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px dashed rgba(148,163,184,.3); font-size: .88rem; }
.fx-err { border-color: rgba(248,113,113,.5); color: #fca5a5; }
.fx-wait { animation: fxPulse 1.4s ease-in-out infinite; }
@keyframes fxPulse { 50% { opacity: .55; } }
.fx-ai { height: 44px; border-radius: 99px; border: 1px solid rgba(47,143,230,.6); background: rgba(47,143,230,.14); color: #bfe0ff; font: 800 .95rem inherit; cursor: pointer; }
.fx-card { border-radius: 14px; padding: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(148,163,184,.22); }
.fx-card.ok { border-color: rgba(34,197,94,.45); }
.fx-card.ai { border-color: rgba(47,143,230,.45); background: rgba(47,143,230,.06); }
.fx-card.ai.c-low { border-color: rgba(234,179,8,.55); }
.fx-c-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fx-brand { font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: rgba(217,169,62,.14); color: #f0c85a; border: 1px solid rgba(217,169,62,.35); }
.fx-c-top > b { font: 800 1.15rem "Inter", monospace; color: #fff; }
.fx-ver { font-size: .75rem; color: #86efac; } .fx-unv { font-size: .75rem; color: #fcd34d; } .fx-conf { font-size: .75rem; color: #bfe0ff; }
.fx-card h4 { margin: 8px 0 4px; font-size: 1rem; } .fx-card h5 { margin: 10px 0 4px; font-size: .82rem; color: #94a3b8; }
.fx-card p { margin: 0; font-size: .9rem; line-height: 1.8; color: #dbe3ee; }
.fx-card ol, .fx-card ul { margin: 0; padding-inline-start: 1.3rem; font-size: .88rem; line-height: 1.8; }
.fx-safe { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.35); color: #fecaca; font-size: .84rem; line-height: 1.7; }
.fx-src { margin-top: 8px; font-size: .8rem; color: #94a3b8; line-height: 1.7; }
.fx-warn { margin-bottom: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(234,179,8,.12); border: 1px solid rgba(234,179,8,.4); color: #fde68a; font-size: .82rem; font-weight: 700; }
.fx-c-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fx-c-act button, .fx-admin button { border: 1px solid rgba(148,163,184,.3); background: rgba(255,255,255,.05); color: #e5e9f2; border-radius: 10px; padding: 8px 12px; font: 700 .82rem inherit; cursor: pointer; }
.fx-admin { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(217,169,62,.3); }
.fx-edit { display: grid; gap: 10px; }
.fx-edit h4 { margin: 0; color: #f0c85a; }
.fx-g { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 10px; }
.fx-chk { display: flex !important; align-items: center; gap: 8px; }
.fx-chk input { width: 18px; height: 18px; accent-color: #d9a93e; }
.fx-msg { color: #fca5a5; font-size: .85rem; margin: 0; }
@media (max-width: 640px) { .fx-form, .fx-g { grid-template-columns: 1fr; } .fx-box { padding: 14px; border-radius: 16px; } }
.docno.tmp { opacity: .75; }
.fx-rel { display: block; width: 100%; text-align: start; border: 1px solid rgba(148,163,184,.25); background: rgba(255,255,255,.03); color: #e5e9f2; border-radius: 10px; padding: 8px 12px; font: 600 .85rem inherit; cursor: pointer; }
.fx-rel b { color: #f0c85a; margin-inline-end: 6px; font-family: "Inter", monospace; }
.fx-card.gen { border-color: rgba(148,163,184,.3); }
.fx-warn.gen { background: rgba(148,163,184,.1); border-color: rgba(148,163,184,.35); color: #cbd5e1; }
.fx-ai.small { height: 38px; font-size: .82rem; opacity: .85; }
/* v16.9 fault corner: end date in the permissions modal */
.dp-fx { margin: 0 0 .8rem; padding: .6rem .7rem; border: 1px dashed rgba(217,169,62,.45); border-radius: 12px; font-size: .8rem; color: #e8edf5; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.dp-fx[hidden] { display: none; }
.dp-fx input[type=date] { background: #0b111e; color: #e8edf5; border: 1px solid rgba(148,163,184,.35); border-radius: 8px; padding: .3rem .45rem; font-family: inherit; color-scheme: dark; }
.dp-quick { display: inline-flex; gap: .3rem; }
.dp-quick button { background: rgba(217,169,62,.14); border: 1px solid rgba(217,169,62,.45); color: var(--gold-light, #f0c85a); border-radius: 8px; padding: .25rem .5rem; cursor: pointer; font-family: inherit; font-size: .75rem; }
.fx-form select { font: inherit; font-size: .95rem; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(148,163,184,.3); background: #111a2b; color: #fff; width: 100%; color-scheme: dark; }
.fx-form select:focus { outline: 2px solid #d9a93e; border-color: transparent; }
