:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202124;
  background: #f7f6f3;
  font-synthesis: none;
  --muted: #6b7077;
  --line: #e5e3df;
  --primary: #486b82;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; background: none; border: 0; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #3672d9; outline-offset: 3px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #8eabd9; outline-offset: 1px; }
svg { width: 19px; height: 19px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.6px; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
h3 { font-size: 14px; font-weight: 600; }
.muted, small { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 8px 13px; border: 1px solid #dcdfe3; border-radius: 8px; background: #fff; color: #34373c; font-size: 12px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: #f5f6f7; border-color: #bfc3c9; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #36566c; }
.btn.small { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.btn.quiet { border-color: transparent; background: transparent; }
.btn.quiet:hover { background: #f3f4f5; }
.btn svg { width: 15px; height: 15px; }
.icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; color: #717780; }
.icon-btn:hover { background: #f0f1f3; color: #202124; }
.text-button { display: inline-flex; align-items: center; gap: 7px; padding: 0; font-size: 12px; color: #535963; }
.text-button:hover { color: #111; text-decoration: underline; }
.text-button svg { width: 15px; height: 15px; }
.pill { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid #dee4df; background: #f3f7f4; color: #41674b; font-size: 11px; line-height: 1.5; border-radius: 5px; white-space: nowrap; }
.pill.neutral { color: #646a73; background: #f7f7f8; border-color: #e5e6e9; }
.pill.draft { color: #85651c; background: #fffbef; border-color: #eee5cc; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 208px; padding: 29px 15px 18px; background: #eeede9; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 12px; margin-bottom: 45px; font-size: 19px; font-weight: 650; letter-spacing: -.5px; }
.brand-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--primary); color: white; }
.brand-icon svg { width: 18px; height: 18px; }
.nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 6px; font-size: 13px; color: #737981; text-align: left; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item:hover { background: #e5e4df; }
.nav-item.active { background: #fff; color: #365b73; font-weight: 600; box-shadow: 0 1px 4px #2928200a; }
.sidebar-bottom { margin-top: auto; padding-top: 36px; }
.profile { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); margin-top: 18px; padding: 18px 6px 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #e0e6e9; display: grid; place-items: center; color: #636974; font-size: 10px; font-weight: 550; }
.profile-copy { flex: 1; min-width: 0; }
.profile-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 500; }
.main-shell { margin-left: 208px; flex: 1; min-width: 0; }
.topbar { background: #ffffff80; height: 65px; padding: 0 36px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.workspace-name { font-size: 12px; color: #747a84; }
.mobile-toggle { display: none; }
.content { max-width: 1500px; padding: 42px 36px; margin: auto; }
.content:focus { outline: none; }
.page-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 30px; }
.heading-actions, .row-actions { display: flex; align-items: center; gap: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #eeede9; }
.tab { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 5px; font-size: 12px; color: #737982; }
.tab.active { color: #365b73; background: #fff; font-weight: 600; box-shadow: 0 1px 3px #29282012; }
.tab:hover { background: #f7f8f9; }
.count { font-size: 10px; min-width: 17px; text-align: center; padding: 1px 4px; border-radius: 4px; background: #e6e8eb; color: #6b7078; }
.search { background: #fff; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #e0e2e6; border-radius: 6px; width: 222px; }
.search svg { width: 15px; height: 15px; color: #8b9098; }
.search input { border: 0; outline: 0; padding: 0; background: transparent; width: 100%; font-size: 12px; }
.search:focus-within { outline: 2px solid #8eabd9; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; box-shadow: 0 3px 12px #29282004; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { background: #f0efec; color: #6d726f; font-size: 11px; font-weight: 500; padding: 12px 17px; border-bottom: 1px solid var(--line); }
td { font-size: 13px; color: #686e78; padding: 17px; border-bottom: 1px solid #eceef0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfd; }
td:last-child { text-align: right; }
td strong { color: #30343b; font-weight: 500; display: block; }
td small { font-size: 10px; display: block; margin-top: 3px; }
.row-name { padding: 0; text-align: left; font-size: 13px; font-weight: 550; color: #33373e; }
.automation-name { display: inline-flex; align-items: center; gap: 12px; }
.automation-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #e8eff3; color: #486b82; }
.automation-icon.deal { background: #f3ece1; color: #92713f; }
.automation-icon.custom { background: #eeebf2; color: #7b6b8c; }
.row-name:hover { text-decoration: underline; }
.row-actions { justify-content: flex-end; }
.order-type { display: flex; align-items: center; gap: 6px; }
.order-type svg { width: 14px; height: 14px; }
.empty { text-align: center; border: 1px dashed #dfe2e6; border-radius: 8px; padding: 60px 24px; }
.empty>svg { width: 27px; height: 27px; color: #959ba5; margin-bottom: 13px; }
.empty p { color: var(--muted); font-size: 12px; margin: 8px 0 18px; }
.pagination { display: flex; justify-content: center; margin-top: 20px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 950px; }
.settings-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 23px; }
.settings-card p { font-size: 12px; color: var(--muted); margin: 16px 0; }
.settings-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 12px; margin: 21px 0; }
.settings-card dt { color: var(--muted); }
.settings-card dd { margin: 0; text-align: right; }
.account-select { max-width: 190px; font-size: 12px; padding: 5px 8px; }
dialog { padding: 0; border: 1px solid #dfe2e6; border-radius: 16px; width: calc(100% - 40px); max-width: 780px; max-height: 90vh; background: #fff; color: #202124; box-shadow: 0 20px 80px #11182726; }
dialog::backdrop { background: #14182055; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); padding: 20px 25px; }
.dialog-head h2 { font-size: 18px; }
.dialog-body { padding: 25px; }
.dialog-body.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dialog-footer { border-top: 1px solid var(--line); padding: 16px 25px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f7f6f3; }
.dialog-footer .right { display: flex; gap: 8px; margin-left: auto; }
.stepper { display: flex; gap: 13px; align-items: center; padding: 21px 25px 0; font-size: 12px; color: #9ba1aa; }
.stepper .current { color: #25282d; font-weight: 550; }
.stepper svg { width: 12px; height: 12px; color: #b6bac1; }
.preset-list { display: grid; gap: 12px; }
.preset { display: flex; gap: 15px; align-items: center; padding: 20px; border: 1px solid #dfe2e6; border-radius: 8px; text-align: left; width: 100%; }
.preset:hover { border-color: #91a6b4; background: #f5f8fa; }
.preset>span:nth-child(2) { flex: 1; display: grid; gap: 5px; }
.preset strong { font-size: 14px; font-weight: 550; }
.preset span span { font-size: 12px; color: #727984; }
.preset>svg { width: 16px; height: 16px; color: #9198a3; }
.preset-icon { display: grid; place-items: center; width: 37px; height: 37px; background: #e8eff3; border-radius: 10px; color: #486b82; }
.custom-preset { margin-top: 22px; }
.setup-summary { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); font-size: 12px; }
.setup-summary>span { color: var(--muted); }
.setup-summary strong { font-weight: 500; }
label.field { display: grid; gap: 7px; font-size: 12px; font-weight: 500; margin-bottom: 18px; }
label.field>span { color: var(--muted); font-size: 11px; font-weight: 400; }
input, select, textarea { min-width: 0; width: 100%; border: 1px solid #dce0e5; border-radius: 6px; padding: 10px 11px; color: #363b43; background: #fff; font-size: 13px; }
input::placeholder, textarea::placeholder { color: #9ca2ac; }
textarea { min-height: 170px; resize: vertical; line-height: 1.7; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-title { font-size: 13px; margin: 16px 0 13px; }
.options + .note { margin-top: 18px; }
.options { margin-top: 23px; border-top: 1px solid var(--line); padding-top: 17px; }
summary { cursor: pointer; font-size: 12px; color: #5c6470; }
details[open]>summary { margin-bottom: 17px; }
.form-note, .storage-hint { font-size: 11px; color: #7a818c; margin-top: 18px; }
.letter-preview { min-width: 0; align-self: start; background: #f1efea; border: 1px solid #e5e1d9; border-radius: 7px; padding: 18px; }
.preview-heading { font-size: 11px; font-weight: 500; color: #6e7683; margin-bottom: 16px; }
.letter-paper { box-shadow: 0 3px 8px #41382708; background: #fffefa; border: 1px solid #e7e9ed; padding: 24px 20px; min-height: 230px; }
.letter-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.9; color: #49515c; }
.preview-label { font-size: 10px; color: #888f9b; margin-top: 12px; }
.token-row { display: flex; gap: 5px; flex-wrap: wrap; margin: -7px 0 23px; }
.token { padding: 4px 6px; background: #f4f5f7; border: 1px solid #e2e5ea; color: #6a7482; border-radius: 4px; font-size: 10px; }
.review-list { display: grid; gap: 18px; margin: 20px 0; }
.review-item { display: grid; grid-template-columns: 80px 1fr; gap: 12px; font-size: 12px; }
.review-item dt { color: var(--muted); }
.review-item dd { margin: 0; overflow-wrap: anywhere; }
.note { padding: 12px 14px; border: 1px solid #e4e6eb; background: #f8f9fb; border-radius: 6px; font-size: 12px; color: #66707d; line-height: 1.6; }
.note.warning { background: #fffbf2; border-color: #eee5d0; color: #816634; }
.error-text { font-size: 12px; color: #b14b42; margin-top: 13px; white-space: pre-wrap; }
.error-text:empty { margin: 0; }
.inline-error { border: 1px solid #edd6d3; border-radius: 6px; padding: 12px 15px; background: #fff7f6; color: #a5574d; font-size: 12px; margin-bottom: 18px; }
.instructions { padding-left: 20px; margin: 24px 0; font-size: 13px; color: #4d5663; }
.instructions li { padding-left: 5px; margin-bottom: 24px; }
.instructions strong { color: #303640; font-weight: 550; }
.instructions p { margin: 7px 0 0; color: #737c89; font-size: 12px; }
.copy-field { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #f8f9fb; border: 1px solid #e7e9ee; border-radius: 6px; margin-top: 12px; padding: 10px 12px; }
.copy-field code { font-size: 12px; overflow-wrap: anywhere; min-width: 0; }
.mapping { margin-top: 15px; }
.mapping-table { margin: 12px 0; white-space: normal; }
.mapping-table th, .mapping-table td { padding: 8px; font-size: 11px; }
.mapping-table td:last-child { text-align: left; }
.code-box { padding: 12px; background: #f7f8fa; border: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; white-space: pre-wrap; border-radius: 6px; margin-top: 12px; }
.login-body { padding: 28px; max-width: 400px; margin: auto; }
.login-body>.btn { width: 100%; }
.detail-message { padding: 24px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; white-space: pre-wrap; line-height: 1.9; }
.initial-loading, .loading-state { padding: 50px; color: var(--muted); }
#toast { position: fixed; bottom: 25px; left: calc(50% + 104px); transform: translateX(-50%); background: #25282d; color: #fff; border-radius: 7px; box-shadow: 0 5px 20px #151a2320; padding: 12px 18px; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 100; max-width: calc(100% - 32px); }
#toast.visible { opacity: 1; }
.skip-link { position: fixed; top: -60px; left: 20px; z-index: 100; background: white; padding: 12px; }
.skip-link:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .sidebar { width: 185px; padding-inline: 12px; }
  .main-shell { margin-left: 185px; }
  .content { padding: 28px 25px; }
  .topbar { padding-inline: 25px; }
  td, th { padding-inline: 13px; }
  .automation-table { white-space: normal; }
  .automation-table .btn, .automation-table .pill { white-space: normal; }
  .automation-icon { flex-shrink: 0; }
  #toast { left: calc(50% + 92px); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); width: 208px; }
  .sidebar.open { transform: translateX(0); box-shadow: 15px 0 50px #11182720; }
  .main-shell { margin-left: 0; }
  .mobile-toggle { display: inline-flex; }
  .topbar { padding-inline: 14px; height: 58px; }
  .content { padding: 26px 17px; }
  .page-heading { margin-bottom: 24px; align-items: flex-start; }
  h1 { font-size: 22px; }
  .heading-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .page-heading .btn { padding-inline: 10px; font-size: 11px; }
  .toolbar { gap: 10px; flex-wrap: wrap; }
  .search { width: 190px; }
  .dialog-body.split, .settings-grid { grid-template-columns: 1fr; }
  .dialog-body, .dialog-head { padding: 20px; }
  .dialog-footer { padding: 15px 20px; }
  .stepper { padding-inline: 20px; }
  dialog { width: calc(100% - 24px); max-height: 94vh; }
  .letter-paper { min-height: 150px; }
  .workspace-name { font-size: 11px; }
  .account-select { max-width: 120px; }
  #toast { left: 50%; }
}
@media (max-width: 420px) {
  .page-heading { flex-wrap: wrap; }
  .page-heading .heading-actions { width: 100%; justify-content: flex-start; }
  .search { width: 100%; }
  .form-row { gap: 9px; }
  .copy-field { flex-wrap: wrap; }
  .tab { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.production-proof { background:white; color:#111; padding:24px; font-family:Georgia,serif; }
.proof-controls { font-family:system-ui,sans-serif;max-width:800px;margin:0 auto 24px; }
.proof-sheet { box-sizing:border-box; width:8.5in;height:11in;padding:.65in;margin:0 auto;border:1px solid #ddd;overflow:hidden;background:white; }
.proof-return { font-size:10pt;line-height:1.25;margin-bottom:.35in; }
.proof-recipient { font-size:11pt;line-height:1.25;margin-bottom:.35in; }
.proof-message { white-space:pre-wrap;overflow-wrap:anywhere;font-size:12pt;line-height:1.5; }
.postcard-proof .proof-sheet { width:6in;height:4in;padding:.2in;display:grid;grid-template-columns:55% 45%;grid-template-rows:auto 1fr;gap:.1in; }
.postcard-proof .proof-return { grid-column:2;grid-row:1;font-size:8pt;margin:0; }
.postcard-proof .proof-recipient { grid-column:2;grid-row:2;align-self:center;font-size:9pt;margin:0; }
.postcard-proof .proof-message { grid-column:1;grid-row:1 / span 2;font-size:10pt;line-height:1.3; }
@media print { @page { size:letter;margin:0; } .proof-controls {display:none;} .production-proof {padding:0;margin:0;} .proof-sheet {border:0;margin:0;break-inside:avoid;} body.postcard-proof {page:postcard;} @page postcard {size:6in 4in;margin:0;} }
.public-document {max-width:850px;margin:40px auto;padding:24px;font-size:16px;line-height:1.65;background:#fff;}
.public-document h1,.public-document h2 {margin:24px 0 12px;}.public-document p,.public-document li {margin-bottom:14px;}.public-document nav {font-size:14px;}.public-document table {width:100%;border-collapse:collapse;}.public-document td,.public-document th {padding:12px;text-align:left;border-bottom:1px solid #ddd;}

.authenticator-qr{display:block;width:240px;max-width:100%;height:auto;margin:20px auto;background:white}.authenticator-secret{overflow-wrap:anywhere;user-select:all}
