:root {
  --brand: #0f4c81;
  --brand-dark: #0a355c;
  --brand-soft: #eaf2fa;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --success: #15803d;
  --success-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --info: #0369a1;
  --info-soft: #e0f2fe;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.18);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.full-width { width: 100%; }
.full-row { grid-column: 1 / -1; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.text-right { text-align: right; }

/* ---------------- AUTH / SETUP ---------------- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #0b2545 0%, var(--brand) 60%, #1d6fa5 100%);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.auth-card-wide { max-width: 760px; }
.auth-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.auth-brand-center { flex-direction: column; text-align: center; }
.auth-brand h1 { margin: 0 0 4px; font-size: 21px; }
.auth-brand p { margin: 0; font-size: 13px; }
.auth-footer { text-align: center; font-size: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }

.logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; }
.logo-mark-lg { width: 76px; height: 76px; font-size: 22px; border-radius: 16px; }

/* ---------------- SHELL & SIDEBAR ---------------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 268px;
  background: #0d1b2a;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.brand-header:hover { background: rgba(255,255,255,0.04); }
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }
.brand-text { min-width: 0; }
.brand-name { font-weight: 700; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-menu {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 16px;
}
.nav-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 12px 10px 6px;
  font-weight: 700;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 2px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.nav-icon { font-size: 15px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.16);
}
.user-card { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: #94a3b8; }

/* ---------------- MAIN AREA ---------------- */
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h2 { margin: 0; font-size: 19px; font-weight: 700; }
.topbar p { margin: 2px 0 0; font-size: 12.5px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.view-container {
  padding: 22px 26px 40px;
  flex: 1;
}

/* ---------------- CARDS, KPI, GRID ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--brand);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.kpi-card.clickable { cursor: pointer; }
.kpi-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}
.kpi-link-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  background: #f1f5f9;
  color: var(--brand);
  font-weight: 600;
  font-size: 11.5px;
  cursor: pointer;
  margin-right: 4px;
}
.kpi-link-chip:hover { background: var(--brand); color: #fff; }
.emp-name-link {
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.emp-name-link:hover { border-bottom-color: var(--brand); }
.dup-alert-banner {
  background: #fef2f2;
  color: #991b1b;
  border: 2px solid #dc2626;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  animation: pulseDup 0.6s ease 2;
}
@keyframes pulseDup {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filter-bar select, .filter-bar input {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 12.5px;
  background: #fff;
}
.print-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 10px 20px;
  background: #eef4fa;
  border-bottom: 1px solid var(--border);
}
.print-tool-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 200px;
}
.print-tool-sm { flex: 0 0 185px; min-width: 170px; }
.print-tool-field label { font-size: 11px; font-weight: 700; color: #334155; text-transform: uppercase; letter-spacing: 0.03em; }
.print-tool-field input, .print-tool-field select {
  padding: 6px 9px;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}
/* Grille Pointage Mensuel */
.att-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
}
.att-cell {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 4px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  background: #fff;
  transition: transform 0.1s;
}
.att-cell:hover { transform: scale(1.04); border-color: var(--brand); }
.att-cell .att-day { font-size: 10px; color: #64748b; display: block; }
.att-cell .att-code { font-weight: 800; font-size: 12.5px; }
.att-P { background: #dcfce7; border-color: #86efac; color: #166534; }
.att-R { background: #e0f2fe; border-color: #7dd3fc; color: #075985; }
.att-CA, .att-JF { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }
.att-OM { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.att-M, .att-AT { background: #ffedd5; border-color: #fdba74; color: #9a3412; }
.att-AI { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.att-AJ { background: #f1f5f9; border-color: #94a3b8; color: #334155; }
.att-W { background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; }
.kpi-card.kpi-success { border-left-color: var(--success); }
.kpi-card.kpi-warn { border-left-color: var(--warn); }
.kpi-card.kpi-danger { border-left-color: var(--danger); }
.kpi-card.kpi-info { border-left-color: var(--info); }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.kpi-value { font-size: 26px; font-weight: 800; margin: 6px 0 2px; color: var(--text); }
.kpi-sub { font-size: 12px; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-header h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card-body { padding: 16px 18px; }

/* ---------------- TABS ---------------- */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 9px 15px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------------- TABLES ---------------- */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
tr:hover td { background: #f8fafc; }
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}

/* ---------------- BUTTONS & BADGES ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #e2e8f0; color: #1e293b; }
.btn-secondary:hover { background: #cbd5e1; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #166534; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #991b1b; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-ghost { background: rgba(255,255,255,0.08); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.12); }
.btn-ghost:hover { background: rgba(255,255,255,0.16); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11.5px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-primary { background: var(--brand-soft); color: var(--brand); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: #e2e8f0; color: #334155; }

/* ---------------- FORMS ---------------- */
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-section-title {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  padding-top: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: #334155; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13.5px;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.14);
}
.field textarea { min-height: 82px; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.checkbox-row input { width: auto; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.search-input {
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  min-width: 240px;
  font-size: 13px;
}

/* ---------------- ALERTS & BOXES ---------------- */
.alert {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid transparent;
}
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }
.alert-info { background: var(--info-soft); color: var(--info); border-color: #bae6fd; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }

.calc-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 12px 14px;
}
.danger-zone {
  border: 2px solid #fca5a5;
  background: #fff5f5;
  border-radius: 10px;
  padding: 18px;
}
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-label { width: 170px; font-size: 12.5px; font-weight: 600; }
.bar-track { flex: 1; height: 10px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 99px; }
.bar-val { width: 38px; text-align: right; font-weight: 700; font-size: 12.5px; }

/* ---------------- MODALS ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  backdrop-filter: blur(2px);
}
.modal-dialog {
  background: var(--surface);
  border-radius: 12px;
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-lg { max-width: 960px; }
.modal-xl { max-width: 1020px; }
.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 18px 20px; overflow-y: auto; }

/* ---------------- TOAST ---------------- */
.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #0f172a;
  color: #fff;
  padding: 11px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  max-width: 380px;
  border-left: 4px solid var(--brand);
}
.toast-success { border-left-color: #22c55e; }
.toast-danger { border-left-color: #ef4444; }

/* ---------------- DOCUMENTS OFFICIELS A4 ---------------- */
.print-preview-bg { background: #cbd5e1; padding: 24px; }
.a4-sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 20px;
  background: #fff;
  color: #111827;
  padding: 16mm 16mm 18mm;
  box-shadow: 0 8px 30px rgba(0,0,0,0.22);
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10.5pt;
  line-height: 1.48;
}
/* Marges exactes de Contrat Type.docx : Top 25mm, Right 12.5mm, Bottom 22.5mm, Left 10mm */
.a4-sheet.contract-sheet {
  padding: 25mm 12.5mm 22.5mm 10mm;
  min-height: 297mm;
  height: auto;
  font-size: 10.2pt;
  line-height: 1.45;
}
.copy-badge {
  text-align: right;
  font-size: 8pt;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.sheet-break {
  page-break-before: always;
  break-before: page;
}
.doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--brand);
  margin-bottom: 12px;
}
.doc-logo {
  max-width: 90px;
  max-height: 64px;
  object-fit: contain;
}
.doc-company-name { font-size: 14.5pt; font-weight: 800; color: var(--brand); text-transform: uppercase; margin: 0; }
.doc-company-meta { font-size: 8.5pt; color: #475569; margin-top: 3px; line-height: 1.35; }
.doc-ref-box {
  text-align: right;
  font-size: 9pt;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.doc-title {
  text-align: center;
  font-size: 13pt;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  margin: 8px 0 14px;
}
.doc-body {
  flex: 1;
  white-space: pre-wrap;
  text-align: justify;
  font-size: 10.2pt;
}
.doc-body.doc-body-compact {
  flex: 0 0 auto;
  margin-bottom: 0;
}
.doc-body strong { font-weight: 700; color: #000; }
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 9.5pt;
}
.doc-table.doc-table-tight {
  margin-top: 4px;
}
.doc-table th, .doc-table td {
  border: 1px solid #94a3b8;
  padding: 6px 8px;
}
.doc-table th { background: #f1f5f9; color: #0f172a; text-transform: none; }
.doc-signatures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 22px;
  padding-top: 8px;
  page-break-inside: avoid;
  break-inside: avoid;
}
.doc-sig-box {
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  min-height: 86px;
  padding: 8px 10px;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: center;
}
.doc-footer {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #cbd5e1;
  font-size: 8pt;
  color: #475569;
  text-align: center;
}

@media (max-width: 900px) {
  .sidebar { width: 220px; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 25mm 12.5mm 22.5mm 10mm;
  }
  body { background: #fff !important; }
  #app-shell, #login-screen, #modal-overlay, #toast-container, .no-print {
    display: none !important;
  }
  #print-overlay {
    position: static !important;
    background: #fff !important;
    padding: 0 !important;
    display: block !important;
    backdrop-filter: none !important;
    overflow: visible !important;
  }
  #print-overlay .modal-dialog {
    max-width: none !important;
    max-height: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }
  #print-overlay .modal-body {
    overflow: visible !important;
    padding: 0 !important;
  }
  .print-preview-bg { background: #fff !important; padding: 0 !important; }
  .a4-sheet, .a4-sheet.contract-sheet {
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }
  .doc-body { flex: none !important; }
  .sheet-break {
    page-break-before: always !important;
    break-before: page !important;
  }
}
