:root {
  --bg: #fffafa;
  --panel: #ffffff;
  --ink: #3c2f39;
  --muted: #7d6977;
  --line: #eddde6;
  --primary: #cb71b1;
  --primary-hover: #b75d9c;
  --primary-soft: #fae7f4;
  --accent: #fed0c6;
  --accent-soft: #fff0ec;
  --success: #18864b;
  --success-bg: #eaf8f0;
  --danger: #b82c36;
  --danger-bg: #fff0f1;
  --warning: #9b6a2d;
  --warning-bg: #fff6e9;
  --shadow: 0 12px 32px rgba(88, 50, 75, 0.08);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; }
.brand-mark {
  display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px;
  background: var(--primary); color: white; font-size: 14px;
}
.top-actions { display: flex; gap: 8px; align-items: center; }
.top-actions form { margin: 0; }

.container { width: min(1260px, calc(100% - 40px)); margin: 42px auto 70px; }
.container.narrow { width: min(930px, calc(100% - 40px)); }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
h1 { margin: 5px 0 6px; font-size: clamp(27px, 4vw, 38px); letter-spacing: -0.035em; }
h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.015em; }
p { line-height: 1.55; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 800; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 7px; }
.back-link:hover { color: var(--ink); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 14px;
  text-decoration: none; font-weight: 750; font-size: 14px; transition: .14s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-quiet { background: white; border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { background: #fff7fa; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger-soft { background: var(--danger-bg); color: var(--danger); border-color: #f0c7ca; }
.btn-full { width: 100%; }
.btn-tall { padding-block: 13px; }
.btn-small { padding: 7px 10px; font-size: 12px; }

.flash-stack { width: min(930px, calc(100% - 40px)); margin: 18px auto -18px; display: grid; gap: 8px; }
.flash { border-radius: 11px; padding: 11px 14px; border: 1px solid var(--line); background: white; }
.flash.error { background: var(--danger-bg); border-color: #f2c5c9; color: #89212a; }
.flash.success, .callout.success { background: var(--success-bg); border: 1px solid #b8e7cb; color: #126537; }
.callout { padding: 13px 15px; border-radius: 12px; margin-bottom: 16px; }

.auth-shell { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 30px; }
.auth-card { width: min(420px, 100%); padding: 30px; }
.stack-lg { margin-top: 24px; display: grid; gap: 18px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
input, textarea {
  width: 100%; border: 1px solid #cfd6df; border-radius: 10px; background: white; color: var(--ink);
  padding: 11px 12px; outline: none;
}
input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(203,113,177,.14); }
small { color: var(--muted); font-weight: 500; }

.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; text-align: left; background: #fffafb; }
th, td { padding: 14px 15px; border-bottom: 1px solid #e8ebf0; vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fff9fb; }
.cell-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; max-width: 250px; }
.nowrap { white-space: nowrap; font-size: 12px; color: var(--muted); }
.reason-cell { max-width: 250px; font-size: 13px; }
.table-actions { white-space: nowrap; }
.yes { color: var(--success); font-weight: 750; }
.status { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; }
.status-sent { background: var(--primary-soft); color: #8c4d79; }
.status-viewed { background: var(--warning-bg); color: var(--warning); }
.status-completed { background: var(--success-bg); color: var(--success); }
.status-declined { background: var(--danger-bg); color: var(--danger); }
.status-large { padding: 7px 11px; font-size: 12px; }
.empty-state { text-align: center; padding: 70px 20px; }
.empty-state p { margin-bottom: 20px; }
.empty-icon { font-size: 32px; margin-bottom: 8px; color: var(--primary); }

.form-panel { padding: 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.span-2 { grid-column: span 2; }
.form-footer { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }

.detail-card { padding: 22px; }
.detail-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; margin-top: 16px; }
.copy-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 13px; }
.copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f8f9fb; }
.details-list { margin: 16px 0 20px; }
.details-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; border-bottom: 1px solid #edf0f3; padding: 9px 0; }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.decline-box { background: var(--danger-bg); border: 1px solid #f1c9cc; border-radius: 11px; padding: 13px; margin: 15px 0; }
.decline-box p { margin: 5px 0 0; color: #7d252d; }
.timeline { list-style: none; margin: 15px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 22px; border-left: 2px solid #e2e6ec; margin-left: 5px; }
.timeline li:before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px white; }
.timeline li:last-child { padding-bottom: 0; }
.timeline span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.timeline p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.signer-body { background: #fff7f9; }
.signer-header {
  min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 14px 24px; background: white; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.signer-header h1 { font-size: 20px; margin: 2px 0; }
.signer-header p { color: var(--muted); margin: 0; font-size: 12px; }
.signer-flash { position: relative; z-index: 19; margin-top: 14px; }
.signer-layout { width: min(1340px, calc(100% - 28px)); margin: 22px auto 50px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; }
.document-column { min-width: 0; }
.document-page { margin: 0 auto 20px; width: min(850px, 100%); background: white; padding: 10px; border: 1px solid #cfd5dd; box-shadow: 0 9px 28px rgba(25,35,55,.12); }
.document-page img { display: block; width: 100%; height: auto; }
.document-page figcaption { text-align: center; color: var(--muted); font-size: 11px; padding: 8px 0 1px; }
.sign-box-wrap { min-width: 0; }
.sign-box { position: sticky; top: 100px; padding: 20px; }
.sign-box form { display: grid; gap: 17px; margin-top: 18px; }
.signature-field { display: grid; gap: 7px; }
.signature-label-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.text-button { border: 0; padding: 2px 0; background: transparent; color: var(--primary); font-weight: 700; }
#signatureCanvas { width: 100%; height: 170px; border: 2px dashed #c8d0db; border-radius: 11px; background: #fff; touch-action: none; cursor: crosshair; }
.check-row { grid-template-columns: 19px 1fr; align-items: start; gap: 9px; font-weight: 500; color: var(--muted); line-height: 1.42; font-size: 12px; }
.check-row input { width: 18px; height: 18px; margin: 0; }
.decline-dialog { width: min(470px, calc(100% - 30px)); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 25px 70px rgba(20,28,45,.25); }
.decline-dialog::backdrop { background: rgba(20,28,45,.5); backdrop-filter: blur(3px); }
.decline-dialog form { display: grid; gap: 18px; }
.decline-dialog p { margin: -4px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.completion-shell { min-height: calc(100vh - 78px); display: grid; place-items: center; padding: 30px; }
.completion-card { width: min(480px, 100%); padding: 38px; text-align: center; }
.completion-card p { color: var(--muted); }
.completion-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: var(--success-bg); color: var(--success); font-size: 30px; font-weight: 800; }
.completion-icon.declined { background: var(--danger-bg); color: var(--danger); }

@media (max-width: 900px) {
  .signer-layout { grid-template-columns: 1fr; }
  .sign-box { position: static; }
  .sign-box-wrap { order: -1; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .topbar { padding: 0 14px; }
  .top-actions .btn:first-child { display: none; }
  .container, .container.narrow { width: min(100% - 22px, 1260px); margin-top: 25px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .copy-row { grid-template-columns: 1fr 1fr; }
  .copy-row input { grid-column: 1 / -1; }
  .signer-header { padding: 12px 14px; }
  .signer-header .status { display: none; }
  .signer-layout { width: calc(100% - 14px); margin-top: 10px; gap: 12px; }
  .document-page { padding: 4px; margin-bottom: 10px; }
}

/* v0.2 contacts-first workflow */
button, input, textarea, select { font: inherit; }
select {
  width: 100%; border: 1px solid #cfd6df; border-radius: 10px; background: white; color: var(--ink);
  padding: 11px 34px 11px 12px; outline: none;
}
select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(203,113,177,.14); }
.hidden { display: none !important; }
.text-link { color: var(--primary); font-size: 12px; font-weight: 800; text-decoration: none; }
.dashboard-container { width: min(1420px, calc(100% - 40px)); }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.dashboard-head p { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(70px, 1fr)); gap: 8px; }
.stat-row > div { min-width: 78px; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: center; }
.stat-row strong { display: block; font-size: 20px; }
.stat-row span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.dashboard-grid { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 18px; align-items: start; }
.contacts-rail { padding: 14px; position: sticky; top: 82px; }
.rail-head { display: flex; justify-content: space-between; align-items: end; padding: 5px 5px 12px; }
.rail-head h2 { margin: 2px 0 0; }
.person-filter { display: flex; align-items: center; gap: 10px; border-radius: 11px; padding: 9px; text-decoration: none; border: 1px solid transparent; }
.person-filter:hover { background: #fff8fa; }
.person-filter.active { background: var(--primary-soft); border-color: #efc9e2; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--primary-soft); color: #8c4d79; font-weight: 850; font-size: 13px; }
.avatar.all { border-radius: 10px; background: var(--primary); color: white; font-size: 10px; }
.avatar.mini { width: 29px; height: 29px; font-size: 11px; }
.avatar.large { width: 50px; height: 50px; font-size: 17px; }
.person-copy { min-width: 0; display: block; }
.person-copy strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.person-copy small { display: block; margin-top: 2px; font-size: 10px; }
.rail-empty { padding: 10px 5px; font-size: 12px; }
.dashboard-main { min-width: 0; display: grid; gap: 18px; }
.quick-create { padding: 20px; display: grid; grid-template-columns: minmax(180px, .75fr) minmax(240px, 1fr) minmax(260px, 1.2fr); gap: 18px; align-items: center; }
.quick-create-copy h2 { margin: 3px 0 5px; }
.quick-create-copy p { margin: 0; font-size: 12px; }
.quick-fields { display: grid; gap: 10px; }
.inline-contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-contact-fields.two-col { grid-template-columns: 1fr 1fr; }
.drop-zone {
  min-height: 142px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px;
  border: 2px dashed #c8d1df; border-radius: 14px; padding: 16px; background: #fbfcfe; cursor: pointer; transition: .15s ease;
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--primary); background: var(--primary-soft); }
.drop-zone.has-files { border-style: solid; border-color: #9ecdb1; background: #f3fbf6; }
.drop-zone > span { color: var(--muted); font-size: 12px; font-weight: 500; }
.drop-zone .drop-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--primary); font-size: 17px; font-weight: 800; }
.drop-zone strong { font-size: 14px; }
.drop-zone small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-footer { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; border-top: 1px solid var(--line); padding-top: 14px; }
.optional-title span small { font-size: 10px; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 15px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.table-toolbar h2 { margin: 0; }
.sort-form label { display: flex; align-items: center; gap: 8px; }
.sort-form label > span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.sort-form select { width: auto; min-width: 145px; padding-top: 8px; padding-bottom: 8px; }
.person-cell { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 190px; }
.person-cell strong { display: block; font-size: 12px; }
.person-cell small { display: block; font-size: 10px; margin-top: 2px; }
.empty-state.compact { padding: 45px 20px; }
.form-drop { min-height: 175px; }
.contact-create { padding: 18px; margin-bottom: 18px; }
.contact-create-form { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 12px; align-items: end; }
.contact-list { display: grid; gap: 12px; }
.contact-card { padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.contact-summary { display: flex; align-items: center; gap: 13px; min-width: 0; }
.contact-summary h2 { margin: 0; }
.contact-summary p { margin: 2px 0 0; font-size: 12px; }
.contact-counts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.contact-counts span { background: #f4f6f9; border: 1px solid #e6e9ee; border-radius: 999px; padding: 4px 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.contact-actions { display: flex; gap: 8px; align-items: center; }
.contact-actions details { position: relative; }
.contact-actions summary { list-style: none; cursor: pointer; }
.contact-actions summary::-webkit-details-marker { display: none; }
.contact-edit-form { position: absolute; right: 0; top: 45px; z-index: 10; width: 300px; display: grid; gap: 10px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 45px rgba(20,28,45,.16); padding: 14px; }
.queue-banner { width: min(650px, calc(100% - 30px)); margin: 14px auto -5px; border-radius: 999px; padding: 8px 14px; text-align: center; background: var(--primary-soft); color: #8c4d79; font-size: 12px; font-weight: 750; }
.signature-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: #fff7fa; }
.signature-tab { border: 0; border-radius: 8px; padding: 8px; color: var(--muted); background: transparent; font-weight: 800; font-size: 12px; }
.signature-tab.active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(25,35,55,.08); }
.signature-pane { display: none; gap: 7px; }
.signature-pane.active { display: grid; }
.typed-signature-preview { min-height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px dashed #c8d0db; border-radius: 11px; background: white; padding: 16px; color: #172033; font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive; font-size: clamp(31px, 5vw, 52px); line-height: 1.1; text-align: center; }
.queue-note { margin: -7px 0 0; color: var(--muted); font-size: 11px; text-align: center; line-height: 1.4; }
.completion-card h1 { font-size: 30px; }

@media (max-width: 1120px) {
  .quick-create { grid-template-columns: 1fr 1fr; }
  .quick-create .drop-zone { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .contacts-rail { position: static; display: flex; gap: 7px; overflow-x: auto; align-items: center; }
  .contacts-rail .rail-head { min-width: 110px; }
  .person-filter { min-width: 170px; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .stat-row { width: 100%; }
}
@media (max-width: 650px) {
  .dashboard-container { width: min(100% - 18px, 1420px); }
  .quick-create { grid-template-columns: 1fr; padding: 15px; }
  .quick-create .drop-zone, .quick-footer { grid-column: auto; }
  .quick-footer { grid-template-columns: 1fr; }
  .inline-contact-fields, .inline-contact-fields.two-col { grid-template-columns: 1fr; }
  .contact-create-form { grid-template-columns: 1fr; }
  .contact-card { align-items: flex-start; flex-direction: column; }
  .contact-actions { width: 100%; }
  .contact-actions > * { flex: 1; }
  .contact-actions .btn { width: 100%; }
  .contact-edit-form { right: auto; left: 0; width: min(300px, calc(100vw - 40px)); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* v0.3 full-dashboard drop, optional contacts, and signer-selected placement */
.dashboard-head-actions { display: flex; align-items: end; gap: 14px; }
.rail-divider { margin: 10px 7px 5px; padding-top: 10px; border-top: 1px solid var(--line); }
.rail-divider span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; font-weight: 850; }
.avatar.temporary { background: #f2f3f5; color: #6f7886; border: 1px dashed #c8ced7; }
.person-filter.one-time .person-copy small { color: #89919e; }

.dashboard-drop-overlay {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(203, 113, 177, .16); backdrop-filter: blur(3px); border: 4px solid rgba(203, 113, 177, .62);
}
.dashboard-drop-overlay.active { display: grid; }
.dashboard-drop-card {
  width: min(520px, calc(100% - 36px)); padding: 34px; text-align: center; border-radius: 20px;
  background: rgba(255,255,255,.96); border: 2px dashed var(--primary); box-shadow: 0 24px 70px rgba(25,35,55,.18);
}
.dashboard-drop-card strong { display: block; font-size: 20px; margin: 10px 0 5px; }
.dashboard-drop-card span:last-child { color: var(--muted); font-size: 13px; }
.drop-big-icon { width: 54px; height: 54px; margin: auto; display: grid; place-items: center; border-radius: 15px; background: var(--accent-soft); color: var(--primary); font-size: 28px; font-weight: 900; }

.request-dialog {
  width: min(620px, calc(100% - 30px)); border: 1px solid var(--line); border-radius: 18px; padding: 0;
  box-shadow: 0 28px 80px rgba(20,28,45,.24); overflow: hidden;
}
.request-dialog::backdrop { background: rgba(20,28,45,.48); backdrop-filter: blur(3px); }
.request-dialog form { display: grid; gap: 17px; padding: 22px; }
.dialog-title-row { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.dialog-title-row h2 { font-size: 22px; margin: 3px 0 0; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); background: white; border-radius: 9px; color: var(--muted); font-size: 22px; line-height: 1; }
.icon-button:hover { color: var(--ink); background: #fff7fa; }
.selected-files-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff8fa; border: 1px solid #e2e7ee; border-radius: 12px; padding: 12px; }
.selected-files-box > div { min-width: 0; }
.selected-files-box strong, .selected-files-box span { display: block; }
.selected-files-box strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.selected-files-box span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.request-file-list { margin: -7px 0 0; padding: 0 0 0 20px; color: var(--muted); font-size: 11px; max-height: 90px; overflow: auto; }
.new-signer-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.save-contact-row { grid-column: 1 / -1; display: flex; grid-template-columns: none; flex-direction: row; align-items: center; gap: 9px; color: var(--muted); font-weight: 600; }
.save-contact-row input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }

.placement-instruction { width: min(850px, 100%); margin: 0 auto 12px; padding: 10px 12px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 11px; color: #7f4e68; font-size: 12px; }
.placement-instruction strong, .placement-instruction span { display: block; }
.placement-instruction span { margin-top: 2px; color: #8c6578; }
.sign-target { position: relative; cursor: crosshair; touch-action: manipulation; }
.sign-target > img { user-select: none; -webkit-user-drag: none; }
.placement-preview { position: absolute; z-index: 3; border: 2px solid var(--primary); border-radius: 5px; background: rgba(254,208,198,.32); box-shadow: 0 3px 12px rgba(203,113,177,.20); pointer-events: none; overflow: hidden; }
.placement-preview::after { content: ""; position: absolute; inset: -5px; border: 1px dashed rgba(203,113,177,.68); }
.placement-signature-image { width: 100%; height: 100%; object-fit: contain; display: block; }
.placement-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #96537f; font-size: clamp(10px, 2vw, 14px); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.sign-step { display: grid; grid-template-columns: 29px 1fr; gap: 10px; align-items: start; }
.sign-step > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: white; font-size: 12px; font-weight: 900; }
.sign-step h2 { margin: 1px 0 3px; }
.sign-step p { margin: 0; font-size: 12px; }
.placement-status { display: grid; grid-template-columns: 13px 1fr; gap: 9px; align-items: start; border: 1px solid #e1e5eb; border-radius: 10px; padding: 10px 11px; background: #f8f9fb; }
.placement-status-dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: #aab2bf; }
.placement-status strong, .placement-status small { display: block; }
.placement-status strong { font-size: 12px; }
.placement-status small { margin-top: 2px; font-size: 10px; }
.placement-status.ready { border-color: #b8e7cb; background: var(--success-bg); }
.placement-status.ready .placement-status-dot { background: var(--success); }

@media (max-width: 900px) {
  .dashboard-head-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .dashboard-head-actions > .btn { align-self: flex-start; }
}
@media (max-width: 650px) {
  .new-signer-fields { grid-template-columns: 1fr; }
  .save-contact-row { grid-column: auto; }
  .selected-files-box { align-items: flex-start; flex-direction: column; }
  .selected-files-box .btn { width: 100%; }
  .request-dialog form { padding: 17px; }
}


/* v0.4 batch assignment, draggable placement, and blush branding */
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 13px; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.brand-mark { box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.eyebrow { color: #a9548d; }
.btn-soft { background: var(--accent-soft); color: #8e4c73; border-color: var(--accent); }
.btn-soft:hover { background: var(--accent); }
.text-link { color: #a9548d; }
.empty-icon { color: var(--primary); }
.avatar.all { background: var(--primary); }
.timeline li:before { background: var(--primary); }
.queue-banner { background: var(--accent-soft); color: #8e4c73; border: 1px solid var(--accent); }

.batch-request-dialog { width: min(980px, calc(100% - 28px)); max-height: min(900px, calc(100vh - 28px)); }
.batch-request-dialog form { max-height: min(900px, calc(100vh - 28px)); overflow: auto; }
.dialog-title-row p { margin: 5px 0 0; font-size: 12px; }
.batch-toolbar { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(400px, 1.2fr); gap: 14px; }
.compact-files { height: 100%; align-items: flex-start; }
.panel-soft { border: 1px solid #efdce7; background: #fff9fb; border-radius: 13px; }
.batch-default { padding: 12px; display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 9px; align-items: end; }
.batch-default-copy { grid-column: 1 / -1; }
.batch-default-copy strong, .batch-default-copy span { display: block; }
.batch-default-copy strong { font-size: 12px; }
.batch-default-copy span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.batch-custom-fields { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.save-contact-row.compact { grid-column: auto; white-space: nowrap; }
.batch-file-rows { display: grid; gap: 10px; }
.batch-file-card { border: 1px solid var(--line); border-radius: 13px; background: white; overflow: hidden; transition: border-color .14s ease, box-shadow .14s ease; }
.batch-file-card.needs-attention { border-color: #d9848b; box-shadow: 0 0 0 3px rgba(184,44,54,.08); }
.batch-file-main { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; background: linear-gradient(90deg, #fff, #fff9fb); border-bottom: 1px solid #f2e7ed; }
.pdf-file-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: #a55286; font-size: 9px; font-weight: 900; letter-spacing: .05em; border: 1px solid var(--accent); }
.batch-file-copy { min-width: 0; }
.batch-file-copy strong, .batch-file-copy span { display: block; }
.batch-file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.batch-file-copy span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.batch-file-fields { display: grid; grid-template-columns: minmax(230px, 1.25fr) minmax(190px, .75fr); gap: 10px; padding: 11px 12px 12px; }
.file-custom-fields { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 9px; align-items: end; padding-top: 9px; border-top: 1px dashed #eddce6; }
.sticky-actions { position: sticky; bottom: -22px; margin: 0 -22px -22px; padding: 13px 22px 18px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); align-items: center; justify-content: space-between; }
.sticky-actions > div { display: flex; gap: 9px; }

.pdf-preview-dialog { width: min(900px, calc(100% - 24px)); height: min(880px, calc(100vh - 24px)); padding: 0; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 28px 80px rgba(62,37,54,.25); overflow: hidden; }
.pdf-preview-dialog::backdrop { background: rgba(60,47,57,.5); backdrop-filter: blur(3px); }
.pdf-preview-head, .pdf-preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; background: white; }
.pdf-preview-head { border-bottom: 1px solid var(--line); }
.pdf-preview-head h2 { margin: 2px 0 0; font-size: 16px; max-width: 650px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-preview-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.pdf-preview-dialog object { display: block; width: 100%; height: calc(100% - 118px); border: 0; background: #f7f3f5; }
.preview-fallback { padding: 30px; }

.signer-company { color: #9f5487; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 3px; }
.placement-preview { pointer-events: auto; cursor: grab; touch-action: none; user-select: none; }
.placement-preview.dragging { cursor: grabbing; box-shadow: 0 6px 20px rgba(203,113,177,.28); }
.drag-cue { position: absolute; right: 3px; top: 3px; padding: 2px 5px; border-radius: 999px; background: rgba(255,255,255,.88); color: #96537f; border: 1px solid #efc7df; font-size: 7px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; pointer-events: none; }
.reuse-decline-card { display: block; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 11px; padding: 11px; cursor: pointer; }
.reuse-decline-head { display: flex; align-items: center; gap: 8px; color: #83516a; }
.reuse-decline-head input { width: 18px; height: 18px; margin: 0; }
.previous-reason-text { display: block; margin: 7px 0 0 26px; color: #795f6d; font-size: 11px; font-weight: 500; line-height: 1.45; }
textarea:disabled { background: #f6f1f4; color: #a08b98; }

@media (max-width: 800px) {
  .batch-toolbar { grid-template-columns: 1fr; }
  .batch-default { grid-template-columns: 1fr auto; }
  .batch-file-fields { grid-template-columns: 1fr; }
  .file-custom-fields { grid-template-columns: 1fr; }
  .save-contact-row.compact { white-space: normal; }
}
@media (max-width: 560px) {
  .batch-default { grid-template-columns: 1fr; }
  .batch-custom-fields { grid-template-columns: 1fr; }
  .batch-file-main { grid-template-columns: 36px minmax(0, 1fr); }
  .batch-file-main .preview-file { grid-column: 1 / -1; width: 100%; }
  .sticky-actions { align-items: stretch; flex-direction: column; }
  .sticky-actions > div { width: 100%; }
  .sticky-actions .btn { flex: 1; }
  .pdf-preview-foot span { display: none; }
}

/* v0.5 public-test and production-hardening UI */
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.public-test-banner {
  display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 18px; background: var(--accent-soft); border-bottom: 1px solid var(--accent);
  color: #784a62; font-size: 11px;
}
.public-test-banner strong { color: #9b4f82; text-transform: uppercase; letter-spacing: .08em; }
.detail-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.detail-section-head h2, .detail-section-head p { margin-top: 0; }
.link-state { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.link-state-active { background: var(--success-bg); color: var(--success); }
.link-state-expired { background: var(--warning-bg); color: var(--warning); }
.link-state-revoked { background: var(--danger-bg); color: var(--danger); }
.link-meta-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 10px; }
.link-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.link-actions form { margin: 0; }
.link-warning { color: var(--danger); font-weight: 750; }
.unavailable-card { max-width: 520px; }
.unavailable-icon { background: var(--danger-bg) !important; color: var(--danger) !important; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #fff4f8; border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }

@media (max-width: 600px) {
  .detail-section-head { align-items: stretch; flex-direction: column; }
  .link-state { align-self: flex-start; }
  .copy-row { grid-template-columns: 1fr 1fr; }
  .copy-row input { grid-column: 1 / -1; }
}

/* v0.6 signer usability + email workflow */
:root {
  --send: #18864b;
  --send-hover: #126f3d;
}
.btn-send { background: var(--send); color: white; border-color: var(--send); }
.btn-send:hover { background: var(--send-hover); border-color: var(--send-hover); }
.desktop-sign-actions { display: grid; gap: 9px; }
.mobile-signer-actions { display: none; }
.signature-reused-note {
  margin: 13px 0 2px; padding: 9px 11px; border-radius: 10px;
  background: var(--success-bg); border: 1px solid #b8e7cb; color: #126537;
  font-size: 11px; font-weight: 750; line-height: 1.4;
}
#signatureCanvas.needs-signature { animation: signatureAttention .55s ease 3; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(203,113,177,.17); }
@keyframes signatureAttention { 50% { transform: scale(1.012); } }
.guidance-dialog {
  width: min(560px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 20px; padding: 30px;
  box-shadow: 0 28px 90px rgba(49,31,44,.3); text-align: center; color: var(--ink);
}
.guidance-dialog::backdrop { background: rgba(43,31,40,.58); backdrop-filter: blur(4px); }
.guidance-dialog h2 { margin: 8px 0 8px; font-size: 24px; }
.guidance-dialog > p { margin: 0 auto 22px; color: var(--muted); max-width: 440px; }
.guidance-icon {
  width: 60px; height: 60px; display: grid; place-items: center; margin: 0 auto 12px;
  border-radius: 50%; background: var(--success-bg); color: var(--send); font-size: 28px; font-weight: 900;
}
.guidance-icon.placement-icon { background: var(--primary-soft); color: var(--primary); }
.consent-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-cancel-link { margin-top: 16px; }
.placement-help-steps { list-style: none; counter-reset: placement; display: grid; gap: 10px; text-align: left; margin: 18px 0 22px; padding: 0; }
.placement-help-steps li {
  counter-increment: placement; display: grid; grid-template-columns: 34px 1fr; column-gap: 11px; row-gap: 2px;
  padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fffafb;
}
.placement-help-steps li::before {
  content: counter(placement); grid-row: 1 / span 2; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: var(--primary); color: white; font-weight: 900; font-size: 12px;
}
.placement-help-steps strong { font-size: 13px; }
.placement-help-steps span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.placement-coach {
  position: fixed; left: 50%; top: 88px; transform: translateX(-50%); z-index: 80;
  width: min(620px, calc(100% - 24px)); padding: 12px 42px 12px 15px;
  border-radius: 13px; background: #fff; border: 2px solid var(--primary); box-shadow: 0 15px 45px rgba(73,45,64,.2);
  color: var(--ink);
}
.placement-coach strong, .placement-coach span { display: block; }
.placement-coach strong { color: var(--primary-hover); font-size: 13px; }
.placement-coach span { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.placement-coach button { position: absolute; right: 10px; top: 8px; border: 0; background: transparent; color: var(--muted); font-size: 22px; }
.document-page { position: relative; }
.document-column.placement-coaching .document-page::before,
.document-column.placement-coaching .document-page::after {
  content: ""; position: absolute; inset: -2px; z-index: 8; pointer-events: none;
  border: 3px solid rgba(203,113,177,.82); border-radius: 3px;
  animation: placementOutlineExpand 1.35s ease-out infinite;
}
.document-column.placement-coaching .document-page::after { animation-delay: .68s; }
@keyframes placementOutlineExpand {
  0% { inset: -2px; opacity: .9; border-width: 3px; }
  75% { opacity: .25; }
  100% { inset: -18px; opacity: 0; border-width: 1px; }
}
.notification-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding: 13px;
  border: 1px solid var(--line); border-radius: 12px; background: #fffafb;
}
.notification-choice { display: grid; grid-template-columns: 19px 1fr; gap: 9px; align-items: start; font-weight: 500; }
.notification-choice input { width: 18px; height: 18px; margin: 1px 0 0; }
.notification-choice strong, .notification-choice small { display: block; }
.notification-choice strong { font-size: 12px; color: var(--ink); }
.notification-choice small { margin-top: 2px; font-size: 10px; line-height: 1.4; }
.email-config-note { grid-column: 1 / -1; margin: 0; font-size: 10px; color: var(--muted); }
.email-config-note.warning { color: var(--warning); }
.reminder-toolbar-form { margin: 0; }
.reminder-detail-card { margin-top: 16px; padding: 18px 20px; }
.reminder-detail-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.reminder-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.reminder-detail-actions form { margin: 0; }
.email-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 10px; }

@media (max-width: 900px) {
  .signer-body { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .desktop-sign-actions { display: none; }
  .mobile-signer-actions {
    display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 9px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -8px 28px rgba(60,47,57,.12);
    backdrop-filter: blur(12px);
  }
  .mobile-signer-actions .btn { min-height: 50px; font-size: 16px; }
  .placement-coach { top: 76px; }
}
@media (max-width: 620px) {
  .guidance-dialog { padding: 24px 18px; }
  .guidance-dialog h2 { font-size: 21px; }
  .consent-choice-grid { grid-template-columns: 1fr; }
  .notification-options { grid-template-columns: 1fr; }
  .email-config-note { grid-column: auto; }
  .reminder-detail-grid { grid-template-columns: 1fr; }
  .reminder-detail-actions { justify-content: stretch; }
  .reminder-detail-actions .btn { flex: 1; }
}
.dashboard-action-row { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
@media (max-width: 760px) {
  .dashboard-action-row { justify-content: flex-start; flex-wrap: wrap; }
}


/* v0.7 signer transition + simplified placement guidance */
.queue-continued .signer-layout,
.queue-continued .signer-header,
.queue-continued .queue-banner,
.queue-continued .signer-flash {
  opacity: 0;
  transform: translateX(44px);
}
.queue-continued.queue-continued-animate .signer-layout,
.queue-continued.queue-continued-animate .signer-header,
.queue-continued.queue-continued-animate .queue-banner,
.queue-continued.queue-continued-animate .signer-flash {
  opacity: 1;
  transform: translateX(0);
  transition: opacity .35s ease, transform .35s ease;
}
.signing-success-overlay {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center;
  background: rgba(255,255,255,.65); backdrop-filter: blur(8px);
}
.signing-success-card {
  display: grid; justify-items: center; gap: 8px; min-width: 260px;
  padding: 26px 28px; border-radius: 22px; background: rgba(255,255,255,.98);
  border: 1px solid #dce8e0; box-shadow: 0 25px 80px rgba(49,31,44,.22);
  color: var(--ink); text-align: center;
}
.signing-success-card strong { font-size: 24px; }
.signing-success-card span { color: var(--muted); font-size: 14px; }
.signing-success-check {
  width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%;
  background: var(--success-bg); color: var(--send); font-size: 34px; font-weight: 900;
}
.signing-transition-out .signer-layout,
.signing-transition-out .signer-header,
.signing-transition-out .queue-banner,
.signing-transition-out .signer-flash {
  opacity: 0;
  transform: translateX(-52px);
  transition: opacity .3s ease, transform .3s ease;
}
/* v0.7.1 Firefox hidden-overlay hotfix */
.signing-success-overlay[hidden] {
  display: none !important;
}


/* v0.7.2 placement cue + signature bounds */
.placement-preview { box-sizing: border-box; padding: 3px; overflow: visible; }
.placement-preview::after { pointer-events: none; }
.placement-signature-image { max-width: 100%; max-height: 100%; object-fit: contain; }


/* v0.7.3 exact draw-pad scale + center-out placement cue + text matching */
.document-column.placement-coaching .document-page::before,
.document-column.placement-coaching .document-page::after { content: none !important; }
.document-column.placement-coaching .sign-target::before,
.document-column.placement-coaching .sign-target::after {
  content: ""; position: absolute; inset: 0; z-index: 8; pointer-events: none;
  border: 3px solid rgba(203,113,177,.88); border-radius: 3px;
  transform-origin: center center; transform: scale(.22, .16); opacity: 0;
  animation: placementOutlineCenterOut 1.4s cubic-bezier(.2,.72,.25,1) infinite;
}
.document-column.placement-coaching .sign-target::after { animation-delay: .7s; }
@keyframes placementOutlineCenterOut {
  0% { transform: scale(.18, .12); opacity: 0; border-width: 4px; }
  18% { opacity: .95; }
  78% { opacity: .55; }
  100% { transform: scale(1, 1); opacity: 0; border-width: 2px; }
}
.placement-preview { overflow: hidden; padding: 2px; }
.placement-signature-image { width: 100%; height: 100%; object-fit: contain; }
.file-match-note { margin-top: 4px !important; font-size: 9px !important; font-weight: 700; line-height: 1.3; }
.file-match-note.checking { color: #9b7d90; }
.file-match-note.matched { color: var(--success); }
.file-match-note.ambiguous { color: var(--warning); }
.file-match-note.muted-match { color: var(--muted); font-weight: 600; }

/* v0.9 dashboard lifecycle, archive, sorting, and retention UI */
.status-downloaded { background: #e7f1ff; color: #2d5f9a; }
.dashboard-view-tabs { display: inline-flex; gap: 4px; margin-top: 14px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #fffafb; }
.dashboard-view-tab { padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 800; }
.dashboard-view-tab.active { background: white; color: var(--ink); box-shadow: 0 1px 5px rgba(45,30,41,.08); }
.stat-row-links > a { text-decoration: none; color: inherit; transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease; }
.stat-row-links > a:hover { border-color: var(--primary); transform: translateY(-1px); }
.stat-row-links > a.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(203,113,177,.12); background: #fff8fb; }
.table-sort { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; }
.table-sort:hover, .table-sort.active { color: #9e4f82; }
.table-sort span { font-size: 9px; }
.inline-action-form { display: inline-block; margin: 0 0 0 5px; vertical-align: top; }
.table-actions { min-width: 210px; }
.selected-files-box.dragging { border: 2px dashed var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 4px rgba(203,113,177,.11); }
.detail-lifecycle-actions { display: grid; gap: 9px; }
.detail-lifecycle-actions form { margin: 0; }
@media (max-width: 720px) {
  .dashboard-view-tabs { width: 100%; }
  .dashboard-view-tab { flex: 1; text-align: center; }
  .table-actions { min-width: 180px; }
}
.stat-row-links > a {
  min-width: 78px; background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; text-align: center;
}
.stat-row-links > a strong { display: block; font-size: 20px; }
.stat-row-links > a span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }

/* v0.10 admin signature settings + auto-placement state */
.settings-page { max-width: 860px; }
.settings-panel { padding: 22px; display: grid; gap: 22px; }
.settings-section-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.settings-section-head h2 { margin-bottom: 5px; }
.settings-section-head p { margin: 0; }
.signature-scale-setting { display: grid; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fffafb; }
.setting-copy label { font-weight: 850; }
.setting-copy p { margin: 4px 0 0; }
.range-control { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 14px; align-items: center; }
.range-control input[type="range"] { width: 100%; accent-color: var(--primary); }
.range-control output { min-width: 66px; padding: 7px 9px; text-align: center; border-radius: 9px; background: white; border: 1px solid var(--line); font-weight: 850; color: #9b4f82; }
.signature-size-preview { position: relative; min-height: 86px; overflow: hidden; border-radius: 12px; background: white; border: 1px dashed #e5c6d9; display: flex; align-items: center; padding: 14px 18px; }
.signature-preview-line { position: absolute; left: 18px; right: 18px; top: 57px; height: 2px; background: #6d5b67; opacity: .55; }
.signature-size-box { position: relative; height: 43px; display: grid; place-items: center; overflow: hidden; border: 2px solid var(--primary); border-radius: 7px; background: rgba(254,208,198,.22); color: #96537f; font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 15px; transition: width .12s ease; z-index: 1; }
.settings-toggle-card { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; }
.settings-toggle-card input { width: 19px; height: 19px; margin-top: 1px; accent-color: var(--primary); }
.settings-toggle-card strong, .settings-toggle-card small { display: block; }
.settings-toggle-card strong { font-size: 13px; }
.settings-toggle-card small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.settings-actions { display: flex; justify-content: flex-end; padding-top: 3px; }
.placement-status.auto-found { border-color: #efd0e2; background: #fff8fb; }
.placement-status.auto-found .placement-status-dot { background: var(--primary); }
@media (max-width: 650px) {
  .settings-panel { padding: 16px; }
  .range-control { grid-template-columns: 1fr; }
  .range-control output { justify-self: start; }
  .settings-actions .btn { width: 100%; }
}


/* v0.10.1 line-only auto-placement tuning */
.offset-setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.offset-setting-grid > div { display: grid; gap: 8px; }
.offset-setting-grid > div > label { font-size: 12px; font-weight: 850; color: var(--ink); }
@media (max-width: 650px) { .offset-setting-grid { grid-template-columns: 1fr; } }

/* v0.10.3 interaction safety */
.signature-pad-actions { display: inline-flex; align-items: center; gap: 10px; }
.draw-pad-status {
  margin: -2px 0 6px; padding: 7px 9px; border-radius: 9px;
  background: var(--success-bg); border: 1px solid #b8e7cb; color: #126537;
  font-size: 10px; font-weight: 800; line-height: 1.35;
}
.draw-pad-status[hidden] { display: none !important; }
#signatureCanvas.locked {
  touch-action: pan-y;
  cursor: default;
  border-style: solid;
  border-color: #b8e7cb;
  background: #fbfffc;
}
.placement-preview { cursor: pointer; }
.placement-preview.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(203,113,177,.13), 0 5px 16px rgba(203,113,177,.18);
}
.placement-preview.selected:not(.drag-ready) { cursor: wait; }
.placement-preview.drag-ready { cursor: grab; }
.placement-preview.drag-ready .drag-cue { background: #fff; color: #8e4c73; border-color: var(--primary); }
.placement-preview.dragging { cursor: grabbing; }
.interaction-safety-head { margin-top: 4px; padding-top: 20px; border-top: 1px solid var(--line); }
