/* CRM بیمه — shared base: fonts, tokens, reset, forms */
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-VF.f6d31671339d.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-VF.f6d31671339d.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Markazi"; src: url("../fonts/markazi-text-arabic-500-normal.128cb43781a8.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Markazi"; src: url("../fonts/markazi-text-arabic-700-normal.0109a93a5bbd.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lalezar"; src: url("../fonts/lalezar-arabic-400-normal.d29aca20adbd.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Naskh"; src: url("../fonts/noto-naskh-arabic-arabic-400-normal.9ebecc332fb3.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Naskh"; src: url("../fonts/noto-naskh-arabic-arabic-700-normal.de2762f6a840.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Kufi"; src: url("../fonts/noto-kufi-arabic-arabic-400-normal.20fb38d522c0.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-065F, U+066A-06EF, U+06FA-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Kufi"; src: url("../fonts/noto-kufi-arabic-arabic-700-normal.bd18b7a9da0a.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-065F, U+066A-06EF, U+06FA-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

:root {
  --ink: #12233f;
  --ink-2: #3b4a63;
  --muted: #6b7789;
  --paper: #f6f7f9;
  --surface: #ffffff;
  --line: #dce1e8;
  --seal: #0e7c66;
  --seal-soft: #e3f2ee;
  --amber: #a8660b;
  --amber-soft: #fbf0dc;
  --red: #b42318;
  --red-soft: #fdecea;
  --radius: 10px;
  --font: "Vazirmatn", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.75; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
[dir="ltr"], .ltr { direction: ltr; unicode-bidi: plaintext; text-align: left; }
.num { font-feature-settings: "tnum"; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--seal) 55%, transparent); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .6em 1.2em; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--seal); color: #fff; transition: background-color .15s; }
.btn:hover { background: #0b6553; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #eef1f5; }
.btn-danger { background: transparent; color: var(--red); border-color: #efc2be; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: .3em .8em; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Forms */
.field { margin-bottom: 1.1rem; }
.field > label, .field-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: .35rem; }
.field .help { color: var(--muted); font-size: 13px; margin-top: .3rem; }
.field .errors { color: var(--red); font-size: 13px; margin-top: .3rem; list-style: none; padding: 0; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=time], input[type=password], input[type=search], input[type=url], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9d0da; border-radius: 8px; padding: .55em .8em; }
input:focus, select:focus, textarea:focus { border-color: var(--seal); outline: none; box-shadow: 0 0 0 3px var(--seal-soft); }
input[type=color] { width: 56px; height: 38px; padding: 2px; border: 1px solid #c9d0da; border-radius: 8px; background: #fff; }
input[type=checkbox], input[type=radio] { accent-color: var(--seal); width: 1.05em; height: 1.05em; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .3rem .8rem; }
.checklist label { display: flex; gap: .5em; align-items: center; font-weight: 400; }

/* Messages */
.flash { list-style: none; padding: 0; margin: 0 0 1rem; }
.flash li { padding: .7rem 1rem; border-radius: 8px; margin-bottom: .5rem; background: var(--seal-soft); color: #08503f; }
.flash li.error { background: var(--red-soft); color: var(--red); }
.flash li.warning { background: var(--amber-soft); color: #6d4206; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Template swatches (sign-up wizard and panel) */
.tpl-swatch { height: 56px; border-radius: 6px; display: grid; place-items: center; color: #fff; background: var(--tpl); font-size: 18px; }
.tpl-swatch.tpl-etemad { font-family: "Markazi", serif; font-weight: 700; font-size: 24px; box-shadow: inset 0 -4px 0 #b08d57; }
.tpl-swatch.tpl-modern { background: #f1f7f6; color: var(--tpl); font-weight: 300; }
.tpl-swatch.tpl-khanevadeh { background: #fcf0f4; color: var(--tpl); font-family: "Naskh", serif; font-weight: 700; }
.tpl-swatch.tpl-khodro { background: #1c1f24; color: var(--tpl); font-family: "Lalezar", sans-serif; font-size: 24px; }
.tpl-swatch.tpl-chandsherkati { background: #eef2fb; color: var(--tpl); font-family: "Kufi", sans-serif; font-weight: 700; font-size: 14px; }

/* ── Plans (landing, sign-up, panel) ── */
.prices[data-period="monthly"] .py, .prices[data-period="yearly"] .pm { display: none; }
.period-toggle { display: flex; width: max-content; margin: 0 auto 28px; background: #eef1f5; border-radius: 99px; padding: 5px; gap: 4px; }
.period-toggle label { cursor: pointer; }
.period-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.period-toggle span { display: block; padding: 9px 22px; border-radius: 99px; font-weight: 750; font-size: 15px; color: var(--ink-2); }
.period-toggle em { font-style: normal; font-size: 12px; background: #f0b429; color: var(--ink); border-radius: 99px; padding: 1px 8px; margin-inline-start: 4px; }
.period-toggle input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(15, 31, 56, .12); }
.period-toggle input:focus-visible + span { outline: 2px solid var(--seal); }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.pcard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--line); border-radius: 22px; padding: 28px 24px 24px; box-shadow: 0 1px 2px rgba(15, 31, 56, .05); }
.pcard.rec { border-color: var(--seal); box-shadow: 0 24px 50px -24px rgba(14, 124, 102, .45); }
.pcard.current { border-color: var(--ink); }
.pc-badge { position: absolute; top: -13px; inset-inline-start: 22px; background: var(--seal); color: #fff; font-size: 13px; font-weight: 800; padding: 3px 14px; border-radius: 99px; }
.pcard h3 { font-size: 22px; font-weight: 900; margin: 0; }
.pc-tag { color: var(--ink-2); font-size: 14.5px; margin: 4px 0 14px; min-height: 2.6em; }
.pc-price { margin: 0 0 14px; }
.pc-price b { font-size: 34px; font-weight: 900; color: var(--ink); }
.pc-price small { color: var(--muted); font-size: 14px; }
.pc-price em { display: inline-block; font-style: normal; font-size: 12.5px; font-weight: 800; background: #fff3d6; color: #8a5a00; border-radius: 99px; padding: 1px 10px; margin-inline-start: 6px; vertical-align: 6px; }
.pc-for { background: var(--paper); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; color: var(--ink); }
.pc-for span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.pc-list { list-style: none; margin: 0 0 20px; padding: 0; font-size: 14.5px; flex: 1; }
.pc-list li { position: relative; padding: 6px 24px 6px 0; border-bottom: 1px dashed var(--line); }
.pc-list li:last-child { border-bottom: 0; }
.pc-list li::before { content: ""; position: absolute; right: 2px; top: 13px; width: 11px; height: 6px; border: solid var(--seal); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.pc-list li:first-child { padding-right: 0; background: var(--mint); border-radius: 10px; padding: 9px 12px; border: 0; margin-bottom: 6px; color: #134a3e; }
.pc-list li:first-child::before, .pc-list .pc-all::before { display: none; }
.pc-list .pc-all { padding-right: 0; font-weight: 800; color: var(--ink); }
.pc-add span { display: block; color: var(--muted); font-size: 13px; }
.pc-current { display: block; text-align: center; font-weight: 800; color: var(--ink); background: var(--paper); border-radius: 10px; padding: .7em; }
label.pcard { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
label.pcard input { position: absolute; opacity: 0; }
label.pcard:has(input:checked) { border-color: var(--seal); box-shadow: 0 0 0 3px rgba(14, 124, 102, .25), 0 24px 50px -24px rgba(14, 124, 102, .45); }
label.pcard:has(input:focus-visible) { outline: 2px solid var(--seal); outline-offset: 3px; }
.pc-pick { display: block; text-align: center; border: 1.5px solid var(--seal); color: var(--seal); border-radius: 10px; padding: .6em; font-weight: 800; }
label.pcard:has(input:checked) .pc-pick { background: var(--seal); color: #fff; }
label.pcard:has(input:checked) .pc-pick::before { content: "✓ "; }
.compare { margin: 26px 0 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.compare summary { cursor: pointer; padding: 16px 20px; font-weight: 800; list-style: none; text-align: center; color: var(--seal); }
.compare summary::-webkit-details-marker { display: none; }
.compare summary::after { content: " ▾"; }
.compare[open] summary::after { content: " ▴"; }
.compare-wrap { overflow-x: auto; padding: 0 12px 12px; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 14.5px; }
.compare-table th, .compare-table td { padding: 12px 10px; border-top: 1px solid var(--line); text-align: center; vertical-align: middle; }
.compare-table thead th { border-top: 0; font-size: 16px; font-weight: 900; }
.compare-table thead th.rec { color: var(--seal); }
.compare-table tbody th { text-align: right; font-weight: 750; width: 38%; }
.compare-table tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.compare-table .yes { font-style: normal; color: var(--seal); font-weight: 900; font-size: 18px; }
.compare-table .no { color: #b8c2cf; font-weight: 700; }
.compare-table td small { display: block; color: var(--muted); font-size: 11.5px; }
.extras { margin-top: 26px; }
.extras h3 { font-size: 17px; font-weight: 850; margin: 0 0 10px; text-align: center; }
.extras ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.extras li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.extras li strong { display: block; }
.extras li span { color: var(--muted); font-size: 13px; display: block; }
.extras li em { font-style: normal; font-size: 13px; color: var(--ink-2); }
.price-faq { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.price-faq details { border-bottom: 1px solid var(--line); }
.price-faq summary { cursor: pointer; font-weight: 750; padding: 12px 0; }
.price-faq p { color: var(--ink-2); margin: 0 0 12px; font-size: 14.5px; }
.plan-actions { margin-top: 22px; display: flex; justify-content: space-between; gap: 12px; }
.form-error { color: #b42318; font-weight: 700; }
@media (max-width: 900px) {
  .plans-grid { grid-template-columns: 1fr; }
  .price-faq { grid-template-columns: 1fr; }
  .pc-tag { min-height: 0; }
}
