/* =====================================================================
   گلیم‌سان — سیستم طراحی
   زبان بصری: کاغذ گرم، جوهَر آلوچه‌ای، خطوط نازک، فضای نفس‌گیر.
   همهٔ اندازه‌ها موبایل-فرست؛ پایه ۳۶۰px.
   ===================================================================== */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  /* سطح‌ها */
  --paper: #fbf7f3;
  --paper-2: #f4ece6;
  --surface: #ffffff;
  --surface-sunk: #f7f0eb;
  --line: #e8dcd3;
  --line-soft: #f0e6de;

  /* جوهر */
  --ink: #2a1f24;
  --ink-2: #4e3b43;
  --muted: #7d6a72;
  --faint: #a3909a;

  /* رنگ برند */
  --plum: #7c3f57;
  --plum-deep: #5e2c40;
  --plum-soft: #f6e9ee;
  --rose: #c98a9f;
  --gold: #a8773a;
  --gold-soft: #fbf1e0;
  --sage: #567a66;
  --sage-soft: #e8f0ea;
  --danger: #a4342f;
  --danger-soft: #fbeae8;
  --amber: #9a6a12;
  --amber-soft: #fdf2dc;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;

  --shadow-sm: 0 1px 2px rgba(60, 35, 45, 0.05);
  --shadow: 0 2px 6px rgba(60, 35, 45, 0.06), 0 12px 28px -18px rgba(60, 35, 45, 0.28);
  --shadow-lg: 0 4px 12px rgba(60, 35, 45, 0.08), 0 32px 60px -30px rgba(60, 35, 45, 0.4);

  --tap: 46px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 88% -8%, rgba(201, 138, 159, 0.16), transparent 42%),
    radial-gradient(circle at 4% 104%, rgba(168, 119, 58, 0.09), transparent 46%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.6em; }
a { color: var(--plum); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.num, .money, time, .tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* ---------- چیدمان ---------- */
.wrap { width: min(1180px, 100% - 28px); margin-inline: auto; }
.shell { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
@media (min-width: 900px) {
  .shell { grid-template-columns: 1fr 248px; }
}

.main { padding: 16px 0 calc(var(--nav-h) + 28px); min-width: 0; }
@media (min-width: 900px) { .main { padding: 26px 0 56px; } }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-4 { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.spacer { flex: 1; }
.hide-mobile { display: none; }
@media (min-width: 720px) { .hide-mobile { display: initial; } }
.only-mobile { display: initial; }
@media (min-width: 720px) { .only-mobile { display: none; } }

/* ---------- سربرگ ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 247, 243, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-in { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 10px; color: #fff; font-size: 15px;
  background: linear-gradient(145deg, var(--plum), var(--plum-deep));
  box-shadow: 0 4px 12px -4px rgba(94, 44, 64, 0.55);
}
.brand small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* ---------- ناوبری کنار (دسکتاپ) ---------- */
.sidenav { display: none; }
@media (min-width: 900px) {
  .sidenav {
    display: flex; flex-direction: column; gap: 3px;
    position: sticky; top: 0; height: 100dvh; padding: 18px 12px;
    border-inline-start: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.5);
    order: 2;
  }
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 12px; border-radius: 11px;
  color: var(--ink-2); font-weight: 600; font-size: 14px;
}
.nav-item:hover { background: var(--surface-sunk); text-decoration: none; }
.nav-item.on { background: var(--plum); color: #fff; box-shadow: 0 6px 16px -8px rgba(124, 63, 87, 0.8); }
.nav-item .ico { font-size: 16px; width: 20px; text-align: center; opacity: 0.9; }
.nav-label { font-size: 10.5px; font-weight: 700; color: var(--faint); padding: 14px 12px 5px; letter-spacing: 0.04em; }

/* ---------- ناوبری پایین (موبایل) — حداکثر ۴ اقدام ---------- */
.botnav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; align-items: center;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .botnav { display: none; } }
.botnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 54px; color: var(--muted); font-size: 10.5px; font-weight: 600;
}
.botnav a.on { color: var(--plum); }
.botnav a .ico { font-size: 19px; line-height: 1; }
.botnav a.on .ico { transform: translateY(-1px); }

/* ---------- کارت ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fffdfb, #fdf9f6);
}
.card-head h2, .card-head h3 { font-size: 0.95rem; }
.card-body { padding: 14px 16px; }
.section-title { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--faint); text-transform: uppercase; }
.section-title-fa { font-size: 11.5px; font-weight: 800; color: var(--faint); }

/* کارت آماری */
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.stat .k { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.stat .v { font-size: 1.28rem; font-weight: 800; letter-spacing: -0.02em; }
.stat .v small { font-size: 11px; font-weight: 600; color: var(--muted); }
.stat.hero { background: linear-gradient(150deg, var(--plum), var(--plum-deep)); border-color: transparent; color: #fff; }
.stat.hero .k { color: rgba(255, 255, 255, 0.78); }

/* ---------- دکمه ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--tap); padding: 0 18px;
  border-radius: 13px; border: 1px solid transparent;
  background: var(--plum); color: #fff;
  font-family: inherit; font-size: 14.5px; font-weight: 700;
  cursor: pointer; transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 18px -10px rgba(124, 63, 87, 0.9);
  text-align: center; line-height: 1.2;
}
.btn:hover { background: var(--plum-deep); text-decoration: none; }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn.block { width: 100%; }
.btn.lg { min-height: 54px; font-size: 16px; border-radius: 15px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-sunk); }
.btn.quiet { background: transparent; color: var(--plum); border-color: transparent; box-shadow: none; padding-inline: 10px; }
.btn.quiet:hover { background: var(--plum-soft); }
.btn.sage { background: var(--sage); box-shadow: 0 6px 18px -10px rgba(86, 122, 102, 0.9); }
.btn.sage:hover { background: #44644f; }
.btn.danger { background: var(--danger); box-shadow: none; }
.btn.danger:hover { background: #8c2a26; }
.btn.warn { background: var(--amber); box-shadow: none; }

/* ---------- برچسب ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 1.6;
  background: var(--surface-sunk); color: var(--ink-2);
  white-space: nowrap;
}
.pill.pending { background: var(--amber-soft); color: var(--amber); }
.pill.confirmed { background: var(--sage-soft); color: var(--sage); }
.pill.done { background: #eceaea; color: #5d5458; }
.pill.cancelled { background: var(--danger-soft); color: var(--danger); }
.pill.noshow { background: #f7e3e1; color: #8a241f; }
.pill.plum { background: var(--plum-soft); color: var(--plum); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.pill.outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* ---------- فرم ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > label, .label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--muted); font-weight: 500; }
input[type='text'], input[type='tel'], input[type='number'], input[type='date'], input[type='password'],
input[type='search'], input[type='time'], select, textarea {
  width: 100%; min-height: var(--tap);
  padding: 10px 13px;
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
textarea { min-height: 78px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(124, 63, 87, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type='number']::-webkit-outer-spin-button, input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237d6a72' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 13px center; padding-left: 34px;
}
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 13.5px; min-height: 40px; }
.check input { width: 19px; height: 19px; accent-color: var(--plum); }

/* چیپ‌های انتخابی */
.chipset { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chipset::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; flex-direction: column; gap: 1px;
  padding: 9px 14px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; min-height: var(--tap); justify-content: center;
  transition: all 0.14s;
}
.chip:hover { border-color: var(--rose); }
.chip small { font-size: 11px; font-weight: 500; color: var(--muted); }
.chip.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.chip.on small { color: rgba(255, 255, 255, 0.82); }
.chip.static { cursor: default; }

/* ---------- تقویم ---------- */
.cal-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-nav { display: flex; gap: 4px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); cursor: pointer; font-size: 15px; padding: 0;
}
.icon-btn:hover { background: var(--surface-sunk); }

.cal { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cal-grid { display: grid; min-width: 100%; }
.cal-heads { display: grid; position: sticky; top: 0; z-index: 12; background: #fffdfb; border-bottom: 1px solid var(--line); }
.cal-head {
  padding: 9px 6px; text-align: center; border-inline-start: 1px solid var(--line-soft);
  font-size: 12px; font-weight: 700;
}
.cal-head:first-child { border-inline-start: 0; }
.cal-head small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); }
.cal-head .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 4px; vertical-align: middle; }
.cal-body { display: grid; max-height: min(64vh, 720px); overflow-y: auto; position: relative; }
.cal-hours { border-inline-start: 1px solid var(--line-soft); }
.cal-hour {
  height: 56px; border-bottom: 1px solid var(--line-soft);
  font-size: 10.5px; color: var(--faint); font-weight: 600;
  padding-top: 2px; padding-inline-end: 7px; text-align: end;
  position: relative;
}
.cal-col { position: relative; border-inline-start: 1px solid var(--line-soft); }
.cal-col .slot-bg { height: 56px; border-bottom: 1px solid var(--line-soft); }
.cal-col .slot-bg:nth-child(even) { background: #fdfaf8; }
.cal-col.today { background: rgba(200, 138, 159, 0.055); }

.appt {
  position: absolute; inset-inline: 3px;
  border-radius: 10px; padding: 5px 7px; overflow: hidden;
  font-size: 11.5px; line-height: 1.45; font-weight: 600;
  border: 1px solid; cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s;
  display: flex; flex-direction: column;
}
.appt:hover { box-shadow: var(--shadow); transform: translateY(-1px); z-index: 6; }
.appt .t { font-size: 10px; font-weight: 700; opacity: 0.8; font-variant-numeric: tabular-nums; }
.appt .n { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt .s { font-size: 10px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt.confirmed { background: var(--sage-soft); border-color: #bfd4c6; color: #34503f; }
.appt.pending { background: var(--amber-soft); border-color: #eacf9c; color: #75500b; }
.appt.done { background: #f0eeee; border-color: #ded9da; color: #5d5458; }
.appt.cancelled { background: repeating-linear-gradient(45deg, #f7f2f1, #f7f2f1 5px, #f1e9e7 5px, #f1e9e7 10px); border-color: #e3d2cf; color: #95706c; text-decoration: line-through; }
.appt.noshow { background: var(--danger-soft); border-color: #eec4c0; color: #8a241f; }
.appt .proc { border-top: 1px dashed currentColor; opacity: 0.72; font-size: 9.5px; margin-top: 3px; padding-top: 2px; }
.appt.tiny { padding: 3px 5px; font-size: 10.5px; }
.now-line { position: absolute; inset-inline: 0; height: 0; border-top: 2px solid var(--plum); z-index: 8; pointer-events: none; }
.now-line::before { content: ''; position: absolute; inset-inline-start: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--plum); }

/* ---------- فهرست ---------- */
.list { display: flex; flex-direction: column; }
.li {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 16px; border-bottom: 1px solid var(--line-soft);
  min-height: 60px; color: var(--ink);
}
.li:last-child { border-bottom: 0; }
.li:hover { background: #fefbf9; text-decoration: none; }
.li-main { min-width: 0; flex: 1; }
.li-title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-end { text-align: end; flex-shrink: 0; }

.avatar {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: var(--plum-soft); color: var(--plum);
}
.avatar.sm { width: 30px; height: 30px; border-radius: 10px; font-size: 12px; }
.avatar.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 19px; }

/* ---------- جدول ---------- */
.table-scroll { Overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th {
  text-align: start; font-size: 11px; font-weight: 700; color: var(--muted);
  padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fdfaf8;
  white-space: nowrap;
}
table.tb td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tfoot td { font-weight: 800; background: #fdfaf8; border-top: 1px solid var(--line); }
table.tb .end { text-align: end; }
table.tb .num { font-variant-numeric: tabular-nums; }

/* ---------- حالت خالی / خطا ---------- */
.empty {
  text-align: center; padding: 34px 20px; color: var(--muted);
}
.empty .glyph {
  font-size: 30px; opacity: 0.35; margin-bottom: 8px; display: block;
}
.empty h3 { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 4px; }
.empty p { font-size: 12.5px; margin: 0 auto 12px; max-width: 34ch; }

.alert {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 13px; border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 500; line-height: 1.65;
  border: 1px solid;
}
.alert.info { background: var(--plum-soft); border-color: #e6cfd9; color: var(--plum-deep); }
.alert.warn { background: var(--amber-soft); border-color: #eed7a8; color: #7d5310; }
.alert.danger { background: var(--danger-soft); border-color: #eec4c0; color: #8a241f; }
.alert.ok { background: var(--sage-soft); border-color: #c3d8c9; color: #34503f; }
.alert .ai { flex-shrink: 0; }

/* ---------- خط زمانی ---------- */
.timeline { position: relative; padding-inline-start: 18px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 4px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 13px; }
.tl-item::before {
  content: ''; position: absolute; inset-inline-start: -18px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--rose);
}

/* ---------- شیت پایین (موبایل) ---------- */
.sheet {
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
}
.sheet-grab { width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 4px auto 12px; }

/* ---------- PWA / آفلاین ---------- */
.offline-bar {
  position: fixed; inset-inline: 0; top: 0; z-index: 90;
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 7px 14px; text-align: center; display: none;
}
.offline-bar.on { display: block; }
.queued-badge {
  position: fixed; inset-inline-end: 12px; bottom: calc(var(--nav-h) + 12px); z-index: 60;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 14px;
  font-size: 12px; font-weight: 700; box-shadow: var(--shadow);
  display: none;
}
@media (min-width: 900px) { .queued-badge { bottom: 16px; } }
.queued-badge.on { display: block; }

/* ---------- متفرقه ---------- */
.hr { height: 1px; background: var(--line-soft); border: 0; margin: 14px 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.bold { font-weight: 800; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.inline-form { display: inline; }

/* کلید/مقدار */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; }

/* بخش جمع‌شده (details/summary)
   فرمول رنگ به‌صورت پیش‌فرض بسته است تا صفحهٔ ثبت نتیجه حداکثر ۷ فیلد فعال داشته باشد.
   فیلدها همان فرم واحدند؛ فقط در دید پیش‌فرض جمع شده‌اند. */
details.formula-block > summary { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; align-items: baseline; }
details.formula-block > summary::-webkit-details-marker { display: none; }
details.formula-block > summary::before {
  content: '▸'; font-size: 11px; color: var(--plum); transition: transform 0.16s ease;
  display: inline-block; width: 11px; flex: 0 0 11px;
}
details.formula-block[open] > summary::before { transform: rotate(90deg); }
details.formula-block[open] > summary { margin-bottom: 2px; }
@media (prefers-reduced-motion: reduce) {
  details.formula-block > summary::before { transition: none; }
}

/* نوار پیشرفت */
.bar { height: 7px; border-radius: 99px; background: var(--surface-sunk); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--plum); }
.bar.sage > span { background: var(--sage); }
.bar.gold > span { background: var(--gold); }
.bar.danger > span { background: var(--danger); }

/* مودال ساده با <dialog> */
dialog.modal {
  border: 0; padding: 0; border-radius: 20px; max-width: min(520px, 94vw); width: 100%;
  background: var(--surface); box-shadow: var(--shadow-lg); color: var(--ink);
}
dialog.modal::backdrop { background: rgba(42, 31, 36, 0.42); backdrop-filter: blur(3px); }

/* چاپ */
@media print {
  .topbar, .botnav, .sidenav, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}

/* حرکت */
@media (prefers-reduced-motion: no-preference) {
  .fade-up { animation: fadeUp 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .fade-up:nth-child(2) { animation-delay: 0.04s; }
  .fade-up:nth-child(3) { animation-delay: 0.08s; }
  .fade-up:nth-child(4) { animation-delay: 0.12s; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
}
