.cheque-print-page {
  --cheque-navy: #153b67;
  --cheque-blue: #235b8f;
  --cheque-mint: #dff3ed;
  --cheque-copper: #c27a42;
  --cheque-ink: #132b49;
  --cheque-line: #cfdae7;
  padding-bottom: 48px;
}

.cheque-print-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 132px;
  margin-bottom: 18px;
  padding: 24px 30px;
  color: #fff;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.18) 0 2px, transparent 3px) 0 0/18px 18px,
    linear-gradient(120deg, #122f56 0%, #1d5984 66%, #217d7b 100%);
  box-shadow: 0 18px 40px rgba(20, 56, 91, .16);
}

.cheque-print-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  left: -70px;
  bottom: -180px;
  border: 34px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.cheque-print-hero > * { position: relative; z-index: 1; }
.cheque-print-hero .eyebrow { margin: 0 0 5px; color: #9de3d1; font-size: 12px; font-weight: 800; }
.cheque-print-hero h1 { margin: 0; font-size: clamp(24px, 3vw, 38px); }
.cheque-print-hero p:last-child { margin: 8px 0 0; color: rgba(255,255,255,.76); }
.cheque-standard-badge { display: grid; min-width: 142px; padding: 15px 18px; text-align: center; border: 1px solid rgba(255,255,255,.24); border-radius: 18px; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.cheque-standard-badge span { font-size: 24px; font-weight: 900; direction: ltr; }
.cheque-standard-badge small { margin-top: 2px; color: #cdeee6; }

.cheque-print-layout {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(600px, 1.55fr);
  gap: 18px;
  align-items: start;
}

.cheque-entry-card,
.cheque-preview-card {
  border: 1px solid var(--cheque-line);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 34px rgba(25, 52, 81, .08);
}

.cheque-entry-card { padding: 18px; }
.cheque-entry-card > header,
.cheque-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.cheque-entry-card header small,
.cheque-preview-toolbar small { color: #62809f; font-size: 11px; }
.cheque-entry-card h2,
.cheque-preview-toolbar h2 { margin: 2px 0 0; color: var(--cheque-ink); font-size: 18px; }
.cheque-entry-card header button,
.cheque-preview-toolbar button {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--cheque-blue);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #c9d8e8;
  border-radius: 11px;
  background: #f8fbff;
  cursor: pointer;
}
.cheque-preview-toolbar button.active { color: #fff; border-color: var(--cheque-blue); background: var(--cheque-blue); }
.cheque-preview-toolbar > div:last-child { display: flex; gap: 7px; }

.cheque-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.cheque-form-grid label { display: grid; gap: 6px; color: #2d4a69; font-size: 11px; font-weight: 800; }
.cheque-form-grid label.span-2 { grid-column: 1 / -1; }
.cheque-form-grid label > span small { color: #8799ad; font-weight: 500; }
.cheque-form-grid input,
.cheque-form-grid textarea,
.cheque-print-controls input,
.cheque-print-controls select,
.cheque-field-setting input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--cheque-ink);
  font: inherit;
  font-size: 12px;
  border: 1px solid #cdd9e7;
  border-radius: 12px;
  outline: 0;
  background: #fbfdff;
  transition: border-color .2s, box-shadow .2s;
}
.cheque-form-grid textarea { min-height: 62px; resize: vertical; }
.cheque-form-grid input:focus,
.cheque-form-grid textarea:focus,
.cheque-print-controls input:focus,
.cheque-print-controls select:focus { border-color: #4f8fb6; box-shadow: 0 0 0 3px rgba(65, 133, 175, .12); }
.cheque-form-grid label > small { min-height: 15px; color: #8495a8; font-size: 9px; }
.cheque-entry-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 12px; color: #5d4c31; border: 1px solid #eed5a7; border-radius: 14px; background: #fff9eb; }
.cheque-entry-note i { display: grid; place-items: center; flex: 0 0 28px; height: 28px; color: #fff; font-style: normal; font-weight: 900; border-radius: 9px; background: var(--cheque-copper); }
.cheque-entry-note p { margin: 0; font-size: 10px; line-height: 1.8; }

.cheque-preview-card { padding: 18px; }
.cheque-preview-stage { display: grid; place-items: center; padding: 26px 18px; overflow: auto; border: 1px solid #c9d8e5; border-radius: 18px; background: linear-gradient(135deg, #e6edf3, #f7fafc); }
.cheque-paper {
  position: relative;
  flex: none;
  width: min(100%, 850px);
  aspect-ratio: 2 / 1;
  overflow: hidden;
  color: #123555;
  border: 1px solid #8eb7af;
  border-radius: 8px;
  background:
    repeating-radial-gradient(circle at 12% 35%, rgba(35,126,110,.08) 0 1px, transparent 1.3px 6px),
    linear-gradient(112deg, rgba(255,255,255,.72), transparent 30%),
    linear-gradient(135deg, #ecf8f4 0%, #f1edf9 50%, #e7f5f3 100%);
  box-shadow: 0 18px 38px rgba(29, 57, 76, .18);
}
.cheque-paper::before,
.cheque-paper::after { content: ""; position: absolute; border: 1px solid rgba(52, 131, 118, .15); border-radius: 50%; }
.cheque-paper::before { width: 47%; height: 90%; left: -14%; top: -33%; }
.cheque-paper::after { width: 38%; height: 75%; right: 18%; bottom: -45%; }
.cheque-sample-layer { position: absolute; inset: 0; color: rgba(31, 99, 95, .36); font-size: clamp(7px, .8vw, 11px); pointer-events: none; }
.cheque-sample-mark { position: absolute; top: 7%; right: 5%; font-weight: 900; letter-spacing: -.3px; }
.cheque-bank-mark { position: absolute; top: 7%; left: 6%; font-weight: 900; }
.cheque-label { position: absolute; }
.cheque-label--date { top: 11%; right: 29%; }
.cheque-label--date-words { top: 24%; right: 6%; }
.cheque-label--amount { top: 39%; right: 6%; }
.cheque-label--payee { top: 57%; right: 6%; }
.cheque-label--id { top: 57%; left: 34%; }
.cheque-label--numeric { top: 79%; left: 6%; }
.cheque-signature { position: absolute; left: 11%; bottom: 7%; padding-top: 12px; border-top: 1px dashed rgba(31, 99, 95, .25); }
.cheque-value {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 1mm;
  color: #092847;
  line-height: 1.55;
  font-weight: 700;
  overflow: hidden;
  white-space: normal;
}
.cheque-value.is-placeholder { color: rgba(45, 94, 119, .3); font-weight: 500; }
.cheque-paper.is-adjusting .cheque-value { overflow: visible; border: 1px dashed #d16d35; border-radius: 4px; background: rgba(255,255,255,.55); cursor: grab; touch-action: none; }
.cheque-paper.is-adjusting .cheque-value::after { content: attr(data-field-label); position: absolute; z-index: 9; top: -17px; right: 0; padding: 2px 6px; color: #fff; font: 800 8px/1.5 Vazirmatn,Tahoma,sans-serif; white-space: nowrap; border-radius: 5px; background: #bb6234; box-shadow: 0 2px 6px rgba(68,55,42,.2); pointer-events: none; }
.cheque-paper.is-adjusting .cheque-value.is-selected { z-index: 8; border: 2px solid #19756c; background: rgba(226, 250, 244, .82); box-shadow: 0 0 0 3px rgba(25,117,108,.13); }
.cheque-paper.is-adjusting .cheque-value.is-selected::after { background: #19756c; }
.cheque-paper.is-adjusting .cheque-value:active { cursor: grabbing; }
.cheque-adjust-help { margin: 10px 0 0; padding: 9px 12px; color: #7c4c2b; font-size: 11px; border-radius: 10px; background: #fff4e9; }
.cheque-selected-field-tools { display: grid; grid-template-columns: minmax(100px,.8fr) minmax(220px,2fr) 38px 38px; align-items: center; gap: 8px; margin-top: 8px; padding: 9px 11px; border: 1px solid #abd4ca; border-radius: 12px; background: #effaf7; }
.cheque-selected-field-tools > strong { color: #155b56; font-size: 11px; }
.cheque-selected-field-tools label { display: grid; grid-template-columns: auto 1fr 52px; align-items: center; gap: 8px; color: #416c69; font-size: 10px; }
.cheque-selected-field-tools input { width: 100%; accent-color: #19756c; }
.cheque-selected-field-tools output { direction: ltr; color: #164e4a; font-size: 10px; font-weight: 900; text-align: center; }
.cheque-selected-field-tools button { display: grid; place-items: center; width: 38px; height: 36px; color: #155b56; font: 900 20px/1 Vazirmatn,Tahoma,sans-serif; border: 1px solid #a6d0c6; border-radius: 10px; background: #fff; cursor: pointer; }

.cheque-print-controls { display: grid; grid-template-columns: 1.45fr 1.45fr .75fr .75fr; gap: 10px; margin-top: 15px; }
.cheque-print-controls > label { display: grid; gap: 5px; color: #526f8b; font-size: 10px; font-weight: 800; }
.cheque-print-controls label > div { position: relative; }
.cheque-print-controls label > div b { position: absolute; top: 50%; left: 10px; color: #7890a7; font-size: 9px; transform: translateY(-50%); }
.cheque-print-controls input { direction: ltr; padding-left: 36px; }
.cheque-advanced-settings { margin-top: 11px; border: 1px solid #d4deea; border-radius: 13px; background: #fafcff; }
.cheque-advanced-settings summary { padding: 11px 13px; color: #385a7c; font-size: 11px; font-weight: 900; cursor: pointer; }
#chequeFieldSettings { display: grid; gap: 7px; padding: 0 10px 10px; }
.cheque-field-setting { display: grid; grid-template-columns: minmax(100px, 1fr) repeat(5, minmax(76px, .72fr)); gap: 7px; align-items: center; padding: 7px; border-radius: 10px; background: #fff; }
.cheque-field-setting strong { color: #2b4968; font-size: 10px; }
.cheque-field-setting label { position: relative; display: flex; align-items: center; gap: 5px; color: #71869d; font-size: 9px; }
.cheque-field-setting input { min-height: 34px; padding: 6px 25px 6px 7px; direction: ltr; font-size: 10px; }
.cheque-field-setting b { position: absolute; left: 6px; color: #90a0b1; font-size: 7px; }
.cheque-print-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 15px; }
.cheque-print-actions .btn { min-height: 42px; }
.cheque-print-warning { margin: 10px 0 0; color: #6e7f91; font-size: 9px; text-align: left; direction: rtl; }
.cheque-printer-hint { margin: 12px 0 0; padding: 10px 12px; color: #24546d; font-size: 10px; line-height: 1.9; border: 1px solid #bcded7; border-radius: 11px; background: #eefaf7; }
.cheque-printer-hint b { color: #146a62; }

@media (max-width: 1180px) {
  .cheque-print-layout { grid-template-columns: 1fr; }
  .cheque-entry-card { order: 1; }
  .cheque-preview-card { order: 2; }
}

@media (max-width: 700px) {
  .cheque-print-page { padding-bottom: 24px; }
  .cheque-print-hero { min-height: auto; padding: 18px; border-radius: 18px; }
  .cheque-print-hero p:last-child { font-size: 10px; }
  .cheque-standard-badge { min-width: 100px; padding: 10px; }
  .cheque-standard-badge span { font-size: 17px; }
  .cheque-entry-card,
  .cheque-preview-card { padding: 13px; border-radius: 17px; }
  .cheque-form-grid,
  .cheque-print-controls { grid-template-columns: 1fr; }
  .cheque-form-grid label.span-2 { grid-column: auto; }
  .cheque-preview-stage { justify-content: start; padding: 14px; }
  .cheque-paper { width: 680px; }
  .cheque-field-setting { grid-template-columns: 1fr 1fr 1fr; }
  .cheque-field-setting strong { grid-column: 1 / -1; }
  .cheque-selected-field-tools { grid-template-columns: 1fr 38px 38px; }
  .cheque-selected-field-tools > strong { grid-column: 1 / -1; }
  .cheque-selected-field-tools label { grid-column: 1 / -1; }
  .cheque-print-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
