:root{--ink:#203934;--muted:#697c76;--line:#e1e8e3;--paper:#fff;--bg:#f5f7f3;--teal:#166b58;--mint:#e7f2ec;--red:#ad3e42;--amber:#94681e}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus,textarea:focus,select:focus{outline:2px solid #389b7e;outline-offset:2px}button{border:1px solid var(--line);background:white;color:var(--ink);border-radius:8px;padding:10px 14px;white-space:nowrap}button:hover{background:#edf4ef}.primary{background:var(--teal);color:white;border-color:var(--teal)}.primary:hover{background:#10503f}.ghost{border:0;background:transparent}.small{padding:6px 10px;font-size:12px}.shell{display:grid;grid-template-columns:228px 1fr;min-height:100vh}#sidebar{background:#fff;border-right:1px solid var(--line);padding:30px 18px;position:fixed;width:228px;height:100vh;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:10px;padding:0 10px 28px}.brand-mark{height:36px;width:36px;background:var(--teal);border-radius:11px;display:grid;place-items:center;color:white;font:24px Georgia}.brand b{display:block;font-size:16px}.brand small{color:var(--muted);font-size:11px;letter-spacing:1.7px}.nav-label{font-size:10px;letter-spacing:1.6px;color:#8b9991;margin:15px 12px 8px}nav button{width:100%;text-align:left;border:0;background:none;display:flex;gap:12px;align-items:center;margin:3px 0;padding:12px;font-weight:500}nav button.active{background:var(--mint);color:var(--teal)}.navicon{width:21px;text-align:center;font-size:17px}.sidebar-bottom{margin-top:auto;padding:18px 10px 0;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.dot{display:inline-block;width:7px;height:7px;background:#51a882;border-radius:50%;margin-right:5px}main{grid-column:2;min-width:0}.topbar{height:78px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;gap:16px;padding:0 36px}.searchbox{max-width:600px;flex:1;display:flex;align-items:center;background:#f5f7f4;border:1px solid var(--line);border-radius:9px;padding:0 13px}.searchbox input{width:100%;border:0;background:none;padding:12px;outline:0}.profile{display:flex;gap:9px;align-items:center;margin-left:auto}.avatar{border-radius:50%;background:#e8ede6;color:var(--teal);width:34px;height:34px;display:grid;place-items:center;font-size:12px;font-weight:650}.profile select{border:0;background:none;max-width:155px}.content{padding:30px 36px 48px;max-width:1580px;margin:auto}.eyebrow{text-transform:uppercase;font-size:10px;letter-spacing:1.6px;color:var(--teal);font-weight:650;margin-bottom:10px}.pagehead{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:25px}h1{font:34px Georgia,serif;letter-spacing:-.7px;margin:0 0 9px}h2{font-size:17px;margin:0}h3{font-size:14px;margin:0 0 12px}p{line-height:1.65}.subtitle{color:var(--muted);margin:0}.toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.notice{background:#edf2e9;border:1px solid #dce5d6;border-radius:9px;padding:12px 16px;line-height:1.5;color:#52624c;font-size:12px;margin-bottom:24px}.notice a{color:inherit}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}.stat{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;position:relative}.stat .number{font:34px Georgia;display:block;margin:16px 0 7px}.stat .label{color:var(--muted);font-size:12px}.stat .stat-icon{float:right;color:var(--teal);background:var(--mint);border-radius:8px;padding:6px 9px}.stat small{color:var(--muted);font-size:11px}.grid{display:grid;grid-template-columns:1.55fr 1fr;gap:22px}.grid.equal{grid-template-columns:1fr 1fr}.card{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-bottom:22px}.cardhead{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:20px 22px;border-bottom:1px solid var(--line)}.cardbody{padding:20px 22px}.badge{display:inline-block;border-radius:5px;font-size:10px;letter-spacing:.3px;padding:5px 8px;background:#f0f3ef;color:var(--muted);font-weight:650}.badge.green{background:#e5f3e9;color:#317546}.badge.red{background:#fbe9e7;color:var(--red)}.badge.amber{background:#fbf1de;color:var(--amber)}.row{display:flex;align-items:center;gap:12px;padding:15px 22px;border-bottom:1px solid #edf0eb}.row:last-child{border:0}.row .text{flex:1;min-width:0}.row small{display:block;color:var(--muted);margin-top:5px;line-height:1.45}.row b{font-weight:550}.empty{text-align:center;padding:28px 20px;color:var(--muted);font-size:13px;line-height:1.7}.empty .empty-icon{display:block;font-size:25px;color:#9caf9e;margin-bottom:8px}.empty b{color:var(--ink)}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:10px;color:var(--muted);font-weight:650;letter-spacing:.6px;text-transform:uppercase;background:#f8faf7;padding:13px 20px;white-space:nowrap}td{padding:15px 20px;border-top:1px solid #edf0eb;vertical-align:middle}td small{display:block;color:var(--muted);margin-top:5px;font-size:11px}.person{display:flex;align-items:center;gap:10px}.person button{padding:0;border:0;background:none;white-space:normal;text-align:left;font-weight:600}.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:22px 0;overflow:auto}.tabs button{background:none;border:0;border-radius:0;padding:12px 16px;color:var(--muted)}.tabs button.active{border-bottom:2px solid var(--teal);color:var(--teal);font-weight:600}.fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.field label,label.formlabel{display:block;font-size:11px;color:var(--muted);margin-bottom:7px}.field-value{min-height:37px;padding:9px 10px;border:1px solid var(--line);border-radius:6px;background:#fbfcfa;white-space:pre-wrap;overflow-wrap:anywhere}.field.full{grid-column:1/-1}.field button{border:0;background:none;padding:0;color:var(--teal);float:right;font-size:11px}.muted{color:var(--muted)}.negative{color:var(--red)}.positive{color:var(--teal)}.sectiongap{margin-top:24px}.chips{display:flex;gap:7px;flex-wrap:wrap}.drop{border:1px dashed #a7bfb0;background:#f4f8f3;border-radius:8px;text-align:center;padding:18px;color:var(--teal)}.drop.drag{background:#deeee2}.drop input{max-width:220px}.filterbar{display:flex;align-items:center;gap:10px;margin-bottom:18px;flex-wrap:wrap}.filterbar input,.filterbar select{border:1px solid var(--line);border-radius:7px;padding:9px;background:white;color:var(--ink)}.progress{height:5px;background:#eff3ed;border-radius:3px;overflow:hidden;margin-top:10px}.progress span{display:block;background:#65a18b;height:100%}.letter-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:22px}.sheet{background:white;border:1px solid #dfe5df;max-width:794px;padding:35px 68px 55px;min-height:900px;box-shadow:0 5px 25px #243c3310;margin:auto}.letterhead{width:100%;max-height:210px;object-fit:contain;object-position:top center}.letter-address{margin-top:18px;white-space:pre-line;min-height:85px;font-size:13px}.letter-date{text-align:right;font-size:12px;margin:18px 0}.letter-subject{font-weight:650;margin:25px 0}.letter-body{white-space:pre-wrap;line-height:1.65;min-height:320px;font-size:14px}.letter-body[contenteditable]{outline:1px dashed #e4e9e0;padding:8px}.letter-foot{margin-top:40px;font-size:10px;color:#7c8880}.controlgroup{margin-bottom:16px}.controlgroup input,.controlgroup select,.controlgroup textarea,dialog input,dialog select,dialog textarea{width:100%;padding:10px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink)}.controlgroup textarea{min-height:80px}dialog{border:0;border-radius:14px;padding:0;width:560px;max-width:95vw;box-shadow:0 25px 100px #18342740;color:var(--ink)}dialog::backdrop{background:#172e2855;backdrop-filter:blur(2px)}.modalhead{padding:20px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.modalbody{padding:23px 24px;max-height:65vh;overflow:auto}.modalfoot{padding:18px 24px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}.modalbody .controlgroup{margin-bottom:15px}#toast{position:fixed;right:30px;bottom:28px;z-index:50;background:var(--ink);color:white;border-radius:8px;padding:14px 20px;box-shadow:0 8px 28px #18342722;display:none;max-width:470px}.source-text{white-space:pre-wrap;font-size:12px;line-height:1.6;background:#f8faf6;padding:15px;border-radius:8px;max-height:320px;overflow:auto}.note{font-size:12px;color:var(--muted);line-height:1.6}.checklist label{display:flex;align-items:center;gap:9px;margin:12px 0}.checklist input{width:auto}.report-period{display:flex;gap:14px}.report-period .controlgroup{flex:1}a{color:var(--teal)}.save-status{font-size:11px;color:var(--muted)}@media(max-width:1100px){.shell{grid-template-columns:190px 1fr}#sidebar{width:190px}.content{padding:25px}.topbar{padding:0 25px}.grid{grid-template-columns:1fr}.letter-layout{grid-template-columns:260px 1fr}.sheet{padding:30px}}@media(max-width:760px){#sidebar{position:static;width:100%;height:auto;padding:15px}.shell{display:block}.brand{padding-bottom:12px}nav{display:flex;overflow:auto}nav button{width:auto;white-space:nowrap}.nav-label,.sidebar-bottom{display:none}main{width:100%}.topbar{height:auto;padding:12px;flex-wrap:wrap}.profile{margin:0}.content{padding:20px 15px}.stats{grid-template-columns:1fr 1fr}.grid.equal,.fields,.letter-layout{grid-template-columns:1fr}.pagehead{align-items:flex-start;flex-direction:column}h1{font-size:29px}.cardhead{padding:16px}.sheet{padding:28px;min-height:700px}.field.full{grid-column:auto}}@media print{@page{size:A4;margin:20mm 20mm 20mm 25mm}body{background:white}.shell,dialog,#toast{display:none!important}#printArea{display:block!important}.sheet{width:auto;max-width:none;border:0;box-shadow:none;padding:0;min-height:0;margin:0}.letterhead{height:38mm;max-height:38mm}.letter-address{margin-top:5mm;min-height:30mm}.letter-body{outline:0!important;min-height:0;padding:0!important}.letter-foot{display:none}.letter-subject{break-after:avoid}p{orphans:3;widows:3}.printtable{font-size:10pt}.printtable td,.printtable th{padding:3mm}.print-title{font:18pt Georgia}}
.letter-header{display:flex;justify-content:space-between;align-items:flex-start;height:110px}.letter-header .letterhead{width:185px;height:104px;object-fit:contain}.letter-contact{font-size:10px;line-height:1.6;padding-top:12px}.sender-line{font-size:8px;border-bottom:1px solid #bbb;padding-bottom:4px;width:320px;margin-top:12px}.letter-address{margin-top:10px;min-height:95px}.letter-date{margin-top:10px}@media print{.letter-header{height:23mm}.letter-header .letterhead{width:47mm;height:24mm}.letter-contact{font-size:8pt;line-height:1.4;padding-top:0}.sender-line{margin-top:2mm;width:85mm;font-size:6.5pt;padding-bottom:1mm}.letter-address{margin-top:2mm;min-height:32mm;font-size:10pt}.letter-date{margin-top:3mm;font-size:10pt}.letter-subject{margin:8mm 0 5mm}.letter-body{font-size:11pt;line-height:1.5}}
.sorthead{border:0;background:none;padding:0;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.6px}.sorthead:hover{background:none;color:var(--teal)}.clickrow{cursor:pointer}.clickrow:hover{background:#f2f7f1}.client-table td{max-width:230px}.history-row{display:flex;gap:14px;padding:18px 22px;border-bottom:1px solid var(--line);align-items:center}.history-row .text{flex:1}.history-row small{display:block;color:var(--muted);margin-top:8px;line-height:1.5}.history-dot{border:2px solid #b3c2b8;width:12px;height:12px;flex-shrink:0;border-radius:50%}.history-dot.current{background:#428f71;border-color:#428f71}.history-heading{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.mini-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:22px}.mini-stats span{display:block;color:var(--muted);font-size:11px;margin-bottom:10px}.mini-stats b{font-size:21px;font-weight:550}.attention{background:#fff2d9;color:#805b15;border-color:#edd7a1}.account-card{display:flex;align-items:center;text-align:left;gap:15px;width:100%;padding:20px;margin:0 0 10px;border-radius:10px}.account-card small{display:block;margin-top:7px;color:var(--muted);font-size:11px}.account-icon{background:var(--mint);color:var(--teal);padding:14px;border-radius:10px;font-size:22px}.account-amount{margin-left:auto;text-align:right;font:24px Georgia;white-space:nowrap}.account-amount small{font:11px -apple-system,BlinkMacSystemFont,sans-serif}.shared-drop{margin:20px 0}.shared-drop p{font-size:12px}.contact-name{padding:0;font-weight:650;text-align:left;white-space:normal}.multi-field{border:0;padding:0;margin:0 0 18px;min-width:0}.multi-field legend{font-size:12px;color:var(--muted);margin-bottom:12px}.multi-options{max-height:300px;overflow:auto;border:1px solid var(--line);border-radius:8px;padding:10px 14px;margin-top:8px}.multi-options label{display:flex;align-items:flex-start;gap:10px;margin:11px 0;font-size:12px;line-height:1.5}.multi-options label[hidden]{display:none}.multi-options input[type=checkbox]{width:auto;margin-top:2px}.modal-tabs{margin-top:0}.modal-tabs button{font-size:12px;white-space:normal}.report-actions{margin-bottom:18px}.report-period{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}.report-period input{padding:10px;width:100%;border:1px solid var(--line);border-radius:7px}.report-section{margin-top:25px}.report-section label{font-size:13px;color:var(--ink);font-weight:550}.report-section textarea{line-height:1.6;min-height:130px}.context-card{border:1px solid var(--line);border-radius:8px;margin-bottom:16px}.context-card summary{padding:15px;cursor:pointer;font-weight:550}.value-input{width:140px;max-width:100%;padding:9px;border:1px solid var(--line);border-radius:5px}.report-logo{width:180px;height:65px;object-fit:contain;object-position:left}.report-prose{white-space:pre-wrap}.report-print h2{font-size:13pt;margin:8mm 0 3mm;break-after:avoid}.report-print h3{margin:7mm 0 3mm}.report-print p{orphans:3;widows:3}.report-print table{break-inside:auto}.report-print tr{break-inside:avoid}@media(max-width:800px){.mini-stats{grid-template-columns:1fr 1fr}.report-period{grid-template-columns:1fr}.account-card{flex-wrap:wrap}.account-amount{margin-left:0}.history-heading{align-items:flex-start;flex-direction:column}}@media print{.report-print{font:11pt Arial,sans-serif}.report-print .print-title{font:20pt Georgia,serif}.report-logo{width:50mm;height:18mm}.report-print th{color:#444;background:#f0f2ee}}

.quick-copy{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 20px}.copy-value{display:inline-flex;flex-wrap:wrap;gap:7px;align-items:center;text-align:left;font-size:12px;padding:7px 10px;max-width:100%;overflow-wrap:anywhere}.copy-value small{color:var(--muted);width:100%}.copy-value span{opacity:.6}.fields{grid-template-columns:repeat(2,minmax(0,1fr))}.field.full{grid-column:auto}.tabs{flex-wrap:wrap}.wizard-section{padding:15px;border:1px solid #dbe5e3;border-radius:12px;margin:12px 0}.wizard-section summary{font-weight:600;cursor:pointer;margin-bottom:10px}.filterbar label{font-size:12px}.filterbar input[type=date]{width:155px}.filterbar input[type=number]{width:100px}@media(max-width:650px){.fields{grid-template-columns:1fr}}

.compact-table td{padding:12px 14px;vertical-align:middle}.compact-table th{white-space:nowrap}.compact-table .badge{font-size:11px}.automation-line,.period-strip,.account-title{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.automation-line{margin-bottom:20px}.period-strip{padding:15px 0}.wealth-tile{border:1px solid #e0e8e5;border-radius:12px;padding:15px;margin-bottom:12px;display:grid;grid-template-columns:1fr auto;gap:10px}.wealth-tile small{grid-column:1/-1;color:#74817c}.wealth-tile .ghost{font-weight:600;text-align:left;padding:0}.account-title h2{margin:0}details.card>summary{padding:18px 22px;font-weight:600;cursor:pointer}.tabs.sectiongap{margin:22px 0}.compact-table tr:hover{background:#f4f8f6}.card textarea{width:100%;box-sizing:border-box}

.wealth-subnav{display:flex;gap:8px;border-bottom:1px solid #dbe5df;padding:0 0 12px;margin:10px 0 22px}.wealth-subnav button.active{background:#e1f0e8;color:#096044}.workflow{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 20px}.workflow span{padding:10px 16px;border:1px solid #dbe5df;border-radius:8px;color:#718077}.workflow .active,.workflow .done{background:#e4f3eb;color:#176341}.document-toolbar{background:white;border:1px solid #dbe5df;border-radius:12px;padding:18px;margin-bottom:20px;display:flex;gap:15px;flex-wrap:wrap;align-items:center}.document-toolbar .note{width:100%;margin:0}.document-paper-wrap{overflow:auto}.document-sheet{margin:auto;min-height:297mm;height:auto}.document-body{line-height:1.55;font-size:11pt;outline:none;min-height:250px}.document-body table{width:100%;border-collapse:collapse;table-layout:auto;font-size:9pt;margin:18px 0}.document-body th,.document-body td{border:1px solid #d3ded8;padding:8px;text-align:left;vertical-align:top}.document-body th{background:#eff5f1;font-weight:600}.document-body p{margin:12px 0}.doc-edit:focus{outline:1px dashed #81b79a;outline-offset:4px}.document-sheet .letter-foot{position:static;margin-top:25mm}.document-sheet .letter-address{min-height:32mm}.document-sheet .letter-date{margin-bottom:10mm}.document-sheet .letter-subject{margin-bottom:6mm}@media print{.document-sheet{min-height:0;height:auto;margin:0;box-shadow:none;overflow:visible}.document-body tr{break-inside:avoid}.document-body thead{display:table-header-group}.doc-edit{outline:none!important}.document-sheet .letter-foot{margin-top:12mm}}

#view>.tabs:not(.sectiongap){gap:0}#view>.tabs:not(.sectiongap)>button{padding:12px 9px;font-size:12px;white-space:nowrap}

.quick-copy{display:grid;grid-template-columns:1.4fr 1.15fr 1fr 1fr;gap:8px;margin:8px 0 15px}.quick-copy .copy-value{width:100%;min-width:0;box-sizing:border-box;padding:5px 8px;font-size:11px;gap:2px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quick-copy .copy-value small{display:block;font-size:10px;margin:0 0 2px}.inline-copy{font:inherit;color:inherit;padding:0;border:0;background:transparent;text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.5;max-width:100%}.inline-copy span{font-size:11px;opacity:.5;margin-left:5px}.contact-link-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.contact-link-card{border:1px solid #dfe8e2;border-radius:12px;padding:18px;min-width:0}.contact-link-head h3{font-size:15px;margin:0 0 4px}.contact-link-head{margin-bottom:16px}.contact-link-card .fields{padding:0;gap:14px}.contact-link-card .toolbar{margin-top:18px;justify-content:flex-start}.contact-link-card label{font-size:11px}.task-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:340px}.task-actions select{font-size:11px;max-width:175px}.task-row{border-left:4px solid transparent}.task-row.urgent{border-left-color:#c44943}.task-row.soon{border-left-color:#4b9871}.task-row.working{border-left-color:#dc923c}.task-row.completed{opacity:.75}.task-dates{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}.task-legend{display:flex;gap:10px;margin-bottom:15px;flex-wrap:wrap}.badge.orange{color:#a15d0c;background:#fff0d8}@media(max-width:900px){.contact-link-grid{grid-template-columns:1fr}}@media(max-width:650px){.quick-copy{grid-template-columns:repeat(2,minmax(0,1fr))}.task-actions{max-width:100%;justify-content:flex-start}}

.contact-link-grid.insurance-grid{grid-template-columns:1fr}.field-value .inline-copy{display:flex;align-items:center;justify-content:space-between;width:100%;padding:0;border:0;background:transparent;text-align:left;font-size:inherit;color:inherit;white-space:normal}.field-value .inline-copy span{flex-shrink:0}.contact-link-card .field-value{min-height:42px;display:flex;align-items:center}

.document-body [data-page-break="1"]{border-top:2px dashed #cbdcd2;margin:32px 0;height:16px}.document-body h1{font-size:22px;margin-top:12px}.document-body table td:last-child{font-variant-numeric:tabular-nums}@media print{.document-body [data-page-break="1"]{break-before:page;page-break-before:always;border:0;margin:0;height:0}}

.signature-image{display:block;width:42mm;max-height:18mm;object-fit:contain;object-position:left center;margin:5px 0}.signature-preview{border:1px solid var(--line);border-radius:10px;padding:20px;background:white}.letter-signature{margin-top:8px;break-inside:avoid}.letter-signature p{margin:4px 0}.visit-layout{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(350px,1.4fr);gap:20px}.visit-question-list{max-height:650px;overflow:auto;padding:10px}.visit-question-list button{display:flex;width:100%;gap:10px;text-align:left;white-space:normal;border:0;margin-bottom:4px;padding:12px}.visit-question-list button.active{background:var(--mint)}.visit-question-list small{display:block;color:var(--muted);margin-top:6px}.visit-title{font-size:23px;line-height:1.5;margin-bottom:18px}.visit-answer textarea{width:100%;margin-top:8px}@media(max-width:900px){.visit-layout{grid-template-columns:1fr}.visit-question-list{max-height:260px}}

#contactWishes,#contactTaskNotes{width:100%;margin:8px 0 15px}.visit-layout textarea{max-width:100%}.visit-layout input,.visit-layout select{max-width:100%}.visit-layout .row{padding:12px 0}.visit-layout .row .small{white-space:normal}.notice button{margin:5px}.sidebar-bottom #storageStatus{line-height:1.5}

/* Saved contact history */
.contact-history-entry{border-bottom:1px solid var(--line,#dce3e8);padding:20px 0}.contact-history-entry:first-of-type{padding-top:0}.contact-history-entry:last-child{border-bottom:0}.contact-prose{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin:8px 0}.contact-protocol-point{padding:12px 0;border-bottom:1px solid #e3e8ee}.contact-source{margin-top:14px;padding:12px;background:#f6f8fb;border-radius:10px}.contact-source summary{cursor:pointer;font-weight:600}.contact-record-summary{margin-bottom:18px}

.select-search{display:grid;gap:5px;margin:0 0 8px;min-width:0}.select-search input{width:100%;min-width:0}.select-search .note{font-size:11px;margin:0}

.select-results{max-height:240px;overflow:auto;border:1px solid #c5d9d1;border-radius:10px;background:#fff;box-shadow:0 6px 16px #173d2412}.select-results[hidden]{display:none}.select-result{padding:11px 13px;cursor:pointer;line-height:1.4;border-bottom:1px solid #eff3f0}.select-result:hover,.select-result.keyboard-active{background:#e5f1eb;color:#0c614e}.select-results p{padding:10px 13px;margin:0}

.dashboard-stats{gap:10px;margin-bottom:14px}.dashboard-stats .stat{padding:11px 14px;border-radius:8px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px}.dashboard-stats .stat .number{font:24px Georgia;margin:0;grid-column:2;grid-row:1/3}.dashboard-stats .stat .stat-icon{display:none}.dashboard-stats .stat small{font-size:10px}.dashboard-stats .stat .label{font-size:11px}.case-alerts{margin:0 0 22px;display:grid;gap:8px}.case-alert{display:flex;gap:10px;align-items:center;padding:13px 16px;border-radius:8px;border-left:5px solid #aa2828;background:#fff0ee;color:#872424}.case-alert.new-case{border-left-color:#216652;background:#eaf5ef;color:#195e49}.case-alert>div,.case-history-row>div{flex:1;min-width:0}.case-alert small,.case-history-row small{display:block;font-size:11px;margin-top:5px;color:inherit;opacity:.85}.case-alert button{white-space:nowrap}.case-history-row{display:flex;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #edf0eb}.case-history-row.ended b{color:#a12c2c}@media(max-width:760px){.case-alert,.case-history-row{flex-wrap:wrap}.case-alert>div,.case-history-row>div{flex-basis:100%}.dashboard-stats .stat .number{font-size:22px}}

.case-alert b,.case-history-row b{white-space:pre-wrap;overflow-wrap:anywhere}

.fee-document .document-body th{background:#f3f3f3;color:#17202b;text-transform:none;letter-spacing:0}.fee-document .document-body td,.fee-document .document-body th{border:1px solid #c8c8c8;padding:7px 8px}.fee-document .document-body table+p{text-align:right}.fee-document .letter-subject{font-size:14px}.fee-document .letter-contact{line-height:1.4;padding-top:0}

.document-sheet .document-body th{background:#f3f3f3;color:#17202b;text-transform:none;letter-spacing:0}.document-sheet .document-body table{border-color:#c8c8c8}.document-sheet .document-body th,.document-sheet .document-body td{border:1px solid #c8c8c8}

/* Gemeinsamer kompakter Briefkopf für alle ausgehenden Dokumente. */
.sheet{position:relative;color:#000}.sheet .letter-contact,.sheet .sender-line,.sheet .letter-date,.sheet .letter-foot{color:#000;background:#fff}.sheet .letter-date{position:absolute;top:185px;right:68px;max-width:42%;margin:0;line-height:1.45}.sheet .document-body th,.sheet .document-body td{color:#000;background:#fff}.sheet .letter-subject{color:#000}
@media screen and (max-width:1100px){.sheet .letter-date{right:30px}}
@media screen and (max-width:760px){.sheet .letter-date{position:static;max-width:none;margin:8px 0}.sheet .letter-contact{color:#000}}
@media print{.sheet .letter-date{position:absolute;top:30mm;right:0;max-width:70mm;margin:0;color:#000}.sheet .letter-contact,.sheet .sender-line,.sheet .letter-foot,.sheet .document-body th,.sheet .document-body td{color:#000;background:#fff}}

.case-alert.notice-red{background:#fff0ee;border-left-color:#aa2828;color:#872424}.case-alert.notice-green{background:#eaf5ef;border-left-color:#216652;color:#195e49}.case-alert.notice-yellow{background:#fff6d9;border-left-color:#b27b08;color:#795407}.case-history-row.notice-red b{color:#a12c2c}.case-history-row.notice-green b{color:#216652}.case-history-row.notice-yellow b{color:#94681e}.notice-completed{opacity:.8}

.sheet .letter-case-info{width:100%;border-collapse:collapse;table-layout:fixed;margin:18px 0 12px;font-size:11px;line-height:1.45;color:#000;background:#fff}.sheet .letter-case-info th,.sheet .letter-case-info td{border:0;border-bottom:1px solid #ddd;padding:5px 0;text-align:left;vertical-align:top;background:#fff;color:#000;overflow-wrap:anywhere}.sheet .letter-case-info th{width:125px;padding-right:12px;font-weight:600;text-transform:none;letter-spacing:normal}.sheet #previewCaseInfo+.letter-subject{margin-top:14px}.sheet .letter-case-info tr{break-inside:avoid}@media print{.sheet .letter-case-info{font-size:10pt;margin:4mm 0 3mm;break-inside:avoid}.sheet .letter-case-info th{width:35mm}.sheet .letter-case-info th,.sheet .letter-case-info td{padding-top:1mm;padding-bottom:1mm}.sheet #previewCaseInfo+.letter-subject{margin-top:4mm}}

.person-letterhead{justify-content:flex-end}.person-letterhead .letter-contact{white-space:normal;max-width:55%;overflow-wrap:anywhere}.person-signature{display:grid;grid-template-columns:1fr 1.5fr;gap:35px;margin-top:45px;break-inside:avoid}.person-signature>div{border-top:1px solid #000;padding-top:5px;font-size:11px;color:#000}.person-signature small{display:block;margin-top:4px}.receipt-letter .letter-address[hidden]{display:none!important}.receipt-letter .letter-date{position:static;max-width:none;text-align:right;margin:12px 0 20px}.receipt-letter .letter-body{min-height:220px}.receipt-letter .sender-line{display:none}.receipt-letter .person-signature{margin-top:40px}@media print{.person-signature{margin-top:12mm;gap:10mm}.person-signature>div{font-size:9pt}.receipt-letter .letter-date{position:static;margin:3mm 0 5mm}.receipt-letter .letter-body{min-height:50mm}.receipt-letter .person-signature{margin-top:12mm}}

@media print{.declaration-letter .letter-body{font-size:10.5pt;line-height:1.35}.declaration-letter .person-signature{margin-top:8mm}}

.self-declaration-controls{border:1px solid var(--line);border-radius:10px;padding:14px;margin:14px 0}.self-declaration-controls legend{padding:0 6px;font-weight:600}.self-declaration-controls .report-period{flex-wrap:wrap;gap:10px}.self-declaration-controls .controlgroup{min-width:110px}.self-declaration-period{font-size:12px;margin:15px 0 8px}.declaration-letter .letter-body{min-height:0!important}.self-declaration-options{font-size:13px;line-height:1.5}.self-declaration-option{display:flex;align-items:flex-start;gap:9px;margin:7px 0;color:#000}.self-declaration-option input{flex:0 0 auto;width:13px;height:13px;margin-top:3px;accent-color:#000}.self-declaration-option span{outline:none}.self-declaration-confirmation{margin-top:28px;font-size:13px;line-height:1.5}.self-declaration-confirmation>p{margin:6px 0 12px}.self-declaration-confirmation .letter-signature{break-inside:avoid}.self-declaration-confirmation .signature-image{max-height:45px}.self-declaration-confirmation [contenteditable]{outline:none}@media print{.self-declaration-period{font-size:10.5pt;margin:3mm 0 2mm}.self-declaration-options,.self-declaration-confirmation{font-size:10.5pt;line-height:1.35}.self-declaration-option{margin:2mm 0;break-inside:avoid}.self-declaration-option input{appearance:none;-webkit-appearance:none;width:3.5mm;height:3.5mm;min-width:3.5mm;margin:.6mm 0 0;border:.25mm solid #000;border-radius:0;background:#fff;position:relative;print-color-adjust:exact}.self-declaration-option input:checked:after{content:'✓';position:absolute;left:0;top:-1.1mm;font-size:12pt;line-height:1}.self-declaration-confirmation{margin-top:7mm;break-inside:avoid}.self-declaration-confirmation>p{margin:1.5mm 0 3mm}.self-declaration-confirmation .signature-image{max-height:12mm}.declaration-letter .person-signature{margin-top:10mm}}

/* Briefanlagen und ankreuzbares Begleitschreiben */
.letter-attachments{margin-top:7mm;font-size:10pt;break-inside:avoid}.letter-attachments div{white-space:pre-wrap;margin-top:2mm}.letter-cover-options{margin:5mm 0}.letter-cover-option{display:flex;align-items:baseline;gap:3mm;margin:3mm 0}.letter-cover-option label{white-space:nowrap}.letter-cover-option input{width:3.5mm;height:3.5mm;accent-color:#143b48}.letter-cover-other{display:inline-block;min-width:55mm;min-height:6mm;border-bottom:1px solid #333;white-space:pre-wrap}.letter-cover-conclusion{margin:5mm 0}.sheet:has(.letter-cover-options) .letter-body{min-height:0}
@media print{.letter-cover-option input{appearance:none;border:1px solid #222;border-radius:0;position:relative}.letter-cover-option input:checked:after{content:'✓';position:absolute;left:0;top:-1.5mm;font-size:14pt;color:#000}.letter-cover-options{break-inside:avoid}}

/* Kompakte Rückgabe und gleich lange Quittungsfelder */
.return-card-letter .letter-body{min-height:0!important}.return-card-letter .letter-signature{margin-top:8px}.receipt-fields{margin:8mm 0;font-size:13px}.receipt-field{display:flex;align-items:baseline;gap:3mm;margin:5mm 0}.receipt-field>span:first-child{flex:0 0 37mm}.receipt-line{display:block;flex:0 1 80mm;width:80mm;min-width:0;min-height:6mm;border-bottom:1px solid #000;white-space:pre-wrap;overflow-wrap:anywhere}.receipt-letter:has(.receipt-fields) .letter-body{min-height:0!important}.receipt-letter:has(.receipt-fields) .person-signature{margin-top:12mm}@media print{.receipt-fields{font-size:11pt}.receipt-line{outline:none}}

.receipt-letter.receipt-addressed .sender-line{display:block}

.letter-body[contenteditable]:empty:before{content:attr(data-placeholder);color:#7a858a;pointer-events:none}.letter-field-missing{outline:2px solid #b14646!important;outline-offset:2px}@media print{.letter-body[contenteditable]:empty:before{content:none}.letter-field-missing{outline:none!important}}

/* Anschrift für Fensterumschläge: innen 80 mm, 25 mm vom linken Blattrand. */
.sheet:not(.document-sheet) .letter-address{max-width:80mm;overflow-wrap:anywhere}.sheet .sender-line{max-width:80mm}.sheet:not(.document-sheet) .letter-header{min-height:30mm}

button.letter-trash-purge{color:#a13339;border-color:#c58689}button.primary.letter-trash-purge{background:#a13339;color:#fff;border-color:#a13339}button.letter-trash-purge:hover{background:#fbeaec;color:#84272c}

button.case-status-button{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:5px 9px;border:1px solid transparent;font-size:11px;cursor:pointer}button.case-status-button:hover{border-color:currentColor}button.case-status-button.inactive{background:#edf0f2;color:#5c6970}
