/* مِداد — هيكل التطبيق. يعتمد على tokens.css و components.css (نظام الكحلي والذهبي). */
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: var(--paper); }
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }

/* ───── القائمة الجانبية ───── */
.side { background: var(--navy); color: var(--on-navy); display: flex; flex-direction: column; gap: var(--space-16);
  padding: var(--space-18) var(--space-14); position: sticky; top: 0; height: 100vh; height: 100dvh;
  background-image: radial-gradient(420px 300px at 100% 0%, var(--glow-navy), transparent 70%); }
.side-brand { display: flex; align-items: center; gap: var(--space-10); color: var(--on-navy); text-decoration: none;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; padding: var(--space-4) var(--space-8) var(--space-12);
  border-bottom: 1px solid var(--navy-rule); }
.side-brand b { color: var(--gold); font-weight: 800; }
.side-mark { width: 38px; height: 38px; border-radius: var(--radius-tile); display: grid; place-items: center; background: var(--gold-wash); color: var(--gold); }
.side-mark svg, .side-nav svg, .side-theme svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-nav { display: flex; flex-direction: column; gap: var(--space-4); flex: 1; }
.side-nav a { display: flex; align-items: center; gap: var(--space-12); color: var(--on-navy-2); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 10px 12px; border-radius: var(--radius-nav); }
.side-nav a:hover { background: var(--navy-hover); color: var(--on-navy); }
.side-nav a[aria-current="page"] { background: var(--navy-hover); color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-rule); }
.side-foot { display: flex; align-items: center; gap: var(--space-8); border-top: 1px solid var(--navy-rule); padding-top: var(--space-14); }
.side-user { flex: 1; display: flex; align-items: center; gap: var(--space-10); background: none; border: 0; color: var(--on-navy); cursor: pointer;
  text-align: start; padding: 6px; border-radius: var(--radius-nav); font: inherit; min-width: 0; }
.side-user:hover { background: var(--navy-hover); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 700; flex: none; font-family: var(--font-display); }
.who-txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.who-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-txt small { color: var(--on-navy-faint); font-size: 12.5px; }
.side-theme { width: 40px; height: 40px; border-radius: var(--radius-control); border: 1px solid var(--navy-rule-2); background: none; color: var(--on-navy-2); cursor: pointer; display: grid; place-items: center; }
.side-theme:hover { color: var(--gold); border-color: var(--gold); }

/* ───── المحتوى ───── */
.content { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; }
.content .main { flex: 1; }
.credit { text-align: center; color: var(--muted); font-size: 13.5px; padding: var(--space-14) var(--space-16) calc(var(--space-14) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--panel); }
.credit b { color: var(--gold-ink); font-weight: 600; }
.main { padding: var(--space-28) max(var(--space-16), 3vw) var(--space-40); min-width: 0; outline: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-16); margin-bottom: var(--space-22); }
.page-head h1 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; }
.page-head p { color: var(--muted); margin-top: var(--space-4); max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: center; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-22); min-width: 0; }
.panel + .panel { margin-top: var(--space-18); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); margin-bottom: var(--space-14); flex-wrap: wrap; }
.panel-h h2 { font-size: 18px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-18); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--space-18); }
.empty { text-align: center; padding: var(--space-40) var(--space-16); color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--panel); }
.empty h3 { color: var(--ink); font-size: 18px; margin-bottom: var(--space-6); }
.empty .ng-btn { margin-top: var(--space-14); }

/* الأيقونات داخل الأزرار والأسطر */
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: var(--radius-control); cursor: pointer; }
.icon-btn:hover { border-color: var(--link); color: var(--link); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.ng-btn[disabled] { opacity: .5; cursor: not-allowed; }
.ng-btn-danger { background: var(--danger); color: #fff; }
.ng-btn-danger:hover { background: var(--danger-ink); }

/* ───── الرئيسية ───── */
.hero { background: var(--navy); color: var(--on-navy); border-radius: var(--radius-feature); padding: var(--space-28) var(--space-28);
  background-image: radial-gradient(700px 320px at 100% 0%, var(--glow-navy), transparent 65%); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-28); align-items: center; }
.hero h1 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; }
.hero h1 b { color: var(--gold); }
.hero p { color: var(--on-navy-2); margin-top: var(--space-10); max-width: 56ch; }
.hero .actions { margin-top: var(--space-18); }
.board { background: var(--navy-deep); border: 1px solid var(--gold-rule); border-radius: var(--radius-panel); padding: var(--space-16) var(--space-18); box-shadow: var(--shadow-board); }
.board h2 { font-size: 13px; color: var(--on-navy-faint); font-family: var(--font-body); font-weight: 600; margin-bottom: var(--space-8); }
.board ul { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-10); padding: 9px 0; border-top: 1px solid var(--navy-rule); }
.board li:first-child { border-top: 0; }
.board li span { color: var(--on-navy-2); font-size: 14.5px; display: flex; align-items: center; gap: var(--space-8); }
.board li b { color: var(--gold); font-family: var(--font-display); font-size: 18px; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live-dot); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-18); margin-top: var(--space-22); }
.quick a { display: flex; flex-direction: column; gap: var(--space-10); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: var(--space-18); text-decoration: none; color: var(--ink); transition: border-color .2s; }
.quick a:hover { border-color: var(--gold); }
.quick h3 { font-size: 16.5px; }
.quick p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-14); counter-reset: f; }
.flow li { border-top: 3px solid var(--gold); background: var(--panel); border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); padding: var(--space-14) var(--space-16); }
.flow li::before { counter-increment: f; content: counter(f); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--gold); font-family: var(--font-display); font-size: 14px; }
.flow h3 { font-size: 15.5px; margin: var(--space-8) 0 var(--space-4); }
.flow p { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ───── الجداول ───── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--panel); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; white-space: nowrap; }
.tbl th { background: var(--neutral-soft); color: var(--muted); font-weight: 600; font-size: 13px; position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--tint); }
.tbl td.num, .tbl th.num { font-variant-numeric: tabular-nums; }
.tbl input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--navy-3); }
.tbl .cell-in { width: 100%; min-width: 140px; border: 1px solid transparent; background: transparent; color: var(--ink); font: 14.5px var(--font-body); padding: 5px 7px; border-radius: 6px; }
.tbl .cell-in:hover { border-color: var(--line); }
.tbl .cell-in:focus { border-color: var(--field-focus); outline: none; box-shadow: var(--shadow-focus); background: var(--panel); }
.tbl .col-h { display: flex; align-items: center; gap: 4px; }
.tbl .col-h input { font-weight: 600; color: var(--ink); min-width: 90px; }

/* ───── البطاقات ───── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; transition: border-color .2s; min-width: 0; }
.card:hover { border-color: var(--gold); }
.card-thumb { aspect-ratio: 320 / 190; background: var(--navy); border-radius: var(--r) var(--r) 0 0; overflow: hidden; position: relative; display: grid; place-items: start center; padding-top: 14px; }
.card-thumb .mini { width: 70%; aspect-ratio: 210/297; background: #fff; border-radius: 3px; box-shadow: var(--shadow-thumb); padding: 8% 9%; display: flex; flex-direction: column; gap: 5px; }
.mini .mh { height: 12%; border-bottom: 2px solid var(--gold); display: flex; justify-content: space-between; align-items: center; }
.mini .mh i { width: 18%; height: 70%; background: #dfe6ef; border-radius: 2px; }
.mini .mh em { width: 14%; aspect-ratio: 1; border-radius: 50%; background: #071a33; }
.mini .ml { height: 4px; background: #e3e8ef; border-radius: 2px; }
.mini .ml.s { width: 55%; }
.mini .ml.k { background: #c6a15b; width: 35%; }
.mini .mt { display: grid; grid-template-columns: 3fr 1fr 1fr; gap: 3px; }
.mini .mt span { height: 5px; background: #e3e8ef; }
.mini .mt span:nth-child(-n+3) { background: #123a6b; }
.card-thumb .word { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; }
.card-body { padding: var(--space-16) var(--space-18); display: flex; flex-direction: column; gap: var(--space-6); flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; }
.card-body h3 { font-size: 16.5px; }
.card-body p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.card-foot { display: flex; gap: var(--space-6); align-items: center; padding: var(--space-12) var(--space-18); border-top: 1px solid var(--line); flex-wrap: wrap; }
.card-foot .grow { flex: 1; }
.fields { display: flex; flex-wrap: wrap; gap: 4px; }
.fields span { font-size: 12px; padding: 1px 8px; border-radius: var(--radius-tag); background: var(--tint); color: var(--tint-ink); }

/* بطاقة الجهة */
.ent { flex: 1; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-14); padding: var(--space-18); }
.ent-logo { width: 72px; height: 72px; border-radius: var(--radius-tile); border: 1px solid var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; }
.ent-logo img { max-width: 86%; max-height: 86%; object-fit: contain; }
.ent h3 { font-size: 16.5px; }
.ent dl { margin: var(--space-6) 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--space-10); font-size: 13.5px; }
.ent dt { color: var(--muted); }
.ent dd { margin: 0; overflow-wrap: anywhere; }
.ent-assets { display: flex; gap: var(--space-8); margin-top: var(--space-10); }
.ent-assets span { font-size: 12px; }

/* ───── النماذج (الحقول) ───── */
.form { display: grid; gap: var(--space-14); }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-14); }
.form .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-14); }
.fld { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.fld > span { font-weight: 600; font-size: 14px; }
.fld > span small { font-weight: 400; color: var(--muted); }
.fld input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), .fld select, .fld textarea {
  font: 15.5px var(--font-body); color: var(--ink); border: 1px solid var(--input-line); border-radius: var(--radius-control);
  padding: 9px 12px; background: var(--panel); width: 100%; min-height: 42px; }
.fld textarea { min-height: 84px; resize: vertical; line-height: 1.7; }
.fld :is(input, select, textarea):focus { border-color: var(--field-focus); outline: none; box-shadow: var(--shadow-focus); }
.fld input[type="color"] { width: 54px; height: 40px; border: 1px solid var(--input-line); border-radius: var(--radius-control); padding: 3px; background: var(--panel); }
.check { display: inline-flex; align-items: center; gap: var(--space-8); font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy-3); }
.seg { display: inline-flex; background: var(--neutral-soft); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font: 600 13.5px var(--font-body); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(7, 26, 51, .12); }
.hint { font-size: 13px; color: var(--muted); line-height: 1.7; }
.callout { background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--ink); border-radius: var(--radius-control); padding: var(--space-12) var(--space-16); font-size: 14px; }
.callout b { color: var(--gold-ink); }
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: var(--space-22); text-align: center; color: var(--muted); background: var(--neutral-soft); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--link); color: var(--link); }
.drop b { color: var(--ink); display: block; font-size: 15.5px; margin-bottom: 2px; }

/* صور الجهة */
.imgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-12); }
.imgbox { border: 1px solid var(--line); border-radius: var(--radius-control); padding: var(--space-10); display: flex; flex-direction: column; gap: var(--space-8); }
.imgbox .pv { height: 96px; border-radius: 8px; background: #fff repeating-conic-gradient(#f0f3f7 0 25%, #fff 0 50%) 0 0 / 14px 14px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.imgbox .pv img { max-width: 92%; max-height: 88px; object-fit: contain; }
.imgbox .pv em { font-style: normal; color: #6b7785; font-size: 13px; }
.imgbox .b { display: flex; gap: 4px; flex-wrap: wrap; }

/* ───── محرر النص ───── */
.editor { border: 1px solid var(--input-line); border-radius: var(--radius-control); background: var(--panel); overflow: hidden; }
.editor:focus-within { border-color: var(--field-focus); box-shadow: var(--shadow-focus); }
.tb { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--neutral-soft); align-items: center; }
.tb button, .tb select { height: 32px; min-width: 32px; border: 1px solid transparent; background: none; border-radius: 6px; color: var(--ink); cursor: pointer; font: 600 13.5px var(--font-body); display: inline-grid; place-items: center; padding: 0 6px; }
.tb button:hover { border-color: var(--line-strong); background: var(--panel); }
.tb select { border-color: var(--line); background: var(--panel); padding: 0 6px; }
.tb .sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 4px; }
.tb svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rte { min-height: 320px; max-height: 60vh; overflow: auto; padding: var(--space-16) var(--space-18); outline: none; background: #fff; color: #16202c;
  font: 400 16px/1.95 var(--font-body); }
.rte table { border-collapse: collapse; width: 100%; }
.rte td, .rte th { border: 1px solid #b9c4d1; padding: 4px 8px; }
.rte .ph, .doc .ph { background: #f7eedc; color: #6e4f17; border-radius: 4px; padding: 0 3px; }

/* ───── شاشة الإنشاء ───── */
.compose { display: grid; grid-template-columns: minmax(330px, 400px) minmax(0, 1fr); gap: var(--space-22); align-items: start; }
.steps { display: flex; flex-direction: column; gap: var(--space-14); }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-16) var(--space-18); display: flex; flex-direction: column; gap: var(--space-12); min-width: 0; }
.step-h { display: flex; align-items: center; gap: var(--space-10); }
.step-h .n { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-family: var(--font-display); font-size: 13px; flex: none; }
.step-h h2 { font-size: 15.5px; font-weight: 700; flex: 1; }
.rlist { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-control); }
.rlist label { display: flex; align-items: center; gap: var(--space-10); padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 14.5px; cursor: pointer; }
.rlist label:last-child { border-bottom: 0; }
.rlist label:hover { background: var(--tint); }
.rlist label small { color: var(--muted); margin-inline-start: auto; font-size: 12.5px; }
.rlist input { width: 17px; height: 17px; accent-color: var(--navy-3); flex: none; }
.items { display: flex; flex-direction: column; gap: var(--space-8); }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 62px 92px 36px; gap: 6px; align-items: center; }
.item input { font: 14.5px var(--font-body); color: var(--ink); border: 1px solid var(--input-line); border-radius: 8px; padding: 7px 9px; background: var(--panel); width: 100%; min-width: 0; }
.item input:focus { border-color: var(--field-focus); outline: none; box-shadow: var(--shadow-focus); }
.item-h { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.preview { position: sticky; top: var(--space-16); display: flex; flex-direction: column; gap: var(--space-12); min-width: 0; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-10); flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; }
.pager { display: flex; align-items: center; gap: var(--space-8); font-variant-numeric: tabular-nums; font-size: 14.5px; }
.pv-stage { background: #c9d2dd; border-radius: var(--r); padding: var(--space-22) var(--space-12); overflow: auto; max-height: calc(100vh - 150px); display: flex; flex-direction: column; align-items: center; gap: var(--space-18); }
[data-theme="dark"] .pv-stage { background: #0e2440; }
.pv-stage .sheet { box-shadow: 0 6px 24px rgba(7, 26, 51, .22); flex: none; }
.pv-count { color: var(--muted); font-size: 13.5px; }

/* ───── نافذة الحوار ───── */
.modal { border: 0; padding: 0; background: transparent; max-width: min(920px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 24px); }
.modal::backdrop { background: rgba(4, 14, 28, .6); }
.modal-in { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-feature); display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: var(--space-16) var(--space-22); border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 19px; }
.modal-b { padding: var(--space-22); overflow: auto; }
.modal-f { display: flex; gap: var(--space-8); justify-content: flex-start; padding: var(--space-14) var(--space-22); border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal.wide { max-width: min(1180px, calc(100vw - 24px)); }
.modal.narrow { max-width: min(520px, calc(100vw - 24px)); }

.toast { position: fixed; inset-block-end: calc(20px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 50%; transform: translateX(50%); background: var(--navy); color: var(--on-navy);
  border: 1px solid var(--gold-rule); border-radius: var(--radius-control); padding: 11px 18px; z-index: 100; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-feature); max-width: calc(100vw - 32px); }
.frame-note { position: fixed; inset-block-end: 16px; inset-inline-end: 16px; z-index: 90; background: var(--panel); border: 1px solid var(--gold-line); border-radius: var(--r);
  padding: 12px 14px; display: flex; gap: 12px; align-items: center; max-width: 520px; box-shadow: var(--shadow-feature); font-size: 14px; }

/* ───── دليل الاستخدام ───── */
.gsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-14); }
.gsteps li { display: flex; flex-direction: column; gap: var(--space-8); border-top: 3px solid var(--gold); background: var(--paper); border-radius: 0 0 var(--r) var(--r); padding: var(--space-14) var(--space-16) var(--space-16); }
.gsteps li.off { opacity: .6; }
.gsteps .n { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-family: var(--font-display); }
.gsteps li > div { display: flex; flex-direction: column; gap: var(--space-6); flex: 1; align-items: flex-start; }
.gsteps h3 { font-size: 16px; }
.gsteps p { color: var(--muted); font-size: 14px; line-height: 1.75; flex: 1; }
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-18) var(--space-22); }
.feat { display: flex; gap: var(--space-12); align-items: flex-start; }
.feat h3 { font-size: 15.5px; margin-bottom: 2px; }
.feat p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.yes { color: var(--live-ink); display: inline-flex; }
.tips { margin: 0; padding-inline-start: 20px; display: grid; gap: var(--space-8); color: var(--ink-2); font-size: 14.5px; }
.tips li::marker { color: var(--gold-ink); }
.faq { display: grid; gap: var(--space-8); }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-control); padding: 0 var(--space-16); background: var(--panel); }
.faq details[open] { border-color: var(--gold-line); background: var(--gold-soft); }
.faq summary { cursor: pointer; font-weight: 600; padding: var(--space-12) 0; list-style-position: inside; }
.faq details p { color: var(--ink-2); padding-bottom: var(--space-14); font-size: 14.5px; }
@media (max-width: 1100px) { .gsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gsteps, .feats { grid-template-columns: minmax(0, 1fr); } }

/* ───── شاشة الدخول ───── */
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 520px); }
.lg-brand { background: var(--navy); color: var(--on-navy); padding: clamp(28px, 6vw, 72px); display: flex; flex-direction: column; justify-content: center; gap: var(--space-16);
  background-image: radial-gradient(900px 420px at 100% 0%, var(--glow-navy), transparent 65%), radial-gradient(640px 420px at 0% 100%, var(--glow-gold), transparent 70%); }
.lg-mark { display: flex; align-items: center; gap: var(--space-10); font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.lg-mark b { color: var(--gold); }
.lg-brand h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; max-width: 18ch; }
.lg-brand h1 b { color: var(--gold); }
.lg-brand > p { color: var(--on-navy-2); max-width: 48ch; font-size: 17px; }
.lg-list { list-style: none; margin: var(--space-8) 0 0; padding: var(--space-14) var(--space-18); display: grid; gap: var(--space-8); background: var(--navy-deep); border: 1px solid var(--gold-rule); border-radius: var(--radius-panel); max-width: 440px; }
.lg-list li { display: flex; align-items: center; gap: var(--space-10); color: var(--on-navy-2); font-size: 15px; }
.lg-side { background: var(--paper); display: flex; flex-direction: column; justify-content: center; padding: var(--space-28) max(var(--space-16), 4vw) 0; }
.lg-form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-feature); padding: var(--space-28); display: flex; flex-direction: column; gap: var(--space-14); width: 100%; max-width: 440px; margin-inline: auto; }
.lg-form h2 { font-size: 22px; }
.lg-form .ng-btn[type="submit"] { width: 100%; }
.demo { border-top: 1px dashed var(--line-strong); padding-top: var(--space-14); display: flex; flex-direction: column; gap: var(--space-8); }
.demo h3 { font-size: 15px; }
.demo .hint { margin-top: -6px; }
.demo-acc { display: flex; align-items: center; justify-content: space-between; gap: var(--space-10); text-align: start; width: 100%; cursor: pointer; padding: 10px 12px;
  background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: var(--radius-control); color: var(--ink); font: inherit; transition: border-color .2s; }
.demo-acc:hover { border-color: var(--gold); }
.demo-acc span { display: flex; flex-direction: column; line-height: 1.4; }
.demo-acc b { font-size: 14.5px; }
.demo-acc small { color: var(--muted); font-size: 12.5px; }
.demo-acc code { font: 600 13px ui-monospace, Menlo, Consolas, monospace; color: var(--gold-ink); white-space: nowrap; }
.lg-srv summary { cursor: pointer; color: var(--link); font-size: 14px; font-weight: 600; }
.lg-srv[open] { display: flex; flex-direction: column; gap: var(--space-10); }
.lg-srv .ng-btn { align-self: flex-start; }
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .lg-brand { padding: var(--space-28) var(--space-18); }
  .lg-list { display: none; }
  .lg-side { padding-top: var(--space-18); }
}

/* ───── الجوال ───── */
@media (max-width: 1100px) {
  .compose { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
  .quick, .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; z-index: 30; gap: 8px; }
  .side-brand { border: 0; padding: 0; font-size: 18px; }
  .side-brand > span:last-child { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 2px; scrollbar-width: none; }
  .side-nav a { padding: 8px 10px; white-space: nowrap; font-size: 14px; gap: 6px; }
  .side-nav a svg { display: none; }
  .side-foot { border: 0; padding: 0; }
  .who-txt { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: var(--space-22); }
  .grid-2, .form .row, .form .row3, .imgs { grid-template-columns: minmax(0, 1fr); }
  .main { padding-top: var(--space-18); }
}
@media (max-width: 560px) {
  .quick, .flow { grid-template-columns: minmax(0, 1fr); }
}

/* ───── 2.1 ───── */
/* المستفيدون: قائمة الجداول بجانب الجدول، وتحتها على الجوال */
.compose.lists-layout { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
@media (max-width: 860px) { .compose.lists-layout { grid-template-columns: minmax(0, 1fr); } }
/* أزرار بطاقة النموذج في سطر واحد */
.card-foot { gap: 4px; }
.card-foot .icon-btn { width: 34px; height: 34px; }
/* الحسابات التجريبية: نص الحساب بلون النص، فالذهبي الداكن على الذهبي الفاتح أقل من 4.5:1 */
.demo-acc code { color: var(--ink); }
