/* =====================================================================
   AutoCar — سیستم مدیریت نمایشگاه خودرو
   طراحی: راست‌چین، واکنش‌گرا (لپ‌تاپ + موبایل)، حالت روشن/تیره
   ===================================================================== */
@font-face {
  font-family: Vazirmatn; font-display: swap; font-weight: 100 900;
  src: url('../fonts/Vazirmatn-Variable.woff2') format('woff2');
}

:root {
  --bg: #f2f4f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: #e5e9f2;
  --line-2: #d6dcea;
  --text: #0e1630;
  --muted: #64708c;
  --primary: #2b59ff;
  --primary-600: #1f43d1;
  --primary-soft: #e8edff;
  --on-primary: #fff;
  --accent: #f6a30f;
  --shadow-sm: 0 1px 2px rgba(16, 24, 56, .06), 0 1px 3px rgba(16, 24, 56, .04);
  --shadow: 0 6px 20px -6px rgba(16, 24, 56, .14), 0 2px 6px rgba(16, 24, 56, .05);
  --shadow-lg: 0 24px 60px -20px rgba(16, 24, 56, .35);
  --radius: 16px;
  --radius-sm: 11px;
  --side-bg: linear-gradient(180deg, #0c1330 0%, #101a42 100%);
  --ph-wheel: #fff;

  --green: #0f9d58;   --green-soft: #e2f6ea;
  --amber: #b76e00;   --amber-soft: #fff1d6;
  --red: #d92d3a;     --red-soft: #fde7e8;
  --blue: #2b59ff;    --blue-soft: #e6ecff;
  --violet: #7344f0;  --violet-soft: #eee8ff;
  --indigo: #4a43d6;  --indigo-soft: #e9e8fd;
  --gray: #5c677f;    --gray-soft: #eceff5;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="dark"] {
  --bg: #0a0f20;
  --surface: #121a33;
  --surface-2: #17213f;
  --line: #243157;
  --line-2: #2f3d69;
  --text: #e9eefc;
  --muted: #94a2c6;
  --primary: #5b82ff;
  --primary-600: #7b9bff;
  --primary-soft: #1b2a5c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --side-bg: linear-gradient(180deg, #070b1a 0%, #0c1330 100%);
  --ph-wheel: #121a33;
  --green: #3ddc8c;  --green-soft: rgba(61, 220, 140, .14);
  --amber: #ffbf47;  --amber-soft: rgba(255, 191, 71, .15);
  --red: #ff6b75;    --red-soft: rgba(255, 107, 117, .15);
  --blue: #7b9bff;   --blue-soft: rgba(91, 130, 255, .18);
  --violet: #a98bff; --violet-soft: rgba(169, 139, 255, .17);
  --indigo: #9a95ff; --indigo-soft: rgba(154, 149, 255, .16);
  --gray: #a3afcf;   --gray-soft: rgba(163, 175, 207, .13);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 15px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Vazirmatn, "Vazir", "Segoe UI", Tahoma, system-ui, sans-serif;
  line-height: 1.7; direction: rtl; -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; color: inherit; }
small.unit { font-size: .72em; color: var(--muted); font-weight: 500; margin-inline-start: 2px; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.tel { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { font-feature-settings: "tnum"; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.hide { display: none !important; }

/* ---------- شِل اصلی ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: 268px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; background: var(--side-bg); color: #cdd6f4;
  display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #3d6bff, #7a4dff); box-shadow: 0 8px 20px -6px rgba(61, 107, 255, .7);
}
.brand b { display: block; color: #fff; font-size: 1.05rem; line-height: 1.3; }
.brand span { font-size: .78rem; color: #8b97c4; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: #b4bfe6; font-weight: 500; transition: .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(91, 130, 255, .28), rgba(91, 130, 255, .08)); color: #fff; box-shadow: inset -3px 0 0 var(--accent); }
.nav .sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 10px 8px; }
.side-foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
.usercard { display: flex; align-items: center; gap: 10px; padding: 8px; }
.usercard .av { width: 38px; height: 38px; }
.usercard b { display: block; color: #fff; font-size: .92rem; line-height: 1.3; }
.usercard small { color: #8b97c4; }
.side-actions { display: flex; gap: 6px; padding: 4px 6px; }
.side-actions button {
  flex: 1; border: 0; background: rgba(255, 255, 255, .07); color: #cdd6f4; border-radius: 10px; padding: 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .85rem;
}
.side-actions button:hover { background: rgba(255, 255, 255, .13); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.2px; }
.topbar .crumb { color: var(--muted); font-size: .85rem; }
.page { padding: 8px 28px 56px; width: 100%; max-width: 1360px; margin-inline: auto; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.bottomnav { display: none; }
.back-btn { display: none; }
.back-btn.show { display: inline-grid; }
.back-btn:not(.show) { display: none !important; }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: .93rem; cursor: pointer; transition: .15s; white-space: nowrap;
  background: var(--surface); color: var(--text); border-color: var(--line-2);
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: linear-gradient(135deg, var(--primary), #5b3dff); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(43, 89, 255, .75); }
.btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); color: #fff; }
.btn.soft { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.btn.soft:hover { filter: brightness(.97); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn.danger { background: var(--red); color: #fff; border-color: transparent; }
.btn.danger:hover { color: #fff; filter: brightness(1.08); }
.btn.green { background: var(--green); color: #fff; border-color: transparent; }
.btn.green:hover { color: #fff; filter: brightness(1.08); }
.btn.sm { padding: 6px 12px; font-size: .84rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  display: inline-grid; place-items: center; cursor: pointer; transition: .15s; flex: none;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red); }

/* ---------- کارت و آمار ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card-head h3 { font-size: 1.02rem; font-weight: 800; flex: 1; }
.card-body { padding: 14px 20px 20px; }
.section-title { font-size: 1.05rem; font-weight: 800; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.section-title .grow { flex: 1; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.stat {
  position: relative; overflow: hidden; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; min-height: 112px;
}
.stat .lbl { color: var(--muted); font-size: .85rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat .val { font-size: 1.55rem; font-weight: 800; letter-spacing: -.3px; line-height: 1.35; }
.stat .val small { font-size: .62em; color: var(--muted); font-weight: 500; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.stat .ico {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.stat.hero {
  background: linear-gradient(135deg, #2b59ff 0%, #6a3dff 100%); color: #fff; border: 0;
  box-shadow: 0 18px 36px -16px rgba(80, 70, 255, .7);
}
.stat.hero .lbl, .stat.hero .sub, .stat.hero .val small { color: rgba(255, 255, 255, .8); }
.stat.hero .ico { background: rgba(255, 255, 255, .18); color: #fff; }
.stat.hero::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .08); inset-inline-end: -50px; bottom: -70px; }
.stat.green .ico { background: var(--green-soft); color: var(--green); }
.stat.amber .ico { background: var(--amber-soft); color: var(--amber); }
.stat.red .ico { background: var(--red-soft); color: var(--red); }
.stat.violet .ico { background: var(--violet-soft); color: var(--violet); }
.stat.link { cursor: pointer; transition: .15s; }
.stat.link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pos { color: var(--green); } .neg { color: var(--red); }

/* ---------- چیپ ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }
.chip.indigo { background: var(--indigo-soft); color: var(--indigo); }
.chip.gray { background: var(--gray-soft); color: var(--gray); }
.chip.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- فرم ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fgrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fgrid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field .lbl { font-size: .86rem; font-weight: 700; color: var(--muted); }
.field .req { color: var(--red); font-style: normal; margin-inline-start: 3px; }
.hint { font-size: .78rem; color: var(--muted); min-height: 0; }
.words { color: var(--primary); font-weight: 500; }
.words:empty { display: none; }
.input {
  width: 100%; padding: 10px 13px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: .96rem; transition: .15s; outline: none; min-height: 44px;
}
textarea.input { resize: vertical; min-height: 70px; line-height: 1.8; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364708c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-inline-end: 13px; padding-left: 36px; }
.field.invalid .input, .field.invalid .picker-btn { border-color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.money-wrap, .date-wrap { position: relative; }
.money-wrap .input { padding-left: 62px; font-weight: 700; font-size: 1.02rem; }
.unit-tag { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .78rem; pointer-events: none; }
.date-wrap .input { padding-left: 44px; }
.date-btn { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.date-btn:hover { background: var(--primary-soft); color: var(--primary); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; transition: .15s; background: var(--surface); }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); color: #fff; }
.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; gap: 4px; width: 100%; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 12px; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--muted); font-size: .9rem; transition: .15s; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.seg.sm button { padding: 6px 12px; font-size: .84rem; }
.picker-btn {
  width: 100%; min-height: 44px; padding: 8px 13px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; font-size: .96rem; text-align: right; color: var(--text);
}
.picker-btn:hover { border-color: var(--primary); }
.picker-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-text .ph { color: var(--muted); }
.form-section { font-weight: 800; font-size: .98rem; margin-top: 8px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.form-section::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-section .ic { color: var(--primary); }
.form-actions { position: sticky; bottom: 0; display: flex; gap: 10px; justify-content: flex-end; padding: 14px 0 calc(14px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 70%, transparent); margin-top: 8px; }

/* ---------- نوار ابزار و فیلتر ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0 16px; }
.searchbox { position: relative; flex: 1; min-width: 200px; }
.searchbox .ic { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox .input { padding-inline-start: 42px; }
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.fchip { border: 1.5px solid var(--line-2); background: var(--surface); padding: 7px 15px; border-radius: 99px; font-weight: 700; font-size: .86rem; cursor: pointer; white-space: nowrap; color: var(--muted); transition: .15s; }
.fchip:hover { border-color: var(--primary); color: var(--primary); }
.fchip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.fchip b { margin-inline-start: 6px; opacity: .8; font-weight: 700; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 6px 0 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: transparent; padding: 12px 18px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; font-size: .95rem; margin-bottom: -1px; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs button .cnt { background: var(--gray-soft); border-radius: 99px; padding: 0 8px; font-size: .75rem; margin-inline-start: 6px; }

/* ---------- جدول ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: right; font-size: .78rem; color: var(--muted); font-weight: 700; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--surface-2); }
.tbl td.n, .tbl th.n { text-align: left; }
.tbl tfoot td { font-weight: 800; background: var(--surface-2); }
.cell-title { font-weight: 700; display: block; }
.cell-sub { color: var(--muted); font-size: .8rem; display: block; }

/* ---------- کارت خودرو ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; cursor: pointer; transition: .2s; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.vcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.vcard .media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.vcard .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.vcard:hover .media img { transform: scale(1.05); }
.vcard .badges { position: absolute; inset: 10px 10px auto 10px; display: flex; justify-content: space-between; gap: 6px; }
.vcard .badges .chip { backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.vcard .days { position: absolute; inset-inline-start: 10px; bottom: 10px; background: rgba(10, 15, 32, .62); color: #fff; font-size: .74rem; padding: 2px 10px; border-radius: 99px; backdrop-filter: blur(6px); }
.vcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.vcard h4 { font-size: 1.06rem; font-weight: 800; line-height: 1.5; }
.vcard .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .82rem; }
.vcard .meta span { display: inline-flex; align-items: center; gap: 5px; }
.vcard .price-row { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.vcard .price { font-weight: 800; font-size: 1.12rem; }
.vcard .plate { font-size: .78rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 7px; padding: 0 8px; background: var(--surface-2); }
.car-ph {
  width: 100%; height: 100%; display: grid; place-items: center; color: hsl(var(--h) 55% 48% / .55);
  background: radial-gradient(circle at 30% 20%, hsl(var(--h) 80% 92%), hsl(var(--h) 60% 86%));
}
:root[data-theme="dark"] .car-ph { background: radial-gradient(circle at 30% 20%, hsl(var(--h) 40% 22%), hsl(var(--h) 45% 14%)); color: hsl(var(--h) 60% 65% / .5); }
.car-ph svg { width: 62%; max-height: 80%; }

/* ---------- جزئیات خودرو ---------- */
.vhero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; margin-bottom: 8px; }
.gallery { position: relative; }
.gallery .main-img { aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); position: relative; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs .th { flex: none; width: 74px; height: 56px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: .75; position: relative; }
.thumbs .th.on { border-color: var(--primary); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .add { display: grid; place-items: center; background: var(--surface-2); border: 2px dashed var(--line-2); color: var(--muted); }
.vinfo { display: flex; flex-direction: column; gap: 14px; }
.vinfo h2 { font-size: 1.55rem; font-weight: 800; line-height: 1.4; }
.vinfo .sub { color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pricebox { background: linear-gradient(135deg, var(--primary-soft), var(--surface-2)); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
.pricebox .big { font-size: 1.7rem; font-weight: 800; line-height: 1.4; }
.pricebox .lbl { color: var(--muted); font-size: .82rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fact { background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 10px 13px; min-width: 0; }
.fact .k { font-size: .76rem; color: var(--muted); }
.fact .v { font-weight: 700; word-break: break-word; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 22px; }
.kv .k { font-size: .78rem; color: var(--muted); }
.kv .v { font-weight: 700; }
.kv .wide { grid-column: 1 / -1; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- خط زمان ---------- */
.timeline { position: relative; padding-inline-start: 30px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item .dot { position: absolute; inset-inline-start: -30px; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--primary); color: var(--primary); }
.tl-item.contract .dot { border-color: var(--green); color: var(--green); }
.tl-item.expense .dot, .tl-item.payment .dot { border-color: var(--amber); color: var(--amber); }
.tl-item.status .dot { border-color: var(--violet); color: var(--violet); }
.tl-item .when { font-size: .78rem; color: var(--muted); }
.tl-item .what { font-weight: 600; }
.tl-item .who { font-size: .78rem; color: var(--muted); }

/* ---------- لیست‌ها ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .li-main { flex: 1; min-width: 0; }
.li .li-main b { display: block; }
.li .li-main small { color: var(--muted); display: block; }
.li.click { cursor: pointer; }
.li.click:hover { background: var(--surface-2); margin-inline: -20px; padding-inline: 20px; }
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, #3d6bff, #8a5bff); color: #fff; }
.av.car { background: var(--primary-soft); color: var(--primary); border-radius: 12px; }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty .ic { opacity: .5; margin-bottom: 8px; }
.empty h4 { color: var(--text); margin-bottom: 4px; }
.empty.small { padding: 22px 10px; }
.skel { height: 74px; border-radius: 16px; margin-bottom: 12px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.pick-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 52vh; overflow-y: auto; }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 9px 12px; cursor: pointer; }
.pick-row:hover { border-color: var(--primary); background: var(--primary-soft); }
.pick-row .pr-main { flex: 1; min-width: 0; }
.pick-row b, .pick-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row small { color: var(--muted); }

/* ---------- نمودار ---------- */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 6px 4px 0; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .bar { width: 100%; max-width: 46px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--primary), #7a4dff); min-height: 4px; position: relative; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.bars .bar.cur { background: linear-gradient(180deg, var(--accent), #ff7a45); }
.bars .bv { font-size: .76rem; font-weight: 700; }
.bars .bl { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.hbar { display: grid; grid-template-columns: minmax(80px, 150px) 1fr auto; gap: 10px; align-items: center; margin: 9px 0; font-size: .88rem; }
.hbar .track { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #7a4dff); }
.hbar.out .fill { background: linear-gradient(90deg, #ff8a4d, #e0343a); }
.hbar.in .fill { background: linear-gradient(90deg, #17b26a, #0f9d58); }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- هشدار / پیام ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 13px; background: var(--amber-soft); color: var(--amber); font-size: .88rem; font-weight: 600; }
.notice.red { background: var(--red-soft); color: var(--red); }
.notice.blue { background: var(--blue-soft); color: var(--blue); }
.notice.green { background: var(--green-soft); color: var(--green); }
.badge-num { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 99px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 800; padding: 0 5px; }

/* ---------- مراحل قرارداد ---------- */
.stepper { display: flex; align-items: center; gap: 0; margin: 4px 0 6px; overflow-x: auto; padding-bottom: 6px; }
.step { flex: 1; min-width: 72px; text-align: center; position: relative; font-size: .8rem; color: var(--muted); font-weight: 700; }
.step .c { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line-2); position: relative; z-index: 1; }
.step::after { content: ""; position: absolute; top: 14px; inset-inline-start: calc(50% + 18px); width: calc(100% - 36px); height: 2px; background: var(--line-2); }
.step:last-child::after { display: none; }
.step.done .c { background: var(--green); border-color: var(--green); color: #fff; }
.step.done::after { background: var(--green); }
.step.now .c { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 14%, transparent); }
.step.now { color: var(--text); }
.type-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.type-card { border: 2px solid var(--line-2); border-radius: 16px; padding: 16px 12px; text-align: center; cursor: pointer; background: var(--surface); transition: .15s; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.type-card small { font-weight: 500; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.type-card:hover { border-color: var(--primary); }
.type-card.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.type-card .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); }
.type-card.on .ico { background: var(--primary); color: #fff; }
.sumbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.sumbox > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.sumbox .k { font-size: .78rem; color: var(--muted); }
.sumbox .v { font-size: 1.15rem; font-weight: 800; line-height: 1.5; }

/* ---------- مودال ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(8, 12, 28, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .2s; }
.modal-wrap.open { opacity: 1; }
.modal { width: min(560px, 100%); max-height: 92vh; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateY(14px) scale(.98); transition: .22s cubic-bezier(.2, .9, .3, 1); overflow: hidden; }
.modal.wide { width: min(820px, 100%); }
.modal-wrap.open .modal { transform: none; }
.modal-grab { display: none; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { flex: 1; font-size: 1.08rem; font-weight: 800; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface-2); }
.confirm-msg { line-height: 2; }
#toasts { position: fixed; top: 16px; inset-inline: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 14px; background: #101a3a; color: #fff; box-shadow: var(--shadow-lg); font-weight: 600; transform: translateY(-16px); opacity: 0; transition: .3s; max-width: min(92vw, 520px); }
.toast.show { transform: none; opacity: 1; }
.toast.ok .ic { color: #4be08e; } .toast.err { background: #8e1c26; } .toast.err .ic { color: #ffd5d8; }

/* ---------- تقویم ---------- */
.datepop { position: absolute; z-index: 250; width: 292px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 12px; }
.datepop.sheet { position: fixed; inset: auto 0 0 0; width: auto; border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); z-index: 400; box-shadow: 0 -20px 60px rgba(0, 0, 0, .35); }
.dp-head { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.dp-head button { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; color: var(--muted); display: grid; place-items: center; grid-auto-flow: column; }
.dp-head button:hover { background: var(--primary-soft); color: var(--primary); }
.dp-title { flex: 1; text-align: center; font-weight: 800; }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.dp-week span { font-size: .75rem; color: var(--muted); font-weight: 700; padding: 4px 0; }
.dp-grid button { aspect-ratio: 1; border: 0; background: transparent; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--text); }
.dp-grid button:hover { background: var(--primary-soft); }
.dp-grid button.fri { color: var(--red); }
.dp-grid button.today { box-shadow: inset 0 0 0 2px var(--accent); }
.dp-grid button.sel { background: var(--primary); color: #fff; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; }
.dp-foot button { border: 0; background: transparent; color: var(--primary); font-weight: 700; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.dp-foot button:hover { background: var(--primary-soft); }

/* ---------- ورود ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login-art { position: relative; overflow: hidden; background: linear-gradient(135deg, #0c1330, #1a2a78 55%, #5b3dff); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art::before, .login-art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.login-art::before { width: 520px; height: 520px; inset-inline-start: -160px; bottom: -200px; }
.login-art::after { width: 300px; height: 300px; inset-inline-end: -80px; top: -90px; }
.login-art h1 { font-size: 2.2rem; line-height: 1.5; font-weight: 800; position: relative; z-index: 1; }
.login-art p { color: rgba(255, 255, 255, .78); max-width: 440px; position: relative; z-index: 1; }
.login-art .car { position: relative; z-index: 1; color: rgba(255, 255, 255, .92); margin-top: 10px; }
.login-art .car svg { width: min(420px, 90%); }
.login-art ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; position: relative; z-index: 1; }
.login-art li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .9); }
.login-art li .ic { color: #ffc861; }
.login-form-wrap { display: grid; place-items: center; padding: 28px; }
.login-box { width: min(400px, 100%); }
.login-box h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.login-box .muted { margin-bottom: 22px; }
.demo-hint { margin-top: 16px; padding: 12px 14px; border-radius: 13px; background: var(--blue-soft); color: var(--blue); font-size: .86rem; line-height: 1.9; }

/* ---------- متفرقه ---------- */
.pagehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.pagehead .grow { flex: 1; }
.dl-box { border: 2px dashed var(--line-2); border-radius: 16px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; }
.dl-box:hover { border-color: var(--primary); color: var(--primary); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .ph-actions { position: absolute; inset: auto 6px 6px 6px; display: flex; gap: 6px; justify-content: space-between; }
.photo .ph-actions button { border: 0; background: rgba(10, 15, 32, .65); color: #fff; border-radius: 9px; padding: 4px 8px; font-size: .74rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.photo .cover-tag { position: absolute; top: 6px; inset-inline-start: 6px; }
.fab { display: none; }
.sticky-sum { position: sticky; top: 74px; }
details.fold > summary { cursor: pointer; font-weight: 800; padding: 12px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary .ic.chev { transform: rotate(180deg); }
.progress { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, #17b26a, #0f9d58); border-radius: 99px; }
.credentials code { background: rgba(255, 255, 255, .6); border-radius: 6px; padding: 0 6px; direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- واکنش‌گرا: تبلت ---------- */
@media (max-width: 1200px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
  .vhero { grid-template-columns: 1fr; }
}
/* ---------- واکنش‌گرا: موبایل ---------- */
@media (max-width: 1023px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 1.12rem; }
  .page { padding: 4px 16px calc(96px + var(--safe-b)); }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 60;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + var(--safe-b));
  }
  .bottomnav a, .bottomnav button {
    border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
    font-size: .7rem; font-weight: 700; color: var(--muted); border-radius: 12px; cursor: pointer; position: relative;
  }
  .bottomnav .active { color: var(--primary); }
  .bottomnav .active .ic { transform: translateY(-1px); }
  .bottomnav .plus { color: #fff; }
  .bottomnav .plus span.pl { width: 50px; height: 50px; border-radius: 17px; margin-top: -22px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), #6a3dff); box-shadow: 0 10px 22px -6px rgba(43, 89, 255, .7); }
  .bottomnav .plus small { color: var(--muted); font-size: .7rem; font-weight: 700; }
}
@media (max-width: 720px) {
  html { font-size: 14.5px; }
  .hide-mobile, .hide-sm { display: none !important; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g4.keep2, .g3.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid, .fgrid.c3 { grid-template-columns: 1fr; }
  .stat { padding: 14px; min-height: 96px; }
  .stat .val { font-size: 1.22rem; }
  .vgrid { grid-template-columns: 1fr; gap: 14px; }
  .type-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vinfo h2 { font-size: 1.3rem; }
  .card-pad { padding: 16px; }
  .card-head { padding: 14px 16px 0; } .card-body { padding: 12px 16px 16px; }
  .li.click:hover { margin-inline: -16px; padding-inline: 16px; }

  /* تبدیل جدول به کارت */
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; }
  .tbl.stack tr:last-child { border-bottom: 0; }
  .tbl.stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left; }
  .tbl.stack td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; flex: none; text-align: right; }
  .tbl.stack td.first { font-size: 1.02rem; padding-bottom: 6px; justify-content: flex-start; }
  .tbl.stack td.first::before, .tbl.stack td[data-label=""]::before { display: none; }
  .tbl.stack tfoot td { display: flex; }

  /* مودال به صورت صفحهٔ پایین‌آمده */
  .modal-wrap { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 94vh; border-radius: 24px 24px 0 0; transform: translateY(100%); }
  .modal-wrap.open .modal { transform: none; }
  .modal-grab { display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 8px auto 0; }
  .modal-head { padding-top: 10px; }
  .modal-foot .btn { flex: 1; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-form-wrap { min-height: 100vh; align-content: center; }
  .hbar { grid-template-columns: minmax(70px, 110px) 1fr auto; }
  .pagehead .btn { flex: none; }
  .toolbar .searchbox { min-width: 100%; }
}

/* ---------- نسخهٔ ۲: ارز، واردات، اسناد، مراحل ---------- */
.notice.violet { background: var(--violet-soft); color: var(--violet); }
.fx { display: grid; gap: 8px; }
.fx .fx-seg { width: auto; max-width: 190px; }
.fx .fx-seg button { padding: 5px 14px; font-size: .84rem; }
.fx-aed .fgrid { gap: 10px; }
.fx-calc { font-weight: 700; color: var(--primary); }
.fxnote { display: block; font-size: .74rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
.fx-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text); border-radius: 99px; padding: 5px 12px; font-weight: 700; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.fx-chip:hover { border-color: var(--primary); color: var(--primary); }
.fx-result { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 1.05rem; min-height: 24px; }
@media (max-width: 560px) { .fx-chip span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; } }

.vin { display: inline-flex; align-items: center; gap: 5px; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; letter-spacing: .04em; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 8px; direction: ltr; }

.steps { display: flex; gap: 0; margin: 6px 0 14px; overflow-x: auto; padding-bottom: 6px; }
.steps .step { flex: 1; min-width: 110px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; position: relative; font-size: .82rem; color: var(--muted); }
.steps .step::after { content: ""; position: absolute; top: 17px; inset-inline-start: calc(50% + 22px); width: calc(100% - 44px); height: 2px; background: var(--line-2); }
.steps .step:last-child::after { display: none; }
.steps .sdot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line-2); position: relative; z-index: 1; }
.steps .step.done .sdot { background: var(--green); border-color: var(--green); color: #fff; }
.steps .step.done::after { background: var(--green); }
.steps .step.now .sdot { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 14%, transparent); }
.steps .step.now { color: var(--text); }
.steps .step b { font-weight: 800; }
.sline { height: 2px; background: var(--line-2); flex: 1; }

.doc-group { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; background: var(--surface); }
.doc-group > .doc-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.doc-row { padding: 10px 14px; }
.stmt-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tbl tr.tot td { background: var(--surface-2); }

.doc .ack-text p { margin: 0 0 6px; text-align: justify; }
.doc td small { font-size: 8.5pt; color: #444; }

/* ---------- چاپ ---------- */
.print-shell { background: #e8ebf2; min-height: 100vh; padding: 24px 12px 60px; }
.print-bar { max-width: 210mm; margin: 0 auto 16px; display: flex; gap: 10px; align-items: center; }
.doc { max-width: 210mm; margin: 0 auto; background: #fff; color: #111; padding: 14mm 14mm 12mm; box-shadow: 0 10px 40px rgba(0, 0, 0, .2); font-size: 11.5pt; line-height: 1.9; border-radius: 4px; }
.doc h1 { font-size: 17pt; text-align: center; margin: 0; }
.doc .doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 12px; gap: 12px; }
.doc .doc-head .meta { font-size: 10.5pt; text-align: left; min-width: 150px; }
.doc .doc-head .meta div { display: flex; justify-content: space-between; gap: 12px; }
.doc .brandline { font-weight: 800; font-size: 13pt; }
.doc .brandline small { display: block; font-weight: 400; font-size: 9.5pt; color: #444; }
.doc h3 { font-size: 11.5pt; background: #eef0f5; padding: 2px 10px; margin: 12px 0 6px; border-right: 4px solid #111; }
.doc table { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
.doc td, .doc th { border: 1px solid #999; padding: 3px 8px; vertical-align: top; }
.doc th { background: #f3f4f8; font-weight: 700; text-align: right; width: 18%; }
.doc ol { margin: 4px 0; padding-inline-start: 22px; }
.doc li { margin-bottom: 2px; text-align: justify; }
.doc .sign-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.doc .sign { border: 1px solid #999; height: 30mm; padding: 4px 8px; font-size: 10pt; text-align: center; }
.doc .amount-words { font-size: 10pt; color: #333; }
@page { size: A4; margin: 8mm; }
@media print {
  html { font-size: 12px; }
  body { background: #fff; }
  .sidebar, .topbar, .bottomnav, .no-print, #toasts, .print-bar { display: none !important; }
  .app { display: block; }
  .print-shell { background: #fff; padding: 0; }
  .doc { box-shadow: none; padding: 0; max-width: none; border-radius: 0; }
  .page { padding: 0; max-width: none; animation: none; }
  .card { box-shadow: none; }
  .tbl-wrap { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
