/* نماذج وحالات التطبيق الفعلي (فوق styles.css المعتمد). القياسات هنا بالبكسل لتبقى مقروءة ولمسية على كل المقاسات. */
.auth-page { display: grid; place-items: center; min-height: 100dvh; padding: 20px; overflow: auto;
  background: #f3e6ee url('assets/plate.jpg') center / cover fixed; }
.auth-page::before { content: ''; position: fixed; inset: 0; background: rgba(250, 238, 245, 0.55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.auth-card { position: relative; width: min(420px, 100%); padding: 28px 24px 24px; text-align: center; border-radius: 28px; border: 1px solid #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 252, 0.86)); box-shadow: 0 30px 70px -28px rgba(150, 80, 125, 0.7); }
.auth-logo { border-radius: 16px; box-shadow: 0 10px 24px -10px rgba(190, 90, 140, 0.8); }
.auth-card h1 { font-size: 21px; font-weight: 700; margin-block-start: 10px; }
.auth-sub { font-size: 13.5px; color: var(--ink-2); margin-block-end: 16px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(219, 179, 207, 0.3); margin-block-end: 14px; }
.seg > button, .seg > label { display: grid; place-items: center; min-height: 44px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg > [aria-selected='true'], .seg > label:has(:checked) { color: #fff; background: linear-gradient(120deg, #d77aa6, #b24f82); box-shadow: 0 8px 18px -10px rgba(178, 79, 130, 0.9); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg > label:has(:focus-visible) { outline: 2px solid var(--rose-d); outline-offset: 2px; }

.form { display: grid; gap: 12px; text-align: start; }
.form[hidden] { display: none; }
.form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form input, .form select, .form textarea { width: 100%; min-height: 46px; padding: 8px 12px; font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); background: #fff; border: 1px solid rgba(190, 140, 170, 0.5); border-radius: 13px; }
.form input:focus-visible, .form select:focus-visible { outline: 2px solid var(--rose-d); outline-offset: 1px; }
.form small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-err { padding: 9px 12px; border-radius: 12px; font-size: 13px; color: #8f1d3a; background: #fde3e8; border: 1px solid #f3b6c3; }
.form-err[hidden] { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; font-size: 15px; font-weight: 700; color: #fff; background: linear-gradient(120deg, #d77aa6, #a8457a); box-shadow: 0 12px 24px -12px rgba(168, 69, 122, 0.9); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn.ghost { color: var(--rose-d); background: #fff; border: 1px solid rgba(190, 140, 170, 0.5); box-shadow: none; }
.btn.small { min-height: 40px; font-size: 13px; padding: 0 12px; }
.btn .ic { width: 18px; height: 18px; }

/* حالات داخل اللوحة */
.empty { display: grid; place-items: center; align-content: center; gap: 4px; height: 100%; min-height: 60px; padding: 8px; text-align: center; font-size: calc(var(--u) * 12.5); color: var(--ink-3); }
.empty b { font-size: calc(var(--u) * 13.5); color: var(--ink-2); font-weight: 600; }
.act { display: inline-flex; align-items: center; gap: 4px; padding: 0 calc(var(--u) * 10); height: calc(var(--u) * 28); min-height: 28px; border-radius: 999px; font-size: calc(var(--u) * 12.5); font-weight: 700; color: #fff; background: linear-gradient(120deg, #d77aa6, #b24f82); white-space: nowrap; }
.act .ic { width: calc(var(--u) * 14); height: calc(var(--u) * 14); }
.amt-in { color: var(--teal); } .amt-out { color: var(--coral); }
.count.plain { background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line); }
.splash { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; font-size: 15px; color: var(--ink-2); background: rgba(250, 238, 245, 0.7); }
.splash[hidden] { display: none; }
.toast { position: fixed; z-index: 70; inset-inline: 0; bottom: calc(86px + env(safe-area-inset-bottom)); margin-inline: auto; width: max-content; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; color: #fff; background: #34163a; box-shadow: 0 16px 30px -12px rgba(52, 22, 58, 0.7); }
.toast.err { background: #a3233f; }
.toast[hidden] { display: none; }

/* محتوى اللوحة الجانبية */
.list { display: grid; gap: 6px; }
.item { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: 13px; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.item small { display: block; font-size: 12px; color: var(--ink-3); }
.item .v { font-weight: 700; white-space: nowrap; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.item.void { opacity: 0.55; }
.mini { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--rose-d); background: #fff; border: 1px solid var(--line); flex: none; }
.mini .ic { width: 18px; height: 18px; }
.sheet-actions { display: grid; gap: 8px; margin-block-start: 16px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 2px; border-block-end: 1px solid var(--line); font-size: 14px; }
.kv b { font-weight: 600; }

.hex-money { font-size: calc(var(--su) * 19); direction: ltr; unicode-bidi: isolate; margin-block-start: calc(var(--su) * 3); }
@container (max-width: 600px) { .hex-money { font-size: calc(var(--su) * 22); } }

.seg[hidden] { display: none; }

@media not ((min-width: 1024px) and (min-aspect-ratio: 5/4)) { .act { min-height: 44px; padding-inline: 14px; font-size: 13.5px; } .act .ic { width: 16px; height: 16px; } }
@media (max-width: 479px) { .kpi:not(:first-child) .kpi-val { font-size: 17px; } }

/* الشريحة 2 */
.sheet-sub { font-size: 13px; color: var(--ink-3); margin-block-end: 6px; }
.hbar { display: block; height: 7px; margin-block-start: 6px; border-radius: 99px; background: rgba(170, 130, 160, 0.22); overflow: hidden; }
.hbar i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, #12998f, #56c7bb); }
.hbar.warn i { background: linear-gradient(90deg, #e3c894, #cba86d); } .hbar.bad i { background: linear-gradient(90deg, #f0a3ad, #e0707f); }
button.item { width: 100%; text-align: start; }
.item input[type='checkbox'] { width: 22px; height: 22px; accent-color: #b24f82; flex: none; }
.stages { margin-block: 10px; }
.form.inline { grid-template-columns: 1fr 84px auto; align-items: center; gap: 6px; margin-block-start: 8px; }
.form.inline .form-err { grid-column: 1 / -1; }
#f-progress.inline { grid-template-columns: 110px 1fr auto auto; }
.item-row { display: grid; grid-template-columns: 1fr 64px 96px; gap: 6px; margin-block-end: 6px; }
.tag { padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #eee1ea; color: var(--ink-2); }
.tag.paid { background: #d9f1ec; color: #0b6c66; } .tag.overdue { background: #fde3e8; color: #a3233f; } .tag.partial { background: #fbe9cf; color: #7a5710; }
a.btn { text-decoration: none; }
@media (max-width: 420px) { #f-progress.inline { grid-template-columns: 1fr 1fr; } }

/* الشريحة 3 */
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-block: 10px; }
.codes code { padding: 10px; text-align: center; border-radius: 12px; background: #fff; border: 1px solid var(--line); font: 600 15px ui-monospace, Consolas, monospace; letter-spacing: 0.06em; user-select: all; }
.codes code.wide { grid-column: 1 / -1; font-size: 16px; }
.mini-select { min-height: 40px; padding: 4px 8px; font: inherit; font-size: 13px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.item { flex-wrap: wrap; }
.item > .grow { min-width: 140px; }

.form label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; } .form label.check input { width: 20px; height: 20px; min-height: 0; flex: none; accent-color: #c0558c; }

.pw-wrap { position: relative; display: block; } .pw-wrap > input { width: 100%; padding-inline-end: 46px; }
.pw-eye { position: absolute; inset-block: 0; inset-inline-end: 4px; display: grid; place-items: center; width: 40px; margin: auto 0; height: 40px; border-radius: 10px; color: #a83f78; background: none; border: 0; cursor: pointer; } .pw-eye:hover { background: #fdeef5; } .pw-eye svg { width: 21px; height: 21px; }
.btn.danger { color: #c93a25; border-color: #f0c3b8; } .btn.danger:hover { background: #fdeee9; }
