/* =========================================================
   سامانه نوبت‌دهی دکتر مریم عباسی — استایل مشترک
   ========================================================= */
@font-face { font-family: 'Shabnam'; src: url('../fonts/Shabnam-Light-FD.woff2') format('woff2'), url('../fonts/Shabnam-Light-FD.woff') format('woff'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Shabnam'; src: url('../fonts/Shabnam-FD.woff2') format('woff2'), url('../fonts/Shabnam-FD.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Shabnam'; src: url('../fonts/Shabnam-Bold-FD.woff2') format('woff2'), url('../fonts/Shabnam-Bold-FD.woff') format('woff'); font-weight: 700; font-display: swap; }

:root {
  --navy-900: #2e1a57; --navy-800: #7a3fe4; --navy-700: #9a55ff; --navy-600: #a96bff; --navy-500: #b66dff;
  --navy-100: #ece0ff; --navy-50: #f6f0ff;
  --gold-600: #fe7096; --gold-500: #fe9b96; --gold-100: #ffe8e6;
  --green-700: #0F7B3E; --green-600: #16A34A; --green-100: #DCFCE7; --green-50: #F0FDF4;
  --amber-700: #B45309; --amber-600: #D97706; --amber-100: #FEF3C7; --amber-50: #FFFBEB;
  --red-700: #B91C1C; --red-600: #DC2626; --red-100: #FEE2E2; --red-50: #FEF2F2;
  --blue-700: #1D4ED8; --blue-100: #DBEAFE;
  --gray-900: #0F172A; --gray-800: #1E293B; --gray-700: #334155; --gray-600: #475569; --gray-500: #64748B;
  --gray-400: #94A3B8; --gray-300: #CBD5E1; --gray-200: #E2E8F0; --gray-100: #F1F5F9; --gray-50: #F8FAFC;
  --bg: #f2edf3; --card: #fff; --text: var(--gray-800); --muted: var(--gray-500);
  --radius: 16px; --radius-sm: 10px; --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .18);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Shabnam', Tahoma, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.7; direction: rtl; -webkit-font-smoothing: antialiased; }
a { color: var(--navy-600); text-decoration: none; }
svg:not([width]) { width: 20px; height: 20px; flex-shrink: 0; }
.wallet-pill svg { width: 30px; height: 30px; opacity: .8; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 700; color: var(--gray-900); }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.bold { font-weight: 700; } .center { text-align: center; } .ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.nowrap { white-space: nowrap; } .hidden { display: none !important; }
.text-green { color: var(--green-700); } .text-red { color: var(--red-700); } .text-amber { color: var(--amber-700); } .text-navy { color: var(--navy-700); }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; } .stack-sm > * + * { margin-top: 6px; } .stack-lg > * + * { margin-top: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- دکمه ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: var(--gray-100); color: var(--gray-800); font-weight: 700; cursor: pointer; transition: background .15s, transform .05s, box-shadow .15s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn.loading { opacity: .55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--navy-700); color: #fff; box-shadow: 0 6px 16px rgba(15, 77, 114, .25); }
.btn-primary:hover { background: var(--navy-800); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-success { background: var(--green-600); color: #fff; }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--gray-300); color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-50); }
.btn-soft { background: var(--navy-50); color: var(--navy-700); }
.btn-soft-danger { background: var(--red-50); color: var(--red-700); }
.btn-soft-success { background: var(--green-50); color: var(--green-700); }
.btn-link { background: none; border: 0; color: var(--navy-600); padding: 0 4px; min-height: auto; font-weight: 700; }
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn-lg { min-height: 54px; font-size: 16px; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 40px; padding: 0; min-height: 40px; border-radius: 12px; }
.btn.loading::after { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-left-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- فرم ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span, .label { display: block; font-size: 13px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .install-form input, .install-reimport input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--gray-200); border-radius: 12px; background: #fff; outline: none; transition: border .15s, box-shadow .15s;
}
.field textarea { min-height: 80px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-500); box-shadow: 0 0 0 4px rgba(27, 122, 166, .12); }
.input-lg { min-height: 56px !important; font-size: 20px; text-align: center; letter-spacing: 2px; font-weight: 700; }
.input-money { direction: ltr; text-align: left; font-weight: 700; }
.input-group { position: relative; }
.input-group .suffix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.input-group input { padding-left: 64px !important; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--navy-700); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 46px; height: 26px; border-radius: 99px; background: var(--gray-300); position: relative; transition: background .2s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: right .2s; }
.switch input:checked + .track { background: var(--green-600); }
.switch input:checked + .track::after { right: 23px; }
.seg { display: inline-flex; background: var(--gray-100); padding: 4px; border-radius: 12px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 700; color: var(--gray-600); cursor: pointer; }
.seg button.on { background: #fff; color: var(--navy-700); box-shadow: var(--shadow-sm); }
.seg.block { display: flex; } .seg.block button { flex: 1; }

/* ---------- کارت و لیست ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { font-size: 16px; }
.card.flat { box-shadow: none; }
.card.tight { padding: 12px 14px; }
.card.clickable { cursor: pointer; transition: box-shadow .15s, transform .1s; }
.card.clickable:hover { box-shadow: var(--shadow); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.list-item:last-child { border-bottom: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--gray-200); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv > :first-child { color: var(--gray-600); }
.kv > :last-child { font-weight: 700; text-align: left; }
.kv.total { border-top: 2px solid var(--gray-200); border-bottom: 0; margin-top: 4px; padding-top: 12px; font-size: 16px; }
.kv.highlight { background: var(--amber-50); margin: 4px -10px; padding: 10px; border-radius: 10px; border: 0; }
.kv.highlight-green { background: var(--green-50); margin: 4px -10px; padding: 10px; border-radius: 10px; border: 0; }
.divider { height: 1px; background: var(--gray-200); margin: 14px 0; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 54px; height: 54px; color: var(--gray-300); margin-bottom: 8px; }

/* ---------- برچسب وضعیت ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--gray-100); color: var(--gray-700); white-space: nowrap; line-height: 22px; }
.chip-success, .st-completed { background: var(--green-100); color: var(--green-700); }
.chip-info, .st-booked { background: var(--navy-100); color: var(--navy-700); }
.chip-warning, .st-pending_payment { background: var(--amber-100); color: var(--amber-700); }
.chip-danger, .st-cancelled, .st-no_show { background: var(--red-100); color: var(--red-700); }
.st-expired, .st-past { background: var(--gray-100); color: var(--gray-500); }
.chip-gold { background: var(--gold-100); color: #8a6a10; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.alert-info { background: var(--navy-50); color: var(--navy-800); }
.alert-success { background: var(--green-50); color: var(--green-700); }
.alert-warning { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-100); }
.alert-danger { background: var(--red-50); color: var(--red-700); }

/* ---------- تقویم ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head .title { font-weight: 700; font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; border: 1.5px solid transparent; background: var(--gray-50); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; font-size: 15px; transition: all .12s; color: var(--gray-800); padding: 0; }
.cal-day small { font-size: 10px; font-weight: 400; line-height: 1.2; color: var(--muted); }
.cal-day.empty-cell { background: transparent; cursor: default; }
.cal-day.disabled { color: var(--gray-300); cursor: not-allowed; background: transparent; }
.cal-day.available { background: var(--green-50); border-color: var(--green-100); color: var(--green-700); }
.cal-day.available small { color: var(--green-700); }
.cal-day.holiday { color: var(--red-600); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--gold-500); }
.cal-day.selected { background: var(--navy-700) !important; color: #fff !important; border-color: var(--navy-700) !important; }
.cal-day.selected small { color: rgba(255,255,255,.85) !important; }
.cal-day.has-sessions { background: var(--navy-50); }
.cal-day.full { background: var(--amber-50); }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 4px; vertical-align: middle; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot { min-height: 50px; border-radius: 12px; border: 1.5px solid var(--gray-200); background: #fff; font-weight: 700; font-size: 16px; cursor: pointer; transition: all .12s; }
.slot:hover { border-color: var(--navy-500); }
.slot.on { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.slot:disabled { background: var(--gray-50); color: var(--gray-300); text-decoration: line-through; cursor: not-allowed; border-color: var(--gray-100); }

/* ---------- مودال / شیت ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8, 38, 54, .45); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--gray-100); gap: 10px; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--gray-100); display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap; }
.modal-foot .btn { min-width: 110px; }
.x-btn { border: 0; background: var(--gray-100); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 20px; line-height: 1; color: var(--gray-600); flex-shrink: 0; }
@media (max-width: 640px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal, .modal.wide { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; animation: up .22s ease-out; }
  .modal-foot { padding-bottom: calc(14px + var(--safe-bottom)); }
  .modal-foot .btn { flex: 1; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- toast ---------- */
#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--gray-900); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; animation: pop .2s; pointer-events: auto; display: flex; gap: 10px; align-items: center; }
.toast.success { background: var(--green-700); } .toast.error { background: var(--red-700); } .toast.warning { background: var(--amber-700); }

/* ---------- اسکلتون ---------- */
.skeleton { background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; min-height: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.page-loading { padding: 24px 0; } .page-loading .skeleton { height: 90px; margin-bottom: 12px; }

/* ---------- جدول ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 8px; border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: var(--gray-50); }
.num { direction: ltr; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount-pos { color: var(--green-700); font-weight: 700; } .amount-neg { color: var(--red-700); font-weight: 700; }

/* =========================================================
   اپلیکیشن بیمار
   ========================================================= */
.p-app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(84px + var(--safe-bottom)); }
.p-top { background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #fff; padding: 22px 18px 64px; border-radius: 0 0 28px 28px; }
.p-top h1 { color: #fff; font-size: 21px; } .p-top .muted { color: rgba(255,255,255,.75); }
.p-body { padding: 0 16px; margin-top: -46px; }
.p-body.flat { margin-top: 0; padding-top: 16px; }
.p-header { position: sticky; top: 0; z-index: 50; background: rgba(243,246,249,.92); backdrop-filter: blur(8px); padding: 14px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--gray-200); }
.p-header h1 { font-size: 18px; flex: 1; }
.back-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.back-btn svg { width: 20px; height: 20px; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; background: #fff; border-top: 1px solid var(--gray-200); display: flex; padding: 6px 4px calc(6px + var(--safe-bottom)); z-index: 100; box-shadow: 0 -4px 20px rgba(15,23,42,.05); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--gray-400); padding: 6px 0; border-radius: 12px; }
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a.on { color: var(--navy-700); }
.bottom-nav a.cta { color: #fff; }
.bottom-nav a.cta span.ic { background: var(--navy-700); width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-top: -22px; box-shadow: 0 8px 20px rgba(15,77,114,.35); border: 4px solid #fff; }
.bottom-nav a.cta em { color: var(--navy-700); font-style: normal; }

.hero-next { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 18px; }
.hero-date { display: flex; gap: 14px; align-items: center; }
.date-badge { width: 64px; min-width: 64px; height: 70px; border-radius: 16px; background: var(--navy-50); color: var(--navy-700); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.date-badge b { font-size: 24px; } .date-badge small { font-size: 12px; font-weight: 700; }
.big-time { font-size: 26px; font-weight: 700; color: var(--gray-900); line-height: 1.2; }
.wallet-pill { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #12324a, #0F4D72); color: #fff; border-radius: 18px; padding: 16px 18px; }
.wallet-pill .amt { font-size: 22px; font-weight: 700; }
.wallet-hero { background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.wallet-hero .amt { font-size: 32px; font-weight: 700; line-height: 1.3; }
.wallet-hero .muted { color: rgba(255,255,255,.75); }

.stepper { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.stepper .st { flex: 1; height: 5px; border-radius: 99px; background: var(--gray-200); transition: background .2s; }
.stepper .st.on { background: var(--navy-600); }
.step-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.person-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--gray-200); border-radius: 14px; background: #fff; cursor: pointer; width: 100%; text-align: right; margin-bottom: 8px; }
.person-opt.on { border-color: var(--navy-600); background: var(--navy-50); }
.person-opt .av { width: 42px; height: 42px; border-radius: 50%; background: var(--navy-100); color: var(--navy-700); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.person-opt .radio { margin-right: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--gray-300); }
.person-opt.on .radio { border: 7px solid var(--navy-600); }
.sticky-action { position: sticky; bottom: calc(76px + var(--safe-bottom)); padding: 12px 0 4px; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 10; }
.pay-box { border: 2px solid var(--navy-100); border-radius: 18px; padding: 16px; background: #fff; }
.countdown { font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; display: inline-block; }

.login-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px; max-width: 440px; margin: 0 auto; }
.login-logo { width: 76px; height: 76px; border-radius: 24px; background: linear-gradient(135deg, var(--navy-700), var(--navy-500)); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; box-shadow: 0 10px 30px rgba(15,77,114,.3); }
.login-logo svg { width: 40px; height: 40px; color: #fff; }
.otp-input { letter-spacing: 12px; font-size: 26px !important; text-align: center; direction: ltr; }

.result-icon { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 10px auto 16px; }
.result-icon svg { width: 44px; height: 44px; }
.result-icon.ok { background: var(--green-100); color: var(--green-700); }
.result-icon.fail { background: var(--red-100); color: var(--red-700); }

/* =========================================================
   پنل مطب
   ========================================================= */
.a-layout { display: flex; min-height: 100vh; }
.a-side { width: 248px; background: var(--navy-900); color: #cfe2ec; position: fixed; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; z-index: 300; transition: transform .2s; }
.a-brand { padding: 20px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.06); }
.a-brand .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--gold-500); color: var(--navy-900); display: flex; align-items: center; justify-content: center; }
.a-brand .logo svg { width: 22px; height: 22px; }
.a-brand b { color: #fff; display: block; font-size: 15px; } .a-brand small { color: #8fb3c6; font-size: 12px; }
.a-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.a-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: #b9d2df; font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.a-nav a svg { width: 20px; height: 20px; opacity: .85; }
.a-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.a-nav a.on { background: var(--navy-600); color: #fff; }
.a-nav .badge { margin-right: auto; background: var(--gold-500); color: var(--navy-900); font-size: 11px; border-radius: 99px; padding: 0 7px; line-height: 20px; }
.a-nav .sep { font-size: 11px; color: #6f93a6; padding: 14px 12px 6px; font-weight: 700; }
.a-user { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; gap: 10px; }
.a-user .av { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.a-user b { color: #fff; font-size: 13px; display: block; } .a-user small { font-size: 11px; color: #8fb3c6; }
.a-main { flex: 1; margin-right: 248px; min-width: 0; }
.a-top { position: sticky; top: 0; z-index: 200; background: rgba(243,246,249,.92); backdrop-filter: blur(8px); padding: 14px 24px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--gray-200); }
.a-top h1 { font-size: 19px; flex: 1; }
.a-content { padding: 22px 24px 60px; max-width: 1280px; }
.menu-btn { display: none; }
.a-scrim { display: none; }
@media (max-width: 980px) {
  .a-side { transform: translateX(100%); }
  .a-side.open { transform: none; box-shadow: var(--shadow-lg); }
  .a-scrim.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 250; }
  .a-main { margin-right: 0; }
  .menu-btn { display: inline-flex; }
  .a-top { padding: 12px 14px; } .a-content { padding: 16px 14px 60px; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 981px) { .show-mobile { display: none !important; } }

.stat { background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; padding: 14px 16px; }
.stat .lbl { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat .val { font-size: 24px; font-weight: 700; color: var(--gray-900); line-height: 1.4; }
.stat .val small { font-size: 12px; color: var(--muted); font-weight: 400; }
.stat.accent { background: var(--navy-700); border-color: var(--navy-700); } .stat.accent .lbl { color: #b9d2df; } .stat.accent .val { color: #fff; }
.stat.green .val { color: var(--green-700); } .stat.amber .val { color: var(--amber-700); } .stat.red .val { color: var(--red-700); }

.queue-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--gray-200); background: #fff; margin-bottom: 8px; cursor: pointer; transition: box-shadow .15s; }
.queue-item:hover { box-shadow: var(--shadow); }
.queue-item.is-done { opacity: .72; background: var(--gray-50); }
.queue-item.is-next { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-100); }
.queue-time { min-width: 58px; text-align: center; font-weight: 700; font-size: 17px; color: var(--navy-700); line-height: 1.3; }
.queue-time small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.queue-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .queue-item { flex-wrap: wrap; } .queue-actions { width: 100%; justify-content: stretch; } .queue-actions .btn { flex: 1; } }
.money-line { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.cal-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } }
.a-cal .cal-day { aspect-ratio: auto; min-height: 66px; justify-content: flex-start; padding-top: 8px; }
.a-cal .cal-day .bar { width: 70%; height: 4px; border-radius: 99px; background: var(--gray-200); margin-top: 6px; overflow: hidden; }
.a-cal .cal-day .bar i { display: block; height: 100%; background: var(--navy-500); }
.a-cal .cal-day.selected .bar { background: rgba(255,255,255,.3); } .a-cal .cal-day.selected .bar i { background: var(--gold-500); }
.session-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--gray-200); margin-bottom: 6px; background: #fff; }
.session-row.inactive { background: var(--gray-50); opacity: .7; }
.session-row.booked { border-color: var(--navy-100); background: var(--navy-50); }
.session-row .t { font-weight: 700; min-width: 92px; }
.range-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.range-row input { min-height: 42px; border: 1.5px solid var(--gray-200); border-radius: 10px; padding: 6px 10px; width: 110px; direction: ltr; text-align: center; }
.wd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-chips button { border: 1.5px solid var(--gray-200); background: #fff; border-radius: 10px; padding: 6px 12px; cursor: pointer; font-weight: 700; }
.wd-chips button.on { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 200px; flex: 1; }
.search-results { max-height: 300px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: 12px; }
.search-results .item { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); cursor: pointer; }
.search-results .item:hover, .search-results .item.on { background: var(--navy-50); }
.bar-chart { display: flex; flex-direction: column; gap: 6px; }
.bar-chart .b { display: grid; grid-template-columns: 82px 1fr 110px; gap: 10px; align-items: center; font-size: 13px; }
.bar-chart .track { height: 14px; background: var(--gray-100); border-radius: 99px; overflow: hidden; display: flex; }
.bar-chart .track i { display: block; height: 100%; }
.bar-chart .on { background: var(--navy-500); } .bar-chart .cl { background: var(--gold-500); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gray-200); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--gray-500); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--navy-700); border-color: var(--navy-700); }
.settings-section { margin-bottom: 18px; }
.settings-section .card-head p { margin: 0; }
.split-preview { display: flex; height: 40px; border-radius: 12px; overflow: hidden; font-size: 12px; font-weight: 700; color: #fff; }
.split-preview div { display: flex; align-items: center; justify-content: center; padding: 0 8px; white-space: nowrap; overflow: hidden; }
.split-preview .on { background: var(--navy-600); } .split-preview .cl { background: var(--gold-600); }

/* ---------- datepicker ---------- */
.dp-input { cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") no-repeat left 12px center / 18px !important; }

/* ---------- صفحه نصب و درگاه آزمایشی ---------- */
.install-page, .mock-gw { display: flex; align-items: flex-start; justify-content: center; padding: 30px 14px; min-height: 100vh; }
.install-card, .mock-card { background: #fff; border-radius: 20px; padding: 26px; max-width: 640px; width: 100%; box-shadow: var(--shadow); }
.install-card h1 { margin-bottom: 8px; } .install-card h2 { margin: 18px 0 10px; }
.install-form label, .install-reimport label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.install-form input, .install-reimport input { margin-top: 6px; font-weight: 400; }
.install-form fieldset { border: 1px solid var(--gray-200); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.install-form legend { font-size: 13px; color: var(--gray-600); padding: 0 6px; }
.install-links { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.install-reimport { margin-top: 18px; border: 1px solid var(--gray-200); border-radius: 12px; padding: 12px 14px; }
.install-reimport summary { cursor: pointer; font-weight: 700; }
.mock-card { max-width: 400px; text-align: center; margin-top: 40px; }
.mock-card .btn { margin-top: 10px; }
.mock-badge { display: inline-block; background: var(--amber-100); color: var(--amber-700); font-weight: 700; font-size: 12px; padding: 4px 12px; border-radius: 99px; margin-bottom: 14px; }
.mock-amount { font-size: 34px; font-weight: 700; margin: 10px 0; color: var(--navy-700); }
.mock-amount small { font-size: 14px; color: var(--muted); }


/* =========================================================
   تم بنفش (Purple) + انیمیشن‌ها
   ========================================================= */
:root {
  --grad-primary: linear-gradient(to left, #da8cff, #9a55ff);
  --grad-danger: linear-gradient(to left, #ffbf96, #fe7096);
  --grad-info: linear-gradient(to left, #90caf9, #047edf 99%);
  --grad-success: linear-gradient(to left, #84d9d2, #07cdae);
  --grad-warning: linear-gradient(to left, #f6e384, #ffd500);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-sm: 0 1px 2px rgba(80, 40, 140, .05);
  --shadow: 0 8px 24px rgba(108, 57, 186, .10);
  --shadow-lg: 0 24px 60px rgba(60, 20, 110, .22);
  --radius: 14px;
}
body { color: #343a40; }
::selection { background: #e5d4ff; }

/* ---- انیمیشن‌ها ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes growY { from { transform: scaleY(0); } }
@keyframes donut { from { stroke-dasharray: 0 999; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(154, 85, 255, .45); } 50% { box-shadow: 0 0 0 10px rgba(154, 85, 255, 0); } }
.anim > * { animation: fadeUp .45s var(--ease) both; }
.anim > *:nth-child(2) { animation-delay: .05s; } .anim > *:nth-child(3) { animation-delay: .1s; }
.anim > *:nth-child(4) { animation-delay: .15s; } .anim > *:nth-child(5) { animation-delay: .2s; }
.anim > *:nth-child(6) { animation-delay: .25s; } .anim > *:nth-child(n+7) { animation-delay: .3s; }
#content > *, .p-body > *, .p-body > .stack > * { animation: fadeUp .45s var(--ease) both; }
.p-body > .stack > *:nth-child(2) { animation-delay: .06s; } .p-body > .stack > *:nth-child(3) { animation-delay: .12s; }
.p-body > .stack > *:nth-child(4) { animation-delay: .18s; } .p-body > .stack > *:nth-child(n+5) { animation-delay: .24s; }
.queue-item, .session-row, .list-item, .table tbody tr { animation: fadeIn .35s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- دکمه‌ها ---- */
.btn { border-radius: 10px; transition: transform .15s var(--ease), box-shadow .2s, filter .2s, background .2s; }
.btn:hover { filter: brightness(1.04); }
.btn-primary { background: var(--grad-primary); border: 0; box-shadow: 0 8px 18px rgba(154, 85, 255, .30); }
.btn-primary:hover { background: var(--grad-primary); box-shadow: 0 10px 24px rgba(154, 85, 255, .42); transform: translateY(-1px); }
.btn-gold { background: var(--grad-danger); color: #fff; box-shadow: 0 6px 16px rgba(254, 112, 150, .3); }
.btn-success { background: var(--grad-success); box-shadow: 0 6px 16px rgba(7, 205, 174, .28); }
.btn-danger { background: var(--grad-danger); }
.btn-soft { background: #f3eaff; color: #8a47f0; }
.btn-soft-success { background: #e2f8f4; color: #07a68d; }
.btn-soft-danger { background: #ffeef2; color: #e0436d; }
.btn-ghost { border-color: #e6dcef; }

/* ---- فرم ---- */
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { border-color: #ebe4f1; border-radius: 10px; transition: border .2s, box-shadow .2s; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #b66dff; box-shadow: 0 0 0 4px rgba(182, 109, 255, .14); }
.switch input:checked + .track { background: #9a55ff; }
.seg { background: #f4eef8; }
.seg button { transition: all .2s var(--ease); }
.seg button.on { color: #8a47f0; }

/* ---- کارت‌ها ---- */
.card { border: 0; box-shadow: 0 0 0 1px rgba(120, 80, 170, .04), var(--shadow-sm); border-radius: var(--radius); transition: box-shadow .25s, transform .25s var(--ease); }
.card.clickable:hover, .queue-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-head h2, .card-head h3 { color: #343a40; }
.chip-info, .st-booked { background: #efe3ff; color: #8a47f0; }
.chip-success, .st-completed { background: #d9f6f1; color: #069a83; }
.chip-gold { background: #ffe8e6; color: #e2486f; }
.chip-warning, .st-pending_payment { background: #fff4d6; color: #b7791f; }
.chip-danger, .st-cancelled, .st-no_show { background: #ffe5ec; color: #e0436d; }

/* کارت آماری گرادیانی (شبیه تصویر) */
.gstat { position: relative; overflow: hidden; border-radius: 14px; color: #fff; padding: 22px 24px; min-height: 150px; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s; animation: fadeUp .5s var(--ease) both; }
.gstat:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(80, 40, 140, .18); }
.gstat::before, .gstat::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .16); pointer-events: none; transition: transform .6s var(--ease); }
.gstat::before { width: 210px; height: 210px; left: -60px; top: -90px; }
.gstat::after { width: 260px; height: 260px; left: -20px; bottom: -170px; }
.gstat:hover::before { transform: scale(1.08); } .gstat:hover::after { transform: scale(1.05); }
.gstat .lbl { font-size: 15px; opacity: .95; position: relative; display: flex; justify-content: space-between; align-items: center; }
.gstat .lbl svg { width: 22px; height: 22px; }
.gstat .val { font-size: 28px; font-weight: 700; margin: 10px 0 14px; position: relative; line-height: 1.3; }
.gstat .val small { font-size: 13px; font-weight: 400; opacity: .9; }
.gstat .sub { font-size: 13px; font-weight: 700; position: relative; opacity: .95; }
.gstat.danger { background: var(--grad-danger); } .gstat.info { background: var(--grad-info); }
.gstat.success { background: var(--grad-success); } .gstat.primary { background: var(--grad-primary); }
.gstat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.gstat-row > :nth-child(2) { animation-delay: .07s; } .gstat-row > :nth-child(3) { animation-delay: .14s; }
@media (max-width: 900px) { .gstat-row { grid-template-columns: 1fr; gap: 14px; } .gstat { min-height: 120px; } }
.stat { border: 0; box-shadow: var(--shadow-sm); border-radius: 14px; transition: transform .25s var(--ease), box-shadow .25s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat.accent { background: var(--grad-primary); }

/* هدر صفحه با آیکون گرادیانی */
.page-title { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.page-title .pt-ic { width: 38px; height: 38px; border-radius: 8px; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(154, 85, 255, .35); }
.page-title .pt-ic svg { width: 18px; height: 18px; }
.page-title h1 { font-size: 20px; flex: 1; color: #343a40; }
.page-title .pt-act { display: flex; gap: 8px; flex-wrap: wrap; }

/* نمودار دایره‌ای */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut circle.seg-c { animation: donut 1s var(--ease) both; transition: stroke-width .2s; }
.donut circle.seg-c:hover { stroke-width: 22; }
.legend { flex: 1; min-width: 180px; }
.legend .li { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13px; color: #6c7293; border-bottom: 1px dashed #efe8f4; }
.legend .li:last-child { border: 0; }
.legend .li i { width: 12px; height: 12px; border-radius: 50%; }
.legend .li b { margin-right: auto; color: #343a40; }
.bar-chart .track i { transform-origin: right; animation: growX .8s var(--ease) both; }
.bar-chart .on { background: var(--grad-primary); } .bar-chart .cl { background: var(--grad-danger); }

/* ---- پنل مطب ---- */
.a-side { background: #fff; color: #3e4b5b; width: 260px; box-shadow: 0 0 30px rgba(80, 40, 140, .06); }
.a-main { margin-right: 260px; }
.a-brand { height: 70px; padding: 0 22px; border-bottom: 0; }
.a-brand .logo { background: var(--grad-primary); color: #fff; box-shadow: 0 6px 14px rgba(154, 85, 255, .35); }
.a-brand b { color: transparent; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; font-size: 18px; }
.a-brand small { color: #9c9fa6; }
.a-profile { display: flex; align-items: center; gap: 12px; padding: 14px 22px 18px; }
.a-profile .av { width: 46px; height: 46px; border-radius: 50%; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; position: relative; }
.a-profile .av::after { content: ''; position: absolute; bottom: 1px; left: 1px; width: 11px; height: 11px; border-radius: 50%; background: #1bcfb4; border: 2px solid #fff; }
.a-profile b { display: block; color: #343a40; font-size: 14px; } .a-profile small { color: #a39cb0; font-size: 12px; }
.a-profile .ok { margin-right: auto; color: #1bcfb4; }
.a-nav { padding: 4px 12px 16px; }
.a-nav a { color: #3e4b5b; font-weight: 400; padding: 12px 14px; border-radius: 10px; position: relative; transition: color .2s, background .2s, padding .2s var(--ease); }
.a-nav a svg { order: 2; margin-right: auto; color: #bba8bf; width: 18px; height: 18px; transition: color .2s, transform .25s var(--ease); }
.a-nav a .badge { order: 1; margin-right: 0; background: var(--grad-danger); color: #fff; }
.a-nav a:hover { background: #f8f3fc; color: #9a55ff; padding-right: 18px; }
.a-nav a:hover svg { color: #b66dff; transform: scale(1.1); }
.a-nav a.on { background: #f6efff; color: #9a55ff; font-weight: 700; }
.a-nav a.on svg { color: #9a55ff; }
.a-nav a.on::before { content: ''; position: absolute; right: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px 0 0 4px; background: var(--grad-primary); animation: growY .3s var(--ease); }
.a-nav .sep { color: #b2a6c0; }
.a-user { display: none; }
.a-top { background: #fff; border-bottom: 0; height: 70px; padding: 0 28px; box-shadow: 0 2px 12px rgba(80, 40, 140, .04); }
.a-top h1 { display: none; }
.a-search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; color: #9c9fa6; max-width: 420px; }
.a-search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; color: #343a40; }
.a-top .tool { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: #8e94a9; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; position: relative; transition: background .2s, color .2s; }
.a-top .tool:hover { background: #f6efff; color: #9a55ff; }
.a-top .tool .dot-b { position: absolute; top: 9px; left: 9px; width: 8px; height: 8px; border-radius: 50%; background: #fe7096; animation: pulse 2s infinite; }
.a-me { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #343a40; padding: 0 8px; }
.a-me .av { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.a-content { padding: 30px 32px 70px; max-width: 1400px; }
.a-scrim.open { animation: fadeIn .2s; }
.queue-item { border: 0; box-shadow: 0 0 0 1px #f0e9f5; transition: transform .2s var(--ease), box-shadow .2s; }
.queue-item.is-next { box-shadow: 0 0 0 2px #b66dff, 0 10px 24px rgba(154, 85, 255, .15); }
.queue-time { color: #9a55ff; }
.table th { color: #343a40; font-size: 13px; border-bottom: 1px solid #ebedf2; }
.table td { border-bottom: 1px solid #f3f0f6; }
.table tr.clickable:hover td { background: #faf6fd; }
.tabs { border-bottom-color: #ece6f1; } .tabs button { transition: color .2s, border-color .2s; } .tabs button.on { color: #9a55ff; border-color: #9a55ff; }
.cal-day { transition: transform .15s var(--ease), background .2s, box-shadow .2s; }
.cal-day:not(.disabled):not(.empty-cell):hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cal-day.selected { background: var(--grad-primary) !important; border-color: transparent !important; box-shadow: 0 8px 18px rgba(154, 85, 255, .35); }
.cal-day.today { box-shadow: inset 0 0 0 2px #fe9b96; }
.cal-day.available { background: #e7f9f6; border-color: #c9f1ea; color: #069a83; } .cal-day.available small { color: #069a83; }
.slot { transition: all .15s var(--ease); } .slot:hover:not(:disabled) { transform: translateY(-2px); border-color: #b66dff; }
.slot.on { background: var(--grad-primary); border-color: transparent; box-shadow: 0 8px 18px rgba(154, 85, 255, .35); }
.fab { position: fixed; left: 24px; bottom: 24px; width: 54px; height: 54px; border-radius: 50%; background: var(--grad-primary); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(154, 85, 255, .45); cursor: pointer; z-index: 150; transition: transform .2s var(--ease); animation: pulse 2.6s infinite; }
.fab:hover { transform: rotate(90deg) scale(1.05); } .fab svg { width: 24px; height: 24px; }
@media (max-width: 980px) {
  .a-main { margin-right: 0; }
  .a-top { padding: 0 12px; height: 62px; } .a-content { padding: 18px 14px 90px; }
  .a-me span { display: none; }
  .a-search { max-width: none; }
}
.toast { border-radius: 12px; } .toast.success { background: linear-gradient(to left, #1bcfb4, #07a68d); } .toast.error { background: linear-gradient(to left, #fe7096, #e0436d); }
.modal { border-radius: 18px; } .overlay { background: rgba(46, 26, 87, .35); }

/* ---- اپ بیمار ---- */
.p-top { background: var(--grad-primary); position: relative; overflow: hidden; }
.p-top::before, .p-top::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.p-top::before { width: 220px; height: 220px; left: -70px; top: -110px; } .p-top::after { width: 160px; height: 160px; left: 40px; bottom: -120px; }
.p-top > * { position: relative; }
.hero-next { border-radius: 18px; transition: transform .25s var(--ease), box-shadow .25s; }
.hero-next:hover { transform: translateY(-2px); }
.date-badge { background: #f3eaff; color: #8a47f0; }
.wallet-pill, .wallet-hero { background: var(--grad-info); position: relative; overflow: hidden; box-shadow: 0 10px 24px rgba(4, 126, 223, .25); }
.wallet-pill::after, .wallet-hero::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .15); left: -50px; top: -80px; }
.wallet-pill > *, .wallet-hero > * { position: relative; z-index: 1; }
.login-logo { background: var(--grad-primary); box-shadow: 0 12px 30px rgba(154, 85, 255, .35); animation: fadeUp .5s var(--ease) both; }
.login-wrap > * { animation: fadeUp .45s var(--ease) both; } .login-wrap > :nth-child(2) { animation-delay: .05s; } .login-wrap > :nth-child(3) { animation-delay: .1s; } .login-wrap > :nth-child(4) { animation-delay: .15s; }
.stepper .st { position: relative; overflow: hidden; } .stepper .st.on { background: var(--grad-primary); animation: growX .4s var(--ease) both; transform-origin: right; }
.person-opt { transition: all .2s var(--ease); } .person-opt.on { border-color: #b66dff; background: #f8f2ff; } .person-opt.on .radio { border-color: #9a55ff; }
.person-opt .av { background: #efe3ff; color: #8a47f0; }
.bottom-nav a { transition: color .2s; } .bottom-nav a.on { color: #9a55ff; }
.bottom-nav a.on svg { animation: fadeUp .3s var(--ease); }
.bottom-nav a.cta span.ic { background: var(--grad-primary); box-shadow: 0 8px 20px rgba(154, 85, 255, .4); transition: transform .2s var(--ease); }
.bottom-nav a.cta:active span.ic { transform: scale(.92); }
.bottom-nav a.cta em { color: #9a55ff; }
.pay-box { border-color: #ece0ff; }
.result-icon { animation: fadeUp .4s var(--ease) both; } .result-icon.ok { background: #d9f6f1; color: #07a68d; }
.alert-info { background: #f6f0ff; color: #6a35c4; }

.donut-box { position: relative; width: 170px; height: 170px; flex-shrink: 0; }
.donut-box svg { transform: rotate(-90deg); }
.donut-box .dc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-box .dc b { font-size: 22px; color: #343a40; line-height: 1.2; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.dash-grid .donut-wrap { flex-direction: column; }
.dash-grid .legend { width: 100%; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } .dash-grid .donut-wrap { flex-direction: row; } }

/* =========================================================
   صفحه ورود
   ========================================================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: #fff; }
.auth-side { position: relative; overflow: hidden; background: linear-gradient(150deg, #c77dff 0%, #9a55ff 45%, #6f3bd8 100%); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .10); pointer-events: none; }
.auth-side .c1 { width: 380px; height: 380px; top: -140px; left: -120px; animation: float 12s ease-in-out infinite; }
.auth-side .c2 { width: 260px; height: 260px; bottom: -90px; right: -60px; background: rgba(255, 255, 255, .08); animation: float 14s ease-in-out infinite reverse; }
.auth-side .c3 { width: 120px; height: 120px; bottom: 30%; left: 18%; background: rgba(254, 112, 150, .25); filter: blur(2px); animation: float 9s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(14px, -18px); } }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; animation: fadeUp .5s var(--ease) both; }
.auth-brand b { display: block; font-size: 16px; } .auth-brand small { opacity: .8; font-size: 12px; }
.auth-logo { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, .25); }
.auth-logo svg { width: 24px; height: 24px; }
.auth-hero { position: relative; max-width: 420px; animation: fadeUp .6s .1s var(--ease) both; }
.auth-hero h2 { color: #fff; font-size: 28px; line-height: 1.6; font-weight: 700; margin-bottom: 10px; }
.auth-hero p { opacity: .85; font-size: 15px; }
.auth-hero ul { list-style: none; padding: 0; margin: 26px 0 0; }
.auth-hero li { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14px; opacity: .95; }
.auth-hero li svg { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .16); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: radial-gradient(circle at 20% 10%, #f8f2ff 0, transparent 40%), radial-gradient(circle at 90% 90%, #fff1f4 0, transparent 35%); }
.auth-box { width: 100%; max-width: 360px; animation: fadeUp .5s .05s var(--ease) both; }
.auth-steps { display: flex; gap: 6px; margin-bottom: 26px; }
.auth-steps i { height: 4px; flex: 1; border-radius: 4px; background: #eee6f5; }
.auth-steps i.on { background: var(--grad-primary); animation: growX .5s var(--ease) both; transform-origin: right; }
.auth-ic { width: 48px; height: 48px; border-radius: 14px; background: #f4ecff; color: #9a55ff; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.auth-ic svg { width: 22px; height: 22px; }
.auth-box h1 { font-size: 22px; font-weight: 700; color: #2c2e3e; margin-bottom: 6px; }
.auth-sub { color: #8e8aa0; font-size: 14px; margin-bottom: 26px; line-height: 1.9; }
.auth-sub b { color: #3e3a50; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .grid-2 { gap: 10px; }
.afield { position: relative; display: block; margin: 0; }
.afield input { width: 100%; height: 50px; border: 1.5px solid #ece6f2; border-radius: 12px; background: #fbf9fd; padding: 0 16px; font-size: 15px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
.afield input::placeholder { color: #b7b0c4; font-size: 14px; }
.afield input[dir=ltr]::placeholder { text-align: right; }
.afield input:hover { border-color: #ddd1ea; }
.afield input:focus { border-color: #b66dff; background: #fff; box-shadow: 0 0 0 4px rgba(182, 109, 255, .12); }
.afield-ic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #b9aecb; pointer-events: none; display: flex; transition: color .2s; }
.afield-ic svg { width: 18px; height: 18px; }
.afield:has(.afield-ic) input { padding-right: 44px; }
.afield:focus-within .afield-ic { color: #9a55ff; }
.afield-eye { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #b9aecb; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.afield-eye.on, .afield-eye:hover { color: #9a55ff; background: #f4ecff; }
.afield:has(.afield-eye) input { padding-left: 46px; }
.auth-btn { height: 50px; min-height: 50px; border-radius: 12px; font-size: 15px; margin-top: 8px; }
.auth-btn svg { transition: transform .2s var(--ease); }
.auth-btn:hover svg { transform: translateX(-4px); }
.auth-foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid #f1ecf5; text-align: center; font-size: 13px; }
.auth-foot a { color: #8e8aa0; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.auth-foot a:hover { color: #9a55ff; } .auth-foot svg { width: 16px; height: 16px; }
.otp-boxes { display: flex; gap: 8px; justify-content: space-between; }
.otp-box { width: 100%; min-width: 0; height: 56px; border: 1.5px solid #ece6f2; border-radius: 12px; background: #fbf9fd; text-align: center; font-size: 22px; font-weight: 700; color: #2c2e3e; outline: none; transition: all .18s var(--ease); caret-color: #9a55ff; }
.otp-box:focus { border-color: #b66dff; background: #fff; box-shadow: 0 0 0 4px rgba(182, 109, 255, .12); transform: translateY(-2px); }
.otp-box.filled { border-color: #c9a6ff; background: #fff; }
.shake { animation: shake .4s; }
.shake .otp-box { border-color: #fe7096 !important; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.auth-resend { text-align: center; font-size: 13px; color: #8e8aa0; margin-top: 18px; }
.auth-resend b { color: #9a55ff; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; background: #f7f3fa; }
  .auth-side { padding: 26px 22px 64px; border-radius: 0 0 28px 28px; }
  .auth-hero ul, .auth-hero p { display: none; }
  .auth-hero h2 { font-size: 18px; margin: 18px 0 0; }
  .auth-main { align-items: flex-start; padding: 0 16px 30px; margin-top: -42px; background: none; }
  .auth-box { background: #fff; border-radius: 20px; padding: 26px 22px; box-shadow: 0 14px 40px rgba(108, 57, 186, .12); max-width: 440px; }
  .otp-box { height: 52px; }
}
.p-app:has(> .auth) { max-width: none; padding-bottom: 0; }
