:root {
  --bg: #f6f6f6;
  --surface: #ffffff;
  --surface-subtle: #f4f4f4;
  --border: #dddddd;
  --border-strong: #000000;
  --ink: #000000;
  --text: #000000;
  --text-muted: #595959;
  --primary: #ff7900;
  --primary-hover: #f16e00;
  --primary-soft: #fff5eb;
  --green-bar: #228722;
  --red-bar: #cd3c14;
  --ok: #228722;
  --ok-soft: #e9f7ec;
  --danger: #cd3c14;
  --danger-soft: #fdece8;
  --warning: #995400;
  --warning-soft: #fff7db;
  --info: #0066cc;
  --info-soft: #e8f4fd;
  --radius: 10px;
  --radius-sm: 8px;
  --font: 'Helvetica Neue', Helvetica, Arial, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* ==================== Login Screen ==================== */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #000000;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border-radius: 0;
  border-top: 6px solid var(--primary);
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-logo img {
  width: 42px;
  height: 42px;
}

.auth-logo h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.auth-logo p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-error {
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.auth-divider {
  text-align: center;
  margin: 18px 0 12px;
  color: var(--text-muted);
  font-size: 12px;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 34%;
  height: 1px;
  background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ==================== App Layout (Orange Boosted) ==================== */

.app-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 56px;
}

.orange-header-band {
  width: 100%;
  background: #000000;
  color: #ffffff;
  border-bottom: 1px solid #262626;
}

.orange-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

.app-content-wrap {
  max-width: 1140px;
  margin: 18px auto 0;
  padding: 0 16px;
}

/* Barre utilitaire noire (haut de page style Orange) */

.slim-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 14px;
  padding: 8px 0;
  border-bottom: 1px solid #262626;
  font-size: 12.5px;
  color: #cccccc;
}

.slim-left,
.slim-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.slim-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.01em;
}

.slim-sep {
  color: #444444;
  user-select: none;
}

.slim-control {
  width: auto !important;
  padding: 3px 8px !important;
  font-size: 12.5px !important;
  font-weight: 600;
  border: 1px solid #595959 !important;
  border-radius: 0 !important;
  background: #141414 !important;
  color: #ffffff !important;
  height: 28px;
  color-scheme: dark;
}

.slim-control:hover,
.slim-control:focus {
  background: #1f1f1f !important;
  border-color: var(--primary) !important;
  outline: none;
}

.sync-mini {
  border: 0;
  background: transparent;
  padding: 2px 6px;
  border-radius: 0;
  font-family: inherit;
  font-size: 12px;
  color: #e5e5e5;
  cursor: pointer;
}

.sync-mini:hover {
  color: var(--primary);
}

.sync-dot-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999999;
  flex-shrink: 0;
}

.sync-dot-wrap[data-status='synced'] { color: #50be87; }
.sync-dot-wrap[data-status='synced'] .sync-dot { background: #50be87; }

.sync-dot-wrap[data-status='syncing'] { color: #4bb4e6; }
.sync-dot-wrap[data-status='syncing'] .sync-dot {
  background: #4bb4e6;
  animation: pulse 1s infinite;
}

.sync-dot-wrap[data-status='offline'] { color: #ffcc00; }
.sync-dot-wrap[data-status='offline'] .sync-dot { background: #ffcc00; }

.sync-dot-wrap[data-status='error'],
.sync-dot-wrap[data-status='auth_expired'] { color: #ff7900; }
.sync-dot-wrap[data-status='error'] .sync-dot,
.sync-dot-wrap[data-status='auth_expired'] .sync-dot { background: #ff7900; }

.slim-user {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.slim-btn {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.12s;
}

.slim-btn:hover {
  background: transparent;
  color: var(--primary);
}

.slim-session-pill {
  border: 1px solid #595959;
  border-radius: 0;
  padding: 2px 10px;
  height: 28px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.slim-session-pill.open {
  background: #14361e;
  border-color: #50be87;
  color: #50be87;
}

.slim-session-pill.closed {
  background: #3d140a;
  border-color: #ff7900;
  color: #ff7900;
}

.orange-brand-square {
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 5px;
  margin: 10px 16px 10px 0;
  flex-shrink: 0;
  user-select: none;
}

.orange-brand-square span {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.orange-brand-square i {
  display: block;
  width: 28px;
  height: 3px;
  background: #ffffff;
  margin-top: 3px;
}

/* ==================== Sessions Tab ==================== */

.session-action-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.session-action-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.session-open-card {
  border-color: #b7e4c7;
  background: #f5fbf7;
}

.session-open-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d8ecdf;
}

.session-live-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.session-live-kpis strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Fiche d'impression d'une session */

.session-print-sheet {
  display: none;
}

.sps-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #141413;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.sps-header h1 {
  margin: 0;
  font-size: 18px;
}

.sps-meta {
  font-size: 12px;
  color: #444;
  margin-top: 3px;
}

.sps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.sps-box {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
}

.sps-box h3 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sps-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12.5px;
  border-bottom: 1px solid #eee;
}

.sps-row:last-child {
  border-bottom: 0;
  font-weight: 700;
  padding-top: 6px;
}

.sps-signatures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.sps-sig-box {
  border-top: 1px solid #666;
  padding-top: 6px;
  font-size: 12px;
  color: #333;
  min-height: 50px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==================== KPI Cards & Dashboard ==================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 17px;
}

.kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 25px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.kpi-value.negative { color: var(--danger); }

.kpi-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13.5px;
  border-bottom: 1px solid #eae7df;
}

.dash-row:last-of-type {
  border-bottom: 0;
}

.dash-footer-meta {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==================== Main 4-Tab Bar (Reference Style) ==================== */

.main-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 4px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0;
}

.main-tab {
  padding: 10px 18px;
  border: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.main-tab:hover {
  background: rgba(20, 20, 19, 0.06);
}

.main-tab.active {
  background: var(--ink);
  color: #ffffff;
}

.nav-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ==================== Écran Validation (Optimisé Tablette) ==================== */

.val-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.val-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.val-header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.val-balances-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.val-bal-chip {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
}

.val-bal-chip strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.val-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.val-pending-total {
  font-size: 14px;
  color: var(--text-muted);
}

.val-pending-total strong {
  color: var(--ink);
  font-size: 15.5px;
  font-variant-numeric: tabular-nums;
}

.val-table {
  width: 100%;
  font-size: 15.5px;
}

.val-table thead th {
  padding: 12px 14px;
  font-size: 12.5px;
}

.val-table tbody td {
  padding: 14px 14px;
  vertical-align: middle;
}

.val-row-pending {
  background: #fffdf7;
}

.val-row-pending:hover {
  background: #fef9ea;
}

.val-order-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  margin-right: 8px;
  vertical-align: middle;
}

.val-pdv-number {
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: var(--ink);
  vertical-align: middle;
}

.val-amount {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}

.val-op-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}

.val-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.btn-val-ok,
.btn-val-cancel {
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.06s, background 0.12s, border-color 0.12s;
  touch-action: manipulation;
}

.btn-val-ok:active,
.btn-val-cancel:active {
  transform: scale(0.97);
}

.btn-val-ok {
  min-width: 112px;
  border: 0;
  background: #1f7a43;
  color: #ffffff;
}

.btn-val-ok:hover {
  background: #176135;
}

.btn-val-cancel {
  min-width: 104px;
  border: 2px solid #dc2626;
  background: #ffffff;
  color: #b91c1c;
}

.btn-val-cancel:hover {
  background: var(--danger-soft);
}

/* Adaptation tablette portrait et paysage (768px - 1080px) */
@media (max-width: 1080px) {
  .val-table tbody td {
    padding: 13px 10px;
  }
  .val-pdv-number {
    font-size: 17.5px;
  }
  .val-amount {
    font-size: 18px;
  }
  .btn-val-ok,
  .btn-val-cancel {
    min-height: 48px;
    padding: 10px 14px;
    font-size: 14.5px;
  }
}

@media (max-width: 720px) {
  .val-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .btn-val-ok,
  .btn-val-cancel {
    min-width: 96px;
    width: 100%;
  }
}

.tab-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 20px 22px 24px;
  margin-bottom: 20px;
}

/* ==================== Saisie Grid (Exact Reference Layout) ==================== */

.saisie-container {
  max-width: 860px;
}

.editing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--warning-soft);
  border: 1px solid #facc15;
  color: var(--warning);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.funds-alert-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

/* Écart de report à l'ouverture de session */
.report-gap-box {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.report-gap-box.hidden { display: none; }

/* Bandeau des modifications refusées par le serveur */
.rejected-banner {
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}
.rejected-banner.hidden { display: none; }
.rejected-banner ul { list-style: none; margin: 8px 0 0; padding: 0; }
.rejected-banner li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #fecaca;
}
.rejected-banner .rej-text { flex: 1 1 260px; min-width: 0; }
.rejected-banner .rej-reason { display: block; color: #7f1d1d; margin-top: 2px; }
.rejected-banner .rej-actions { display: flex; gap: 6px; }

.funds-alert-sub {
  display: block;
  font-weight: 400;
  color: #7f1d1d;
  margin-top: 2px;
}

.op-tiles-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.op-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  padding: 11px 8px;
  transition: background 0.12s, border-color 0.12s, transform 0.06s;
  overflow: hidden;
}

.op-tile:hover {
  border-color: #a8a499;
  background: #faf9f6;
}

.op-tile:active {
  transform: scale(0.99);
}

.op-tile-row1 {
  min-height: 60px;
}

.op-tile-row2 {
  min-height: 40px;
  padding: 8px 8px;
}

.op-tile[data-accent='green']::before,
.op-tile[data-accent='red']::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.op-tile[data-accent='green']::before {
  background: var(--green-bar);
}

.op-tile[data-accent='red']::before {
  background: var(--red-bar);
}

.op-tile-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.op-tile-row2 .op-tile-title {
  font-size: 13px;
  font-weight: 600;
}

.op-tile-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.15;
}

.op-tile.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.op-tile.active .op-tile-sub {
  color: #d6d3cb;
}

/* Explication discrète du bouton sélectionné */

.op-explain-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 12px;
  margin-top: 10px;
  border-radius: 7px;
  background: var(--surface-subtle);
  border: 1px solid #e6e3da;
  font-size: 12.5px;
  color: var(--text-muted);
}

.op-explain-text {
  color: var(--text);
  font-weight: 500;
}

.op-explain-impacts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.impact-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.impact-up {
  background: var(--ok-soft);
  color: var(--ok);
}

.impact-down {
  background: var(--danger-soft);
  color: var(--danger);
}

.impact-warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.impact-neutral {
  background: #eae7df;
  color: #5c5952;
}

/* Giant Dual Inputs */

.big-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.big-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.big-input {
  width: 100%;
  height: 70px;
  padding: 10px 16px;
  border: 2px solid var(--ink) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: var(--ink) !important;
  font-family: inherit;
  font-size: 32px !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.big-input::placeholder {
  color: #827f77;
  font-weight: 700;
}

.big-select {
  font-size: 18px !important;
  font-weight: 700;
  cursor: pointer;
}

.big-input-amount {
  text-align: right;
}

.big-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 20, 19, 0.14) !important;
}

.field-helper {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ok);
  min-height: 18px;
  font-weight: 600;
}

.field-helper.muted {
  color: var(--text-muted);
  font-weight: 400;
}

.field-helper.error {
  color: var(--danger);
  font-weight: 600;
}

.big-input.input-invalid {
  border-color: var(--danger) !important;
}

/* Garde-fous anti-erreurs (milliers, n° TDP, typo 1 chiffre) */

.inline-guard {
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--warning-soft);
  border: 1px solid #facc15;
  color: #854d0e;
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inline-guard.guard-danger {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.inline-guard button {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid currentColor;
  background: #ffffff;
  color: inherit;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.inline-guard button:hover {
  filter: brightness(0.95);
}

/* Quick Amount Buttons (2 rows x 6 cols) */

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.quick-amt-btn {
  height: 44px;
  border: 1px solid #e1dfd7;
  border-radius: 8px;
  background: #f5f4ef;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.quick-amt-btn:hover {
  background: #eae8e0;
  border-color: #c7c3b8;
}

.quick-amt-btn:active {
  background: var(--ink);
  color: #ffffff;
}

/* Primary Action Row (Enregistrer + Effacer) */

.saisie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-save-main {
  height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-save-main:hover {
  background: var(--primary-hover);
}

.btn-clear-main {
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-clear-main:hover {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}

/* Extra details disclosure */

details.extra-details {
  margin-top: 4px;
}

details.extra-details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  user-select: none;
  padding: 4px 0;
}

details.extra-details[open] summary {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 10px;
}

details.extra-details .extra-body {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

/* Journal Section inside Saisie tab */

.journal-divider {
  margin: 26px 0 18px;
  border: 0;
  border-top: 1px solid var(--border);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== Standard Forms & Buttons ==================== */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

input[type='text'],
input[type='password'],
input[type='number'],
input[type='date'],
input[type='time'],
input[type='search'],
select,
textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(20, 20, 19, 0.12);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.form-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { background: var(--surface-subtle); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

.session-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 13px;
}

.btn-link {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 5px;
  text-decoration: underline;
}
.btn-link:hover { background: var(--surface-subtle); }
.btn-link.danger { color: var(--danger); }
.btn-link.danger:hover { background: var(--danger-soft); }

/* ==================== Tables ==================== */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

thead th.num { text-align: right; }

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #efede7;
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #faf9f6; }

tfoot td {
  padding: 10px 12px;
  background: var(--surface-subtle);
  border-top: 2px solid var(--border);
  font-weight: 700;
}

.empty-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 12px !important;
}

.cell-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.cell-actions {
  white-space: nowrap;
  text-align: right;
}

/* ==================== Badges ==================== */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: #efede7; color: #525049; }

.pending-mark {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #eab308;
  margin-right: 5px;
  vertical-align: middle;
}

/* ==================== Clôture (Arrêté de caisse) ==================== */

.cloture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cloture-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.cloture-box h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.ecart-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.ecart-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ecart-val.ok { color: var(--ok); }
.ecart-val.diff { color: var(--danger); }

.autosave-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==================== PDV Accounts & Reconciliation ==================== */

.inline-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.inline-controls .field {
  min-width: 150px;
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  background: var(--surface-subtle);
  transition: border-color 0.15s, background 0.15s;
}

.dropzone.dragover {
  border-color: var(--ink);
  background: #efede7;
}

.dropzone input[type='file'] {
  display: none;
}

.reconcile-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.rec-stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface-subtle);
}

.rec-stat .lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.rec-stat .val { font-size: 20px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }

.tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.tab-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.tab-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

/* ==================== Dialog / Modal ==================== */

dialog.modal {
  width: min(760px, 95vw);
  max-height: 90vh;
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(20, 20, 19, 0.3);
  overflow: hidden;
}

dialog.modal-compact {
  width: min(540px, 95vw);
}

.cancel-op-summary {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.motif-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.motif-chip {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.motif-chip:hover {
  background: var(--surface-subtle);
  border-color: var(--ink);
}

.motif-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.cancel-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.btn-val-cancel-solid {
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: #b91c1c;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-val-cancel-solid:hover {
  background: #991b1b;
}

dialog.modal::backdrop {
  background: rgba(20, 20, 19, 0.55);
  backdrop-filter: blur(2px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.modal-header h2 {
  margin: 0;
  font-size: 17px;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  max-height: calc(90vh - 64px);
}

.settings-alert {
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.settings-alert.ok {
  background: var(--ok-soft);
  border: 1px solid #b7e4c7;
  color: var(--ok);
}

.settings-alert.error {
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger);
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ==================== Toast ==================== */

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error { background: var(--danger); }

/* ==================== Onglet Bilan ==================== */

.bilan-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.bilan-right-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bilan-select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}

.bilan-period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
}

.bilan-period-bar input[type='date'] {
  margin-left: 6px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
}

.bilan-table th:nth-child(2),
.bilan-table th:nth-child(3),
.bilan-table td:nth-child(2),
.bilan-table td:nth-child(3) {
  width: 22%;
  min-width: 130px;
}

.bilan-credit {
  color: var(--ok);
  font-weight: 700;
}

.bilan-debit {
  color: var(--danger);
  font-weight: 700;
}

.bilan-row-opening {
  background: #f8fafc;
}

.bilan-total-row th {
  border-top: 2px solid var(--border);
  background: var(--surface-subtle);
  font-size: 14px;
  padding: 12px;
}

.bilan-subsolde-row th {
  border-top: 1px solid var(--border);
  background: #fafafa;
  font-size: 13px;
  padding: 10px 12px;
}

.bilan-solde-row th {
  border-top: 2px solid #b7e4c7;
  background: #f5fbf7;
  font-size: 15px;
  padding: 12px;
}

.debt-overview-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  color: #991b1b;
  font-size: 13px;
}

.pdv-row-unreturned {
  background: #fff7f7;
}

.pdv-stmt-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

.pdv-stmt-kv strong {
  display: block;
  font-size: 15px;
  margin-top: 2px;
}

/* ==================== Orange Boosted Component Overrides ==================== */

.main-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  border-bottom: 0;
  margin-bottom: 0;
  background: #000000;
}

.main-tab {
  position: relative;
  padding: 18px 14px;
  border: 0;
  border-bottom: 4px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  transition: color 0.12s, border-color 0.12s;
}

.main-tab:hover {
  background: transparent;
  color: var(--primary);
}

.main-tab.active {
  background: transparent;
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-count-badge {
  border-radius: 0;
  background: var(--primary);
  color: #000000;
  font-weight: 800;
}

.journal-datetime-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
  background: var(--surface-subtle);
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.journal-datetime-bar input {
  margin-left: 4px;
  height: 34px;
  padding: 0 8px;
  border: 1.5px solid #d4d4d4;
  border-radius: 8px;
  font-family: inherit;
}

.topbar-toggle-btn {
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid #444444;
  border-radius: 6px;
  background: #141414;
  color: #cccccc;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.topbar-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.topbar-toggle-btn.collapsed {
  border-color: var(--primary);
  background: var(--primary);
  color: #000000;
}

.tab-surface {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-top: 3px solid var(--primary);
  border-radius: 10px;
  padding: 22px 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Boutons modernes style Orange */
.btn {
  border: 1.5px solid #d4d4d4;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  font-weight: 600;
  transition: background 0.14s, color 0.14s, border-color 0.14s, box-shadow 0.14s, transform 0.06s;
}

.btn:hover {
  background: #f5f5f5;
  color: #000000;
  border-color: #111111;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #000000;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(255, 121, 0, 0.24);
}

.btn-primary:hover {
  background: #e56c00;
  border-color: #e56c00;
  color: #000000;
  box-shadow: 0 4px 10px rgba(255, 121, 0, 0.32);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
  font-weight: 700;
}

.btn-danger:hover {
  background: #a82f0f;
  border-color: #a82f0f;
  color: #ffffff;
}

.btn-save-main {
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #000000;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(255, 121, 0, 0.28);
  transition: background 0.14s, box-shadow 0.14s, transform 0.06s;
}

.btn-save-main:hover {
  background: #e56c00;
  box-shadow: 0 5px 14px rgba(255, 121, 0, 0.36);
}

.btn-save-main:active {
  transform: translateY(1px);
}

.btn-clear-main {
  border: 1.5px solid #d4d4d4;
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  font-weight: 700;
}

.btn-clear-main:hover {
  background: #f5f5f5;
  color: #000000;
  border-color: #111111;
}

/* Tuiles d'opérations : cartes arrondies propres, tuile active noire + texte blanc + accent Orange */
.op-tile {
  border-radius: 10px;
  border: 1.5px solid #e2e2e2;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.14s, background 0.14s, box-shadow 0.14s, transform 0.08s;
}

.op-tile:hover {
  border-color: var(--primary);
  background: #fffaf5;
  box-shadow: 0 3px 10px rgba(255, 121, 0, 0.12);
  transform: translateY(-1px);
}

.op-tile.active {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), inset 0 -3px 0 var(--primary);
}

.op-tile.active:hover {
  border-color: #111111;
  background: #1a1a1a;
  color: #ffffff;
}

.op-tile.active .op-tile-title {
  color: #ffffff;
}

.op-tile.active .op-tile-sub {
  color: #ff9e42;
  font-weight: 600;
}

.op-explain-bar {
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  border-left: 4px solid var(--primary);
  background: #fafafa;
}

.big-input {
  border: 2px solid #222222 !important;
  border-radius: 10px !important;
}

.big-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.22) !important;
}

.quick-amt-btn {
  border-radius: 8px;
  border: 1px solid #e2e2e2;
  background: #f7f7f7;
  color: #111111;
  font-weight: 700;
}

.quick-amt-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: #000000;
}

.quick-amt-btn:active {
  background: var(--primary);
  border-color: var(--primary);
  color: #000000;
}

/* Sous-onglets, filtres & chips */
.tab-btn {
  border-radius: 8px;
  border: 1.5px solid #dcdcdc;
  background: #ffffff;
  color: #222222;
  font-weight: 600;
}

.motif-chip {
  border-radius: 999px;
  border: 1.5px solid #dcdcdc;
  background: #ffffff;
  color: #222222;
  font-weight: 600;
}

.tab-btn:hover,
.motif-chip:hover {
  border-color: var(--primary);
  background: #fffaf5;
}

.tab-btn.active,
.motif-chip.active {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

/* Cartes KPI & Tableaux */
.kpi-card {
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  border-top: 4px solid var(--primary);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.kpi-value {
  color: #000000;
  font-weight: 800;
}

.table-wrap {
  border-radius: 10px;
  border: 1px solid #e5e5e5;
}

table thead th {
  background: #f7f7f7;
  color: #111111;
  border-bottom: 2px solid #222222;
  font-weight: 700;
}

table tbody tr:hover {
  background: #fff9f3;
}

.badge {
  border-radius: 6px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  border-radius: 8px;
  border: 1.5px solid #d4d4d4;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.18);
}

/* Modales & Toast */
dialog.modal {
  border-radius: 12px;
  border: 1px solid #222222;
  border-top: 5px solid var(--primary);
}

.modal-header {
  background: #111111;
  color: #ffffff;
  border-bottom: 0;
}

.modal-header h2 {
  color: #ffffff;
}

.modal-header .btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.modal-header .btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #000000;
}

.toast {
  border-radius: 10px;
  background: #111111;
  color: #ffffff;
  border-left: 5px solid var(--primary);
}

.toast.error {
  background: var(--danger);
  border-left-color: #000000;
}

.btn-link {
  color: #000000;
  font-weight: 700;
}

.btn-link:hover {
  color: var(--primary);
}

/* ==================== Responsive ==================== */

@media (max-width: 820px) {
  .kpi-grid,
  .dash-details-grid { grid-template-columns: 1fr; }
  .op-tiles-row { grid-template-columns: repeat(2, 1fr); }
  .quick-amounts { grid-template-columns: repeat(3, 1fr); }
  .big-inputs-grid { grid-template-columns: 1fr; }
  .cloture-grid { grid-template-columns: 1fr; }
  .reconcile-summary { grid-template-columns: repeat(2, 1fr); }
  .big-input { font-size: 26px !important; height: 60px; }
}

@media (max-width: 560px) {
  .form-grid-2,
  .form-grid-3 { grid-template-columns: 1fr; }
  .saisie-actions { grid-template-columns: 1fr; }
  .tab-surface { padding: 14px; }
}

/* ==================== Print Stylesheet ==================== */

.print-only { display: none; }

@media print {
  body {
    background: #ffffff;
    font-size: 12px;
  }
  .no-print { display: none !important; }
  .print-only { display: block !important; }
  .app-shell {
    max-width: 100%;
    padding: 0;
  }
  .app-content-wrap {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .tab-surface {
    border: 0;
    padding: 0;
  }
  .tab-panel.hidden {
    display: block !important;
    margin-top: 18px;
  }
  .tab-panel[data-tab-panel='reconcile'] {
    display: none !important;
  }
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .cloture-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Impression dédiée d'une fiche session */
  body.printing-session-sheet .app-shell {
    display: none !important;
  }
  body.printing-session-sheet .session-print-sheet {
    display: block !important;
    padding: 4mm;
  }

  /* Impression dédiée du tableau des sessions */
  body.printing-sessions-table .tab-panel {
    display: none !important;
  }
  body.printing-sessions-table .tab-panel[data-tab-panel='sessions'] {
    display: block !important;
  }

  /* Impression dédiée du Bilan */
  body.printing-bilan .tab-panel {
    display: none !important;
  }
  body.printing-bilan .tab-panel[data-tab-panel='bilan'] {
    display: block !important;
  }
}
