/* Rapport CAC — interface. Aucune ressource externe (CSP stricte). Polices et icônes auto-hébergées. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --navy: #0D1F34;
  --navy-2: #16304f;
  --blue: #0059F8;
  --blue-2: #0047c9;
  --blue-soft: #e8f0ff;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --line: #e3e8f1;
  --line-2: #cfd7e5;
  --texte: #0D1F34;
  --doux: #5f6b80;
  --ok: #1d7a4d;
  --ok-bg: #e5f5ec;
  --warn: #9a5b06;
  --warn-bg: #fdf1dc;
  --err: #b42323;
  --err-bg: #fdeaea;
  --shadow: 0 1px 2px rgba(13,31,52,.04), 0 4px 16px rgba(13,31,52,.06);
  --radius: 12px;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --grad: linear-gradient(135deg, #0D1F34 0%, #0a3a91 55%, #0059F8 100%);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--texte); font-family: var(--sans); line-height: 1.55; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 700; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-2); }
:focus-visible { outline: 3px solid rgba(0,89,248,.35); outline-offset: 2px; }
.muted { color: var(--doux); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.bi { font-size: 1.05em; }

/* Coquille */
.shell { display: flex; min-height: 100vh; }
.side { width: 256px; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: block; padding: 2px 10px 20px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.brand img { display: block; width: 100%; max-width: 176px; height: auto; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side nav a { display: flex; align-items: center; gap: 11px; color: #34435a; text-decoration: none; padding: 9px 12px; border-radius: 10px; font-weight: 500; font-size: .94rem; }
.side nav a .bi { font-size: 1.15rem; color: #7c889e; width: 1.3em; text-align: center; }
.side nav a:hover { background: #f1f4fa; color: var(--navy); }
.side nav a.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.side nav a.on .bi { color: var(--blue); }
.nav-sep { margin: 20px 12px 6px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: #8b95a9; }
.who { border-top: 1px solid var(--line); padding: 14px 6px 0; font-size: .85rem; display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; align-items: center; }
.who-avatar { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.who-mail { word-break: break-all; color: var(--doux); line-height: 1.25; }
.who form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; font-weight: 600; }
.linklike:hover { color: var(--blue-2); }
.main { flex: 1; min-width: 0; padding: 32px 40px 64px; max-width: 1220px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.pagehead h1 { font-size: 1.65rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cartes et grilles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.card > h2 { margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; text-decoration: none; color: var(--texte); display: block; border-top: 3px solid var(--blue); }
.stat:hover { border-color: var(--blue); border-top-color: var(--blue); transform: translateY(-1px); }
.stat b { font-size: 2rem; font-weight: 800; display: block; line-height: 1.1; color: var(--navy); letter-spacing: -.02em; }
.stat span { color: var(--doux); font-size: .875rem; font-weight: 500; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th { text-align: left; font-weight: 600; color: var(--doux); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #f8f9fc; white-space: nowrap; }
th:first-child { border-top-left-radius: 8px; }
th:last-child { border-top-right-radius: 8px; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fbff; }
td.num, th.num { text-align: right; }
.empty { color: var(--doux); padding: 18px 4px; }

/* Formulaires */
form.stack > * + * { margin-top: 14px; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: #26364d; }
label .hint, .hint { font-weight: 400; color: var(--doux); font-size: .85rem; }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(0,89,248,.15); outline-offset: 0; }
input[type=file] { font: inherit; max-width: 100%; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.checkline { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.checkline input { width: auto; accent-color: var(--blue); }
.inline-form { display: inline; }

.btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 600; font-size: .93rem; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--navy); background: var(--navy); color: #fff; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-danger { background: #fff; color: var(--err); border-color: #e8b4b4; }
.btn-danger:hover { background: var(--err-bg); color: var(--err); border-color: var(--err); }

/* Messages et badges */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; border: 1px solid; font-weight: 500; }
.flash-ok { background: var(--ok-bg); border-color: #b9e1cb; color: #145c3a; }
.flash-err { background: var(--err-bg); border-color: #f0bcbc; color: #8c1818; }
.flash-warn { background: var(--warn-bg); border-color: #efd7a5; color: #6f4204; }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #eaeef5; color: #38465e; white-space: nowrap; }
.st-nouveau { background: #eaeef5; }
.st-lettre_envoyee, .st-lettre_signee { background: var(--blue-soft); color: var(--blue-2); }
.st-en_cours { background: var(--warn-bg); color: var(--warn); }
.st-rapport_emis { background: var(--ok-bg); color: var(--ok); }
.st-clos { background: #e1e5ec; color: #3a4456; }
.st-abandonne { background: var(--err-bg); color: var(--err); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-id { background: var(--blue-soft); color: var(--blue-2); }

progress { width: 90px; height: 8px; vertical-align: middle; accent-color: var(--blue); }

/* Fiche mission */
.dossier { display: flex; gap: 20px; align-items: baseline; flex-wrap: wrap; margin: -8px 0 22px; color: var(--doux); }
.dossier .ref { font-size: 1rem; color: var(--blue); font-weight: 700; letter-spacing: .02em; background: var(--blue-soft); padding: 3px 12px; border-radius: 99px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 7px 14px; margin: 0; }
.kv dt { color: var(--doux); font-size: .9rem; }
.kv dd { margin: 0; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.subnav a { text-decoration: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: #34435a; font-size: .9rem; font-weight: 500; }
.subnav a:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.linkbox { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.linkbox input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
details.fold { margin-top: 12px; }
details.fold summary { cursor: pointer; font-weight: 600; color: var(--blue); }
details.fold[open] summary { margin-bottom: 12px; }
.reqlist { list-style: none; margin: 0; padding: 0; }
.reqlist li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.reqlist li:last-child { border-bottom: 0; }
.reqlist .rl-label { flex: 1; min-width: 220px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #b0b8c8; flex: none; }
.dot.recu { background: var(--warn); border-color: var(--warn); }
.dot.valide { background: var(--ok); border-color: var(--ok); }
.dot.na { background: #dfe3ea; border-color: #dfe3ea; }

/* Pages publiques : bandeau dégradé marine → bleu, logo blanc */
body.public { background: var(--bg); min-height: 100vh; }
.pub-top { background: var(--grad); }
.pub-top-in { max-width: 760px; margin: 0 auto; padding: 22px 20px; }
.pub-top img { display: block; height: 40px; width: auto; }
.pub-wrap { max-width: 460px; margin: 0 auto; padding: 32px 20px 64px; }
.pub-wrap.pub-wide { max-width: 760px; }
.pub-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 28px 30px 30px; }
.pub-card h1 { font-size: 1.45rem; margin-bottom: 10px; }
.pub-card p { margin: 0 0 14px; }
.pub-foot { margin-top: 20px; color: var(--doux); font-size: .83rem; }
/* Connexion : plein écran dégradé, logo complet centré, carte blanche */
body.public-narrow { background: var(--grad); background-attachment: fixed; }
.public-narrow .pub-top { background: transparent; }
.public-narrow .pub-top-in { max-width: 460px; padding: 56px 20px 0; text-align: center; }
.public-narrow .pub-top img { height: 132px; margin: 0 auto; }
.public-narrow .pub-wrap { padding-top: 28px; }
.public-narrow .pub-card { box-shadow: 0 20px 50px rgba(0,0,0,.28); border: 0; }
.public-narrow .pub-card .btn { width: 100%; justify-content: center; padding: 12px 18px; }
.public-narrow .pub-card .btn-block { width: 100%; }

/* Dépôt client */
.depot-progress { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; }
.depot-progress progress { width: 100%; height: 10px; }
.slot { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; background: #fff; }
.slot.done { border-color: #b9e1cb; background: #f6fbf8; }
.slot-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.slot-title { font-weight: 600; }
.slot-files { margin: 8px 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--ok); }
.slot-files li::before { content: "✓ "; font-weight: 700; }
.drop { margin-top: 10px; border: 2px dashed #b9c4d8; border-radius: 12px; padding: 14px; text-align: center; color: var(--doux); font-size: .92rem; background: #fafbfe; }
.drop.over { border-color: var(--blue); background: var(--blue-soft); }
.drop input[type=file] { display: block; margin: 8px auto 0; }
.slot-msg { margin-top: 8px; font-size: .88rem; min-height: 1.2em; }
.slot-msg.err { color: var(--err); }
.slot-msg.ok { color: var(--ok); }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; padding: 12px 14px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 4px 10px; margin-bottom: 8px; }
  .brand img { max-width: 150px; }
  .side nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .side nav a { padding: 7px 11px; }
  .nav-sep { display: none; }
  .who { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; }
  .who-avatar { display: none; }
  .who-mail { margin: 0; }
  .main { padding: 22px 16px 48px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dd { margin-bottom: 8px; }
  .card { padding: 18px 16px; }
  .pub-card { padding: 22px 18px 24px; }
  .public-narrow .pub-top img { height: 108px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .stat, .subnav a, .side nav a { transition: background-color .15s, border-color .15s, color .15s, transform .15s; }
}

/* Ajustements d'espacement */
.card h3 { margin: 20px 0 8px; }
.card .card-head h3 { margin: 0; }
.card > .actions + h3, .card > form + h3 { margin-top: 24px; }
.slot-form > * + * { margin-top: 8px; }
.kv + h3, .grid + h3 { margin-top: 22px; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: .85rem; padding: 6px 12px; margin-right: 10px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--navy); cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.slot-msg:empty { display: none; }

/* Fenêtres surgissantes (<dialog>) */
.subnav-btn { font: inherit; cursor: pointer; padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: #34435a; font-size: .9rem; font-weight: 500; }
.subnav-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
dialog.modal { border: 0; padding: 0; border-radius: 16px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); box-shadow: 0 24px 70px rgba(13,31,52,.35); color: var(--texte); background: #fff; overflow: hidden; }
dialog.modal[open] { display: flex; flex-direction: column; }
dialog.modal.modal-wide { width: min(860px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(13,31,52,.55); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #f8f9fc; }
.modal-head h2 { font-size: 1.1rem; }
.modal-x { border: 0; background: transparent; font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--doux); padding: 6px 8px; border-radius: 8px; }
.modal-x:hover { background: var(--blue-soft); color: var(--blue); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); background: #f8f9fc; }

/* Lien externe (flèche) */
a.ext-arrow { display: inline-flex; align-items: center; justify-content: center; width: 1.45em; height: 1.45em; margin-left: 4px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); text-decoration: none; font-weight: 700; font-size: .85rem; line-height: 1; vertical-align: middle; }
a.ext-arrow:hover { background: var(--blue); color: #fff; }
a.ext-arrow.hidden { display: none !important; }

/* Règlement (Stripe) */
table.amounts { width: auto; min-width: 280px; max-width: 100%; margin: 6px 0 14px; font-size: .95rem; }
table.amounts td { padding: 7px 14px 7px 0; border-bottom: 1px solid var(--line); }
table.amounts td.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; padding-left: 28px; white-space: nowrap; }
table.amounts tr.total td { border-bottom: 0; border-top: 2px solid var(--navy); font-weight: 800; font-size: 1.1rem; padding-top: 10px; }
.btn-pay { background: var(--blue); border-color: var(--blue); }
.btn-pay:hover { background: var(--blue-2); border-color: var(--blue-2); }
.pay-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; background: var(--warn-bg); border: 1px solid #efd7a5; border-left: 5px solid #e0a02b; border-radius: 14px; padding: 16px 20px; margin-bottom: 18px; color: #5a3703; }
.pay-banner-text { display: flex; flex-direction: column; gap: 2px; }
.pay-banner .btn { flex: none; }
.linkbox .btn { white-space: nowrap; flex: none; }

/* Zone de dépôt multi-types (fiche mission) */
.upzone { margin-top: 4px; }
.drop-big { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 26px 18px; border: 2px dashed #b9c4d8; border-radius: 14px; background: #fafbfe; cursor: pointer; font-weight: 400; color: var(--doux); margin-bottom: 0; }
.drop-big strong { color: var(--navy); font-size: 1.05rem; }
.drop-big .drop-icon { font-size: 2rem; line-height: 1; }
.drop-big:hover, .drop-big.over { border-color: var(--blue); background: var(--blue-soft); }
.up-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.up-input:focus-visible + .up-list, .upzone:focus-within .drop-big { outline: 3px solid rgba(0,89,248,.25); outline-offset: 2px; }
.up-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.up-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) auto; gap: 8px 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.up-row .up-subject { grid-column: 1 / 3; }
.up-name { display: flex; flex-direction: column; min-width: 0; }
.up-fn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-del { border: 0; background: transparent; cursor: pointer; color: var(--doux); font-size: 1rem; padding: 6px 8px; border-radius: 8px; }
.up-del:hover { background: var(--err-bg); color: var(--err); }
.up-actions { margin-top: 12px; }
.up-actions .btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 700px) { .up-row { grid-template-columns: 1fr auto; } .up-row .up-type, .up-row .up-subject { grid-column: 1 / 2; } .up-del { grid-column: 2; grid-row: 1; } }

/* ---- Fenêtre SMS ---- */
.modal-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--line); background: #f8f9fc; }
.modal-tab { font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 11px 12px 9px; color: var(--doux); }
.modal-tab:hover { color: var(--blue); }
.modal-tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 2px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-size: .78rem; text-align: center; }
.sms-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; }
.sms-kinds { display: grid; gap: 8px; }
.sms-kind { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: #fff; font-weight: 400; margin: 0; }
.sms-kind:hover { border-color: var(--blue); }
.sms-kind input { position: absolute; opacity: 0; pointer-events: none; }
.sms-kind:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 1px var(--blue) inset; }
.sms-kind:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.sms-kind:has(input:disabled) { opacity: .5; cursor: not-allowed; background: #f4f6fb; }
.sk-ico { font-size: 1.4rem; line-height: 1; }
.sk-t { display: flex; flex-direction: column; }
.sk-t small { color: var(--doux); font-size: .8rem; }
.sms-bar { height: 4px; border-radius: 4px; background: var(--line); margin-top: 6px; overflow: hidden; }
.sms-bar i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 4px; transition: width .15s; }
.sms-bar i.warn { background: #d97706; }
.ok-txt { color: #0f7b45; }
.err-txt { color: #b42318; }
.sms-side { position: sticky; top: 0; }
.sms-phone { border: 6px solid #0D1F34; border-radius: 28px; background: #fff; overflow: hidden; box-shadow: 0 10px 30px rgba(13,31,52,.18); }
.sms-phone-top { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px 8px; background: #f2f4f8; border-bottom: 1px solid var(--line); font-size: .85rem; }
.sms-avatar { width: 30px; height: 30px; border-radius: 50%; background: #c9d2e3; display: grid; place-items: center; font-size: .95rem; }
.sms-screen { min-height: 230px; max-height: 330px; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sms-bubble { background: #e9ecf2; color: #0D1F34; padding: 9px 12px; border-radius: 18px 18px 18px 4px; font-size: .84rem; line-height: 1.4; white-space: pre-wrap; word-break: break-word; max-width: 100%; }
.sms-bubble.empty { display: none; }
.sms-time { font-size: .7rem; color: var(--doux); padding-left: 6px; }
.sms-hist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.sms-hist li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; }
.sms-hist li.is-fail { border-color: #f1b4ae; background: #fff7f6; }
.sms-hist-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
@media (max-width: 720px) {
  .sms-grid { grid-template-columns: 1fr; }
  .sms-side { display: none; }
}
#sms-phone-state { min-height: 1.4em; margin: 4px 0 6px; }
a.ext-link { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); text-decoration: none; font-size: .8rem; font-weight: 600; white-space: nowrap; }
a.ext-link:hover { background: var(--blue); color: #fff; }
.checkline { align-items: flex-start; }
