:root {
  --bg-studio: #090d16;
  --bg-panel: #111726;
  --bg-card: #161e31;
  --bg-input: #0d1322;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --doc-accent: #4f46e5;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-studio);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.w-full { width: 100%; }

/* ==========================================
   ÜST STÜDYO BARI (GLASSMORPHIC HEADER)
   ========================================== */
.studio-header {
  height: 64px;
  background: rgba(15, 21, 35, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 40;
  position: relative;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
  overflow: hidden;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Belge Türü Seçici */
.doc-type-switcher {
  display: flex;
  background: #0b101d;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
  gap: 4px;
  flex-shrink: 0;
}

.doc-type-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.81rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.doc-type-btn:hover {
  color: var(--text-main);
}

.doc-type-btn.active {
  background: linear-gradient(180deg, #1e293b 0%, #172033 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.doc-type-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-quote { background: #818cf8; box-shadow: 0 0 8px #818cf8; }
.dot-proforma { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.dot-invoice { background: #10b981; box-shadow: 0 0 8px #10b981; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buton Stilleri */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: #e2e8f0;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.badge-count {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 99px;
}

/* Dropdown Menü */
.dropdown-wrap {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 310px;
  background: #131b2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  padding: 8px;
  z-index: 100;
}

.dropdown-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 6px 10px;
}

.dropdown-item {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.15);
}

.preset-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-item strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
}

.dropdown-item small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

/* ==========================================
   ANA ÇALIŞMA ALANI (SOL EDİTÖR + SAĞ SAHNE)
   ========================================== */
.studio-workspace {
  display: grid;
  grid-template-columns: 460px 1fr;
  height: calc(100vh - 64px);
  transition: grid-template-columns 0.22s ease;
}

body.focus-preview-mode .editor-sidebar {
  display: none !important;
}

body.focus-preview-mode .studio-workspace {
  grid-template-columns: 1fr;
}

/* ==========================================
   SOL EDİTÖR PANELİ
   ========================================== */
.editor-sidebar {
  background: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.editor-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #0c111d;
  padding: 6px;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.editor-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 9px 4px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.16s ease;
}

.editor-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.editor-tab.active {
  background: var(--bg-card);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.editor-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scroll-behavior: smooth;
}

.editor-scroll-body::-webkit-scrollbar {
  width: 6px;
}
.editor-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
}

.privacy-notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 9px 11px;
  border-radius: 10px;
  margin-bottom: 13px;
}

.privacy-notice-bar svg {
  flex-shrink: 0;
  color: #34d399;
}

.privacy-notice-bar strong {
  color: #ecfdf5;
}

.editor-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.editor-panel.active {
  display: flex;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  padding: 15px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* A4 Kağıdından Tıklanınca Sol Kartın Parlama Efekti */
.panel-card.card-flash-highlight,
.item-editor-card.card-flash-highlight {
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.32), 0 8px 25px rgba(99, 102, 241, 0.2) !important;
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-card-header h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
}

.panel-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.panel-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.45;
}

/* Sol Panel Alt Bar (cenk.org projesidir) */
.sidebar-footer-bar {
  padding: 10px 16px;
  background: #0b101d;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cenk-project-link {
  color: #a5b4fc;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s;
}
.cenk-project-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Şablon Seçim Kartları */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.template-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px;
  text-align: left;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.16s ease;
}

.template-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.template-card.active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 0 1px #6366f1;
}

.tpl-preview {
  width: 34px;
  height: 44px;
  background: #fff;
  border-radius: 4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}
.tpl-prev-obsidian .tpl-bar { height: 11px; background: #0f172a; border-radius: 2px; }
.tpl-prev-swiss .tpl-bar { height: 4px; background: #ef4444; }
.tpl-prev-executive .tpl-bar { height: 8px; background: #1e3a8a; border-bottom: 2px solid #d97706; }
.tpl-prev-nordic .tpl-bar { height: 10px; background: #e0e7ff; border-radius: 4px; }

.tpl-lines span {
  display: block;
  height: 3px;
  background: #cbd5e1;
  margin-top: 3px;
  border-radius: 2px;
}

.tpl-meta strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
}
.tpl-meta small {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Renk Seçici */
.color-swatches {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
  transform: scale(1.1);
}

.color-picker-label {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.color-picker-label input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Form Elemanları */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-group label {
  display: block;
  font-size: 0.73rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 5px;
}

.form-group label small {
  color: var(--text-dim);
  font-weight: 400;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.81rem;
  padding: 8px 10px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.22);
}

.mono-input {
  font-family: var(--font-mono) !important;
  font-size: 0.79rem !important;
}

.btn-link {
  background: none;
  border: none;
  color: #818cf8;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-link:hover {
  text-decoration: underline;
}

.btn-pill-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-pill-action:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
  color: #fff;
}

.btn-pill-primary {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}

/* Logo Yükleme */
.logo-dropzone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.logo-dropzone:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.06);
}
.logo-dropzone strong {
  display: block;
  font-size: 0.8rem;
}
.logo-dropzone small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Hızlı Müşteri Çipleri */
.client-chips-row,
.quick-terms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-size: 0.71rem;
  padding: 4px 9px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip-btn:hover {
  border-color: #6366f1;
  color: #fff;
}

/* Kalem Editörü (Line Items) */
.line-items-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-editor-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 11px;
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.item-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.item-index-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  padding: 2px 7px;
  border-radius: 5px;
}

.item-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.item-delete-btn:hover {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.12);
}

.item-editor-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr 0.9fr;
  gap: 7px;
  margin-top: 8px;
}

.btn-dashed-add {
  width: 100%;
  padding: 10px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px dashed rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-dashed-add:hover {
  background: rgba(99, 102, 241, 0.14);
  color: #fff;
}

/* Vergi & Stopaj Anahtarları */
.toggle-group-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tax-toggle-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 10px 12px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch-row input {
  accent-color: #6366f1;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.switch-text strong {
  display: block;
  font-size: 0.78rem;
  color: #f1f5f9;
}
.switch-text small {
  display: block;
  font-size: 0.69rem;
  color: var(--text-muted);
}

.sub-tax-options {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--border-subtle);
}

.sub-tax-options label {
  display: block;
  font-size: 0.71rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.sub-tax-options select {
  width: 100%;
  background: #141c2f;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
}

/* Banka / IBAN Editörü */
.bank-editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bank-item-row {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 9px;
  display: grid;
  grid-template-columns: 1fr 1.8fr auto;
  gap: 7px;
  align-items: center;
}

.bank-item-row input {
  background: #141c2f;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  width: 100%;
}

/* İmza Pedi */
.signature-pad-wrap {
  position: relative;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(99, 102, 241, 0.35);
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#signatureCanvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
  position: relative;
  z-index: 2;
}

.sig-pad-watermark {
  position: absolute;
  font-size: 0.8rem;
  color: #cbd5e1;
  pointer-events: none;
  z-index: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sig-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.switch-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
  cursor: pointer;
}

/* ==========================================
   SAĞ PANEL: CANLI A4 ÖNİZLEME SAHNESİ
   ========================================== */
.preview-stage {
  background:
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.14), transparent 55%),
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.stage-toolbar {
  height: 48px;
  padding: 0 24px;
  background: rgba(13, 19, 34, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.stage-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 99px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}

.stage-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.stage-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zoom-controls {
  display: flex;
  align-items: center;
  background: #0b101d;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2px;
}

.zoom-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.zoom-fit-btn {
  width: auto;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
}

.zoom-val {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0 8px;
  color: #94a3b8;
}

.stage-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 8px;
  cursor: pointer;
}
.stage-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* A4 Kağıt Sahnesi */
.a4-viewport {
  flex: 1;
  overflow: auto;
  padding: 28px 24px 48px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.a4-paper {
  width: 210mm;
  min-height: 297mm;
  background: #ffffff;
  color: #0f172a;
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 16mm 16mm 14mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform-origin: top center;
  transition: transform 0.18s ease;
  position: relative;
  flex-shrink: 0;
}

/* A4 Kağıdı Üzerindeki Tıklanabilir Bölümler (Sol Panelde İlgili Yeri Açar) */
[data-jump-tab] {
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

[data-jump-tab]:hover {
  background-color: rgba(99, 102, 241, 0.05);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.28);
}

/* Sağ Sahne En Alt Bilgi Barı (cenk.org projesidir) */
.stage-bottom-footer {
  height: 40px;
  padding: 0 24px;
  background: rgba(11, 16, 29, 0.92);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.stage-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-text-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 0.74rem;
  cursor: pointer;
}
.footer-text-btn:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-sep {
  color: var(--text-dim);
}

.cenk-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(16, 185, 129, 0.14));
  border: 1px solid rgba(99, 102, 241, 0.38);
  color: #f8fafc;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
}

.cenk-footer-badge:hover {
  transform: translateY(-1px);
  border-color: #818cf8;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.32);
  color: #ffffff;
}

.cenk-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* ==========================================
   A4 BELGE İÇERİĞİ & 4 PREMİUM ŞABLON
   ========================================== */
.doc-top-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--doc-accent);
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid #e2e8f0;
}

.doc-brand-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 58%;
}

.doc-logo-img {
  max-height: 56px;
  max-width: 150px;
  object-fit: contain;
  border-radius: 6px;
}

.doc-monogram {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: var(--doc-accent);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.03em;
}

.doc-sender-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.doc-sender-role {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--doc-accent);
  margin-top: 2px;
}

.doc-sender-meta {
  font-size: 0.73rem;
  color: #475569;
  line-height: 1.45;
  margin-top: 5px;
}

.doc-title-block {
  text-align: right;
}

.doc-status-stamp {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 6px;
  border: 1.5px solid currentColor;
}
.stamp-draft { color: #64748b; background: #f8fafc; }
.stamp-Valid { color: var(--doc-accent); background: rgba(79, 70, 229, 0.06); }
.stamp-approved { color: #059669; background: #ecfdf5; }
.stamp-paid { color: #059669; background: #ecfdf5; }
.stamp-unpaid { color: #d97706; background: #fffbeb; }

.doc-main-heading {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  text-transform: uppercase;
}

.doc-meta-table {
  margin-top: 8px;
  margin-left: auto;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.doc-meta-table td {
  padding: 2px 0 2px 14px;
}

.doc-meta-table td:first-child {
  color: #64748b;
  font-weight: 500;
}

.doc-meta-table td:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #0f172a;
}

/* Taraflar & Proje Özeti Kutusu */
.doc-parties-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-top: 18px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.doc-party-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--doc-accent);
  margin-bottom: 5px;
}

.doc-client-name {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
}

.doc-client-details {
  font-size: 0.74rem;
  color: #475569;
  line-height: 1.48;
  margin-top: 4px;
}

.doc-project-box {
  border-left: 2px solid var(--doc-accent);
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.doc-project-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.doc-intro-text {
  margin-top: 14px;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.55;
}

/* Hizmet & Ürün Kalemleri Tablosu */
.doc-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

.doc-items-table thead th {
  background: #0f172a;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 9px 10px;
  text-align: left;
}

.doc-items-table thead th:first-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  width: 34px;
  text-align: center;
}

.doc-items-table thead th:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.doc-items-table th.num-col,
.doc-items-table td.num-col {
  text-align: right;
}

.doc-items-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
}

.doc-items-table tbody tr:nth-child(even) {
  background: #fcfcfd;
}

.doc-items-table tbody td {
  padding: 10px 10px;
  font-size: 0.78rem;
  vertical-align: top;
  color: #1e293b;
}

.doc-item-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
}

.doc-item-title {
  font-weight: 600;
  color: #0f172a;
}

.doc-item-desc {
  font-size: 0.71rem;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

.doc-mono-cell {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  white-space: nowrap;
}

/* Alt Toplamlar & Banka Özeti */
.doc-summary-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin-top: 18px;
  align-items: start;
}

.doc-left-notes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-words-banner {
  background: #f8fafc;
  border-left: 3px solid var(--doc-accent);
  padding: 7px 11px;
  font-size: 0.73rem;
  color: #334155;
  border-radius: 0 6px 6px 0;
}

.doc-words-banner strong {
  color: #0f172a;
}

.doc-bank-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.doc-box-subtitle {
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #475569;
  margin-bottom: 6px;
}

.doc-bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  padding: 4px 0;
  border-bottom: 1px dashed #e2e8f0;
  gap: 8px;
}
.doc-bank-row:last-child {
  border-bottom: none;
}

.doc-bank-name {
  font-weight: 700;
  color: #0f172a;
}

.doc-bank-iban {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #334155;
  letter-spacing: 0.02em;
}

.doc-terms-box {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.5;
  white-space: pre-line;
}

/* Sağ Finansal Hesap Tablosu */
.doc-totals-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}

.doc-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.77rem;
  color: #475569;
}

.doc-totals-row span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #0f172a;
}

.doc-totals-row.deduction-row span:last-child {
  color: #dc2626;
}

.doc-grand-total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 2px solid #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.doc-grand-total-label {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
}

.doc-grand-total-val {
  font-family: var(--font-mono);
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--doc-accent);
}

/* İmza & Onay Bloğu */
.doc-signatures-grid {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.doc-sign-box {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.doc-sign-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.doc-sign-visual {
  height: 54px;
  display: flex;
  align-items: center;
  margin: 4px 0;
}

.doc-sign-visual img {
  max-height: 52px;
  max-width: 170px;
  object-fit: contain;
}

.doc-sign-line {
  border-top: 1px solid #cbd5e1;
  padding-top: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #1e293b;
}

.doc-footer-bar {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  color: #94a3b8;
}

/* ==========================================
   ŞABLON FARKLILIKLARI (4 ÖZEL TASARIM)
   ========================================== */
.a4-paper.tpl-obsidian .doc-items-table thead th {
  background: #0f172a;
}

.a4-paper.tpl-swiss {
  font-family: 'Inter', sans-serif;
}
.a4-paper.tpl-swiss .doc-top-ribbon {
  height: 10px;
}
.a4-paper.tpl-swiss .doc-parties-grid {
  background: #ffffff;
  border: 1.5px solid #0f172a;
  border-radius: 0;
}
.a4-paper.tpl-swiss .doc-items-table thead th {
  background: transparent;
  color: #0f172a;
  border-top: 2px solid #0f172a;
  border-bottom: 2px solid #0f172a;
  border-radius: 0 !important;
}
.a4-paper.tpl-swiss .doc-totals-card {
  background: #fff;
  border: 1.5px solid #0f172a;
  border-radius: 0;
}

.a4-paper.tpl-executive .doc-main-heading {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.a4-paper.tpl-executive .doc-items-table thead th {
  background: var(--doc-accent);
}
.a4-paper.tpl-executive .doc-header {
  border-bottom: 3px double var(--doc-accent);
}

.a4-paper.tpl-nordic .doc-top-ribbon {
  display: none;
}
.a4-paper.tpl-nordic .doc-header {
  background: #f8fafc;
  margin: -6mm -6mm 0;
  padding: 8mm 8mm 6mm;
  border-radius: 12px;
  border-bottom: none;
}
.a4-paper.tpl-nordic .doc-items-table thead th {
  background: #f1f5f9;
  color: #0f172a;
}

/* ==========================================
   MODALLAR & AEO/SEO REHBER KUTUSU
   ========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 17, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  background: #141c2f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-card.modal-lg { max-width: 680px; }
.modal-card.modal-xl { max-width: 820px; }

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.modal-header h3,
.modal-h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.modal-header p {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* AEO & SEO Rehber Grid */
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.guide-box {
  background: #0d1322;
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 14px;
}

.guide-box h3 {
  font-family: var(--font-display);
  font-size: 0.84rem;
  color: #a5b4fc;
  margin-bottom: 6px;
}

.guide-box p {
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: #0d1322;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 11px 14px;
}

.faq-item summary {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  cursor: pointer;
}

.faq-item p {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 8px;
}

.guide-footer-credit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}

.saved-docs-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.saved-doc-row {
  background: #0d1322;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.saved-doc-info strong {
  display: block;
  font-size: 0.85rem;
}
.saved-doc-info small {
  color: var(--text-muted);
  font-size: 0.73rem;
}

.saved-doc-actions {
  display: flex;
  gap: 8px;
}

/* Mobil Alt Navigasyon (Masaüstünde Gizli) */
.mobile-bottom-nav {
  display: none;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 54px;
  right: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-item {
  background: #1e293b;
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: slideInUp 0.22s ease;
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   MOBİL & TABLET DUYARLI (RESPONSIVE) TASARIM
   (Sadece ekran görünümünde geçerli, yazdırmayı etkilemez!)
   ========================================== */
@media screen and (max-width: 1220px) {
  .hide-lg { display: none !important; }
  .studio-workspace {
    grid-template-columns: 410px 1fr;
  }
}

@media screen and (max-width: 1024px) {
  .hide-md { display: none !important; }

  .studio-header {
    height: auto;
    min-height: 60px;
    padding: 8px 12px;
    flex-wrap: wrap;
  }

  .brand-sub {
    display: none;
  }

  .doc-type-switcher {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .doc-type-btn {
    flex: 1;
    justify-content: center;
    padding: 7px 8px;
    font-size: 0.76rem;
  }

  .studio-workspace {
    grid-template-columns: 1fr;
    height: calc(100vh - 156px);
  }

  body[data-mobile-view="editor"] .preview-stage {
    display: none !important;
  }

  body[data-mobile-view="preview"] .editor-sidebar {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    height: 54px;
    background: #0b101d;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    padding: 6px 10px;
    gap: 8px;
  }

  .mob-nav-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: 9px;
    font-family: var(--font-display);
    font-size: 0.76rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
  }

  .mob-nav-btn.active {
    background: rgba(99, 102, 241, 0.18);
    border-color: #6366f1;
    color: #ffffff;
  }

  .mob-nav-cta {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: #fff;
    border: none;
    padding: 0 14px;
  }

  .a4-viewport {
    padding: 16px 8px 60px;
  }

  .stage-bottom-footer {
    height: auto;
    padding: 8px 14px;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 640px) {
  .hide-sm { display: none !important; }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .item-editor-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .bank-item-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   KUSURSUZ A4 YAZDIRMA & PDF ÇIKTISI
   ========================================== */
@page {
  size: A4 portrait;
  margin: 0mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body,
  body.studio-body,
  body[data-mobile-view="editor"],
  body[data-mobile-view="preview"] {
    background: #ffffff !important;
    color: #0f172a !important;
    overflow: visible !important;
    height: auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .no-print,
  #studioHeader,
  #editorSidebar,
  .stage-toolbar,
  .stage-bottom-footer,
  .mobile-bottom-nav,
  .modal-backdrop,
  .toast-container {
    display: none !important;
  }

  .studio-workspace,
  body[data-mobile-view="editor"] .studio-workspace,
  body[data-mobile-view="preview"] .studio-workspace {
    display: block !important;
    height: auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .preview-stage,
  body[data-mobile-view="editor"] .preview-stage,
  body[data-mobile-view="preview"] .preview-stage,
  .a4-viewport {
    display: block !important;
    visibility: visible !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    height: auto !important;
    width: 100% !important;
  }

  .a4-paper,
  #a4Paper {
    display: flex !important;
    visibility: visible !important;
    width: 210mm !important;
    min-height: 296mm !important;
    padding: 15mm 15mm 12mm !important;
    margin: 0 auto !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    transform: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  .a4-paper.fit-single-page,
  #a4Paper.fit-single-page {
    height: 296mm !important;
    max-height: 296mm !important;
    min-height: 296mm !important;
    padding: 10mm 12mm 9mm !important;
    overflow: hidden !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* ==========================================
   TEK A4 SAYFASINA SIĞDIRMA (FIT TO 1 PAGE)
   ========================================== */
.btn-fit-one-page {
  border-color: rgba(99, 102, 241, 0.38) !important;
  color: #c7d2fe !important;
  background: rgba(99, 102, 241, 0.1) !important;
}

.btn-fit-one-page:hover {
  background: rgba(99, 102, 241, 0.22) !important;
  color: #ffffff !important;
}

.btn-fit-one-page.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35);
}

.a4-fit-inner {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  zoom: var(--fit-scale, 1);
}

.a4-paper.fit-single-page {
  height: 297mm;
  max-height: 297mm;
  padding: 10mm 12mm 9mm;
  overflow: hidden;
}

.a4-paper.fit-single-page .doc-header {
  padding-bottom: 10px;
}

.a4-paper.fit-single-page .doc-parties-grid {
  margin-top: 10px;
  padding: 9px 12px;
  gap: 12px;
}

.a4-paper.fit-single-page .doc-intro-text {
  margin-top: 8px;
  font-size: 0.74rem;
  line-height: 1.4;
}

.a4-paper.fit-single-page .doc-items-table {
  margin-top: 10px;
}

.a4-paper.fit-single-page .doc-items-table thead th {
  padding: 6px 8px;
}

.a4-paper.fit-single-page .doc-items-table tbody td {
  padding: 6px 8px;
  font-size: 0.74rem;
}

.a4-paper.fit-single-page .doc-summary-section {
  margin-top: 10px;
  gap: 14px;
}

.a4-paper.fit-single-page .doc-left-notes {
  gap: 7px;
}

.a4-paper.fit-single-page .doc-bank-box {
  padding: 7px 10px;
}

.a4-paper.fit-single-page .doc-totals-card {
  padding: 8px 11px;
}

.a4-paper.fit-single-page .doc-signatures-grid {
  margin-top: 10px;
  padding-top: 8px;
}

.a4-paper.fit-single-page .doc-sign-box {
  min-height: 58px;
}

.a4-paper.fit-single-page .doc-sign-visual {
  height: 36px;
}

.a4-paper.fit-single-page .doc-footer-bar {
  margin-top: 8px;
  padding-top: 5px;
}
