/* ================= فاکتور (اندازه A4 در ۹۶dpi) =================
   نکته: برای سازگاری با html2canvas از color-mix، object-fit و letter-spacing روی متن فارسی استفاده نشده. */
.inv {
  width: 794px; min-height: 1123px; background: #fff; color: #1f2937;
  font-size: 12.5px; line-height: 1.75; padding: 38px 40px 26px;
  display: flex; flex-direction: column; position: relative; box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}
.inv * { box-sizing: border-box; }
.inv h1, .inv h2, .inv h3, .inv p { margin: 0; }
.inv .grow { flex: 1 1 auto; min-height: 16px; }
.inv .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.inv small { font-size: .86em; color: #6b7280; }
.inv b { font-weight: 700; }
.inv .kv { display: flex; gap: 6px; align-items: baseline; }
.inv .kv span { color: #6b7280; white-space: nowrap; }
.inv .stars { display: inline-flex !important; gap: 2px; vertical-align: middle; }
.inv .stars svg { display: block; }
.inv .chip { font-style: normal; background: var(--pl); color: var(--pd); border-radius: 20px; padding: 0 9px; font-size: 10.5px; font-weight: 700; margin-left: 6px; white-space: nowrap; display: inline-block; }
.inv .arr { font-style: normal; color: var(--a); margin: 0 4px; font-weight: 900; }

/* لوگوها — فقط max-width/max-height تا نسبت تصویر حفظ شود */
.inv img { display: block; width: auto; height: auto; }
.inv .ag-logo { max-height: 64px; max-width: 150px; }
.inv .al-logo { max-height: 34px; max-width: 110px; }
.inv .al-logo.sm { max-height: 20px; max-width: 58px; }
.inv .al-logo.md { max-height: 38px; max-width: 84px; }
.inv .al-badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 11px; flex: none; }
.inv .al-badge.sm { width: 22px; height: 22px; font-size: 9px; }
.inv .al-badge.md { width: 38px; height: 38px; }
.inv .al-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.inv .ht-logo { max-width: 60px; max-height: 60px; }

/* بخش‌ها */
.inv h3.sec { font-size: 13px; font-weight: 800; margin: 15px 0 7px; color: var(--p); display: flex; align-items: center; gap: 8px; }
.inv h3.sec::before { content: ''; width: 5px; height: 16px; border-radius: 3px; background: var(--a); display: inline-block; }

/* جدول‌ها */
.inv table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
.inv table.t th { text-align: right; font-weight: 700; padding: 6px 8px; white-space: nowrap; }
.inv table.t td { padding: 6px 8px; border-bottom: 1px solid #e8eaef; vertical-align: middle; }
.inv table.t .idx { width: 30px; text-align: center; color: #6b7280; }
.inv table.t .num { white-space: nowrap; }
.inv table.t td .sub { display: block; font-size: 10.5px; color: #6b7280; line-height: 1.6; }

/* جمع مبالغ */
.inv .sumwrap { min-width: 300px; }
.inv table.sum { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.inv table.sum th { text-align: right; font-weight: 500; color: #4b5563; padding: 4px 12px; }
.inv table.sum td { text-align: left; padding: 4px 12px; font-weight: 700; white-space: nowrap; }
.inv table.sum tr.neg td { color: #dc2626; }
.inv table.sum tr.sub th, .inv table.sum tr.sub td { border-top: 1px dashed #d1d5db; font-weight: 700; color: #111827; }
.inv table.sum tr.grand th, .inv table.sum tr.grand td { background: var(--p); color: #fff; font-size: 13.5px; font-weight: 800; padding: 8px 12px; }
.inv table.sum tr.grand small { color: #ffffff; opacity: .85; font-weight: 500; }
.inv table.sum tr.paid th, .inv table.sum tr.paid td { color: #047857; }
.inv table.sum tr.remain th, .inv table.sum tr.remain td { color: #b91c1c; font-weight: 800; border-top: 1px dashed #d1d5db; }

.inv .bottom { display: flex; gap: 18px; align-items: flex-start; margin-top: 14px; }
.inv .bottom .left { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.inv .words { background: var(--pll); border: 1px solid var(--pl); border-radius: 8px; padding: 8px 12px; font-size: 11.5px; line-height: 1.9; }
.inv .words span { color: var(--p); font-weight: 700; }
.inv .notes { font-size: 11px; }
.inv .notes b { color: var(--p); display: block; margin-bottom: 2px; }
.inv .notes p { color: #4b5563; line-height: 1.9; }

.inv .sign { display: flex; justify-content: space-between; margin-top: 14px; padding: 0 30px; }
.inv .sign > div { width: 210px; height: 72px; text-align: center; border: 1px dashed #d1d5db; border-radius: 10px; padding-top: 6px; }
.inv .sign span { font-size: 11px; color: #6b7280; }
.inv .foot { margin-top: 14px; border-top: 1px solid #e5e7eb; padding-top: 8px; font-size: 10.5px; color: #6b7280; text-align: center; }

/* جدول پروازها */
.inv table.t.segt td { white-space: nowrap; }
.inv table.t.segt td .sub { white-space: nowrap; }

/* ========== F1 کلاسیک رسمی ========== */
.tpl-f1 { border-top: 10px solid var(--p); }
.tpl-f1 .f1-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--p); }
.tpl-f1 .brand { display: flex; align-items: center; gap: 14px; }
.tpl-f1 .brand h1 { font-size: 20px; font-weight: 900; color: var(--p); line-height: 1.5; }
.tpl-f1 .brand p { font-size: 12px; color: #4b5563; }
.tpl-f1 .docbox { background: var(--pll); border: 1px solid var(--pl); border-right: 4px solid var(--a); border-radius: 10px; padding: 10px 14px; min-width: 230px; }
.tpl-f1 .docbox h2 { font-size: 14px; color: var(--p); margin-bottom: 4px; font-weight: 900; }
.tpl-f1 .docbox .kv { justify-content: space-between; }
.tpl-f1 .party { display: flex; flex-wrap: wrap; gap: 4px 28px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 9px 14px; margin-top: 16px; }
.tpl-f1 table.t thead th { background: var(--p); color: #fff; }
.tpl-f1 table.t thead th:first-child { border-radius: 0 8px 0 0; }
.tpl-f1 table.t thead th:last-child { border-radius: 8px 0 0 0; }
.tpl-f1 table.t tbody tr:nth-child(even) td { background: var(--pll); }
.tpl-f1 .sumwrap { border: 1px solid var(--pl); border-radius: 10px; overflow: hidden; }

/* ========== F2 کارت پرواز ========== */
.tpl-f2 .f2-head { display: flex; justify-content: space-between; align-items: center; background: var(--p); color: #fff; margin: -38px -40px 0; padding: 18px 40px; }
.tpl-f2 .f2-head .brand { display: flex; align-items: center; gap: 12px; }
.tpl-f2 .f2-head .ag-logo { background: #fff; border-radius: 10px; padding: 4px; max-height: 58px; }
.tpl-f2 .f2-head h1 { font-size: 19px; font-weight: 900; }
.tpl-f2 .f2-head p { color: #fff; opacity: .8; font-size: 11.5px; }
.tpl-f2 .f2-head .doc { text-align: left; }
.tpl-f2 .f2-head h2 { font-size: 15px; font-weight: 800; }
.tpl-f2 .pills { margin-top: 6px; display: flex; gap: 6px; justify-content: flex-end; }
.tpl-f2 .pills span { background: rgba(255, 255, 255, .16); border-radius: 20px; padding: 1px 12px; font-size: 11px; }
.tpl-f2 .party { display: flex; flex-wrap: wrap; gap: 4px 26px; padding: 10px 2px; border-bottom: 1px dashed #d1d5db; margin-bottom: 12px; }
.tpl-f2 .ticket { display: flex; border: 1.5px solid var(--pm); border-radius: 16px; margin-bottom: 10px; position: relative; overflow: hidden; background: #fff; }
.tpl-f2 .ticket::before, .tpl-f2 .ticket::after { content: ''; position: absolute; left: 139px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1.5px solid var(--pm); }
.tpl-f2 .ticket::before { top: -12px; }
.tpl-f2 .ticket::after { bottom: -12px; }
.tpl-f2 .tmain { flex: 1; padding: 10px 16px; min-width: 0; }
.tpl-f2 .ttop { display: flex; justify-content: space-between; align-items: center; }
.tpl-f2 .al { display: flex; align-items: center; gap: 10px; }
.tpl-f2 .al b { display: block; font-size: 13.5px; line-height: 1.4; }
.tpl-f2 .al small { display: block; font-size: 10px; }
.tpl-f2 .route { display: flex; align-items: center; margin: 2px 0 6px; }
.tpl-f2 .pt { width: 140px; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.5; }
.tpl-f2 .pt b { font-size: 27px; font-weight: 900; color: var(--p); line-height: 1.15; font-family: Vazirmatn, sans-serif; }
.tpl-f2 .pt span { font-weight: 700; font-size: 12.5px; }
.tpl-f2 .pt span em { font-style: normal; color: var(--p); margin-right: 4px; }
.tpl-f2 .pt small { font-size: 10px; }
.tpl-f2 .line { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tpl-f2 .line i { flex: 1; border-top: 2px dashed var(--pm); }
.tpl-f2 .line svg { display: block; }
.tpl-f2 .line small { width: 100%; text-align: center; font-size: 11px; color: #374151; font-weight: 700; }
.tpl-f2 .tinfo { display: flex; flex-wrap: wrap; gap: 2px 22px; background: var(--pll); border-radius: 10px; padding: 4px 12px; font-size: 11.5px; }
.tpl-f2 .stub { width: 150px; flex: none; background: var(--pll); border-right: 2px dashed var(--pm); padding: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.5; }
.tpl-f2 .stub small { font-size: 10px; color: #6b7280; }
.tpl-f2 .stub b { font-size: 17px; color: var(--p); margin-bottom: 4px; font-weight: 900; }
.tpl-f2 table.t thead th { background: var(--pl); color: var(--pd); }
.tpl-f2 table.t thead th:first-child { border-radius: 0 10px 10px 0; }
.tpl-f2 table.t thead th:last-child { border-radius: 10px 0 0 10px; }
.tpl-f2 .sumwrap { border: 1.5px solid var(--pm); border-radius: 14px; overflow: hidden; }
.tpl-f2 .foot { background: var(--p); color: #fff; margin: 14px -40px -26px; padding: 10px 40px; border: 0; }

/* ========== F3 / H3 مینیمال ========== */
.tpl-f3, .tpl-h3 { padding: 42px 50px 26px; color: #111827; }
.tpl-f3 .f3-head, .tpl-h3 .f3-head { display: flex; justify-content: space-between; align-items: flex-start; }
.tpl-f3 .brand, .tpl-h3 .brand { display: flex; gap: 12px; align-items: center; }
.tpl-f3 .brand h1, .tpl-h3 .brand h1 { font-size: 18px; font-weight: 800; line-height: 1.5; }
.tpl-f3 .brand p, .tpl-h3 .brand p { color: #6b7280; font-size: 11.5px; }
.tpl-f3 .doc, .tpl-h3 .doc { text-align: left; }
.tpl-f3 .big, .tpl-h3 .big { font-size: 42px; font-weight: 900; color: var(--p); line-height: 1.1; }
.tpl-f3 .doc small, .tpl-h3 .doc small { display: block; margin-top: 4px; font-size: 11px; color: var(--a); font-weight: 700; }
.tpl-f3 .meta, .tpl-h3 .meta { display: flex; margin-top: 20px; border-top: 2px solid #111827; border-bottom: 1px solid #e5e7eb; }
.tpl-f3 .meta > div, .tpl-h3 .meta > div { flex: 1; padding: 8px 0 8px 12px; line-height: 1.6; }
.tpl-f3 .meta span, .tpl-h3 .meta span { display: block; font-size: 10.5px; color: #6b7280; }
.tpl-f3 .meta b, .tpl-h3 .meta b { font-size: 13px; }
.tpl-f3 .meta small, .tpl-h3 .meta small { display: block; }
.tpl-f3 h3.sec, .tpl-h3 h3.sec { color: #111827; font-size: 12px; margin-top: 18px; }
.tpl-f3 h3.sec::before, .tpl-h3 h3.sec::before { width: 14px; height: 3px; }
.tpl-f3 .seg { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid #f0f1f4; }
.tpl-f3 .segl { width: 86px; display: flex; justify-content: center; }
.tpl-f3 .segm { flex: 1; min-width: 0; }
.tpl-f3 .rt { font-size: 14px; }
.tpl-f3 .rt em { font-style: normal; font-size: 10.5px; color: var(--a); font-weight: 800; margin-left: 8px; }
.tpl-f3 .rt small { font-size: 11px; }
.tpl-f3 .dt { font-size: 11px; color: #6b7280; }
.tpl-f3 .dot { margin: 0 6px; color: #c0c4cc; }
.tpl-f3 .segr { text-align: left; line-height: 1.5; }
.tpl-f3 .segr b { font-size: 19px; display: block; color: var(--p); }
.tpl-f3 .segr small, .tpl-f3 .segr span { display: block; font-size: 10.5px; color: #6b7280; }
.tpl-f3 table.t thead th, .tpl-h3 table.t thead th { border-bottom: 2px solid #111827; color: #111827; font-size: 11px; }
.tpl-f3 table.t td, .tpl-h3 table.t td { border-bottom: 1px solid #f0f1f4; }
.tpl-f3 table.sum tr.grand th, .tpl-f3 table.sum tr.grand td,
.tpl-h3 table.sum tr.grand th, .tpl-h3 table.sum tr.grand td { background: #fff; color: var(--p); border-top: 2px solid var(--p); font-size: 15px; }
.tpl-f3 table.sum tr.grand small, .tpl-h3 table.sum tr.grand small { color: var(--p); }
.tpl-f3 .words, .tpl-h3 .words { background: #fff; border: 0; border-right: 3px solid var(--a); border-radius: 0; }
.tpl-f3 .sign > div, .tpl-h3 .sign > div { border: 0; border-top: 1px solid #111827; border-radius: 0; height: 56px; }
.tpl-h3 .hline { display: flex; border: 1px solid #e5e7eb; border-radius: 10px; margin-top: 16px; }
.tpl-h3 .hline > div { flex: 1; padding: 10px 14px; line-height: 1.6; }
.tpl-h3 .hline > div + div { border-right: 1px solid #e5e7eb; }
.tpl-h3 .hline .hn { flex: 2.2; }
.tpl-h3 .hline .hn b { font-size: 15px; margin-left: 8px; }
.tpl-h3 .hline .hn small { display: block; }
.tpl-h3 .hline > div > span { display: block; font-size: 10.5px; color: #6b7280; }
.tpl-h3 .hline .stars { vertical-align: -1px; }

/* ========== F4 مدرن ========== */
.tpl-f4 { padding-top: 0; }
.tpl-f4 .f4-hero { margin: 0 -40px; padding: 28px 40px 62px; background: linear-gradient(135deg, var(--pd), var(--p) 55%, var(--a)); color: #fff; display: flex; justify-content: space-between; align-items: center; border-radius: 0 0 28px 28px; }
.tpl-f4 .brand { display: flex; align-items: center; gap: 12px; }
.tpl-f4 .lbox { background: #fff; border-radius: 14px; padding: 6px; display: inline-flex; }
.tpl-f4 .lbox .ag-logo { max-height: 54px; }
.tpl-f4 .f4-hero h1 { font-size: 19px; font-weight: 900; }
.tpl-f4 .f4-hero p { font-size: 11.5px; color: #fff; opacity: .85; }
.tpl-f4 .f4-hero .doc { text-align: left; }
.tpl-f4 .f4-hero h2 { font-size: 16px; font-weight: 800; }
.tpl-f4 .f4-hero .no { display: inline-block; margin-top: 6px; background: rgba(255, 255, 255, .2); border-radius: 20px; padding: 2px 14px; font-weight: 700; }
.tpl-f4 .cards { display: flex; gap: 10px; margin-top: -38px; position: relative; }
.tpl-f4 .cards > div { flex: 1; background: #fff; border-radius: 14px; padding: 9px 12px; box-shadow: 0 6px 18px rgba(15, 23, 42, .09); border: 1px solid #eef0f4; line-height: 1.6; }
.tpl-f4 .cards span { display: block; font-size: 10.5px; color: #6b7280; }
.tpl-f4 .cards b { font-size: 13px; }
.tpl-f4 .cards small { display: block; }
.tpl-f4 .segs { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.tpl-f4 .segs.two { flex-direction: row; }
.tpl-f4 .segs.two .seg { flex: 1; min-width: 0; }
.tpl-f4 .seg { border: 1px solid #e9ebf1; border-radius: 16px; padding: 12px 14px; background: linear-gradient(180deg, var(--pll), #ffffff); }
.tpl-f4 .sh { display: flex; align-items: center; gap: 10px; }
.tpl-f4 .sh b { display: block; font-size: 13px; line-height: 1.4; }
.tpl-f4 .sh small { display: block; font-size: 10.5px; }
.tpl-f4 .sh .chip { margin-right: auto; margin-left: 0; }
.tpl-f4 .route { display: flex; align-items: center; margin: 10px 0; }
.tpl-f4 .pt { text-align: center; width: 104px; line-height: 1.45; }
.tpl-f4 .pt span { display: block; font-size: 12px; font-weight: 700; }
.tpl-f4 .pt b { display: block; font-size: 25px; font-weight: 900; color: var(--p); font-family: Vazirmatn, sans-serif; }
.tpl-f4 .pt small { display: block; font-size: 12.5px; color: #374151; font-weight: 700; }
.tpl-f4 .line { flex: 1; display: flex; align-items: center; gap: 6px; }
.tpl-f4 .line i { flex: 1; border-top: 2px dotted var(--pm); }
.tpl-f4 .sf { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tpl-f4 .sf span { background: #fff; border: 1px solid #e3e6ee; border-radius: 20px; padding: 0 10px; font-size: 10.5px; }
.tpl-f4 .tw { border: 1px solid #e9ebf1; border-radius: 14px; overflow: hidden; }
.tpl-f4 table.t thead th { background: var(--pll); color: var(--pd); }
.tpl-f4 table.t tbody tr:last-child td { border-bottom: 0; }
.tpl-f4 .sumwrap { border-radius: 16px; overflow: hidden; border: 1px solid #e9ebf1; }
.tpl-f4 .foot { border-top: 0; background: var(--pll); border-radius: 12px; padding: 8px; }

/* ========== H1 رویال ========== */
.tpl-h1 { padding: 16px; }
.tpl-h1 .frame { flex: 1; display: flex; flex-direction: column; border: 2px solid var(--a); padding: 4px; }
.tpl-h1 .frame > .in { flex: 1; display: flex; flex-direction: column; border: 1px solid var(--a); padding: 20px 26px 12px; }
.tpl-h1 .h1-head { text-align: center; }
.tpl-h1 .h1-head .ag-logo { margin: 0 auto 6px; }
.tpl-h1 .h1-head h1 { font-size: 22px; font-weight: 900; color: var(--p); line-height: 1.5; }
.tpl-h1 .h1-head p { color: #6b7280; font-size: 12px; }
.tpl-h1 .orn { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--a); margin: 6px 0 8px; font-size: 13px; }
.tpl-h1 .orn i { width: 110px; border-top: 1px solid var(--a); }
.tpl-h1 .h1-head h2 { display: inline-block; background: var(--p); color: #fff; padding: 4px 26px; border-radius: 30px; font-size: 14px; font-weight: 800; }
.tpl-h1 .meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 26px; margin-top: 10px; font-size: 12px; }
.tpl-h1 .hotel { text-align: center; margin-top: 8px; line-height: 1.55; }
.tpl-h1 .hotel h3 { font-size: 21px; color: var(--pd); font-weight: 900; }
.tpl-h1 .hotel p { color: #4b5563; font-size: 12px; margin-top: 2px; }
.tpl-h1 .stay { display: flex; margin-top: 10px; border-top: 1px solid var(--a); border-bottom: 1px solid var(--a); }
.tpl-h1 .stay > div { flex: 1; text-align: center; padding: 5px 4px; line-height: 1.6; }
.tpl-h1 .stay > div + div { border-right: 1px solid var(--al); }
.tpl-h1 .stay span { display: block; font-size: 10.5px; color: #6b7280; }
.tpl-h1 .stay b { font-size: 12px; }
.tpl-h1 h3.sec { justify-content: center; }
.tpl-h1 h3.sec::before, .tpl-h1 h3.sec::after { content: ''; width: 26px; height: 1px; background: var(--a); border-radius: 0; display: inline-block; }
.tpl-h1 table.t thead th { background: var(--p); color: #fff; }
.tpl-h1 table.t tbody tr:nth-child(even) td { background: var(--pll); }
.tpl-h1 .sumwrap { border: 1px solid var(--a); }
.tpl-h1 table.sum tr.grand th, .tpl-h1 table.sum tr.grand td { background: var(--p); }

/* ========== H2 ستون کناری ========== */
.tpl-h2 { flex-direction: row; padding: 0; }
.tpl-h2 .side { width: 214px; flex: none; background: linear-gradient(180deg, var(--p), var(--pd)); color: #fff; padding: 30px 18px 24px; display: flex; flex-direction: column; gap: 11px; line-height: 1.6; }
.tpl-h2 .side .lbox { background: #fff; border-radius: 14px; padding: 8px; align-self: flex-start; display: inline-flex; }
.tpl-h2 .side .ag-logo { max-width: 120px; max-height: 56px; }
.tpl-h2 .side h1 { font-size: 16px; font-weight: 900; line-height: 1.6; }
.tpl-h2 .side .subt { font-size: 11px; color: #fff; opacity: .8; }
.tpl-h2 .side .blk { border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 9px; }
.tpl-h2 .side .blk > span { display: block; font-size: 10.5px; color: #fff; opacity: .75; }
.tpl-h2 .side .blk b { display: block; font-size: 12px; }
.tpl-h2 .side .blk .hn { font-size: 15px; }
.tpl-h2 .side .blk small { display: block; color: #fff; opacity: .85; }
.tpl-h2 .side .contact { font-size: 10.5px; color: #fff; opacity: .85; line-height: 1.9; }
.tpl-h2 .mainc { flex: 1; min-width: 0; padding: 34px 26px 24px; display: flex; flex-direction: column; }
.tpl-h2 .h2-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--p); padding-bottom: 12px; }
.tpl-h2 .h2-head h2 { font-size: 17px; font-weight: 900; color: var(--p); }
.tpl-h2 .h2-head .no { text-align: left; line-height: 1.5; }
.tpl-h2 .h2-head .no span { display: block; font-size: 10.5px; color: #6b7280; }
.tpl-h2 .h2-head .no b { display: block; font-size: 18px; color: var(--p); }
.tpl-h2 .party { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 12px; }
.tpl-h2 table.t { font-size: 11px; }
.tpl-h2 table.t th, .tpl-h2 table.t td { padding: 6px 6px; }
.tpl-h2 table.t thead th { background: var(--pl); color: var(--pd); }
.tpl-h2 table.t thead th:first-child { border-radius: 0 8px 8px 0; }
.tpl-h2 table.t thead th:last-child { border-radius: 8px 0 0 8px; }
.tpl-h2 .bottom { justify-content: flex-end; }
.tpl-h2 .sumwrap { border: 1px solid var(--pl); border-radius: 12px; overflow: hidden; }
.tpl-h2 .words { margin-top: 12px; }
.tpl-h2 .notes { margin-top: 10px; }
.tpl-h2 .sign { padding: 0; }
.tpl-h2 .sign > div { width: 190px; }

/* ========== H4 اقیانوسی ========== */
.tpl-h4 { padding-top: 0; }
.tpl-h4 .h4-hero { margin: 0 -40px; padding: 26px 40px 72px; background: linear-gradient(120deg, var(--pd), var(--p) 50%, var(--a)); color: #fff; display: flex; justify-content: space-between; align-items: center; border-radius: 0 0 40px 40px; }
.tpl-h4 .brand { display: flex; align-items: center; gap: 12px; }
.tpl-h4 .lbox { background: #fff; border-radius: 50%; padding: 8px; display: inline-flex; }
.tpl-h4 .lbox .ag-logo { max-height: 48px; max-width: 48px; }
.tpl-h4 .h4-hero h1 { font-size: 19px; font-weight: 900; }
.tpl-h4 .h4-hero p { font-size: 11.5px; color: #fff; opacity: .85; }
.tpl-h4 .h4-hero .doc { text-align: left; }
.tpl-h4 .h4-hero h2 { font-size: 15px; font-weight: 800; }
.tpl-h4 .h4-hero .doc span { font-size: 11.5px; opacity: .9; }
.tpl-h4 .hcard { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 18px; box-shadow: 0 10px 26px rgba(2, 32, 71, .12); padding: 14px 18px; margin: -50px 12px 0; position: relative; border: 1px solid #e6eef5; }
.tpl-h4 .hi { flex: 1; line-height: 1.6; }
.tpl-h4 .hi h3 { font-size: 18px; font-weight: 900; color: var(--pd); }
.tpl-h4 .hi p { font-size: 11.5px; color: #6b7280; }
.tpl-h4 .cust { text-align: left; border-right: 1px solid #e5e7eb; padding-right: 14px; line-height: 1.6; }
.tpl-h4 .cust span, .tpl-h4 .cust small { display: block; font-size: 10.5px; color: #6b7280; }
.tpl-h4 .cust b { font-size: 13px; }
.tpl-h4 .tiles { display: flex; gap: 10px; margin-top: 14px; }
.tpl-h4 .tiles > div { flex: 1; background: var(--pll); border-radius: 12px; padding: 7px 12px; border: 1px solid var(--pl); line-height: 1.6; }
.tpl-h4 .tiles span { display: block; font-size: 10.5px; color: var(--p); font-weight: 700; }
.tpl-h4 .tiles b { font-size: 12px; }
.tpl-h4 .rooms { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tpl-h4 .room { width: calc(50% - 5px); border: 1px solid #e3ecf4; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.tpl-h4 .rh { background: var(--pll); padding: 7px 12px; display: flex; align-items: center; gap: 8px; }
.tpl-h4 .rh em { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--p); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.tpl-h4 .rh b { font-size: 12.5px; }
.tpl-h4 .rh small { margin-right: auto; font-size: 10.5px; }
.tpl-h4 .rb { padding: 7px 12px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tpl-h4 .rb > div { display: flex; gap: 8px; align-items: baseline; }
.tpl-h4 .rb span { color: #6b7280; min-width: 50px; font-size: 11px; flex: none; }
.tpl-h4 .rb b { font-size: 12px; }
.tpl-h4 .rb .mem { font-weight: 500; font-size: 11px; }
.tpl-h4 .rf { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed #d4e1ec; padding: 6px 12px; font-size: 11px; color: #4b5563; }
.tpl-h4 .rf b { color: var(--p); font-size: 13px; }
.tpl-h4 .tw { border: 1px solid #e3ecf4; border-radius: 14px; overflow: hidden; }
.tpl-h4 table.t thead th { background: var(--pll); color: var(--pd); }
.tpl-h4 table.t tbody tr:last-child td { border-bottom: 0; }
.tpl-h4 .sumwrap { border-radius: 16px; overflow: hidden; border: 1px solid #e3ecf4; }
.tpl-h4 .foot { border-top: 0; background: var(--pll); border-radius: 12px; padding: 8px; }
