/* محاكاة صفحة الهبوط (landing-sim.js): إطارات حية بدل الصور. الألوان والخطوط من رموز Vireo فقط؛ النص أبيض أو بلون الهوية،
   والحالة نقطة ملوّنة لا كلمة ملوّنة. الصناديق زجاج داكن بلا خلفيات ملوّنة. */
.sim { position: relative; background: var(--ax-surface-subtle, rgba(255, 255, 255, .03)); color: var(--ax-text); min-height: 320px; }
.sim-note { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--ax-text-subtle); }
.sim-fallback { margin: 0; padding: 48px 20px; text-align: center; color: var(--ax-text-muted); }
.sim-pane[hidden] { display: none; }
.frame .sim, .office-view .sim { border-radius: 0; }

/* 1) المجرّة */
.gx { position: relative; overflow: hidden; aspect-ratio: 16 / 9; min-height: 340px; background: radial-gradient(120% 90% at 50% 50%, rgba(var(--ax-accent-rgb, 16, 128, 143), .10), transparent 62%), var(--ax-canvas, #0b0d10); }
.gx-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.gx-card { position: absolute; top: 0; left: 0; z-index: 2; width: max-content; max-width: min(270px, 72%); padding: 10px 13px; border-radius: 14px; background: rgba(8, 10, 16, .94); border: 1px solid var(--ax-border-strong); box-shadow: 0 14px 40px rgba(0, 0, 0, .5); display: grid; gap: 3px; pointer-events: none; will-change: transform; }
.gx-card[hidden] { display: none; }
.gx-card b { font-size: 13.5px; color: var(--ax-text-strong); }
.gx-card span { font-size: 13px; line-height: 1.7; color: var(--ax-text); }
.gx-card small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ax-text-muted); }
.gx-card small::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ax-success-500, #3fb37f); }
.gx-card small.wait::before { background: var(--ax-warning-500, #e0a020); }
.gx-layers { position: absolute; inset-block-end: 12px; inset-inline: 0; z-index: 3; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 0 10px; }
.gx-layers button { font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 13px; min-height: 36px; border-radius: 99px; border: 1px solid var(--ax-border-strong); background: rgba(8, 10, 16, .8); color: var(--ax-text-muted); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.gx-layers button.on { color: var(--ax-text-strong); border-color: var(--ax-accent); }
.gx-layers button:disabled { cursor: default; opacity: .85; }
.gx-layers button:focus-visible, .ph-bar button:focus-visible, .cs-btns button:focus-visible { outline: 2px solid var(--ax-accent); outline-offset: 2px; }

/* 2) نافذة النظام */
.sw { display: grid; grid-template-columns: 210px 1fr; min-height: 420px; text-align: start; }
.sw-side { padding: 14px 10px; display: grid; gap: 6px; align-content: start; border-inline-end: 1px solid var(--ax-border); background: rgba(255, 255, 255, .02); }
.sw-nav { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; font-size: 13.5px; color: var(--ax-text-muted); border: 1px solid transparent; }
.sw-nav svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sw-nav.on { color: var(--ax-text-strong); background: var(--ax-accent-wash, rgba(16, 128, 143, .16)); border-color: rgba(var(--ax-accent-rgb, 16, 128, 143), .5); }
.sw-main { position: relative; padding: 16px 18px 20px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.sw-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sw-head b { font-size: 17px; color: var(--ax-text-strong); }
.sw-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.sw-tabs span { font-size: 12.5px; padding: 6px 12px; border-radius: 99px; color: var(--ax-text-muted); border: 1px solid var(--ax-border); }
.sw-tabs span.on { color: var(--ax-on-accent, #fff); background: var(--ax-accent); border-color: transparent; }
.sw-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sw-kpi { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ax-border); background: var(--ax-surface); display: grid; gap: 4px; min-width: 0; }
.sw-kpi small { font-size: 12px; color: var(--ax-text-muted); }
.sw-kpi b { font-size: 18px; color: var(--ax-text-strong); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-table { border: 1px solid var(--ax-border); border-radius: 14px; overflow: hidden; background: var(--ax-surface); }
.sw-row { display: grid; grid-template-columns: 96px 1fr 150px 140px; gap: 10px; align-items: center; padding: 10px 14px; font-size: 13.5px; border-top: 1px solid var(--ax-border); transition: background .6s; }
.sw-row.sw-th { border-top: 0; font-size: 12px; color: var(--ax-text-muted); background: rgba(255, 255, 255, .03); }
.sw-row.flash { background: rgba(var(--ax-accent-rgb, 16, 128, 143), .16); }
.sw-no { direction: ltr; text-align: start; color: var(--ax-text-muted); font-variant-numeric: tabular-nums; }
.sw-who { color: var(--ax-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-chip { justify-self: start; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 4px 11px; border-radius: 99px; border: 1px solid var(--ax-border-strong); color: var(--ax-text-strong); white-space: nowrap; }
.sw-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ax-text-subtle); }
.sw-chip[data-s="1"]::before { background: var(--ax-warning-500, #e0a020); }
.sw-chip[data-s="2"]::before { background: var(--ax-accent); }
.sw-chip[data-s="3"]::before { background: var(--ax-success-500, #3fb37f); }
.sw-toast { position: absolute; inset-block-end: 14px; inset-inline-start: 18px; max-width: calc(100% - 36px); padding: 9px 14px; border-radius: 12px; font-size: 13px; background: rgba(8, 10, 16, .94); border: 1px solid var(--ax-accent); color: var(--ax-text-strong); box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }
.sw-toast[hidden] { display: none; }

/* 3) الجوال */
#simPhone { display: grid; place-items: center; padding: 26px 12px; }
.ph { position: relative; width: min(300px, 100%); height: 540px; border-radius: 38px; border: 1px solid var(--ax-border-strong); background: var(--ax-canvas, #0b0d10); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 0 0 6px rgba(255, 255, 255, .04); display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; text-align: start; }
.ph-notch { justify-self: center; width: 92px; height: 20px; margin-top: 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.ph-top { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 20px 8px; }
.ph-top b { font-size: 19px; color: var(--ax-text-strong); }
.ph-top small { font-size: 12px; color: var(--ax-text-subtle); }
.ph-list { padding: 4px 14px; display: grid; gap: 9px; align-content: start; overflow: hidden; }
.ph-card { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--ax-border); background: var(--ax-surface); display: grid; gap: 4px; animation: simIn .4s ease both; }
.ph-card b { font-size: 14px; color: var(--ax-text-strong); }
.ph-card small { font-size: 12.5px; line-height: 1.7; color: var(--ax-text-muted); }
.ph-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 8px 8px 14px; border-top: 1px solid var(--ax-border); background: rgba(255, 255, 255, .03); }
.ph-bar button { font: inherit; min-height: 48px; display: grid; justify-items: center; gap: 4px; padding: 6px 2px; border: 0; border-radius: 14px; background: transparent; color: var(--ax-text-muted); cursor: pointer; }
.ph-bar button i { width: 22px; height: 4px; border-radius: 99px; background: transparent; }
.ph-bar button span { font-size: 11px; white-space: nowrap; }
.ph-bar button.on { color: var(--ax-text-strong); }
.ph-bar button.on i { background: var(--ax-accent); }

/* 4) المحادثة والاعتماد */
.cs { display: grid; grid-template-rows: auto 1fr; height: 430px; text-align: start; }
.cs-head { display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-bottom: 1px solid var(--ax-border); background: rgba(255, 255, 255, .03); }
.cs-head i { width: 9px; height: 9px; border-radius: 50%; background: var(--ax-success-500, #3fb37f); }
.cs-head b { font-size: 14.5px; color: var(--ax-text-strong); }
.cs-head small { font-size: 12px; color: var(--ax-text-subtle); margin-inline-start: auto; }
.cs-log { padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden auto; scrollbar-width: none; }
.cs-msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.8; display: grid; gap: 2px; animation: simIn .35s ease both; }
.cs-msg small { font-size: 11.5px; color: var(--ax-text-subtle); }
.cs-msg.me { align-self: flex-start; background: var(--ax-accent); color: var(--ax-on-accent, #fff); border-end-start-radius: 5px; }
.cs-msg.me small { color: inherit; opacity: .8; }
.cs-msg.them { align-self: flex-end; background: var(--ax-surface); border: 1px solid var(--ax-border); color: var(--ax-text-strong); border-end-end-radius: 5px; }
.cs-typing { display: flex; gap: 5px; padding: 14px 16px; }
.cs-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ax-text-muted); animation: simDot 1s infinite; }
.cs-typing i:nth-child(2) { animation-delay: .15s; } .cs-typing i:nth-child(3) { animation-delay: .3s; }
.cs-appr { align-self: stretch; padding: 13px 14px; border-radius: 16px; border: 1px solid var(--ax-accent); background: rgba(var(--ax-accent-rgb, 16, 128, 143), .1); display: grid; gap: 6px; animation: simIn .35s ease both; }
.cs-appr b { font-size: 14px; color: var(--ax-text-strong); }
.cs-appr small { font-size: 12.5px; color: var(--ax-text-muted); }
.cs-btns { display: flex; gap: 8px; margin-top: 4px; }
.cs-btns button { font: inherit; font-size: 13.5px; font-weight: 700; min-height: 40px; padding: 8px 20px; border-radius: 99px; cursor: pointer; border: 1px solid var(--ax-border-strong); background: transparent; color: var(--ax-text-strong); }
.cs-btns button.yes { background: var(--ax-accent); border-color: transparent; color: var(--ax-on-accent, #fff); }
.cs-btns button:disabled { opacity: .5; cursor: default; }
.cs-done { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ax-text-strong); }
.cs-done::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ax-success-500, #3fb37f); flex: none; }
.cs-done.no::before { background: var(--ax-danger-500, #e05252); }

/* 5) الفاتورة */
.iv { padding: 20px 22px; display: grid; gap: 10px; text-align: start; }
.iv-head { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--ax-border); }
.iv-head b { display: block; font-size: 18px; color: var(--ax-text-strong); }
.iv-head small { direction: ltr; display: inline-block; font-size: 12.5px; color: var(--ax-text-muted); font-variant-numeric: tabular-nums; }
.iv-dates { display: grid; gap: 2px; text-align: end; font-size: 12.5px; color: var(--ax-text-muted); }
.iv-party { display: grid; gap: 2px; padding: 4px 0 8px; }
.iv-party small { font-size: 12px; color: var(--ax-text-subtle); }
.iv-party b { font-size: 15px; color: var(--ax-text-strong); }
.iv-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.iv-line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ax-text-strong); }
.iv-line.sub { color: var(--ax-text-muted); font-size: 13.5px; }
.iv-line.sub:first-of-type, .iv-line + .iv-line.sub { padding-top: 2px; }
.iv-line.tot { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--ax-border-strong); font-size: 17px; font-weight: 700; color: var(--ax-text-strong); }
.iv-foot { display: flex; align-items: center; gap: 16px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--ax-border); }
.iv-qr { width: 92px; height: 92px; flex: none; padding: 7px; border-radius: 12px; background: #fff; }
.iv-qr path { fill: #0b0d10; }
.iv-state { display: flex; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.7; color: var(--ax-text-strong); }
.iv-state i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ax-success-500, #3fb37f); }
.iv-state.wait i { background: var(--ax-warning-500, #e0a020); animation: simDot 1s infinite; }

@keyframes simIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes simDot { 50% { opacity: .25; } }

@media (max-width: 860px) {
  .sw { grid-template-columns: 1fr; }
  .sw-side { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--ax-border); scrollbar-width: none; }
  .sw-kpis { grid-template-columns: repeat(2, 1fr); }
  .sw-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .sw-row.sw-th { display: none; }
  .sw-no { grid-column: 1; } .sw-who { grid-column: 1; grid-row: 1; } .sw-amt { grid-column: 2; grid-row: 1; justify-self: end; } .sw-chip { grid-column: 2; grid-row: 2; justify-self: end; }
}
@media (max-width: 560px) {
  .gx { aspect-ratio: 4 / 5; min-height: 380px; }
  .sw-main { padding: 14px 12px 18px; }
  .iv { padding: 16px 14px; } .iv-head { flex-direction: column; } .iv-dates { text-align: start; }
  .cs { height: 460px; }
}
@media (prefers-reduced-motion: reduce) { .ph-card, .cs-msg, .cs-appr { animation: none; } .cs-typing i, .iv-state.wait i { animation: none; } .sw-row { transition: none; } }
