/* Application Noézio : palette « pastel doux » (façon Notion), pensée d'abord pour le téléphone. */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #2f2b33;
  --muted: #7a7480;
  --line: #ece9e4;
  --accent: #7c5cff;
  --accent-soft: #f1edff;
  --warm: #dcb43c;
  --late: #d4554a;
  --late-soft: #fbeceb;
  --ok: #4a9c6d;
  --whatsapp: #2f9a5e;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111015;
    --surface: #1a1920;
    --ink: #f3f1ec;
    --muted: #a7a4b0;
    --line: #2b2a33;
    --accent: #a08cff;
    --accent-soft: #2a2440;
    --late: #f08a80;
    --late-soft: #33201e;
    --ok: #7cc79a;
    --whatsapp: #34d399;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11"; /* Inter : « a » à un seul étage, plus lisible */
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--accent); }
button { font: inherit; }

/* En-tête */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 12px 0; }
.check input { margin-top: 4px; }
.beta-badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.tabs a.active { background: var(--accent-soft); color: var(--accent); }
.link { background: none; border: 0; color: var(--muted); font-size: 14px; cursor: pointer; padding: 6px; }
@media (max-width: 520px) {
  .topbar { gap: 6px; }
  .topbar .brand { font-size: 0; gap: 0; }
  .tabs { margin-left: 0; }
  #logout { margin-left: auto; }
}

.page { max-width: 720px; margin: 0 auto; padding: 20px 16px calc(env(safe-area-inset-bottom) + 40px); }
h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 28px 0 10px; }
.sub { color: var(--muted); margin: 0 0 8px; }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.card.late { border-color: color-mix(in srgb, var(--late) 45%, var(--line)); }
.card-title { font-weight: 600; margin: 0; }
.card-meta { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.card-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.amount { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
a.contact-link { color: inherit; text-decoration: none; display: block; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge.late { background: var(--late-soft); color: var(--late); }
.badge.done { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-whatsapp { background: var(--whatsapp); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-block { width: 100%; }

/* Connexion */
.login { max-width: 400px; margin: 12vh auto 0; text-align: center; }
.login img { margin-bottom: 12px; }
.login form { text-align: left; margin-top: 24px; }
.field { margin-bottom: 14px; }
.form { max-width: 520px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.inline-form input { flex: 1 1 160px; }
input[type="text"], input[type="tel"], input[type="url"], input[type="date"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
}
select.btn { width: auto; min-height: 40px; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; }
textarea { resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.chip span { color: var(--muted); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.active span { color: inherit; opacity: 0.8; }
.card.muted { opacity: 0.6; }
.draft {
  background: linear-gradient(180deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 40%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 14px; padding: 12px 14px; margin: 10px 0 0; font-size: 15px; white-space: pre-wrap;
}
.badge.stage-won { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.stage-lost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.badge.stage-no_show { background: var(--late-soft); color: var(--late); }
.badge.stage-thinking { background: color-mix(in srgb, var(--warm) 22%, transparent); color: color-mix(in srgb, var(--warm) 55%, var(--ink)); }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type="email"], input[type="search"], input[type="tel"] {
  width: 100%; min-height: 46px; padding: 10px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
}
input:focus-visible, .btn:focus-visible, .tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notice { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin-top: 16px; font-size: 15px; }
.error { color: var(--late); }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

.empty { color: var(--muted); text-align: center; padding: 28px 12px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Conversation */
.messages { display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.out { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.bubble time { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.back { display: inline-block; margin-bottom: 8px; color: var(--muted); text-decoration: none; font-size: 15px; }

details > summary { cursor: pointer; list-style-position: inside; }
.stats + .stats { margin-top: 8px; }
.badge.stage-not_qualified { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.stats + .card, .stats + details { margin-top: 10px; }
input[type="file"] { width: 100%; padding: 10px 0; font: inherit; }

/* Sélecteur d'offre (barre du haut) */
.offer-picker { width: auto; max-width: 42vw; min-height: 34px; padding: 4px 28px 4px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface); }
.badge.offer { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.notice.warn { display: block; margin-top: 12px; background: var(--late-soft); color: var(--late); text-decoration: none; font-weight: 500; }

/* Pipeline en colonnes */
.page:has(.kanban) { max-width: none; }
.kanban { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 16px; margin-top: 12px; scroll-snap-type: x proximity; }
.kcol { flex: 0 0 260px; background: color-mix(in srgb, var(--line) 35%, var(--bg)); border-radius: var(--radius); padding: 8px; scroll-snap-align: start; min-height: 120px; }
.kcol.over { outline: 2px dashed var(--accent); }
.kcol header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 6px 8px; font-weight: 600; font-size: 14px; }
.kcount { color: var(--muted); font-weight: 500; font-size: 13px; }
.kcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; color: inherit; text-decoration: none; cursor: grab; }
.kcard:hover { border-color: var(--accent); }
.kcard .card-meta { font-size: 13px; }
.kempty { color: var(--muted); text-align: center; margin: 12px 0; }
.kcol.stage-won header { color: var(--ok); }
.kcol.stage-lost, .kcol.stage-not_qualified { opacity: 0.85; }

/* Offres : KPI du mois */
.month-nav { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; }
.month-nav b { min-width: 150px; text-align: center; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.kpis .stat small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.offer-card details { margin-top: 4px; }

/* Petits écrans : sélecteur d'offre et déconnexion en haut, onglets sur une seconde ligne */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .topbar .brand { font-size: 0; gap: 0; }
  .offer-picker { max-width: none; flex: 1; }
  #logout { margin-left: 0; order: 2; }
  .tabs { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  .tabs a { flex: 1; text-align: center; }
}

/* Tableau CRM */
.page:has(table.crm) { max-width: 1200px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.crm { width: 100%; border-collapse: collapse; font-size: 14px; }
table.crm th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.crm td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.crm tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
table.crm .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.crm .nowrap { white-space: nowrap; }
table.crm .muted { color: var(--muted); }
table.crm td small { display: block; color: var(--late); font-size: 12px; }
table.crm tfoot td { font-weight: 600; border-bottom: 0; }
table.crm a { color: inherit; }
select.outcome { width: auto; min-height: 32px; padding: 4px 26px 4px 10px; font-size: 13px; font-weight: 600; border-radius: 999px; }
select.outcome.stage-won { color: var(--ok); }
select.outcome.stage-lost, select.outcome.stage-not_qualified { color: var(--muted); }
select.outcome.stage-no_show { color: var(--late); }

/* Fathom */
details.notice summary { font-weight: 600; }
.fathom-call { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.fathom-call:first-of-type { margin-top: 10px; }
.fathom-call small { color: var(--muted); }
.fathom-call select { width: auto; max-width: 100%; min-height: 40px; }
.steps { padding-left: 20px; margin: 12px 0; line-height: 1.7; }

/* Proposition de l'IA */
.ai-card { border-color: var(--accent); background: var(--accent-soft); margin-top: 16px; }
.ai-card .field { margin-top: 10px; }
.ai-facts { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
.ai-facts .quote { font-style: italic; color: var(--muted); }
.badge.ai { margin-left: 6px; background: var(--accent); color: #fff; text-decoration: none; }

/* À faire : liste de tâches façon Notion */
.page:has(.todo) { max-width: 1000px; }
.todo-head { background: color-mix(in srgb, var(--line) 30%, var(--surface)); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.todo-head h1 { margin: 0; font-size: 30px; }
.todo-head .sub { margin: 4px 0 0; font-size: 14px; }
.todo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.todo-tabs { display: flex; gap: 4px; overflow-x: auto; }
.todo-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.todo-tabs a.active { background: color-mix(in srgb, var(--line) 55%, var(--surface)); color: var(--ink); }
.todo-tabs .count { font-size: 12px; color: var(--muted); }
.task-list { list-style: none; margin: 0; padding: 0; }
.task { border-bottom: 1px solid var(--line); }
.task-line { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; }
.task-main { min-width: 0; display: flex; flex-direction: column; }
.task-title { font: inherit; font-weight: 500; text-align: left; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
.task-title:hover { color: var(--accent); }
.task-main { align-items: flex-start; }
.task-who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.task-who a { color: inherit; text-decoration: none; }
.task-who a:hover { color: var(--accent); text-decoration: underline; }
.task-sep { color: var(--line); color: color-mix(in srgb, var(--muted) 45%, transparent); }
.task-props { display: grid; grid-template-columns: 150px 146px; align-items: center; gap: 32px; white-space: nowrap; }
.task-props.with-date { grid-template-columns: 150px 140px 146px; }
.task-props > :first-child, .task-status { justify-self: start; }
.task-date { font-size: 14px; color: var(--ink); }
.task-close { position: relative; }
.task-box { display: block; width: 22px; height: 22px; padding: 0; border: 1.5px solid var(--muted); border-radius: 5px; background: var(--surface); cursor: pointer; }
.task-box:hover { border-color: var(--accent); }
.task.done .task-box { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 14px; font-weight: 700; line-height: 1; }
.status-postponed { background: #f1edff; color: #7c5cff; border-radius: 999px; }
.status-missed { background: var(--late-soft); color: var(--late); border-radius: 999px; }
.status-done { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-radius: 999px; }
.todo-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; font-size: 14px; }
.todo-progress .pct { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; color: var(--ok); }
.todo-progress .cheer { color: var(--muted); }
.todo-progress.complete .cheer { color: var(--ok); font-weight: 600; }
.todo-progress .bar { flex: 1 1 160px; max-width: 360px; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.todo-progress .bar span { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width 0.4s; }

/* Fenêtre au centre de l'écran */
.modal { width: min(420px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / 0.2); }
.modal:focus { outline: none; }
.modal::backdrop { background: rgb(20 18 30 / 0.45); }
.modal h2 { margin: 0; font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.modal .card-meta { margin-bottom: 16px; }
.modal-choices { display: grid; gap: 8px; margin-bottom: 10px; }
.modal-date { margin-bottom: 12px; }
.modal-quick { margin-bottom: 14px; }
.modal-quick .chip { flex: 1 1 0; flex-direction: column; gap: 0; padding: 8px 6px; border-radius: 12px; white-space: nowrap; }
.modal-quick .chip span { font-size: 12px; }
.modal-date label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.modal-date small { display: block; margin-top: 4px; }
.modal-choice:disabled { opacity: 0.55; cursor: default; }
.modal-choice { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.modal-choice:hover, .modal-choice:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.modal-choice.primary { border-color: var(--accent); }
.modal-choice.ok { background: #e9f4ed; border-color: #b9dcc6; }
.modal-choice.ok:hover, .modal-choice.ok:focus-visible { background: #dcefe3; border-color: #4a9c6d; }
.modal-choice.ok b { color: #3d7f58; }
.modal-choice.date { background: #f1edff; border-color: #d6cbff; }
.modal-choice.date:hover, .modal-choice.date:focus-visible { background: #e8e1ff; border-color: var(--accent); }
.modal-choice.date b { color: #5b43d9; }
.modal-choice.bad { background: #fbeceb; border-color: #f0c9c5; }
.modal-choice.bad:hover, .modal-choice.bad:focus-visible { background: #f8dedb; border-color: #d4554a; }
.modal-choice.bad b { color: #b4483f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .modal-choice.ok { background: #16301f; border-color: #2f6b45; }
  :root:not([data-theme="light"]) .modal-choice.ok b { color: #8fdcaa; }
  :root:not([data-theme="light"]) .modal-choice.bad { background: #351a17; border-color: #7a3a32; }
  :root:not([data-theme="light"]) .modal-choice.bad b { color: #f7a59c; }
}
.modal-choice b { display: block; font-size: 16px; font-weight: 600; }
.modal-choice small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.task.aside .task-title { text-decoration: line-through; color: var(--muted); }
.task.aside { opacity: 0.6; transition: opacity 0.3s; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task.done .task-who, .task.done .task-props .pill:not(.status-done) { opacity: 0.55; }
.task-details { padding: 0 0 14px 34px; }
.task-summary { margin: 0; color: var(--muted); font-size: 15px; }
.task-label { margin: 10px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.task-details .draft { margin-top: 8px; }
.send-row { display: flex; justify-content: flex-end; margin-top: 14px; }
.send-link { color: var(--whatsapp); font-size: 14px; font-weight: 600; text-decoration: none; }
.send-link:hover { text-decoration: underline; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 3px 10px; border-radius: 8px; }
.pill .emoji { font-size: 12px; line-height: 1; }
.pill .dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.prio-high .dot { background: #d4554a; }
.prio-medium .dot { background: #e39a52; }
.prio-low .dot { background: #dcb43c; }
/* Pastilles de priorité de même largeur, point de couleur au bord droit (aligné d'une ligne à l'autre) */
.pill.prio { width: 140px; justify-content: space-between; }
/* Priorité modifiable : liste déroulante habillée comme la pastille */
/* Statut modifiable : liste déroulante habillée comme la pastille */
select.status-select { width: auto; min-height: 0; border: 0; font: inherit; font-size: 13px; font-weight: 500; padding: 3px 12px; border-radius: 999px; cursor: pointer; appearance: none; -webkit-appearance: none; }
select.status-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select.priority-select { width: auto; min-height: 0; border: 0; font: inherit; font-size: 13px; font-weight: 500; width: 140px; padding: 3px 25px 3px 10px; border-radius: 8px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-repeat: no-repeat; background-position: right 10px center; background-size: 9px 9px; }
select.priority-select.prio-high { background-image: radial-gradient(circle closest-side, #d4554a 92%, transparent 100%); }
select.priority-select.prio-medium { background-image: radial-gradient(circle closest-side, #e39a52 92%, transparent 100%); }
select.priority-select.prio-low { background-image: radial-gradient(circle closest-side, #dcb43c 92%, transparent 100%); }
select.priority-select:hover { filter: brightness(0.96); }
select.priority-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prio-high { background: #fbeceb; color: #b4483f; }
.prio-medium { background: #fcf1e6; color: #a86a2c; }
.prio-low { background: #fbf6e2; color: #8a7426; }
.status-inbox { background: #f1efec; color: #7a7480; border-radius: 999px; }
.status-doing { background: #e9f1fa; color: #3f6fa3; border-radius: 999px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .prio-high { background-color: #3a2220; color: #f7a59c; }
  :root:not([data-theme="light"]) .prio-medium { background-color: #3a2c1e; color: #f5bd85; }
  :root:not([data-theme="light"]) .prio-low { background-color: #34301e; color: #ecd77a; }
  :root:not([data-theme="light"]) .status-inbox { background: #2b2a31; color: #b9b6c2; }
  :root:not([data-theme="light"]) .status-doing { background: #172a45; color: #9cc0f5; }
}

/* Fenêtre « Nouvelle tâche » */
.modal.modal-form { width: min(480px, calc(100vw - 32px)); }
.modal-field { margin-bottom: 14px; }
.modal-field > label { font-size: 14px; margin-bottom: 6px; }
.pick-results { display: grid; gap: 2px; margin-top: 4px; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.pick-results:empty { display: none; }
.pick-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; }
.pick-item:hover, .pick-item:focus-visible { background: var(--accent-soft); outline: none; }
.pick-item .task-who, .pick-chosen .task-who { margin: 0; font-size: 14px; }
.pick-item b, .pick-chosen b { color: var(--ink); font-weight: 600; }
.pick-chosen { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-form h2 { margin-bottom: 16px; }
.pick-pill { width: auto; white-space: nowrap; gap: 8px; border: 2px solid transparent; cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; }
.pick-pill[aria-pressed="false"] { opacity: 0.5; }
.pick-pill[aria-pressed="true"] { border-color: currentColor; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-date { position: relative; margin: 0; }
.chip-date-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.modal-choice.submit { text-align: center; }
.modal-choice:disabled.submit { opacity: 0.5; }

/* « + Ajouter une tâche » en face des onglets (pas encore branché) */
.task-add { flex-shrink: 0; padding: 7px 4px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.task-add:hover { color: var(--accent); }

/* Téléphone : titre sur toute la largeur, priorité / date / statut en dessous */
@media (max-width: 760px) {
  .task-line { grid-template-columns: 22px 1fr; row-gap: 6px; }
  .task-props { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; gap: 6px 16px; white-space: normal; }
  .task-close { grid-row: 1; align-self: start; padding-top: 2px; }
  .task-date { min-width: 0; font-size: 13px; }
  .pill { font-size: 12px; padding: 2px 8px; }
  .task-details { padding: 0 0 14px 34px; }
  .todo-head h1 { font-size: 26px; }
  .task-add .long { display: none; }
}

/* En-tête de la fiche prospect : « Prénom NOM | Offre » + logo WhatsApp */
/* Trait sous le nom : même espace visuel au-dessus (bas des lettres → trait) et en dessous (trait → cartes) */
.prospect-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 16px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.prospect-head h1 { margin: 0; }
.head-offer { color: var(--muted); font-size: 18px; padding-left: 14px; border-left: 2px solid var(--line); }
.contact-row { margin-left: auto; }
.contact-row .send-link { font-size: 15px; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-whatsapp { color: #06231a; } }

/* Fiche prospect minimaliste : infos clés, À faire à gauche, détails repliés à droite */
.page:has(.prospect-grid) { max-width: 1200px; }
.prospect-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .prospect-grid { grid-template-columns: 1fr; gap: 0; } }
.prospect-grid > div > h2:first-child { margin-top: 18px; }
.know { padding: 4px 16px; margin: 10px 0 0; }
.know .r { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.know .r:last-child { border-bottom: 0; }
.know .k { padding-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.know .v { font-weight: 600; line-height: 1.4; }
.know .r.warn .k, .know .r.warn .v { color: var(--late); }
@media (max-width: 520px) { .know .r { grid-template-columns: 1fr; gap: 2px; } }
.proposal { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); margin-top: 18px; }
.stage-row { margin: 18px 0 10px; }
.stage-select { width: auto; min-height: 40px; padding: 6px 28px 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; }
details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 10px; }
details.fold > summary { cursor: pointer; font-weight: 600; font-size: 15px; }
details.fold > summary span { color: var(--muted); font-weight: 400; font-size: 14px; }
.fold-body { margin-top: 12px; }
.fold-body .card { box-shadow: none; }
.actions.small .btn, .actions.small select { min-height: 34px; font-size: 14px; padding: 4px 12px; }
.bref { margin: 0 0 8px; font-weight: 500; }

/* Fiche prospect : colonne « d'un coup d'œil » à gauche, brief et à faire à droite */
.page:has(.prospect-side) { max-width: 1200px; }
.prospect-side { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 8px; }
@media (max-width: 900px) { .prospect-side { grid-template-columns: 1fr; gap: 0; } }
.prospect-side > div > h2:first-child { margin-top: 0; }
.glance { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px; }
.glance .g { padding: 12px 0; border-bottom: 1px solid var(--line); }
.glance .g:last-child { border-bottom: 0; }
.glance .k { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.glance .v { font-weight: 600; line-height: 1.35; }
.glance .v small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.glance .v.warn, .glance .warn small { color: var(--late); }
.glance .progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.glance .progress i { display: block; height: 100%; background: var(--ok); }
select.stage-badge { width: auto; min-height: 30px; padding: 2px 26px 2px 12px; border-radius: 999px; border: 0; font-size: 14px; font-weight: 700; cursor: pointer; background-color: var(--accent-soft); color: var(--accent); }
select.stage-badge.stage-thinking { background-color: color-mix(in srgb, var(--warm) 22%, var(--surface)); color: color-mix(in srgb, var(--warm) 55%, var(--ink)); }
select.stage-badge.stage-won { background-color: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
select.stage-badge.stage-lost, select.stage-badge.stage-not_qualified { background-color: var(--line); color: var(--muted); }
select.stage-badge.stage-no_show { background-color: var(--late-soft); color: var(--late); }
dl.kv { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
.folds { margin-top: 18px; }
.prospect-side > div > .card, .prospect-side > div > h2 { margin-top: 0; }
.prospect-side > div > * + h2 { margin-top: 18px; }

/* Ligne du haut + Suivi */
.key-strip { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0 18px; }
.key-strip > div { padding: 12px 18px; }
.key-strip > div + div { border-left: 1px solid var(--line); }
.key-strip .k { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.key-strip .v { font-weight: 600; line-height: 1.35; }
.key-strip .v small { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); font-size: 13px; }
.key-strip .v.warn { color: var(--late); }
.key-strip .progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.key-strip .progress i { display: block; height: 100%; background: var(--ok); }
@media (max-width: 760px) { .key-strip { grid-template-columns: 1fr; } .key-strip > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.last { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.last .k { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.last .v { font-size: 18px; font-weight: 600; }
.last small { color: var(--muted); font-size: 13px; text-align: right; }
.last.warn .v { color: var(--late); }
.summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.summary .pill { font-size: 13px; background: var(--accent-soft); border-radius: 999px; padding: 3px 11px; }
.summary .pill.late { background: var(--late-soft); color: var(--late); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: -4px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.timeline li.done::after { background: var(--ok); border-color: var(--ok); }
.timeline li.in::after { background: var(--accent); border-color: var(--accent); }
.timeline li.call::after { background: var(--warm); border-color: var(--warm); }
/* Relances sans réponse : gris de plus en plus foncé (1 clair, 2 moyen, 3 et plus foncé) */
.timeline li.relance-1::after { background: #d6d2d8; border-color: #d6d2d8; }
.timeline li.relance-2::after { background: #a29da7; border-color: #a29da7; }
.timeline li.relance-3::after { background: #5a5560; border-color: #5a5560; }
.timeline li.paid::after { background: var(--ok); border-color: var(--ok); }
.timeline li.paid .t { color: var(--ok); }
.timeline li.stopped::after { background: var(--late); border-color: var(--late); }
.timeline li.stopped .t { color: var(--late); }
.timeline li.out-won::after { background: var(--ok); border-color: var(--ok); }
.timeline li.out-thinking::after { background: var(--warm); border-color: var(--warm); }
.timeline li.out-lost::after { background: var(--late); border-color: var(--late); }
.timeline li.out-no_show::after { background: #5a5560; border-color: #5a5560; }
.timeline li.out-not_qualified::after { background: #e39a52; border-color: #e39a52; }
.timeline .d { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.timeline .t { font-weight: 600; margin: 0; }
/* Information complémentaire : une seule ligne */
.timeline .m { color: var(--muted); font-size: 14px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline .m a { color: var(--accent); }
.timeline .tag { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 9px; background: var(--accent-soft); margin-left: 6px; vertical-align: 1px; }
.timeline .tag.r { background: var(--late-soft); color: var(--late); }
.timeline .tag.g { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }

.timeline + .toggle { display: block; margin: 10px 0 0 26px; padding: 4px 0; }

/* Suivi des mensualités */
table.sched { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sched td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.sched tr:last-child td { border-bottom: 0; }
table.sched td.when { white-space: nowrap; color: var(--muted); }
table.sched td.amt { text-align: right; font-weight: 600; white-space: nowrap; }
table.sched td.act { text-align: right; white-space: nowrap; }
table.sched tr.paid td { color: var(--muted); }
.st { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--line); color: var(--muted); white-space: nowrap; }
.st.ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
.st.late { background: var(--late-soft); color: var(--late); }
.st.next { background: var(--accent-soft); color: var(--accent); }
.btn-small { min-height: 30px; padding: 3px 12px; font-size: 13px; }
input.reschedule { width: 128px; min-height: 30px; padding: 2px 8px; font-size: 13px; border-radius: 999px; margin-left: 6px; }
@media (max-width: 520px) { table.sched td:nth-child(2) { display: none; } input.reschedule { display: none; } }

.card > .progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 0 0 6px; }
.card > .progress i { display: block; height: 100%; background: var(--ok); }

/* Case Paiement : « 2x » en pastille puis le montant de chaque paiement, à la hauteur de l'étiquette de finalité */
.key-strip .pay { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.key-strip .pay { white-space: nowrap; }
.key-strip .pay .times { color: var(--muted); font-weight: 600; font-size: 15px; }
.key-strip .pay .dots { display: inline-flex; gap: 4px; }
.key-strip .pay .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.key-strip .pay .dots i.on { background: var(--ok); }
.key-strip .pay .dots i.late { background: var(--late); }
.key-strip .pay .dots { align-items: center; }
.key-strip .pay .dots .stop-x { color: var(--late); font-size: 13px; line-height: 9px; }
.key-strip .pay .mini-bar { width: 56px; height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.key-strip .pay .mini-bar span { display: block; height: 100%; background: var(--ok); }
.key-strip .pay .each { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* Mensualités dans la colonne de gauche : deux lignes par échéance */
ul.installments { list-style: none; margin: 8px 0 0; padding: 0; }
li.inst { padding: 10px 0; border-bottom: 1px solid var(--line); }
li.inst:last-child { border-bottom: 0; }
li.inst .head { display: flex; align-items: baseline; gap: 8px; }
li.inst .when { color: var(--muted); font-size: 13px; min-width: 52px; }
li.inst .label { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
li.inst .amt { font-weight: 700; white-space: nowrap; }
li.inst .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
li.inst .act { display: inline-flex; align-items: center; gap: 10px; }
li.inst.paid .label, li.inst.paid .amt { color: var(--muted); }
.date-hidden { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.prospect-side > div > .card + h2 { margin-top: 18px; }

/* Brief en quatre puces */
.bullets { list-style: none; margin: 0; padding: 0; }
.bullets li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bullets li:last-child { border-bottom: 0; }
.bullets small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 1px; }
/* Mensualités en étapes */
.sumline { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.sumline b { font-size: 18px; }
.sumline b span { color: var(--muted); font-size: 15px; font-weight: 600; }
.sumline > span { color: var(--muted); font-size: 13px; }
.pay-steps { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); position: relative; margin: 16px 0 4px; }
.pay-steps::before, .pay-steps .fill { content: ""; position: absolute; left: calc(50% / var(--n)); top: 35px; height: 2px; background: var(--line); }
.pay-steps::before { right: calc(50% / var(--n)); }
.pay-steps .fill { background: var(--ok); }
.stp { text-align: center; position: relative; padding: 0 4px; }
.stp .amt { font-weight: 700; font-size: 16px; height: 24px; font-variant-numeric: tabular-nums; }
.stp .dot { width: 18px; height: 18px; border-radius: 50%; margin: 3px auto 8px; background: var(--surface); border: 2px solid #d6d2d8; position: relative; z-index: 1; }
.stp.ok .dot { background: var(--ok); border-color: var(--ok); }
.stp.late .dot { background: var(--late); border-color: var(--late); box-shadow: 0 0 0 4px var(--late-soft); }
.stp.next .dot { border-color: var(--accent); }
.stp.stopped .dot { border: 0; background: none; color: var(--late); font-weight: 800; font-size: 19px; line-height: 18px; }
.stp .d { color: var(--muted); font-size: 14px; }
button.dot { display: block; padding: 0; cursor: pointer; }
.stp.ok button.dot:hover, .stp.ok button.dot:focus-visible, .stp.open button.dot { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 22%, transparent); outline: none; }
.undo-pop { position: absolute; left: 50%; top: 80px; transform: translateX(-50%); width: 270px; max-width: calc(100vw - 48px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 12px 34px rgb(0 0 0 / 0.14); text-align: left; }
.undo-pop::before { content: ""; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.undo-pop .t { font-weight: 700; margin: 0; }
.undo-pop .m { color: var(--muted); font-size: 13px; margin: 2px 0 12px; }
.undo-pop .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.undo-pop .row .btn { width: 100%; justify-content: center; margin: 0; }
/* Premier et dernier point : la bulle part du point vers l'intérieur de la carte. */
.pay-steps .stp:first-of-type .undo-pop { left: calc(50% - 30px); transform: none; }
.pay-steps .stp:first-of-type .undo-pop::before { left: 30px; }
.pay-steps .stp:last-of-type .undo-pop { left: auto; right: calc(50% - 30px); transform: none; }
.pay-steps .stp:last-of-type .undo-pop::before { left: auto; right: 24px; }
.btn-danger { background: var(--late); border-color: var(--late); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.stp.late .d, .stp.stopped .d, .stp.stopped .amt { color: var(--late); }
/* Tâches faites */
.summary .pill.ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); font-weight: 600; }
ul.tasks-done { list-style: none; margin: 0; padding: 0; }
li.task-done { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
li.task-done:last-child { border-bottom: 0; }
li.task-done .chk { width: 18px; height: 18px; border-radius: 5px; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; margin-top: 2px; }
li.task-done .t { font-weight: 600; margin: 0; }
li.task-done .m { color: var(--muted); font-size: 13px; margin: 0; }
li.task-done .rt { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; background: var(--accent-soft); color: var(--accent); }
li.task-done .rt.g { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
li.task-done .rt.r { background: var(--late-soft); color: var(--late); }
ul.tasks-done + .toggle { display: block; margin: 8px 0 0; padding: 4px 0; }
.card > .actions.small { margin: 14px 0 12px; align-items: center; }

.ai-notice { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); margin-bottom: 14px; }

/* Brief de la fiche : 4 lignes, intitulé à gauche, texte à droite (2 lignes au maximum) */
.brief-card { padding: 4px 18px; }
.brief-row { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.brief-row small { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.brief-row p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.brief-label { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.brief-date { white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; }
.brief-meta { margin: 0; padding: 10px 0 8px; }
@media (max-width: 640px) { .brief-row { grid-template-columns: 1fr; gap: 2px; } }

/* Modifier le plan de paiement : encaissé en lignes grises, versements à venir modifiables, bandeau du total */
.plan-editor form { margin-top: 12px; }
.plan-rows { display: grid; }
.plan-paid { display: grid; grid-template-columns: 26px 1fr auto 28px; gap: 8px; padding: 4px 0; color: var(--muted); font-size: 14px; }
.plan-paid .n { color: var(--ok); font-weight: 600; font-size: 13px; }
.plan-paid .num { padding-right: 12px; }
.plan-paid + .plan-row { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.plan-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 130px 28px; gap: 8px; align-items: center; padding: 5px 0; }
.plan-row .n { color: var(--muted); font-weight: 600; font-size: 13px; text-align: center; }
@media (max-width: 420px) { .plan-row { grid-template-columns: 22px minmax(0, 1fr) 110px 24px; } }
.plan-row input.missing { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-hint { grid-column: 3; text-align: right; font-size: 12px; font-weight: 600; color: var(--accent); }
.plan-hint.on-date { grid-column: 2; text-align: left; }
.plan-hint:empty { display: none; }
.plan-row input { width: 100%; min-width: 0; height: 40px; min-height: 0; font-size: 15px; padding: 0 12px; font: inherit; font-weight: 600; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
.plan-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-amount { position: relative; display: block; margin: 0; }
.plan-amount input { padding-right: 26px; text-align: right; font-variant-numeric: tabular-nums; }
.plan-amount span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.plan-remove { border: 0; background: none; color: #b9b3be; font-size: 15px; cursor: pointer; padding: 4px; }
.plan-remove:hover { color: var(--late); }
.link.plan-add { color: var(--accent); font-weight: 600; padding: 6px 0; margin-top: 2px; }
.plan-balance { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-balance.ok { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); color: color-mix(in srgb, var(--ok) 80%, var(--ink)); }
.plan-balance.warn { background: color-mix(in srgb, var(--warm) 18%, var(--surface)); color: color-mix(in srgb, var(--warm) 50%, var(--ink)); }
.plan-balance.over { background: var(--late-soft); color: color-mix(in srgb, var(--late) 85%, var(--ink)); }
.plan-msg { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-balance .link { padding: 0; font-weight: 700; color: inherit; text-decoration: underline; font-size: 14px; }
.plan-total { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; margin-left: auto; }
.plan-sale-wrap { display: inline-flex; align-items: baseline; gap: 3px; margin: 0; font: inherit; cursor: text; }
.plan-sale-wrap input.plan-sale { display: inline-block; width: auto; height: auto; min-height: 0; margin: 0; font: inherit; color: inherit; background: none; border: 0; border-bottom: 1.5px dashed currentColor; border-radius: 0; padding: 0; text-align: right; min-width: 2ch; box-shadow: none; font-variant-numeric: tabular-nums; }
.plan-sale-wrap input.plan-sale:focus { outline: none; border-bottom-style: solid; }
.plan-editor .actions { margin-top: 14px; }
