@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #18202c;
  --ink-2: #3b4555;
  --muted: #6b7486;
  --line: #e3e6eb;
  --line-strong: #cfd4dc;
  --accent: #1d5c8c;
  --accent-hover: #164a72;
  --accent-soft: #e8f0f7;
  --success: #17794a; --success-soft: #e6f4ec;
  --danger: #b42318;  --danger-soft: #fdecea;
  --warning: #9a5b00; --warning-soft: #fdf3e1;
  --info: #1d5c8c;    --info-soft: #e8f0f7;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --sidebar: 232px;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  font-feature-settings: 'cv11' 1;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); min-height: 100%; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
.booting { opacity: 0; }

/* ——— Structure ——— */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; color: var(--ink); }
.logo img { width: 30px; height: 30px; }
.logo strong { display: block; font-size: 14px; }
.logo span { display: block; font-size: 12px; color: var(--muted); }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav-link:hover { background: var(--surface-2); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-link .count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 500; }
.nav-link svg { width: 18px; height: 18px; flex: none; }
.sidebar .btn-new { margin: 8px 0 10px; justify-content: center; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.env-badge { font-size: 12px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); }
.env-badge.legal { background: var(--success-soft); color: var(--success); }

.main { min-width: 0; padding: 28px 32px 48px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; font-weight: 650; }
.page-head .sub { color: var(--muted); }
.page-head .spacer { flex: 1; }

/* ——— Boutons ——— */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 500;
  text-decoration: none; color: var(--ink); white-space: nowrap; line-height: 1.3;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.icon { padding: 6px; }
.btn.block { width: 100%; justify-content: center; }

/* ——— Cartes ——— */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card h2 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.card + .card { margin-top: 16px; }

/* ——— Statuts ——— */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.neutral { background: #eef0f3; color: #4a5465; }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.muted { background: #f1f2f4; color: #7c8494; }

/* ——— Filtres et liste ——— */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px;
  cursor: pointer; font-weight: 500; color: var(--ink-2); font-size: 13px;
}
.chip .n { color: var(--muted); margin-left: 4px; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.active .n { color: #c9ced6; }
.search { margin-left: auto; position: relative; }
.search input { padding: 7px 12px 7px 32px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); width: 240px; background: var(--surface); }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table th:first-child { border-top-left-radius: var(--radius); }
.table th:last-child { border-top-right-radius: var(--radius); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--surface-2); }
.table .num { text-align: right; }
.table td { font-variant-numeric: tabular-nums; }
.table .mono { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; }
.table .client strong { display: block; font-weight: 600; }
.table .client span { color: var(--muted); font-size: 13px; }
.table .actions { text-align: right; white-space: nowrap; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ——— Menu contextuel ——— */
.menu-wrap { position: relative; display: inline-block; }
.menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 190px; padding: 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.menu button {
  display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 10px; border: 0; background: none;
  border-radius: 5px; cursor: pointer; text-align: left;
}
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }
.menu svg { width: 15px; height: 15px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ——— Choix du contrat type ——— */
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.template-card { text-align: left; cursor: pointer; padding: 20px; border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.template-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.template-card .ico { width: 40px; height: 40px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.template-card .ico svg { width: 22px; height: 22px; }
.template-card h3 { font-size: 16px; margin-bottom: 6px; }
.template-card p { margin: 0; color: var(--muted); }
.template-card.soon { cursor: default; opacity: .6; border-style: dashed; box-shadow: none; }
.template-card.soon:hover { border-color: var(--line); box-shadow: none; }

/* ——— Éditeur ——— */
.editor-head { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 14px 0; margin: -28px 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.editor-head h1 { font-size: 18px; font-weight: 650; }
.editor-head .spacer { flex: 1; }
.editor-head .meta { color: var(--muted); font-size: 13px; }
.save-state { color: var(--muted); font-size: 12.5px; }
.save-state.err { color: var(--danger); }
.editor { display: grid; grid-template-columns: minmax(340px, 440px) 1fr; gap: 24px; align-items: start; }
.editor-form { display: flex; flex-direction: column; gap: 16px; }
.form-section h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.fields { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.field { grid-column: span 6; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.half { grid-column: span 3; }
.field.third { grid-column: span 2; }
.field.two-thirds { grid-column: span 4; }
.field label, .field .label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field .req { color: var(--danger); margin-left: 2px; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
}
.field textarea { resize: vertical; min-height: 60px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--danger); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field.check { flex-direction: row; align-items: flex-start; gap: 9px; }
.field.check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.field.check label { font-weight: 400; color: var(--ink); }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 2px; background: var(--surface-2); }
.segmented label { padding: 6px 14px; border-radius: 5px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; }
.alert.danger { background: var(--danger-soft); color: var(--danger); }
.alert.warning { background: var(--warning-soft); color: var(--warning); }
.alert.info { background: var(--info-soft); color: var(--info); }

/* ——— Aperçu ——— */
.preview-col { position: sticky; top: 72px; min-width: 0; }
.editor-form, .detail > * { min-width: 0; }
.preview-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 12.5px; }
.preview-frame { overflow: auto; max-height: calc(100vh - 110px); border-radius: var(--radius); background: #e6e9ee; padding: 20px; border: 1px solid var(--line); }
.preview-scale { transform-origin: top left; }
.sheet { width: 794px; padding: 60px 64px 72px; background: #fff; box-shadow: 0 2px 10px rgba(16,24,40,.12); }
.mobile-tabs { display: none; }

/* ——— Fiche contrat envoyé ——— */
.detail { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; gap: 24px; align-items: start; }
.detail-side { display: flex; flex-direction: column; gap: 16px; }
.detail-side .card + .card { margin-top: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.signer { padding: 12px 0; border-top: 1px solid var(--line); }
.signer:first-of-type { border-top: 0; padding-top: 0; }
.signer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.signer-head strong { font-weight: 600; }
.signer-state { font-size: 12.5px; color: var(--muted); }
.signer-state.signed { color: var(--success); font-weight: 500; }
.signer-state.declined { color: var(--danger); font-weight: 500; }
.link-box { display: flex; gap: 6px; }
.link-box input { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }
.link-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.link-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.link-note.ok { color: var(--success); font-weight: 500; }
.modal-check { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.doc-item .doc-ico { color: var(--danger); flex: none; }
.doc-item .doc-ico svg { width: 20px; height: 20px; }
.doc-item .doc-name { flex: 1; font-weight: 500; font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 18px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 3px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.timeline li::after { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li:first-child::before { background: var(--accent); }
.timeline time { display: block; color: var(--muted); font-size: 12px; }
.pdf-frame { width: 100%; height: calc(100vh - 120px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: #e6e9ee; }

/* ——— Signés ——— */
.signed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.signed-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.signed-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.signed-card h3 { font-size: 15px; font-weight: 600; }
.signed-card .muted { color: var(--muted); font-size: 13px; }
.signed-card .amount { font-weight: 600; }
.signed-card .row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* ——— Connexion ——— */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 380px; padding: 30px 28px; }
.login .logo { padding: 0 0 22px; }
.login h1 { font-size: 20px; margin-bottom: 4px; }
.login p { color: var(--muted); margin: 0 0 18px; }
.login form { display: flex; flex-direction: column; gap: 12px; }

/* ——— Fenêtre modale et notifications ——— */
dialog#modal { border: 0; padding: 0; border-radius: 12px; box-shadow: var(--shadow-lg); width: min(460px, calc(100vw - 32px)); color: var(--ink); }
dialog#modal::backdrop { background: rgba(16, 24, 40, .45); }
.modal-body { padding: 22px 24px 8px; }
.modal-body h2 { font-size: 17px; margin-bottom: 8px; }
.modal-body p { margin: 0 0 10px; color: var(--ink-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px 20px; }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-width: 380px; animation: toast-in .18s ease-out; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ——— Responsive ——— */
@media (max-width: 1100px) {
  .editor, .detail { grid-template-columns: 1fr; }
  .preview-col { position: static; }
  .mobile-tabs { display: inline-flex; }
  .editor[data-tab=form] .preview-col { display: none; }
  .editor[data-tab=preview] .editor-form { display: none; }
  .pdf-frame { height: 75vh; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; z-index: 25; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .logo { padding: 0 6px 0 0; }
  .logo div { display: none; }
  .nav-link .count { display: none; }
  .sidebar .btn-new { margin: 0; padding: 7px 9px; }
  .sidebar .btn-new span, .sidebar-foot .btn span { display: none; }
  .signed-grid { grid-template-columns: 1fr; }
  .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; padding: 0; }
  .env-badge { display: none; }
  .main { padding: 20px 16px 40px; }
  .editor-head { margin-top: -20px; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .table .hide-sm { display: none; }
  .fields { grid-template-columns: 1fr; }
  .field.half, .field.third, .field.two-thirds { grid-column: span 1; }
  .field { grid-column: span 1; }
}

/* ——— Suivi de la signature ——— */
.trail-chain { font-size: 12.5px; font-weight: 500; padding: 6px 10px; border-radius: var(--radius-sm); margin-bottom: 10px; }
.trail-chain.ok { background: var(--success-soft); color: var(--success); }
.trail-chain.bad { background: var(--danger-soft); color: var(--danger); }
.trail { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; font-size: 13px; }
.trail li { padding: 8px 0; border-top: 1px solid var(--line); }
.trail li:first-child { border-top: 0; padding-top: 0; }
.trail-top { display: flex; justify-content: space-between; gap: 8px; }
.trail-top time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.trail-dev { color: var(--muted); font-size: 12px; word-break: break-word; }
.trail .t-signed strong, .trail .t-completed strong { color: var(--success); }
.trail .t-declined strong, .trail .t-otp_failed strong { color: var(--danger); }

/* ——— Paramètres ——— */
.settings { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.settings .card + .card { margin-top: 0; }
.muted-p { color: var(--muted); margin: 0 0 10px; font-size: 13.5px; }
.muted-p.small { font-size: 12.5px; margin: 8px 0 0; }
.num-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.num-prefix { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }
.num-row input, .num-inline input { width: 90px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }
.num-inline { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.num-inline input { width: 76px; }

.danger-zone { border-color: #f1c4bf; }
.danger-zone h2 { display: flex; align-items: center; gap: 8px; color: var(--danger); }
.danger-zone h2 svg { width: 18px; height: 18px; }
.dz-row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.dz-row > div { flex: 1 1 320px; }
.dz-row .muted-p { margin-top: 4px; }
.btn.danger:not(:disabled) { border-color: #f1c4bf; }
.btn.danger:hover:not(:disabled) { background: var(--danger-soft); }
.dz-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.dz-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.dz-stats b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.dz-stats span { font-size: 12px; color: var(--muted); }
.dz-stats .warn { background: var(--warning-soft); border-color: #f0dcb6; }
.dz-stats .warn b { color: var(--warning); }

.wipe { margin-top: 18px; padding-top: 18px; border-top: 1px dashed #f1c4bf; animation: wipe-in .35s ease-out; }
@keyframes wipe-in { from { opacity: 0; transform: translateY(-6px); } }
.wipe-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wipe-steps > li { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; transition: opacity .25s, border-color .25s, background .25s; }
.wipe-steps > li.locked { opacity: .45; }
.wipe-steps > li.done { border-color: #b9dcc8; background: #fbfefc; }
.ws-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ws-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--danger-soft); color: var(--danger); transition: background .25s, color .25s; }
.wipe-steps > li.done .ws-num { background: var(--success); color: #fff; }
.wipe-steps code { background: var(--danger-soft); color: var(--danger); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.ack { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 13.5px; cursor: pointer; }
.ack input[type=checkbox] { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--danger); flex: none; }
.ack.next-num { align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--ink-2); cursor: default; }
#wipe-phrase, #wipe-pass { width: 100%; max-width: 360px; padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 15px; }
#wipe-phrase { font-family: Consolas, 'Courier New', monospace; letter-spacing: .08em; }
#wipe-phrase.bad { border-color: var(--danger); background: #fff8f7; }
#wipe-phrase.ok { border-color: var(--success); background: #f6fcf8; }
.phrase { font-family: Consolas, 'Courier New', monospace; font-size: 18px; letter-spacing: .14em; margin-bottom: 8px; color: #c3c8d0; user-select: none; }
.phrase span { transition: color .15s; }
.phrase span.ok { color: var(--success); }
.phrase span.bad { color: var(--danger); text-decoration: underline wavy; }

.hold-btn { --p: 0; position: relative; overflow: hidden; width: 100%; max-width: 420px; padding: 14px 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--danger); background: #fff; color: var(--danger); font-weight: 700; font-size: 15px; cursor: pointer; user-select: none; touch-action: none; transition: transform .15s, opacity .2s; }
.hold-btn:disabled { opacity: .4; cursor: not-allowed; border-color: var(--line-strong); color: var(--muted); }
.hold-fill { position: absolute; inset: 0; background: #f6b9b1; transform-origin: left; transform: scaleX(var(--p)); }
.hold-label { position: relative; z-index: 1; mix-blend-mode: normal; }
.hold-btn.holding { transform: scale(.985); animation: hold-shake .12s linear infinite; }
.hold-btn.working { background: var(--danger); color: #fff; }
@keyframes hold-shake { 0%, 100% { translate: 0 0; } 25% { translate: -1px 0; } 75% { translate: 1px 0; } }
.wipe .alert { margin-top: 10px; }
@media (max-width: 760px) { .dz-stats { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .hold-btn.holding { animation: none; } }
