/* Emails → Contacts (sous-navigation, liste, fiches) et formulaire d'inscription de l'éditeur de page. */
.em-sub { margin: 0 0 14px; }
.em-sub .chip { cursor: pointer; }
.em-sub .chip:not(.on) { background: transparent; color: var(--text); }
.ct-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px;
  background: var(--terra, #C77B5A); color: #fff; font: 700 11px/1 var(--sans); }
.ct-warn { color: var(--err); background: var(--err-bg); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0 0 12px; }
.ct-stats { margin: 0; }
.ct-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.ct-filters input[type="search"] { flex: 1 1 220px; min-width: 180px; }
.ct-filters select, .ct-filters input { width: auto; }
.ct-filters label { display: flex; align-items: center; gap: 6px; margin: 0; }
.ct-bulk { padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); margin: 0 0 12px; }
.ct-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ct-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ct-table th { text-align: left; font-weight: 700; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.ct-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ct-table td.ct-mail { word-break: break-all; }
.ct-table input[type="checkbox"] { width: 16px; height: 16px; }
.ct-tag { display: inline-block; margin: 0 4px 4px 0; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line2); font-size: 12px; }
.ct-st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ct-confirmed { color: var(--ok); background: var(--ok-bg); }
.ct-pending { color: var(--gold-text, var(--text)); background: var(--soft); border: 1px solid var(--line2); }
.ct-unsubscribed { color: var(--muted); background: transparent; border: 1px dashed var(--line2); }
.ct-invalid { color: var(--err); background: var(--err-bg); margin-top: 4px; }
/* Emails → Statistiques */
.es-kpi { align-content: start; }
.es-kv { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.es-kv strong { font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--heading); }
.es-kv strong small { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.es-say { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text); }
.es-h { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 700 11.5px/1.4 var(--sans); white-space: nowrap; }
.es-good { color: var(--ok); background: var(--ok-bg); }
.es-watch { color: var(--gold-text, var(--text)); background: var(--soft); border: 1px solid var(--gold); }
.es-bad { color: var(--err); background: var(--err-bg); }
.es-few, .es-none { color: var(--muted); background: var(--soft); }
.es-hook { color: var(--muted); background: transparent; border: 1px dashed var(--line2); }
.es-note { padding: 14px 16px; }
.es-note p { margin: 4px 0 0; }
.es-note-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.es-note-row > div { flex: 1 1 360px; }
.es-privacy { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 10px !important; }
.es-switch { display: inline-flex !important; align-items: center; gap: 10px; margin: 0; font-weight: 600; cursor: pointer; }
.es-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; margin: 0; border-radius: 999px; background: var(--line2); position: relative; cursor: pointer; transition: background .2s; }
.es-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.es-switch input:checked { background: var(--ok); }
.es-switch input:checked::after { transform: translateX(18px); }
.es-switch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.es-hook summary { cursor: pointer; }
.es-hook ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.es-hook code { font-size: 12.5px; background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
.es-legend { display: flex; gap: 16px; margin-top: 6px; }
.es-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.es-legend i.st-b1 { background: var(--gold); } .es-legend i.st-b2 { background: var(--sage); } .es-legend i.st-b3 { background: var(--terra); }
.es-table tr.es-seq td { border-top: 1px solid var(--line2); background: var(--soft); }
.es-table tr.es-mail td:first-child { padding-left: 18px; }
.es-table tr.es-mail td:first-child .badge { display: inline-block; margin-right: 6px; }
.es-links li span:first-child { word-break: break-all; }
.es-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.es-p { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: var(--radius-sm); }
.es-p strong { font-family: var(--serif); font-size: 26px; line-height: 1.1; color: var(--heading); }
.es-p span { font-size: 13px; color: var(--muted); }
.es-p.ok strong { color: var(--ok); }
.es-p.err strong { color: var(--err); }
.ct-pager { justify-content: center; margin-top: 14px; }
.ct-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.ct-check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.ct-tagdefs { display: grid; gap: 8px; }
.ct-tagdef { flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.ct-tagdef input[name="name"] { flex: 1 1 160px; width: auto; }
.ct-colors { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ct-sw { display: inline-block; width: 20px; height: 20px; border-radius: 50%; margin: 0; cursor: pointer; position: relative; }
.ct-sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ct-sw:has(input:checked) { outline: 2px solid var(--text); outline-offset: 2px; }
.au-act { flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.au-act select { flex: 1 1 200px; width: auto; }
.sa-days { display: grid; gap: 6px; }
.sa-day { display: flex !important; justify-content: space-between; align-items: center; gap: 10px; font-weight: 400 !important; margin: 0; }
.sa-day .row { flex: none; gap: 4px; }
/* Onglet Ventes */
.sl-paid { color: var(--ok); background: var(--ok-bg); }
.sl-pending, .sl-partial { color: var(--gold-text, var(--text)); background: var(--soft); border: 1px solid var(--line2); }
.sl-failed { color: var(--err); background: var(--err-bg); }
.sl-refunded, .sl-canceled { color: var(--muted); background: transparent; border: 1px dashed var(--line2); }
.sl-row { cursor: pointer; }
.sl-row:hover td, .sl-row:focus td { background: var(--soft); }
.sl-row:focus { outline: none; }
.sl-table td { color: var(--text); }
.sl-amt { white-space: nowrap; }
.sl-mail { overflow-wrap: anywhere; }
.sl-ref { color: var(--err); }
.sl-amounts { width: 100%; border-collapse: collapse; font-size: 14px; }
.sl-amounts td { padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.sl-amounts .sl-num { text-align: right; white-space: nowrap; padding-left: 12px; }
.sl-amounts .sl-total td { border-top: 1px solid var(--line2); }
.sl-kv { margin: 0 0 8px; line-height: 1.6; }
.sl-kv code { font-size: 12.5px; background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
.sl-list { margin: 0 0 8px; padding-left: 18px; }
/* Onglet Comptabilité */
.cp-banner { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 12px 0 0; padding: 12px 16px;
  border: 1px solid var(--line2); border-radius: 12px; background: var(--soft); color: var(--text); font-size: 14px; line-height: 1.5; }
.cp-banner p { margin: 0; flex: 1 1 320px; }
.cp-banner.warn { background: var(--err-bg); border-color: transparent; }
.cp-banner.warn strong { color: var(--err); }
.cp-table td, .cp-table th { white-space: nowrap; }
.cp-table td:nth-child(3), .cp-table td:nth-child(4) { white-space: normal; min-width: 140px; }
.cp-table td:nth-child(3) { min-width: 200px; }
.cp-table .cp-num, .ct-table .cp-num { text-align: right; white-space: nowrap; }
.cp-act { text-align: right; white-space: nowrap; }
.cp-kind { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; color: var(--muted); }
.cp-neg { color: var(--err); }
.cp-dl { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-set .chips .chip-radio span { text-align: left; }
.cp-set .chips small { font-weight: 400; opacity: .8; }
@media (max-width: 720px) {
  .ct-table th:nth-child(4), .ct-table td:nth-child(4), .ct-table th:nth-child(5), .ct-table td:nth-child(5) { display: none; }
  .sl-table th:nth-child(4), .sl-table td:nth-child(4) { display: table-cell; }
  .ab-table th:nth-child(4), .ab-table td:nth-child(4), .ab-table th:nth-child(5), .ab-table td:nth-child(5) { display: table-cell; }
  .sl-table th:nth-child(8), .sl-table td:nth-child(8) { display: none; }
}
