:root {
  /* ── SURFACES ─────────────────────────────────────────────── */
  --paper:            #fff;
  --bg:               #f4f2ec;
  --surface-subtle:   #f6f4ee;   /* ⊕ #f5f5f5 */
  --surface-control:  #fbfaf6;   /* ⊕ #f9f9f6 */
  --surface-hover:    #fbfaf6;   /* ⊕ #fafbfc #fafafa */
  --surface-warm:     #f0eee7;   /* ⊕ #fafaf5 */
  --surface-active:   #e9eff3;
  --surface-hover-blue:#eef1f3;  /* ⊕ #f0f4f9 */

  /* ── BORDURES ─────────────────────────────────────────────── */
  --border:           #cbc5b7;   /* ⊕ #c5cbd6 */
  --border-light:     #e2ded4;   /* ⊕ #e4e7eb #e0e4e8 */
  --border-mid:       #d6d1c5;
  --border-hover:     #b7b1a2;
  --border-neutral:   #e2e2e2;
  --border-warm:      #e5e5e0;
  --border-faint:     #f1eee7;
  --border-hair:      #ddd;
  --border-hair-lt:   #eee;
  --border-hairline:  #f5f4f0;

  /* ── TEXTE / ENCRE ────────────────────────────────────────── */
  --ink:              #2c2c2e;
  --ink-brand:        #35505f;
  --ink-black:        #1a1a1a;   /* noir modale finalize (distinct de --ink) */
  --text-strong:      #34322f;
  --text-label:       #4d4a45;
  --text-muted:       #8a857a;
  --text-subtitle:    #6b7a85;
  --text-nav:         #5c6b76;
  --text-slate:       #676258;
  --text-slate-mid:   #4a463f;
  --text-slate-soft:  #948e82;
  --text-subtle:      #aea89d;
  --grey-700:         #444;
  --grey-600:         #555;
  --grey-500:         #666;
  --grey-400:         #888;
  --grey-350:         #999;
  --code-ink:         #336;
  --code-pseudo-ink:  #933;

  /* ── BLEU : primary / accent / liens / info ───────────────── */
  --primary:          #3d5a6c;
  --primary-hover:    #35505f;
  --accent:           #3d5a6c;
  --accent-hover:     #35505f;
  --link:             #3e78b3;
  --info:             #35505f;
  --info-border:      #c7d4dc;
  --bim-bg:           #c7d4dc;   /* fond badge BIM : même valeur que --info-border, à dessein distinct */

  /* ── SÉLECTION PROTHÈSE AMOVIBLE (v5 ; teinte revue en R3.2) ──
     Depuis la scène d'odontogramme unique, la sélection prothèse et la saisie
     soin se peignent sur les MÊMES dents. Elles portaient toutes deux #3e78b3
     et étaient indistinguables. Le bleu appartient au soin
     (ODONTO_STYLES['soin'], lib/odontogram.php) : la sélection prend donc la
     teinte de l'amovible résine — ODONTO_STYLES['amovResine']['stroke'], état
     par défaut d'une sélection tant que le stellite n'est pas coché. Même
     couple rose/bleu que le PDF, où les deux états coexistent déjà.
     --select        : contour de dent (non-texte, 3,55:1 sur --paper ≥ 3:1 requis).
     --select-strong : texte du récap (6,08:1, à parité avec l'ancien #326191). */
  --select:           #d26487;
  --select-strong:    #a34158;

  /* Sortie du catalogue d'actes : sans rapport avec la prothèse, mais partageait
     --select-strong. Token propre, à l'ancienne valeur — iso-visuel. */
  --catalog-pick:     #326191;

  /* ── VERT : succès / statut envoyé / hygiéniste ───────────── */
  --success:          #2c5f2d;
  --msg-success-ink:  #2d5a26;
  --msg-success-bg:   #e3f3e0;
  --msg-success-border:#b6d8b0;
  --hyg-ink:          #065f46;
  --hyg-bg:           #d1fae5;
  --sent-ink:         #1d5c2f;
  --sent-bg:          #e1f3e6;
  --sent-border:      #95c8a3;

  /* ── AMBRE / OR : BIM, brouillon, identité, alerte, finalize ── */
  --warning:          #d97706;   /* zone identité + alerte (ambre) */
  --warning-ink:      #92400e;
  --warning-ink-deep: #78350f;
  --warning-bg:       #fef3c7;
  --warning-bg-soft:  #fffbeb;
  --note-bg:          #f5eddc;
  --note-border:      #e4d6b4;
  --conditional-bg:   #fffaf0;
  --msg-warning-ink:  #6b540e;
  --msg-warning-bg:   #fcf3d9;
  --msg-warning-border:#e6cf78;
  --draft-ink:        #79663b;
  --draft-bg:         #f5eddc;
  --draft-border:     #e4d6b4;
  --gold-border:      #c8ad74;
  --gold-bg:          #faf7ef;

  /* ── ROUGE : danger (3 collisions) / erreur / non-remboursé ── */
  --danger:           #c2402f;
  --danger-hover:     #9d3426;
  --msg-error-ink:    #8a1f1f;
  --msg-error-bg:     #fff0f0;
  --msg-error-border: #f3c4c4;
  --noreimb-ink:      #991b1b;
  --noreimb-bg:       #fee2e2;
  --danger-zone-bg:   #fdf5f5;
  --danger-zone-border:#e6c5c5;
  --finalize-warn-bg: #faefec;
  --code-pseudo-bg:   #fee;

  /* ── VIOLET / INDIGO : flags esthétique & prix forcé ──────── */
  --aesthetic-ink:    #5b21b6;
  --aesthetic-bg:     #ede9fe;
  --override-ink:     #3730a3;
  --override-bg:      #e0e7ff;
  --code-tag-bg:      #eef;

  /* ── SOIN : barre d'outils + mémoire visuelle odontogramme (migré) ── */
  --soin-toolgroup-border:#e0e0e0;
  --soin-toollabel:   #777;
  --soin-tool-border: #bbb;
  --odonto-exist-stroke:#8a959e;
  --odonto-crown-fill:#d0d7dc;
  --odonto-root-fill: #a3b6c4;
  --odonto-canaux-ink:#3a3f44;
  --odonto-active-fill:#b8d4ee;
  --odonto-active-root-fill:#e3a9a1; /* racines en saisie endo — pendant clair de --danger */

  /* ── EFFETS (ombres / anneau / voile — pas des couleurs plates) ── */
  --shadow-card:      0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-modal:     0 10px 40px rgba(0, 0, 0, 0.25);
  --backdrop:         rgba(0, 0, 0, 0.45);
  --focus-ring:       0 0 0 3px rgba(61, 90, 108, 0.18);
}


/* style.css — Phase 1. Sobre, pas de framework. */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}

/* ===== Page de login ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--paper);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    padding: 2.25rem 2rem;
}

.login-card h1 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    text-align: center;
    color: var(--ink-brand);
}

.login-card .subtitle {
    margin: 0 0 1.75rem;
    text-align: center;
    color: var(--text-subtitle);
    font-size: 0.9rem;
}

.login-card label {
    display: block;
    margin: 1rem 0 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
}

.login-card input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--paper);
}

.login-card input:focus {
    outline: none;
    border-color: var(--text-nav);
    box-shadow: var(--focus-ring);
}

.login-card button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.7rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--paper);
    background: var(--primary);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.login-card button:hover { background: var(--primary-hover); }

.msg {
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.msg-error { background: var(--msg-error-bg); color: var(--msg-error-ink); border: 1px solid var(--msg-error-border); }
.msg-info  { background: var(--surface-active); color: var(--info); border: 1px solid var(--info-border); }

/* ===== Pages applicatives ===== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--border-light);
}

.app-header .brand {
    font-weight: 600;
    color: var(--ink-brand);
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-nav);
}

.user-nav a {
    color: var(--primary);
    text-decoration: none;
}

.user-nav a:hover { text-decoration: underline; }

.badge-admin {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    font-size: 0.7rem;
    background: var(--primary);
    color: var(--paper);
    border-radius: 3px;
}

.app-main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}
/* ============================================================
   PHASE 1 — Écrans patient (recherche, création, fiche)
   À COLLER À LA FIN du style.css existant. Ne rien modifier au-dessus.
   ============================================================ */

/* En-tête de page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.5em 1.1em;
    border: 1px solid var(--border);
    background: var(--paper);
    color: var(--text-strong);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.15s;
}
.btn:hover { background: var(--surface-subtle); }

/* Bouton désactivé (ex. « Appliquer » tant que l'acquittement n'est pas coché) :
   affordance visuelle explicite en plus de l'état natif disabled. */
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: var(--paper);
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-link {
    border: none;
    background: transparent;
    color: var(--accent);
    padding: 0.4em 0.2em;
}
.btn-link:hover {
    background: transparent;
    text-decoration: underline;
}

/* Barre de recherche */
.search-bar {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1.5em;
}
.search-bar input[type="search"] {
    flex: 1;
    padding: 0.6em 0.8em;
    font-size: 1em;
    border: 1px solid var(--border);
    border-radius: 4px;
}

/* Tableau de résultats */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    background: var(--paper);
}
.data-table th,
.data-table td {
    padding: 0.6em 0.8em;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
}
.data-table th {
    background: var(--surface-subtle);
    font-weight: 600;
}
.data-table tr:hover { background: var(--surface-hover); }

/* Badges */

/* Messages additionnels */
.msg-success {
    background: var(--msg-success-bg);
    color: var(--msg-success-ink);
    border: 1px solid var(--msg-success-border);
    padding: 0.7em 1em;
    border-radius: 4px;
    margin-bottom: 1em;
}
.msg-warning {
    background: var(--msg-warning-bg);
    color: var(--msg-warning-ink);
    border: 1px solid var(--msg-warning-border);
    padding: 0.7em 1em;
    border-radius: 4px;
    margin-bottom: 1em;
}
.msg-warning ul { margin: 0.6em 0 0.3em 1.2em; }

/* Formulaires patient */
.patient-form fieldset {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 1em 1.2em 0.6em;
    margin-bottom: 1.2em;
}
.patient-form legend {
    padding: 0 0.6em;
    font-weight: 600;
    color: var(--text-strong);
}
.form-row {
    margin-bottom: 0.9em;
    display: flex;
    flex-direction: column;
}
.form-row label {
    font-size: 0.9em;
    margin-bottom: 0.25em;
    color: var(--text-label);
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="date"] {
    padding: 0.45em 0.6em;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1em;
}
.form-row-split {
    flex-direction: row;
    gap: 1em;
}
.form-row-split > div {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.form-row-check label {
    flex-direction: row;
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1em;
    color: var(--text-strong);
    margin-bottom: 0;
}
.field-error {
    margin-top: 0.3em;
    color: var(--danger);
    font-size: 0.85em;
}
.form-actions {
    display: flex;
    gap: 0.8em;
    align-items: center;
    margin-top: 1em;
}

/* Fiche patient */
.patient-card {
    background: var(--paper);
    padding: 1.2em 1.6em;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}
.patient-card h2 {
    font-size: 1.05em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin: 1.2em 0 0.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border-light);
}
.patient-card h2:first-of-type { margin-top: 0; }
.patient-card dl {
    display: grid;
    grid-template-columns: 240px 1fr;
    row-gap: 0.5em;
    column-gap: 1em;
    margin: 0;
}
.patient-card dt {
    color: var(--text-muted);
    font-size: 0.9em;
}
.patient-card dd { margin: 0; }
.patient-card .meta {
    margin-top: 1.5em;
    font-size: 0.85em;
    color: var(--text-muted);
}

/* Divers */
.muted {
    color: var(--text-muted);
    font-style: italic;
}
/* ============================================================
   PHASE 1 — Ajout pour la double saisie de date (calendrier + texte)
   À COLLER À LA FIN du style.css existant.
   ============================================================ */
 
.date-input-group {
    display: flex;
    gap: 0.5em;
    align-items: stretch;
}
.date-input-group input[type="text"] {
    flex: 0 0 8em;
    padding: 0.45em 0.6em;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    letter-spacing: 0.02em;
}
.date-input-group input[type="date"] {
    flex: 0 0 auto;
    padding: 0.45em 0.6em;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
}
.field-hint {
    margin-top: 0.3em;
    color: var(--text-muted);
    font-size: 0.82em;
    font-style: italic;
}
 /* ============================================================
   PHASE 1 — Ajouts liés au titre patient + zone de suppression
   À COLLER À LA FIN du style.css existant.
   ============================================================ */

/* Sélecteur de titre dans le formulaire patient */
.form-row select {
    padding: 0.45em 0.6em;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    background: var(--paper);
}

/* Zone sensible (suppression conditionnelle) */
.danger-zone {
    margin-top: 2em;
    padding: 1.2em 1.6em;
    border: 1px solid var(--danger-zone-border);
    background: var(--danger-zone-bg);
    border-radius: 4px;
}
.danger-zone h2 {
    margin: 0 0 0.6em;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--danger);
}
.danger-zone p {
    margin: 0 0 1em;
    color: var(--text-label);
    font-size: 0.95em;
}

.btn-danger {
    background: var(--danger);
    color: var(--paper);
    border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger-hover); }
/* ============================================================
   Écran d'édition de devis — additions
   ============================================================ */

.patient-strip {
    background: var(--surface-warm);
    border-left: 4px solid var(--success);
    padding: 0.75rem 1rem;
    margin: 1rem 0 1.5rem;
    border-radius: 4px;
}
.patient-strip-main { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.patient-strip-age { font-weight: 600; color: var(--success); }
.patient-strip-dob { color: var(--grey-500); font-size: 0.9rem; }
.patient-strip-status { margin-left: auto; color: var(--grey-600); font-size: 0.9rem; }
.badge-bim { display: inline-block; background: var(--bim-bg); color: var(--accent); border: 1px solid var(--accent); padding: 0.1rem 0.55rem; border-radius: 11px; font-size: 0.8rem; font-weight: 600; }

.form-inline { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: start; }
.form-field-wide { grid-column: span 2; }
.form-field-narrow { max-width: 100px; }
.form-field-checks { grid-column: span 2; display: flex; flex-wrap: wrap; gap: 1rem; }
.form-field-pseudo { grid-column: span 4; display: flex; gap: 1rem; align-items: center; }
.form-field-action { grid-column: span 4; text-align: right; }
.cb { display: inline-flex; gap: 0.4rem; align-items: center; cursor: pointer; }

.lines-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.9rem; }
.lines-table th, .lines-table td { padding: 0.5rem; border-bottom: 1px solid var(--border-warm); text-align: left; vertical-align: top; }
.lines-table th { background: var(--surface-warm); font-weight: 600; }
.lines-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.line-conditional { background: var(--conditional-bg); }
.line-conditional td { border-left-style: dashed; }
.line-note-row td.line-note { background: var(--note-bg); color: var(--warning-ink); font-size: 0.85rem; padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--note-border); }

.code-tag { display: inline-block; background: var(--code-tag-bg); color: var(--code-ink); padding: 0.05rem 0.3rem; border-radius: 3px; font-size: 0.8rem; font-family: monospace; }
.code-pseudo { background: var(--code-pseudo-bg); color: var(--code-pseudo-ink); }
.line-desc { color: var(--grey-500); font-size: 0.85rem; font-style: italic; }

.flag { display: inline-block; padding: 0.05rem 0.35rem; border-radius: 3px; font-size: 0.75rem; font-weight: 600; margin-right: 0.2rem; }
.flag-cond { background: var(--warning-bg); color: var(--warning-ink); }
.flag-aest { background: var(--aesthetic-bg); color: var(--aesthetic-ink); }
.flag-hyg  { background: var(--hyg-bg); color: var(--hyg-ink); }
.flag-noreimb { background: var(--noreimb-bg); color: var(--noreimb-ink); }
.flag-priceoverride { background: var(--override-bg); color: var(--override-ink); }
.reimb-off { color: var(--noreimb-ink); font-weight: 600; }

.line-edit summary { cursor: pointer; color: var(--link); }
.line-edit-form { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; padding: 0.5rem; background: var(--surface-control); border-radius: 4px; }
.line-edit-form label { display: flex; flex-direction: column; font-size: 0.8rem; }
.line-edit-form label.cb { flex-direction: row; align-items: center; }
.line-edit-form input[type=number], .line-edit-form input[type=text], .line-edit-form textarea { padding: 0.2rem 0.4rem; }
.line-edit-actions { width: 100%; text-align: right; }
.line-delete-form { margin-top: 0.4rem; text-align: right; }


.totals { background: var(--surface-warm); padding: 1rem 1.5rem; border-radius: 6px; margin-top: 2rem; }
.totals-grid { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 2rem; max-width: 600px; }
.totals-grid dt { color: var(--grey-700); }
.totals-grid dd { text-align: right; font-variant-numeric: tabular-nums; margin: 0; }
.totals-note { color: var(--grey-500); font-size: 0.85rem; margin-top: 1rem; font-style: italic; }

.empty-hint { color: var(--grey-400); font-style: italic; padding: 1rem; }
/* ============================================================
   Liste des derniers patients consultés (patients.php, état vide)
   ============================================================ */

.recent-section {
    margin-top: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
    color: var(--accent);
}

.muted.small {
    font-size: 0.85rem;
    margin: 0 0 0.75rem 0;
}

/* Lignes cliquables : feedback visuel cohérent avec les autres
   actions (curseur main, fond sur survol). */
tr.row-link {
    cursor: pointer;
    transition: background-color 0.1s ease-in;
}

tr.row-link:hover {
    background-color: var(--surface-hover-blue);
}
/* === Édition fiche patient : zone d'identité ============================ */

/* Encadré visuel distinct pour la zone sensible du formulaire d'édition. */
.form-identity-zone {
    border: 2px solid var(--warning);        /* ambre soutenu */
    background: var(--warning-bg-soft);              /* ambre très clair */
    border-radius: 6px;
}

.form-identity-zone legend {
    color: var(--warning-ink);
    font-weight: 600;
}

.form-identity-warning {
    background: var(--warning-bg);
    border-left: 3px solid var(--warning);
    padding: 0.5rem 0.75rem;
    margin: 0 0 1rem 0;
    font-size: 0.92em;
    color: var(--warning-ink-deep);
}

/* === Fiche patient : section actions ==================================== */

.patient-actions {
    margin: 1.5rem 0;
}

.patient-actions .action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
/* ============================================================
   Liste des devis sur la fiche patient
   ============================================================ */

.patient-quotes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.patient-quotes-header h2 {
    margin: 0;
}

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

table.quotes-list th {
    text-align: left;
    padding: 8px 10px;
    background-color: var(--surface-subtle);
    border-bottom: 2px solid var(--border-hair);
    font-weight: 600;
}

table.quotes-list th.num,
table.quotes-list td.num {
    text-align: right;
}

table.quotes-list td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-hair-lt);
}

table.quotes-list tr:hover {
    background-color: var(--surface-hover);
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background-color: var(--draft-bg);
    color: var(--draft-ink);
    border: 1px solid var(--draft-border);
}

.status-sent {
    background-color: var(--sent-bg);
    color: var(--sent-ink);
    border: 1px solid var(--sent-border);
}

.muted {
    color: var(--grey-350);
    font-style: italic;
}
/* ============================================================
   Modale de finalisation d'un devis (dialog natif HTML5)
   ============================================================ */

.finalize-dialog {
    border: none;
    border-radius: 6px;
    padding: 0;
    width: 90%;
    max-width: 540px;
    box-shadow: var(--shadow-modal);
}

.finalize-dialog::backdrop {
    background-color: var(--backdrop);
}

.finalize-form {
    padding: 28px 32px 24px 32px;
}

.finalize-form h2 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink-black);
}

.finalize-intro {
    font-size: 14px;
    line-height: 1.5;
    color: var(--grey-600);
    margin: 0 0 20px 0;
}

.finalize-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.finalize-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border-hair);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.finalize-option:hover {
    border-color: var(--gold-border);
    background-color: var(--gold-bg);
}

.finalize-option-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.finalize-option-disabled:hover {
    border-color: var(--border-hair);
    background-color: transparent;
}

.finalize-option input[type="checkbox"] {
    margin-top: 2px;
}

.finalize-option-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.45;
}

.finalize-option-text strong {
    display: block;
    color: var(--ink-black);
    margin-bottom: 2px;
}

.finalize-option-detail {
    color: var(--grey-600);
    font-size: 13px;
}

.finalize-option-detail.muted {
    color: var(--grey-350);
    font-style: italic;
}

.finalize-warning {
    color: var(--danger);
    font-size: 13px;
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background-color: var(--finalize-warn-bg);
    border-radius: 4px;
}

.finalize-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border-hair-lt);
    padding-top: 16px;
    margin-top: 8px;
}