:root {
  --bg: #0d0d0d;
  --surface: #171717;
  --text: #f0f0f0;
  --muted: #888888;
  --border: #262626;
  --accent: #ff1135;
  --danger: #e74c3c;
  --bg-grad-start: #0d0d0d;
  --bg-grad-end: #121212;
  --brand-text: #f0f0f0;
  --brand-border: #262626;
  --brand-bg: #171717;
  --menu-trigger-text: #b9b9b9;
  --menu-trigger-hover-bg: #1f1f1f;
  --menu-trigger-hover-text: #f0f0f0;
  --menu-active-text: #f0f0f0;
  --menu-active-line: #333333;
  --menu-dropdown-bg: #171717;
  --menu-dropdown-border: #262626;
  --menu-dropdown-shadow: rgba(0, 0, 0, 0.55);
  --menu-item-text: #cfcfcf;
  --menu-item-hover-bg: #1f1f1f;
  --menu-item-active-text: #f0f0f0;
  --menu-item-active-bg: #242424;
  --menu-context-text: #888888;
  --badge-bg: #1f1f1f;
  --badge-danger-bg: rgba(255, 17, 53, 0.15);
  --badge-danger-border: rgba(255, 17, 53, 0.25);
  --badge-danger-text: #ff9aa9;
  --badge-warning-bg: rgba(255, 17, 53, 0.08);
  --badge-warning-border: rgba(255, 17, 53, 0.18);
  --badge-warning-text: #ffb8c2;
  --badge-neutral-bg: #1f1f1f;
  --badge-neutral-border: #262626;
  --badge-neutral-text: #a8a8a8;
  --table-head-bg: #1f1f1f;
  --secondary-btn-bg: #1f1f1f;
  --kpi-danger: #ff8a9a;
  --success: #2ecc71;
  --panel-bg: #171717;
  --forecast-bg: #1b1b1b;
  --forecast-text: #b7b7b7;
  --summary-forecast-bg: #1c1c1c;
  --summary-total-bg: #1f1f1f;
  --summary-total-border: #262626;
  --pill-bg: #1f1f1f;
  --amount-credit: #2ecc71;
  --amount-debit: #ff8a9a;
  --amount-net: #8ab4ff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "IBM Plex Sans", "Segoe UI", sans-serif; background:
  linear-gradient(180deg, rgba(255,255,255,0.012), rgba(255,255,255,0) 20%),
  linear-gradient(130deg, var(--bg-grad-start), var(--bg-grad-end));
  color: var(--text); }
header {
  padding: 0 18px;
  min-height: 50px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5000;
  isolation: isolate;
}
.menu-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--brand-text);
  white-space: nowrap;
}
.brand-logo {
  width: auto;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 0 0 auto;
}
.brand-logo img {
  width: auto;
  height: 28px;
  object-fit: contain;
  display: block;
}
.brand-logo .logo-dark { display: none; }
[data-theme="dark"] .brand-logo .logo-light { display: none; }
[data-theme="dark"] .brand-logo .logo-dark { display: block; }
.menu-root {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.menu-group {
  position: relative;
  padding-bottom: 6px;
  margin-bottom: -6px;
  z-index: 2;
}
.menu-group::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 6px;
}
.menu-trigger {
  border: 0;
  background: transparent;
  color: var(--menu-trigger-text);
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 10px;
}
.menu-trigger:hover,
.menu-trigger:focus-visible {
  background: var(--menu-trigger-hover-bg);
  color: var(--menu-trigger-hover-text);
  outline: none;
}
.menu-group.active .menu-trigger {
  color: var(--menu-active-text);
  background: var(--menu-trigger-hover-bg);
  box-shadow: inset 0 -1px 0 var(--menu-active-line);
}
.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--menu-dropdown-bg);
  border: 1px solid var(--menu-dropdown-border);
  border-radius: 8px;
  box-shadow: 0 8px 20px var(--menu-dropdown-shadow);
  padding: 4px;
  z-index: 6000;
}
.menu-group:hover .menu-dropdown,
.menu-group.open .menu-dropdown,
.menu-group:focus-within .menu-dropdown {
  display: block;
}
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--menu-item-text);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12.5px;
}
.menu-dropdown .menu-item,
.menu-dropdown .menu-item:visited {
  color: var(--menu-item-text);
}
.menu-item:visited {
  color: var(--menu-item-text);
}
.menu-item:hover {
  background: var(--menu-item-hover-bg);
  color: var(--menu-item-active-text);
}
.menu-item.active {
  color: var(--menu-item-active-text);
  background: var(--menu-item-active-bg);
  box-shadow: inset 0 0 0 1px var(--menu-dropdown-border);
  font-weight: 600;
}
.menu-context {
  font-size: 11.5px;
  color: var(--menu-context-text);
  white-space: nowrap;
}
.menu-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}
.menu-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 0;
}
.studio-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.studio-switcher-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--menu-context-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.studio-switcher-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--menu-context-text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.studio-switcher-link:hover {
  color: var(--text);
  background: rgba(255, 17, 53, 0.08);
  border-color: rgba(255, 17, 53, 0.22);
}
.menu-session {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--menu-context-text);
  font-size: 11.5px;
}
.topbar-logout-form {
  display: inline-flex;
  margin: 0;
}
.topbar-logout-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 17, 53, 0.24);
  background: rgba(255, 17, 53, 0.12);
  color: #ff8fa0;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.topbar-logout-button:hover {
  background: rgba(255, 17, 53, 0.2);
  border-color: rgba(255, 17, 53, 0.4);
  color: #ffd0d8;
}
.nav-badge {
  display: inline-block;
  min-width: 18px;
  text-align: center;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.4;
  border: 1px solid var(--border);
  background: var(--badge-bg);
}
.nav-badge-danger { background: var(--badge-danger-bg); border-color: var(--badge-danger-border); color: var(--badge-danger-text); }
.nav-badge-warning { background: var(--badge-warning-bg); border-color: var(--badge-warning-border); color: var(--badge-warning-text); }
.nav-badge-neutral { background: var(--badge-neutral-bg); border-color: var(--badge-neutral-border); color: var(--badge-neutral-text); }
@media (max-width: 980px) {
  .menu-bar {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .menu-root {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .menu-right {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .menu-meta {
    align-items: flex-start;
  }
}
main {
  padding: 14px 20px 32px;
  position: relative;
  z-index: 1;
}
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); }
th, td { border-bottom: 1px solid var(--border); padding: 6px 8px; text-align: left; font-size: 13px; }
th { background: var(--table-head-bg); }
table td { vertical-align: middle; }
input, select, button, textarea { border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; background: var(--surface); color: var(--text); }
button { background: var(--accent); color: white; border: none; cursor: pointer; }
a, a:visited { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
[data-theme="dark"] a, [data-theme="dark"] a:visited { color: #60a5fa; }
.menu-context a, .menu-context a:visited {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--menu-context-text);
  text-decoration: none;
}
.menu-context a:hover {
  background: var(--menu-item-hover-bg);
  color: var(--text);
  text-decoration: none;
}
button.secondary { background: var(--secondary-btn-bg); }
button.danger { background: var(--danger); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.kpi { font-size: 22px; font-weight: 700; }
.kpi.remain { color: var(--kpi-danger); }
.small.paid { color: var(--success); }
.kpi-period {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
  color: var(--muted);
  margin-left: 6px;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }
.no-margin { margin: 0; }
.text-danger { color: var(--danger); }
.grid-span-2 { grid-column: span 2; }
.login-main {
  max-width: 400px;
  margin: 32px auto;
  padding: 0 16px;
}
.login-main .card {
  padding: 14px;
  border-radius: 8px;
  border-color: var(--border);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.login-brand .brand-logo {
  height: 22px;
}
.login-brand-copy {
  display: grid;
  gap: 1px;
}
.login-brand-copy strong {
  font-size: 13px;
  letter-spacing: -0.3px;
}
.login-brand-copy span {
  font-size: 11px;
  color: var(--muted);
}
.login-title {
  margin-top: 0;
  margin-bottom: 2px;
  font-size: 1rem;
}
.login-form-grid {
  display: grid;
  gap: 5px;
}
.home-period-card {
  padding-top: 10px;
  padding-bottom: 10px;
}
.home-period-card h2 {
  margin: 0 0 8px;
}
.home-period-row {
  gap: 6px;
  flex-wrap: nowrap;
}
.home-period-row select,
.home-period-row button {
  height: 32px;
}
.home-period-hint {
  margin-left: auto;
  white-space: nowrap;
}
@media (max-width: 980px) {
  .home-period-row {
    flex-wrap: wrap;
  }
  .home-period-hint {
    margin-left: 0;
    width: 100%;
  }
}
.action-groups { display: grid; grid-template-columns: 1fr; gap: 10px; }
.action-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px;
  background: var(--panel-bg);
}
.selection-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.dual-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.totals-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel-bg);
}
.totals-panel h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
}
.forecast-panel {
  background: var(--forecast-bg);
  color: var(--forecast-text);
  font-style: italic;
}
.summary-wrap {
  overflow-x: auto;
}
.summary-table {
  min-width: 760px;
}
.summary-table th {
  text-align: right;
}
.summary-table th:first-child {
  text-align: left;
}
.summary-table td {
  vertical-align: middle;
  color: var(--muted);
}
.summary-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.summary-table .amount {
  font-weight: 500;
}
.summary-table .amount-net {
  font-weight: 600;
}
.summary-table .amount-urssaf {
  color: var(--danger);
}
.summary-forecast td {
  opacity: 0.82;
  background: var(--summary-forecast-bg);
}
.summary-total td {
  background: var(--summary-total-bg);
  color: var(--muted);
  border-top: 1px solid var(--summary-total-border);
}
.summary-estimated-badge {
  margin-left: 4px;
  font-style: normal;
}
.metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.small { font-size: 12px; color: var(--muted); }
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  background: var(--pill-bg);
}
.amount {
  display: inline-block;
  min-width: 8ch;
  text-align: right;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.amount.credit { color: var(--amount-credit); }
.amount.debit { color: var(--amount-debit); }
.amount-urssaf {
  color: var(--amount-debit);
  font-weight: 600;
}
.amount-net {
  color: var(--amount-net);
  font-weight: 600;
}
.tx-table {
  width: 100%;
  table-layout: fixed;
}
.tx-table th,
.tx-table td {
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tx-table .c-check { width: 36px; }
.tx-table .c-id { width: 70px; }
.tx-table .c-date { width: 110px; }
.tx-table .c-label { width: 240px; }
.tx-table .c-amount { width: 110px; }
.tx-table .c-side { width: 70px; }
.tx-table .c-proposal { width: 260px; }
.tx-table .c-category { width: 170px; }
.tx-table .c-link { width: 170px; }
.tx-table .c-explain { width: 160px; }
.tx-table .c-valid { width: 90px; }
.cell-select {
  display: flex;
  align-items: center;
}
.cell-select select {
  height: 32px;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 32px;
  box-sizing: border-box;
  max-width: 100%;
}
.status-open { color: var(--danger); font-weight: 700; }
.status-acknowledged, .status-validated { color: var(--accent); font-weight: 700; }
.status-paid { color: var(--success, #4caf50); font-weight: 700; }
.delay-badge {
  display: inline-block;
  min-width: 56px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.delay-neutral {
  background: #e7f6ee;
  color: #1f7a4d;
}
.delay-yellow {
  background: #fff3cd;
  color: #8a6d00;
}
.delay-orange {
  background: #ffe3cc;
  color: #a85200;
}
.delay-red {
  background: #ffe0e0;
  color: #b42318;
}
[data-theme="dark"] .delay-red {
  background: #2b1717;
  color: #c96a6a;
}
.delay-unknown {
  background: #f1f3f5;
  color: #6c757d;
}
.invoice-row-acquitted td {
  color: #1f7a4d;
}
.invoice-row-acquitted .amount-urssaf,
.invoice-row-acquitted .amount-net {
  color: inherit;
}
.invoice-paid-badge {
  color: #1f7a4d;
  border-color: #9fd5b6;
  background: #eef9f2;
}
.invoice-status-unpaid {
  color: #b42318;
  font-weight: 700;
}
[data-theme="dark"] .invoice-status-unpaid {
  color: #c96a6a;
}
.invoice-row-acquitted .invoice-status-cell,
.invoice-row-acquitted .invoice-payment-cell {
  font-weight: 700;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.section-head h3 {
  margin: 0;
}
.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7faf8;
}
[data-theme="dark"] .view-toggle {
  background: #1f252f;
  border-color: #344052;
}
.view-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
}
.urssaf-annual-table .month-row td {
  border-bottom: 1px solid #e7ece9;
}
.urssaf-annual-table .quarter-divider td {
  padding: 0;
  height: 6px;
  border-bottom: 0;
  background: #cdd6d1;
}
[data-theme="dark"] .urssaf-annual-table .quarter-divider td {
  background: #2a3442;
}
.urssaf-annual-table .quarter-total td {
  font-weight: 600;
  background: #f4f7f5;
  border-top: 1px solid #dce5df;
}
[data-theme="dark"] .urssaf-annual-table .quarter-total td {
  background: #202833;
  border-top: 1px solid #314050;
}
.suivi-layout {
  display: grid;
  grid-template-columns: minmax(260px, 30%) minmax(0, 70%);
  gap: 14px;
  align-items: start;
}
.suivi-clients h3,
.suivi-detail h3,
.suivi-detail h4 {
  margin-top: 0;
}
.suivi-detail {
  padding-top: 12px;
}
.suivi-new-client-form {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.suivi-client-entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.suivi-client-entry label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.suivi-client-entry .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}
.suivi-client-entry input,
.suivi-client-entry select,
.suivi-client-entry button {
  height: 34px;
}
.suivi-client-entry button {
  padding: 0 14px;
  white-space: nowrap;
}
.suivi-client-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.suivi-client-row {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px;
  background: var(--surface);
}
.suivi-client-row:hover {
  background: var(--menu-item-hover-bg);
}
.suivi-client-row.active {
  background: var(--menu-item-active-bg);
  box-shadow: inset 2px 0 0 var(--menu-active-line);
}
.suivi-client-main,
.suivi-client-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.suivi-client-meta {
  margin-top: 4px;
}
.suivi-main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.suivi-main-headline p {
  margin: 4px 0 0;
}
.suivi-main-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.suivi-primary-btn {
  background: var(--accent);
}
.suivi-primary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.suivi-actions-menu {
  position: relative;
}
.suivi-actions-menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  line-height: 1;
  color: var(--muted);
}
.suivi-actions-menu summary::-webkit-details-marker {
  display: none;
}
.suivi-actions-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 8px 20px var(--menu-dropdown-shadow);
  z-index: 20;
  display: grid;
  gap: 6px;
}
.suivi-section + .suivi-section,
.suivi-history {
  margin-top: 16px;
}
.suivi-quick-add {
  display: grid;
  gap: 6px;
}
.suivi-quick-head,
.suivi-quick-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 90px 140px 140px auto 130px;
  gap: 8px;
  align-items: center;
}
.suivi-quick-head {
  margin-top: 10px;
}
.suivi-quick-head > .small {
  font-size: 10.5px;
  color: var(--muted);
}
.suivi-item-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.suivi-item-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.suivi-item-form {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 90px 140px 140px auto 130px;
  align-items: center;
  gap: 8px;
}
.suivi-quote-items {
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel-bg);
}
.suivi-quote-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 80px 120px 120px;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.suivi-quote-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.suivi-quote-item + .suivi-quote-item {
  border-top: 1px solid var(--border);
}
.suivi-history summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}
.suivi-history-content {
  margin-top: 8px;
}
.suivi-modal {
  width: min(860px, 92vw);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
}
.suivi-modal::backdrop {
  background: rgba(0, 0, 0, 0.3);
}
.suivi-modal-form {
  padding: 12px;
}
.tva-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.tva-hero-head h2 {
  margin: 0;
}
.tva-hero-year input {
  width: 110px;
}
.tva-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 8px 18px;
}
.tva-kpi {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.tva-kpi .small {
  color: var(--muted);
}
.tva-kpi-wide {
  grid-column: 1 / -1;
}
.tva-hero-links {
  margin-top: 10px;
  justify-content: space-between;
}
.tva-hero-links form {
  margin-left: auto;
}
@media (max-width: 700px) {
  th, td { font-size: 12px; }
  main { padding: 12px; }
  header { padding: 10px 12px 8px; }
  header h1 { font-size: 22px; }
  .header-top { align-items: flex-start; flex-direction: column; }
  .header-context { gap: 8px; }
  .section-head {
    align-items: flex-start;
  }
  .view-toggle {
    width: 100%;
    justify-content: space-between;
  }
  .dual-totals {
    grid-template-columns: 1fr;
  }
  .summary-table {
    min-width: 640px;
  }
  .suivi-layout {
    grid-template-columns: 1fr;
  }
  .suivi-main-header {
    flex-direction: column;
    align-items: stretch;
  }
  .suivi-main-actions {
    width: 100%;
    justify-content: space-between;
  }
  .suivi-quick-add,
  .suivi-quick-head,
  .suivi-quick-body,
  .suivi-item-form {
    grid-template-columns: 1fr;
  }
  .suivi-quick-head > .small {
    display: none;
  }
  .suivi-item-row {
    flex-direction: column;
    align-items: stretch;
  }
  .suivi-client-entry-grid {
    grid-template-columns: 1fr;
  }
  .suivi-quote-item {
    grid-template-columns: auto 1fr 1fr;
  }
  .suivi-quote-head {
    display: none;
  }
  .tva-hero-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .tva-kpi-grid {
    grid-template-columns: 1fr;
  }
  .tva-kpi-wide {
    grid-column: auto;
  }
  .tva-hero-links {
    gap: 8px;
    justify-content: flex-start;
  }
  .tva-hero-links form {
    margin-left: 0;
  }
}
