/* ══════════════════════════════════════════════════════
   SmartStore Contract Generator – Stylesheet
   Professional B2B Design
══════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --primary:       #1a3a5c;
  --primary-light: #2563a8;
  --accent:        #0ea5e9;
  --accent-2:      #22c55e;
  --gold:          #f59e0b;
  --danger:        #ef4444;
  --warning:       #f97316;
  --bg:            #f1f5f9;
  --bg-white:      #ffffff;
  --border:        #dde3ed;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.13);
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --font-main:     'Inter', sans-serif;
  --font-serif:    'Merriweather', serif;
  --transition:    all .2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════ */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  font-size: 2rem;
  color: var(--accent);
}

.logo-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff;
}

.logo-sub {
  display: block;
  font-size: .72rem;
  color: #94b8d4;
  letter-spacing: .2px;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.25);
  color: #c8dae8;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-btn:hover,
.nav-btn.active {
  background: var(--primary-light);
  border-color: var(--accent);
  color: #fff;
}

/* ══════════════════════════════════════════════════════
   MAIN CONTAINER
══════════════════════════════════════════════════════ */
.main-container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem 4rem;
}

/* ── Progress Steps ── */
.progress-bar-wrap {
  margin-bottom: 2.5rem;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 6px;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  background: var(--bg-white);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  transition: var(--transition);
}

.step span {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}

.step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(26,58,92,.15);
}

.step.active span {
  color: var(--primary);
  font-weight: 700;
}

.step.done .step-circle {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}

.step-line {
  height: 2.5px;
  background: var(--border);
  flex: 1;
  max-width: 100px;
  margin-bottom: 22px;
  transition: var(--transition);
}

.step-line.done {
  background: var(--accent-2);
}

/* ══════════════════════════════════════════════════════
   FORM VIEW
══════════════════════════════════════════════════════ */
.form-view { width: 100%; }

.form-section { animation: fadeIn .3s ease; }

.hidden { display: none !important; }

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 1.5rem;
}

.section-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -2px;
}

.section-header h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.section-header p {
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.card-title i { color: var(--accent); font-size: .95rem; }

/* ── Grid ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
}

/* ── Form Fields ── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.field-group input,
.field-group select,
.field-group textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: .9rem;
  font-family: var(--font-main);
  color: var(--text);
  background: var(--bg-white);
  transition: var(--transition);
  width: 100%;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37,99,168,.12);
}

.field-group textarea { resize: vertical; min-height: 70px; }

/* ── Input Prefix ── */
.input-prefix-wrap {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.input-prefix-wrap:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37,99,168,.12);
}

.input-prefix {
  background: var(--bg);
  padding: 9px 12px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1.5px solid var(--border);
  display: flex;
  align-items: center;
}

.input-prefix-wrap input {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* ── Checkbox Group ── */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.checkbox-group.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 0;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-light);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Package Selector ── */
.package-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.package-option {
  cursor: pointer;
  display: block;
}

.package-option input[type="radio"] {
  display: none;
}

.pkg-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  background: var(--bg);
  transition: var(--transition);
  height: 100%;
}

.package-option input:checked + .pkg-card {
  border-color: var(--primary-light);
  background: #eef4fb;
  box-shadow: 0 0 0 3px rgba(37,99,168,.1);
}

.pkg-badge {
  display: inline-block;
  background: var(--text-muted);
  color: #fff;
  border-radius: 20px;
  padding: 3px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: .75rem;
}

.badge-blue { background: var(--primary-light); }
.badge-gold { background: var(--gold); }

.pkg-features {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: .82rem;
  color: var(--text);
}

.pkg-features .fa-check { color: var(--accent-2); margin-right: 4px; }
.pkg-features .fa-times { color: var(--text-light); margin-right: 4px; }
.pkg-features .text-muted { color: var(--text-light); }

/* ── SLA Table ── */
.sla-table-wrap { overflow-x: auto; }

.sla-input-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.sla-input-table th {
  background: var(--primary);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .3px;
}

.sla-input-table td {
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.sla-input-table input,
.sla-input-table select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: .85rem;
  font-family: var(--font-main);
  color: var(--text);
}

.prio-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.prio-1 { background: #fee2e2; color: #b91c1c; }
.prio-2 { background: #ffedd5; color: #c2410c; }
.prio-3 { background: #fef9c3; color: #a16207; }
.prio-4 { background: #dcfce7; color: #15803d; }

.prio-critical td { background: #fff8f8; }
.prio-high td     { background: #fffbf4; }
.prio-medium td   { background: #fffef4; }
.prio-low td      { background: #f4fff8; }

/* ── Standort Table ── */
.standort-table-wrap { overflow-x: auto; margin-bottom: 1rem; }

.standort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
}

.standort-table th {
  background: var(--bg);
  color: var(--text-muted);
  padding: 9px 10px;
  text-align: left;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .3px;
  border-bottom: 2px solid var(--border);
}

.standort-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.standort-table input,
.standort-table select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: .84rem;
  font-family: var(--font-main);
  color: var(--text);
}

.btn-add-row {
  margin-left: auto;
  background: var(--accent-2);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  float: right;
  transition: var(--transition);
}

.btn-add-row:hover { background: #16a34a; }

.btn-delete-row {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
}

.btn-delete-row:hover { color: #b91c1c; }

/* ── Buttons ── */
.btn-primary, .btn-secondary, .btn-success {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-light);
  color: #fff;
}
.btn-primary:hover { background: var(--primary); }

.btn-secondary {
  background: var(--bg-white);
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); border-color: var(--primary-light); }

.btn-success {
  background: var(--accent-2);
  color: #fff;
}
.btn-success:hover { background: #16a34a; }

.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  margin-top: .5rem;
}

.mt-1 { margin-top: 1rem; }

/* ══════════════════════════════════════════════════════
   PREVIEW VIEW
══════════════════════════════════════════════════════ */
.preview-view { width: 100%; animation: fadeIn .3s ease; }

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.preview-toolbar-right {
  display: flex;
  gap: 10px;
}

.empty-preview {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-light);
}

.empty-preview i {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
  color: var(--border);
}

/* ══════════════════════════════════════════════════════
   CONTRACT DOCUMENT STYLES
══════════════════════════════════════════════════════ */
.contract-preview {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.contract-doc {
  max-width: 100%;
  margin: 0 auto;
  padding: 40px 48px;
  font-family: var(--font-main);
  color: #1a1a1a;
  font-size: 9.5pt;
  line-height: 1.65;
}

/* ── Contract Header ── */
.contract-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 3px double #1a3a5c;
}

.contract-header .contract-type-label {
  display: inline-block;
  background: #1a3a5c;
  color: #fff;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 18px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.contract-header h1 {
  font-family: var(--font-serif);
  font-size: 20pt;
  font-weight: 700;
  color: #1a3a5c;
  line-height: 1.25;
  margin-bottom: 8px;
}

.contract-header .contract-subtitle {
  font-size: 11pt;
  color: #4b5563;
  font-weight: 400;
}

.contract-header .contract-meta {
  margin-top: 16px;
  font-size: 8.5pt;
  color: #6b7280;
}

/* ── Parties Block ── */
.parties-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1.5px solid #1a3a5c;
  border-radius: 4px;
  margin-bottom: 32px;
  overflow: hidden;
}

.party-box {
  padding: 16px 20px;
}

.party-box:first-child {
  border-right: 1.5px solid #1a3a5c;
}

.party-label {
  font-size: 7pt;
  font-weight: 800;
  color: #1a3a5c;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.party-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1a3a5c;
  opacity: .3;
}

.party-name {
  font-size: 11pt;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}

.party-details {
  font-size: 8.5pt;
  color: #374151;
  line-height: 1.7;
}

/* ── Paragraph Styles ── */
.contract-section {
  margin-bottom: 22px;
}

.contract-paragraph-title {
  font-size: 10.5pt;
  font-weight: 700;
  color: #1a3a5c;
  background: #f0f4fa;
  border-left: 4px solid #1a3a5c;
  padding: 8px 14px;
  margin-bottom: 10px;
  page-break-after: avoid;
}

.contract-paragraph-body,
.section-head-keep {
  padding: 0 4px;
}

.contract-paragraph-body p,
.section-head-keep p {
  margin-bottom: 7px;
  text-align: justify;
  font-size: 9.5pt;
}

.contract-paragraph-body ol,
.contract-paragraph-body ul,
.section-head-keep ol,
.section-head-keep ul {
  margin: 6px 0 10px 20px;
}

.contract-paragraph-body li,
.section-head-keep li {
  margin-bottom: 5px;
  font-size: 9.5pt;
}

/* ── Tables in contract ── */
.contract-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 8.5pt;
}

.contract-table th {
  background: #1a3a5c;
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 8pt;
}

.contract-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.contract-table tr:nth-child(even) td { background: #f8fafc; }

.contract-table .prio-cell-1 { background: #fee2e2 !important; }
.contract-table .prio-cell-2 { background: #ffedd5 !important; }
.contract-table .prio-cell-3 { background: #fef9c3 !important; }
.contract-table .prio-cell-4 { background: #dcfce7 !important; }

/* ── Signature Block ── */
.signature-section {
  margin-top: 50px;
  padding-top: 24px;
  border-top: 2px solid #1a3a5c;
}

.signature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.signature-box {
  padding-top: 16px;
}

.signature-line {
  border-top: 1.5px solid #374151;
  margin-bottom: 6px;
  margin-top: 60px;
}

.signature-label {
  font-size: 8pt;
  color: #6b7280;
}

.signature-party-name {
  font-size: 8.5pt;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 2px;
}

/* ── Annex / Anlage ── */
.contract-annex {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px dashed #1a3a5c;
}

.annex-title {
  font-size: 13pt;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 4px;
  font-family: var(--font-serif);
}

.annex-subtitle {
  font-size: 9pt;
  color: #6b7280;
  margin-bottom: 16px;
}

.annex-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
  margin-top: 12px;
}

.annex-table th {
  background: #1a3a5c;
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
}

.annex-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.annex-table tr:nth-child(even) td { background: #f8fafc; }

/* ── Page break hint ── */
.page-break { page-break-before: always; margin-top: 32px; }

/* ══════════════════════════════════════════════════════
   PDF EXPORT — PAGE BREAK CONTROL
   Die Brüche werden vollständig durch insertSmartPageBreaks
   in main.js gesetzt. CSS-Regeln zu page-break-* sind bewusst
   minimal gehalten, damit html2pdf nicht doppelt umbricht
   und Lücken erzeugt.
══════════════════════════════════════════════════════ */
.contract-annex {
  page-break-before: always;
  break-before: page;
}

/* Manuelle Seitenumbruch-Marker (durch insertSmartPageBreaks gesetzt) */
.html2pdf__page-break {
  display: block;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  page-break-before: always;
  break-before: page;
}

/* ══════════════════════════════════════════════════════
   MODAL — Verträge speichern / laden
══════════════════════════════════════════════════════ */
.nav-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,.18);
  margin: 0 4px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  animation: fadeIn .15s ease;
}

.modal-overlay.hidden { display: none !important; }

.modal-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.modal-head h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.08rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body {
  padding: 1rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.empty-list {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 1rem;
  font-size: .92rem;
}

.contract-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: var(--transition);
}

.contract-entry:hover {
  border-color: var(--primary-light);
  background: #f8fbff;
}

.contract-entry-info {
  flex: 1;
  min-width: 0;
}

.contract-entry-name {
  font-weight: 600;
  color: var(--text);
  font-size: .95rem;
  margin-bottom: 3px;
  word-break: break-word;
}

.contract-entry-date {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.contract-entry-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 7px 14px !important;
  font-size: .82rem !important;
}

/* ══════════════════════════════════════════════════════
   FLASH TOAST
══════════════════════════════════════════════════════ */
.flash-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1100;
}

.flash-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Info Notice ── */
.info-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .82rem;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

/* ── Contract number badge in table ── */
td.nr-cell {
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
  width: 36px;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--primary);
  color: #94b8d4;
  padding: 1rem 2rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .8rem;
}

.footer-note {
  font-style: italic;
  color: #6991aa;
}

/* ══════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════════════════ */
@media print {
  .site-header,
  .site-footer,
  .preview-toolbar,
  .progress-bar-wrap,
  .form-view {
    display: none !important;
  }

  .preview-view { display: block !important; }
  .main-container { padding: 0; max-width: 100%; }

  .contract-preview {
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  .contract-doc {
    padding: 14mm 14mm;
    max-width: 100%;
  }
}

@page { margin: 14mm; }

@media print {
  body { background: #fff; font-size: 9.5pt; }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .package-selector { grid-template-columns: 1fr; }
  .checkbox-group.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .parties-block { grid-template-columns: 1fr; }
  .party-box:first-child { border-right: none; border-bottom: 1.5px solid #1a3a5c; }
  .signature-grid { grid-template-columns: 1fr; gap: 20px; }
  .contract-doc { padding: 30px 24px; }
  .progress-steps { gap: 0; }
  .step span { display: none; }
}

@media (max-width: 600px) {
  .site-header { padding: 0 1rem; }
  .logo-sub { display: none; }
  .main-container { padding: 1.25rem 1rem 3rem; }
  .card { padding: 1.1rem 1rem; }
  .checkbox-group.cols-3 { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; text-align: center; gap: .5rem; }
}
