/* Patient Follow-up — styles. Outil interne : lisibilité avant tout. */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #1c2733;
  --muted: #66717d;
  --line: #dde3e9;
  --brand: #0f6e5d;
  --brand-ink: #ffffff;
  --green-bg: #e5f6ec; --green-line: #b7e4c7; --green-ink: #14683a;
  --amber-bg: #fdf3df; --amber-line: #f3ddae; --amber-ink: #8a5a00;
  --red-bg: #fdeaea;   --red-line: #f3bcbc;   --red-ink: #a11a1a;
  --grey-bg: #eef1f3;  --grey-line: #d3dade;  --grey-ink: #57646f;
  --blue-bg: #e6f0fb;  --blue-line: #b6d4f5;  --blue-ink: #1857a4;
  --purple-bg: #f1ebfa; --purple-line: #d9c6f0; --purple-ink: #6b3fa0;
  --brown-bg: #f4ece5;  --brown-line: #e0c8b6;  --brown-ink: #7b3f1d;
  --slate-bg: #e7ecef;  --slate-line: #c2cdd6;  --slate-ink: #3d4d5c;
  --rose-bg: #fde8ef;   --rose-line: #f3c2d2;   --rose-ink: #a13b6b;
  --future-ink: #4a5762;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.45 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg); color: var(--ink);
}
a { color: var(--brand); text-decoration: none; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- barre du haut ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 10px 18px; position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 700; font-size: 17px; color: var(--ink); white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip {
  background: var(--bg); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px; font-size: 13px;
}
.sync-indicator {
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  white-space: nowrap; min-width: 0; flex-shrink: 1;
}
/* Le libellé de synchro reste sur une seule ligne : sur écran étroit il
   s'efface en pointillés plutôt que de faire passer le bouton « Vérifier »
   à la ligne — la pastille et le bouton restent toujours visibles. */
#sync-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sync-indicator > .btn { flex: 0 0 auto; }

/* Topbar du tableau : une seule ligne horizontale — synchro + actions à la
   suite, dans l'ordre, AUCUN retour à la ligne. Les autres pages gardent le
   .topbar simple (brand + topbar-right). */
.topbar--inline { flex-wrap: nowrap; gap: 10px; padding: 8px 18px; }
.topbar--inline > * { flex: 0 0 auto; }
/* Seul le libellé de synchro peut se tasser (pointillés) si la ligne dépasse
   l'écran : les boutons restent entiers et identifiables. */
.topbar--inline > .sync-indicator { flex: 0 1 auto; }

/* Sélecteur de médecin : <select> habillé en chip. Le caret ▾ est volontairement
   proéminent et passe à la couleur marque au survol pour indiquer clairement
   qu'on peut cliquer pour choisir un autre médecin. */
.doctor-chip {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
  background-color: var(--card); border: 1px solid var(--line);
  padding: 4px 30px 4px 12px; border-radius: 999px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5 L9 4.5 L6 8 Z' fill='%2366717d'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color .12s, color .12s, background-color .12s;
}
.doctor-chip:hover {
  border-color: var(--brand); color: var(--brand); background-color: rgba(15,110,93,.08);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5 L9 4.5 L6 8 Z' fill='%230f6e5d'/></svg>");
}
.doctor-chip:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,110,93,.15); }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: #b8c2cc; }
.sync-indicator[data-state="ok"] .sync-dot { background: #2ea36b; }
.sync-indicator[data-state="error"] .sync-dot { background: #d64545; }
.sync-indicator[data-state="running"] .sync-dot,
.sync-indicator[data-state="never"] .sync-dot {
  background: #e2b93b; animation: pulse 1.2s infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- boutons ---------- */
.btn {
  font: inherit; cursor: pointer; border-radius: 7px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 7px 14px;
}
.btn:hover { border-color: #b9c2cb; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-tiny { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.btn-small { padding: 4px 9px; font-size: 12.5px; border-radius: 6px; white-space: nowrap; }
.btn-ok { border-color: var(--green-line); background: var(--green-bg); color: var(--green-ink); }
.btn-warn { border-color: var(--red-line); background: var(--red-bg); color: var(--red-ink); }
.btn[disabled] { opacity: .5; cursor: wait; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 34px 36px; width: 360px; max-width: 100%;
  box-shadow: 0 12px 40px rgba(28, 39, 51, .08);
}
.login-logo { font-size: 34px; text-align: center; }
.login-card h1 { margin: 6px 0 2px; font-size: 21px; text-align: center; }
.login-sub { margin: 0 0 18px; text-align: center; color: var(--muted); font-size: 13.5px; }
.login-card label { display: block; font-size: 13.5px; color: var(--muted); margin: 12px 0 4px; }
.login-card input {
  width: 100%; font: inherit; padding: 9px 11px; margin-top: 3px;
  border: 1px solid var(--line); border-radius: 8px;
}
.login-card button { margin-top: 18px; }
.login-foot { margin: 16px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.form-error {
  background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red-ink);
  border-radius: 8px; padding: 9px 12px; font-size: 13.5px; margin-bottom: 10px;
}

/* ---------- pages étroites (profil) ---------- */
.narrow { max-width: 480px; margin: 34px auto; padding: 0 18px; }
.stack label { display: block; margin: 14px 0 4px; color: var(--muted); font-size: 14px; }
.stack input {
  width: 100%; font: inherit; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px;
}
.stack div { margin-top: 18px; display: flex; gap: 10px; }

/* ---------- bandeau d'alerte ---------- */
.alert-banner {
  background: var(--red-bg); border-bottom: 2px solid var(--red-line);
  color: var(--red-ink); padding: 12px 20px;
}
.alert-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert-head .btn { margin-left: auto; }
.alert-icon { font-size: 17px; animation: ring 2.4s infinite; display: inline-block; }
@keyframes ring { 0%, 86%, 100% { transform: rotate(0); }
  88% { transform: rotate(12deg); } 92% { transform: rotate(-12deg); }
  96% { transform: rotate(8deg); } }
.alert-banner ul { margin: 8px 0 0; padding-left: 26px; }

/* ---------- bandeau "suivi non rempli" (toujours visible, médecin) ---------- */
.missing-review-bar {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 10px 20px; color: var(--ink);
}
.missing-review-bar.has-items {
  background: var(--red-bg); border-bottom-color: var(--red-line); color: var(--red-ink);
}
.missing-review-bar ul { margin: 8px 0 0; padding-left: 26px; }
.missing-review-controls {
  margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 13px;
}
.missing-review-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.missing-review-controls select {
  font: inherit; font-size: 13px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line);
}
.alert-banner li { margin: 3px 0; font-size: 14px; }

/* ---------- barre d'outils ---------- */
main { padding: 18px; max-width: 1500px; margin: 0 auto; }
.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 14px;
}
.tab .count {
  background: var(--bg); border-radius: 999px; padding: 1px 8px;
  font-size: 12px; color: var(--muted); margin-left: 3px;
}
.tab.active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); font-weight: 600; }
.tab-rdv_pris.active { border-color: var(--blue-ink); box-shadow: inset 0 0 0 1px var(--blue-ink); }
.tab-a_rappeler.active { border-color: var(--red-ink); box-shadow: inset 0 0 0 1px var(--red-ink); }
.tab-a_programmer.active { border-color: var(--amber-ink); box-shadow: inset 0 0 0 1px var(--amber-ink); }
.tab-no_review.active { border-color: var(--grey-ink); box-shadow: inset 0 0 0 1px var(--grey-ink); }
.tab-non_confirme.active { border-color: var(--brown-ink); box-shadow: inset 0 0 0 1px var(--brown-ink); }
.tab-sita.active { border-color: var(--slate-ink); box-shadow: inset 0 0 0 1px var(--slate-ink); }
.tab-prp.active { border-color: var(--rose-ink); box-shadow: inset 0 0 0 1px var(--rose-ink); }
.toolbar-right { margin-left: auto; display: flex; gap: 8px; }
.toolbar-right input[type="search"] {
  font: inherit; padding: 7px 11px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); min-width: 210px;
}

/* ---------- navigation jour par jour ---------- */
.day-nav {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 4px 0 16px;
}
.btn-arrow {
  font-size: 16px; line-height: 1; padding: 8px 14px; border-radius: 999px;
}
.day-label {
  display: flex; align-items: center; gap: 10px; font-size: 16px; min-width: 260px;
  justify-content: center;
}
.day-label .muted { font-size: 13px; }

/* ---------- tableau ---------- */
.table-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow-x: auto;
}
table.board { width: 100%; border-collapse: collapse; min-width: 1080px; }
.board th {
  text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 11px 12px; border-bottom: 2px solid var(--line);
  background: var(--card); position: sticky; top: 0;
}
.board td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.board tr:last-child td { border-bottom: none; }
.board td .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cell-date .d { font-weight: 600; white-space: nowrap; }
.cell-patient b { font-size: 15px; }
.cell-patient .note { display: block; font-size: 12.5px; color: var(--future-ink); font-style: italic; }
.cell-type { font-size: 13.5px; color: var(--future-ink); max-width: 180px; }
.empty { text-align: center; color: var(--muted); padding: 40px !important; }

/* lignes colorées selon le statut */
tr.row-rdv_pris td { background: var(--blue-bg); }   /* déclaré par la secrétaire, pas encore confirmé */
tr.row-a_rappeler td { background: var(--red-bg); }
tr.row-a_programmer td { background: var(--amber-bg); }
tr.row-no_review td { background: var(--grey-bg); }
tr.row-will_call_back td { background: var(--purple-bg); }
tr.row-non_confirme td { background: var(--brown-bg); }
tr.row-sita td { background: var(--slate-bg); }
tr.row-prp td { background: var(--rose-bg); }
/* "RDV pris" confirmé sur TuoTempo : vert, prime sur le bleu "déclaré"
   ci-dessus (même spécificité, l'ordre dans la feuille tranche). */
tr.row-rdv-confirmed td { background: var(--green-bg); }
/* "RDV pris" déclaré mais pas confirmé passé le délai d'alerte : rouge,
   prime sur le bleu (mutuellement exclusifs de toute façon — une ligne
   confirmée n'est jamais "stale"), ordre dans la feuille tranche. */
tr.row-rdv-stale td { background: var(--red-bg); }
tr.row-future .cell-date .d { color: var(--future-ink); }

/* pastilles & badges */
.chip {
  display: inline-block; font-size: 11.5px; border-radius: 999px;
  padding: 1px 8px; border: 1px solid var(--line); background: var(--bg);
  margin-top: 3px; white-space: nowrap;
}
.chip-future { color: var(--future-ink); }
.chip-cancelled { color: var(--red-ink); border-color: var(--red-line); background: #fff; }
.chip-inst[data-inst="Wellkin"] { background: #e7f0fb; border-color: #c4d9f2; color: #1c4f8a; }
.chip-inst[data-inst="Royal Green"] { background: #e8f6ee; border-color: #c0e5cf; color: #17693c; }
.chip-inst[data-inst="Grand Baie"] { background: #f3ecfa; border-color: #ddc9f0; color: #5f2f8f; }
.badge {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  border-radius: 7px; padding: 3px 9px; white-space: nowrap;
}
.badge-none { color: var(--muted); background: var(--bg); border: 1px dashed var(--line); font-weight: 400; }
.badge-amber { background: #fff; border: 1px solid var(--amber-line); color: var(--amber-ink); }
.badge-green { background: #fff; border: 1px solid var(--green-line); color: var(--green-ink); }
.badge-red { background: #fff; border: 1px solid var(--red-line); color: var(--red-ink); }
.badge-grey { background: var(--grey-bg); border: 1px solid var(--grey-line); color: var(--grey-ink); }
.badge-blue { background: var(--blue-bg); border: 1px solid var(--blue-line); color: var(--blue-ink); }
.badge-purple { background: #fff; border: 1px solid var(--purple-line); color: var(--purple-ink); }
.badge-brown { background: #fff; border: 1px solid var(--brown-line); color: var(--brown-ink); }
.badge-slate { background: #fff; border: 1px solid var(--slate-line); color: var(--slate-ink); }
.badge-rose { background: #fff; border: 1px solid var(--rose-line); color: var(--rose-ink); }
.tab-alert-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 3px;
  border-radius: 999px; background: var(--red-ink); color: #fff;
  font-size: 11px; font-weight: 700;
}
.cell-status em { font-style: normal; font-size: 11px; background: var(--green-line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.badge-icon {
  display: inline-block; font-size: 11.5px; margin-left: 4px; padding: 2px 7px;
  border-radius: 999px; background: var(--grey-bg); border: 1px solid var(--grey-line);
  color: var(--grey-ink); cursor: help;
}
.stale-warning {
  font-size: 12px; font-weight: 700; color: var(--red-ink);
  margin-bottom: 3px;
}

/* note de suivi (texte libre) */
.review-input {
  font: inherit; font-size: 13.5px; padding: 5px 7px; width: 150px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  transition: width .15s ease;
}
.review-input:focus { width: 230px; }
.review-input::placeholder { color: #b7c0c9; font-size: 12.5px; }
.review-input.saving { outline: 2px solid var(--amber-line); }
.review-input.saved { outline: 2px solid var(--green-line); }
.review-input.error { outline: 2px solid var(--red-line); }

/* tentatives */
.cell-attempts details { font-size: 13px; }
.cell-attempts summary { cursor: pointer; color: var(--brand); }
.attempt-list { margin: 6px 0 0; padding-left: 4px; list-style: none; }
.attempt-list li { margin: 3px 0; font-size: 12.5px; white-space: nowrap; }
.at-joignable { color: var(--green-ink); }
.at-injoignable { color: var(--red-ink); }
.callback-msg { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; max-width: 220px; }
.callback-msg-text {
  font: inherit; font-size: 11.5px; padding: 6px 7px; resize: vertical;
  border: 1px solid var(--red-line); border-radius: 6px; background: var(--red-bg);
  color: var(--ink);
}
.btn-copy-msg { align-self: flex-start; }
.btn-sita {
  align-self: flex-start; font-weight: 600; letter-spacing: .03em;
  border-color: var(--slate-line); background: var(--slate-bg); color: var(--slate-ink);
}

.cell-actions .action-group { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }

/* ---------- légende ---------- */
.legend {
  display: flex; gap: 22px; flex-wrap: wrap; align-items: center;
  font-size: 13px; color: var(--muted); padding: 14px 4px;
}
.swatch {
  display: inline-block; width: 14px; height: 14px; border-radius: 4px;
  vertical-align: -2px; margin-right: 5px; border: 1px solid rgba(0,0,0,.08);
}
.sw-green { background: var(--green-bg); }
.sw-amber { background: var(--amber-bg); }
.sw-red { background: var(--red-bg); }
.sw-grey { background: var(--grey-bg); }
.sw-blue { background: var(--blue-bg); }
.sw-purple { background: var(--purple-bg); }
.sw-brown { background: var(--brown-bg); }
.sw-slate { background: var(--slate-bg); }
.sw-rose { background: var(--rose-bg); }

/* ---------- modales génériques (calculatrice, messagerie) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20, 30, 38, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-box {
  background: var(--card); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  width: 100%; max-width: 560px; max-height: 85vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}

/* ---------- calculatrice de facturation (colonne FEES) ---------- */
.cell-fees { text-align: center; }
.fee-summary { font-size: 12px; margin-top: 4px; white-space: nowrap; }
.calc-groups { padding: 14px 18px; overflow-y: auto; }
.calc-group { margin-bottom: 14px; }
.calc-group-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin-bottom: 6px;
}
.calc-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.calc-code-btn { min-width: 46px; }
.calc-result { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg); }
.calc-selected { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.calc-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  background: var(--blue-bg); border: 1px solid var(--blue-line); color: var(--blue-ink);
  border-radius: 999px; font-size: 12.5px; cursor: pointer;
}
.calc-chip:hover { background: var(--red-bg); border-color: var(--red-line); color: var(--red-ink); }
.calc-total { margin-top: 8px; font-size: 15px; }
.calc-actions {
  display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line);
  justify-content: flex-end;
}

/* ---------- messagerie interne ---------- */
.chat-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 1001;
  width: 56px; height: 56px; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff; box-shadow: 0 6px 22px rgba(15, 110, 93, .35);
  font-size: 24px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 9px 26px rgba(15, 110, 93, .42); }
.chat-fab .chat-badge { position: absolute; top: -5px; right: -5px; margin: 0; }
.chat-fab.has-unread { animation: chat-pulse 1.4s ease-in-out infinite; }
@keyframes chat-pulse {
  50% { box-shadow: 0 0 0 8px rgba(161, 26, 26, .18), 0 6px 22px rgba(15, 110, 93, .35); }
}
.chat-overlay { background: transparent; align-items: flex-end; justify-content: flex-end; padding: 0 24px 92px 0; pointer-events: none; }
.chat-overlay .modal-box { width: min(420px, calc(100vw - 32px)); pointer-events: auto; }
.chat-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px; margin-left: 5px;
  background: var(--red-ink); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; vertical-align: 2px;
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 240px; max-height: 50vh;
}
.chat-msg { max-width: 80%; align-self: flex-start; }
.chat-msg-mine { align-self: flex-end; }
.chat-msg-meta { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.chat-msg-mine .chat-msg-meta { text-align: right; }
.chat-msg-body {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 11px; font-size: 13.5px; white-space: pre-wrap; word-break: break-word;
}
.chat-msg-mine .chat-msg-body { background: var(--blue-bg); border-color: var(--blue-line); }
.chat-send-form { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.chat-send-form input {
  flex: 1; font: inherit; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px;
}

/* ---------- grille tarifaire (page /fees) ---------- */
.fee-category { margin-bottom: 26px; }
.fee-category h3 { margin-bottom: 8px; }
.fee-table { width: 100%; border-collapse: collapse; }
.fee-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 8px 12px; border-bottom: 2px solid var(--line);
}
.fee-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.fee-table code {
  background: var(--bg); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; font-size: 12.5px;
}
.fee-actions { display: flex; gap: 6px; white-space: nowrap; }
.fee-edit-row td { background: var(--bg); padding: 12px; }
.fee-inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fee-inline-form input[type="text"], .fee-inline-form input[type="number"] {
  font: inherit; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px;
}
.fee-inline-form input[name="label"] { min-width: 220px; flex: 1; }
.fee-inline-form input[name="code"] { width: 100px; }
.fee-inline-form input[name="price"] { width: 100px; }

/* ---------- modal d'export FEES ---------- */
.export-box { max-width: 480px; }
.export-body { padding: 16px 18px; overflow-y: auto; }
.export-section { margin-bottom: 18px; }
.export-section:last-child { margin-bottom: 0; }
.export-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin-bottom: 8px;
}
.export-quick, .export-inst-quick { display: flex; gap: 8px; margin-bottom: 10px; }
.export-dates { display: flex; gap: 14px; flex-wrap: wrap; }
.export-dates label { font-size: 13.5px; color: var(--muted); }
.export-dates input[type="date"] {
  font: inherit; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 7px; margin-left: 4px;
}
.export-inst-list { display: flex; flex-direction: column; gap: 6px; }
.export-inst { font-size: 14px; display: flex; align-items: center; gap: 7px; }
.export-inst-hint { font-size: 12px; margin-top: 6px; }
.export-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 18px; border-top: 1px solid var(--line);
}

/* ---------- documents de consentement (page /consentement) ---------- */
.consent-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.consent-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  background: var(--card);
}
.consent-card h3 { margin-bottom: 10px; font-size: 15px; }
.consent-file { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; font-size: 13.5px; }
.consent-actions { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.consent-upload-form {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding-top: 10px; border-top: 1px solid var(--line);
}
.consent-upload-form input[type="file"] { font: inherit; max-width: 100%; }

.consent-preview-box { max-width: min(820px, calc(100vw - 32px)); width: 100%; height: 85vh; }
.consent-preview-box .modal-head > div { display: flex; gap: 8px; align-items: center; }
.consent-preview-frame { flex: 1; border: 0; width: 100%; background: var(--bg); }

/* ---------- notes d'appel (page /notes-appel) ---------- */
.call-table { width: 100%; border-collapse: collapse; }
.call-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line);
  background: var(--card); position: sticky; top: 0;
}
.call-table td { padding: 3px 6px; border-bottom: 1px solid var(--line); }
.call-table th:nth-child(1), .call-table td:nth-child(1) { width: 130px; }
.call-table th:nth-child(2), .call-table td:nth-child(2) { width: 170px; }
.call-input {
  font: inherit; font-size: 13.5px; padding: 6px 7px; width: 100%;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
  box-sizing: border-box;
}
.call-input:hover, .call-input:focus { border-color: var(--line); background: #fff; }
.call-input.saving { outline: 2px solid var(--amber-line); }
.call-input.saved { outline: 2px solid var(--green-line); }
.call-input.error { outline: 2px solid var(--red-line); }

/* ---------- choix de profil / PIN secrétariat ---------- */
.profile-grid { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.profile-btn { padding: 14px; font-size: 16px; }
.profile-logout { margin-top: 6px; }
