:root{--green:#176b52;--green-dark:#10513e;--green-light:#edf6f1;--ink:#25362e;--muted:#7e8b83;--line:#e3e9e4;--bg:#f5f7f4;--white:#fff;--red:#ba4545;--radius:12px;--shadow:0 3px 18px #20362904}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:88px}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-variant-numeric:tabular-nums}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #91c6ad;outline-offset:3px}button{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}a{color:inherit;text-decoration:none}svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}h1,h2,h3,p{margin:0}button{border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);padding:8px 13px;transition:background .16s,border-color .16s}button:hover{border-color:#afc5b8;background:#f5f9f6}.primary{background:var(--green);border-color:var(--green);color:white}.primary:hover{background:var(--green-dark);border-color:var(--green-dark)}.quiet{border-color:transparent;background:transparent;color:#68796e}.small{font-size:12px;padding:5px 10px}.danger{color:var(--red)}.icon-button{padding:5px;width:28px;height:28px;border:0;background:transparent;color:#87958b}.icon-button:hover{color:var(--green);background:#e9f2ec}.icon-button.danger:hover{color:var(--red);background:#fff0f0}.muted{color:var(--muted)}.no-wrap{white-space:nowrap}[hidden]{display:none!important}
.app-header{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 40px;position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:11px}.brand-mark{background:var(--green);color:#fff;width:36px;height:36px;border-radius:9px;display:grid;place-items:center}.brand-mark svg{width:24px;height:24px}.brand-name{font-size:17px;font-weight:650;letter-spacing:1.5px}.brand-note{margin-left:20px;padding-left:20px;border-left:1px solid var(--line);color:var(--muted);font-size:12px;letter-spacing:1px}.header-right{display:flex;gap:22px;align-items:center}.save-state{font-size:12px;color:#7a897f;display:flex;align-items:center;gap:6px}.save-dot{height:6px;width:6px;border-radius:50%;background:#649d7a}.header-tag{font-size:11px;color:var(--green);background:var(--green-light);padding:3px 9px;border-radius:4px}
.workspace{max-width:1560px;margin:auto;padding:32px 40px 60px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.breadcrumb{font-size:11px;color:#909b94;margin-bottom:8px;letter-spacing:.3px}.breadcrumb span{margin:0 8px;color:#bac5bd}.title-line{display:flex;align-items:center;gap:12px}h1{font-size:27px;letter-spacing:1px;font-weight:650}.draft-badge{font-size:11px;padding:2px 8px;background:#e7ede7;color:#718373;border-radius:4px}.subtitle{font-size:12px;color:var(--muted);margin-top:5px}.toolbar{display:flex;gap:9px;align-items:center}.toolbar button{font-size:12px;padding:9px 13px}.toolbar .primary{padding:10px 17px}.menu{position:relative}.menu>summary{list-style:none;cursor:pointer;display:flex;gap:7px;align-items:center;background:white;border:1px solid var(--line);padding:9px 13px;font-size:12px;border-radius:7px}.menu>summary::-webkit-details-marker{display:none}.menu-panel{position:absolute;right:0;top:calc(100% + 8px);width:190px;z-index:30;background:#fff;border:1px solid var(--line);border-radius:9px;padding:5px;box-shadow:0 10px 40px #24382e16}.menu-panel button{width:100%;justify-content:flex-start;border:0;font-size:12px}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 274px;gap:24px;align-items:start}.editor{min-width:0}.section-nav{display:flex;gap:24px;align-items:center;padding:0 20px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);margin-bottom:18px;height:53px;overflow:auto;white-space:nowrap}.section-nav a{font-size:12px;align-self:stretch;display:flex;align-items:center;gap:7px;color:#7f8d82;border-bottom:2px solid transparent;padding-top:2px}.section-nav a:hover,.section-nav a.active{color:var(--green);border-bottom-color:var(--green)}.section-nav a span{font-size:10px;opacity:.65}.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:20px;overflow:hidden}.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 22px 15px}.section-title{display:flex;gap:10px;align-items:center}.section-index{font-size:11px;font-weight:650;color:var(--green);background:var(--green-light);width:26px;height:26px;border-radius:6px;display:grid;place-items:center}.section-title h2{font-size:14px;font-weight:650;letter-spacing:.3px}.section-caption{font-size:11px;color:#929c95}.section-actions{display:flex;align-items:center;gap:6px}.fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 20px;padding:0 22px 22px}.field{display:flex;flex-direction:column;gap:5px;min-width:0}.field>span,.field-label{color:#7c8a80;font-size:11px;display:flex;align-items:center;justify-content:space-between}.field.wide{grid-column:1/-1}.field.half{grid-column:span 1}.input,input,textarea,select{color:#33473b;background:#fff;border:1px solid #e0e7e1;border-radius:6px;padding:8px 10px;min-width:0;width:100%;outline:none;transition:border .15s,box-shadow .15s}input::placeholder,textarea::placeholder{color:#b4bdb6}input:focus,textarea:focus,select:focus{border-color:#77a78e;box-shadow:0 0 0 3px #176b5209;background:#fff}input:hover,textarea:hover,select:hover{border-color:#afc2b5}input[type=number]{appearance:textfield;-moz-appearance:textfield}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=date]{min-height:38px}textarea{resize:vertical;min-height:39px;line-height:1.6}.field input,.field textarea,.field select{font-size:12px}.configuration-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.configuration-grid .field input{background:#fafbf9}.configuration-grid .field input:focus{background:white}.inline-hint{display:flex;align-items:center;gap:6px;color:#8c9890;font-size:11px}.inline-hint svg{width:13px;height:13px}.field-remove{width:18px;height:18px;padding:0;border:0;color:#9ba79d;background:transparent}.field-remove:hover{color:var(--red)}
.table-wrap{overflow:auto;padding:0 0 2px;scrollbar-width:thin;scrollbar-color:#d5ded7 transparent}table{border-collapse:separate;border-spacing:0;width:100%;font-size:12px;table-layout:fixed}th{background:#f7f9f6;color:#7b8b7e;font-size:10px;font-weight:500;text-align:left;padding:11px 5px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);line-height:1.65}th small{display:block;font-size:9px;color:#9aa49c;font-weight:400}td{padding:10px 4px;border-bottom:1px solid #edf0eb;vertical-align:middle}td:first-child,th:first-child{text-align:center;color:#9ca79f;padding-left:10px}td:last-child,th:last-child{padding-right:10px}td input,td textarea{border-color:transparent;background:transparent;border-radius:4px;font-size:12px;padding:6px 4px;height:32px;width:100%}td input:hover,td textarea:hover{border-color:#dce5dd;background:#fff}td textarea{resize:vertical;min-height:32px;line-height:18px}td.numeric input{text-align:right}th.numeric,td.numeric{text-align:right}td.calculated{background:#f6faf7;color:#2d6950;padding-right:9px}td.amount{font-weight:600}.row-actions{display:flex;justify-content:center;opacity:0;transition:opacity .15s}tr:hover .row-actions,tr:focus-within .row-actions{opacity:1}.row-actions .icon-button{width:24px}.row-actions svg{width:14px;height:14px}.table-footer{display:flex;align-items:center;justify-content:space-between;padding:10px 18px;background:#fcfdfa;border-bottom:1px solid var(--line);gap:10px}.table-subtotal{display:flex;gap:18px;align-items:center;font-size:11px;color:#8a968c}.table-subtotal strong{color:#3e614b;font-weight:600;font-size:12px}.table-hint{padding:10px 22px;font-size:10px;color:#95a097;display:flex;gap:7px;align-items:flex-start}.table-hint svg{width:13px;height:13px;margin-top:2px}.custom-column-head{display:flex;align-items:center;justify-content:flex-end;gap:2px}.custom-column-head .icon-button{width:15px;height:16px;padding:0}.custom-column-head svg{height:11px;width:11px}.field>.print-value,.print-value{display:none}.add-section{width:100%;padding:13px;border-style:dashed;background:transparent;color:#899b8d;margin-bottom:20px;font-size:12px}.add-section:hover{background:#edf5ef}.terms-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.signatures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px;padding:17px 22px;border-top:1px dashed #e1e7df;background:#fcfdfa}.signature-line{display:flex;align-items:center;gap:12px;color:#8b978f;font-size:11px}.signature-line input{border:0;border-bottom:1px solid #dbe3da;border-radius:0;background:transparent;padding:5px 0;font-size:12px}.bottom-note{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#a0aba2;font-size:10px;letter-spacing:.3px;padding:4px 2px}.bottom-note span{display:flex;align-items:center;gap:5px}.bottom-note svg{height:12px;width:12px}
.sidebar{position:sticky;top:96px}.summary-card{border:1px solid #d9e3db;background:white;border-radius:var(--radius);overflow:hidden;margin-bottom:16px}.summary-top{padding:21px 22px 18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.summary-top h2{font-size:14px;font-weight:600}.summary-top span{font-size:10px;color:#8b978e}.summary-body{padding:18px 22px}.summary-line{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;color:#7f8e83;margin-bottom:13px}.summary-line strong{font-weight:500;color:#344c3d}.summary-line.area{font-size:11px;padding-bottom:17px;border-bottom:1px dashed #e1e7df;margin-bottom:18px}.summary-line .discount-input{position:relative;width:105px}.discount-input span{position:absolute;left:10px;top:8px;font-size:12px;color:#89988d}.discount-input input{text-align:right;padding:6px 10px 6px 23px;font-size:12px;background:#fbfcfa}.discount-line{margin-bottom:0}.final-total{background:var(--green);color:#fff;padding:21px 22px 22px}.total-label{font-size:11px;color:#c6dfd3;display:flex;align-items:center;justify-content:space-between}.total-label span:last-child{font-size:9px;letter-spacing:1px}.total-number{font-size:32px;line-height:1.5;font-weight:600;letter-spacing:-.8px;overflow-wrap:anywhere;margin-top:5px}.total-number small{font-size:19px;font-weight:400;margin-right:5px}.amount-words{font-size:10px;line-height:1.8;color:#c7e0d4;margin-top:6px;padding-top:12px;border-top:1px solid #ffffff23;overflow-wrap:anywhere}.summary-print{padding:15px 16px}.summary-print .primary{width:100%;padding:11px;font-size:12px}.summary-print p{text-align:center;color:#a3ada5;font-size:10px;margin-top:8px}.note-card{padding:18px 18px;border:1px solid var(--line);border-radius:var(--radius);margin-bottom:16px}.note-card h3{font-size:12px;font-weight:500;display:flex;align-items:center;gap:7px;margin-bottom:12px}.note-card h3 svg{height:16px;width:16px;color:#8b9f8c}.note-card p{font-size:11px;color:#87948a;line-height:1.9;margin-top:7px}.note-card .status-row{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#859187;margin:9px 0}.status-icon{display:flex;align-items:center;gap:6px}.status-icon svg{width:13px;height:13px}.status-good{color:var(--green)}.status-pending{color:#a09c85}.local-note{font-size:10px;line-height:1.9;color:#9aa69d;text-align:center;padding:0 15px}.alert{padding:9px 11px;border-radius:6px;font-size:11px;color:#af3d3d;background:#fff2ef;margin-top:12px}.screen-only{}.print-header,.print-summary{display:none}.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,15px);padding:11px 20px;max-width:calc(100vw - 30px);text-align:center;border-radius:8px;color:#fff;background:#234934;box-shadow:0 8px 35px #203a3520;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:100}.toast.show{opacity:1;transform:translate(-50%,0)}dialog{border:1px solid var(--line);border-radius:14px;width:440px;max-width:calc(100vw - 32px);padding:0;color:var(--ink);box-shadow:0 30px 100px #1b3b3522}dialog::backdrop{background:#1f302d60;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid var(--line)}.dialog-head h2{font-size:17px}.dialog-body{padding:22px 24px;display:grid;gap:16px}.dialog-body p{font-size:12px;color:#87948a}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;padding:0 24px 22px}.dialog-help{padding:10px 12px;background:#f3f7f1;border-radius:6px;line-height:1.8}.dialog-body .field>span{font-size:12px}.field-choice{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.field-choice label{font-size:12px;padding:10px;border:1px solid var(--line);border-radius:6px;display:flex;align-items:center;gap:7px}.field-choice input{width:auto;accent-color:var(--green)}.preview-toolbar{display:none}body.preview{background:#e7ebe6}body.preview .app-header,body.preview .page-heading,body.preview .section-nav,body.preview .sidebar,body.preview .screen-only,body.preview .bottom-note{display:none!important}body.preview .layout{display:block}body.preview .workspace{padding:28px 0;width:210mm;max-width:calc(100% - 30px);margin:25px auto;background:#fff;box-shadow:0 3px 25px #243a3014}body.preview .editor{padding:0 10mm}body.preview .preview-toolbar{display:flex;position:sticky;top:0;z-index:50;justify-content:center;align-items:center;gap:16px;background:var(--green-dark);color:white;padding:12px;font-size:12px}body.preview .preview-toolbar button{font-size:12px;padding:6px 12px}body.preview .print-header{display:block}body.preview .card{border-radius:0;box-shadow:none;margin-bottom:14px}body.preview .section-head{padding:11px 14px}body.preview .fields{padding:0 14px 14px;gap:10px 16px}body.preview .field>span{font-size:10px}body.preview .field input,body.preview .field textarea,body.preview .field select,body.preview .edit-cell{display:none}body.preview .print-value{display:block;white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;min-height:19px}body.preview .table-wrap{overflow:visible}body.preview table{min-width:0!important}body.preview td,body.preview th{padding:6px 3px;font-size:9px;overflow-wrap:anywhere}body.preview td .print-value{font-size:9px}body.preview .print-summary{display:block}body.preview .table-hint{font-size:9px}body.preview .signatures{padding:10px 14px}body.preview .signature-line input{display:none}body.preview .signature-line .print-value{flex:1;border-bottom:1px solid #d6dfd7}.print-heading{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:2px solid var(--green);padding:0 0 16px;margin-bottom:16px}.print-heading h1{font-size:23px;letter-spacing:3px}.print-heading p{font-size:10px;color:#87938a;letter-spacing:2px;margin-top:4px}.print-meta{text-align:right;font-size:10px;line-height:2;color:#6c7e70}.print-summary-inner{padding:14px 18px;display:grid;grid-template-columns:1fr 1fr;gap:9px;font-size:11px}.print-summary-inner>div{display:flex;justify-content:space-between;gap:12px}.print-final{grid-column:1/-1;border-top:1px solid var(--line);padding-top:9px;font-size:16px;color:var(--green);font-weight:600}.print-uppercase{grid-column:1/-1;color:#738478;font-size:10px;justify-content:flex-start!important}.print-footer{display:none}
@media(min-width:1700px){.workspace{padding-top:38px}}@media(max-width:1250px){.workspace{padding:26px 24px 40px}.app-header{padding:0 24px}.layout{grid-template-columns:minmax(0,1fr) 245px;gap:18px}.section-head{padding:17px 18px 13px}.fields{padding:0 18px 20px;gap:13px}.table-wrap table{min-width:860px}.summary-body,.summary-top,.final-total{padding-left:18px;padding-right:18px}.total-number{font-size:28px}.section-caption{display:none}.toolbar{gap:6px}}@media(max-width:1000px){.layout{grid-template-columns:minmax(0,1fr)}.sidebar{position:static;display:grid;grid-template-columns:1fr 1fr;gap:16px}.summary-card{grid-row:span 3;margin:0}.note-card{margin:0}.page-heading{align-items:flex-start}.toolbar{flex-wrap:wrap;justify-content:flex-end}.brand-note{display:none}.table-wrap table{min-width:840px}.local-note{padding:5px}.workspace{max-width:950px}}@media(max-width:640px){.workspace{padding:20px 12px 35px}.app-header{height:60px;padding:0 16px}.brand-name{font-size:15px}.brand-mark{width:31px;height:31px}.header-tag{display:none}.header-right{gap:0}.save-state{font-size:10px}.page-heading{display:block;margin-bottom:20px}.breadcrumb{font-size:10px}h1{font-size:24px}.subtitle{font-size:11px}.toolbar{justify-content:flex-start;margin-top:18px;gap:7px}.toolbar button,.menu>summary{font-size:11px;padding:8px 10px}.toolbar .primary{padding:8px 12px}.toolbar svg{height:15px;width:15px}.section-nav{gap:21px;padding:0 14px}.fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.section-head{padding:15px 16px}.section-title h2{font-size:13px}.section-actions button{font-size:10px;padding:5px 6px}.inline-hint{display:none}.card{margin-bottom:16px}.sidebar{display:block}.summary-card,.note-card{margin-bottom:15px}.row-actions{opacity:1}.table-subtotal{gap:10px;font-size:10px;flex-wrap:wrap;justify-content:flex-end}.table-subtotal strong{font-size:11px}.table-footer{padding:9px 12px}.table-hint{padding:9px 16px}.signatures{gap:20px;padding:14px 16px}.signature-line{display:block}.bottom-note{display:block;text-align:center}.bottom-note span{justify-content:center}.print-meta{max-width:45%}.preview-toolbar{flex-wrap:wrap;gap:8px!important}.preview-toolbar span{font-size:10px}.preview-toolbar select{width:110px!important}body.preview .workspace{max-width:none;width:210mm;margin:15px}.terms-fields{grid-template-columns:1fr 1fr}}
.mobile-quote-bar,.mobile-columns,.mobile-action-label{display:none}
.menu-separator{height:1px;background:var(--line);margin:5px 7px}
button.destructive{background:var(--red);border-color:var(--red);color:#fff}
button.destructive:hover{background:#9c3333;border-color:#9c3333}
.mobile-total-link{min-width:0;display:flex;flex-direction:column}
.mobile-total-link span{font-size:10px;color:#78877d}
.mobile-total-link strong{font-size:21px;color:var(--green);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media screen{
  body.preview .workspace{max-width:none;margin:16px auto;zoom:var(--preview-scale,1)}
  body.preview .fields{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.preview .configuration-grid,body.preview .terms-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media screen and (max-width:760px){
  html{scroll-padding-top:76px;scroll-padding-bottom:105px}
  body:not(.preview) .workspace{padding:22px 12px calc(105px + env(safe-area-inset-bottom,0px))}
  .app-header{padding:0 14px;height:60px}
  .brand-note,.header-tag{display:none}
  .header-right{min-width:0;max-width:46%}
  .save-state{font-size:10px;line-height:1.4}
  .save-dot{flex-shrink:0}
  .page-heading{display:block}
  .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:18px}
  .toolbar>button,.toolbar .menu>summary{width:100%;min-height:44px;font-size:13px;justify-content:center;padding:9px 7px}
  .toolbar .menu-panel{right:0;width:220px;max-width:calc(100vw - 24px)}
  .menu-panel button{min-height:44px;font-size:13px;justify-content:flex-start}
  .section-nav{gap:20px;padding:0 14px;scrollbar-width:none;height:48px}
  .section-nav a{font-size:12px}
  .section-head{padding:12px 14px;gap:8px}
  .section-title{gap:7px;min-width:0}
  .section-title h2{font-size:13px;overflow-wrap:anywhere}
  .section-index{flex-shrink:0}
  .section-actions{min-width:0;flex-wrap:wrap;justify-content:flex-end}
  .section-head .small{min-height:40px;padding:6px 8px;font-size:11px}
  .inline-hint,.section-caption{display:none}
  body:not(.preview) .field input,body:not(.preview) .field textarea,body:not(.preview) .field select,
  body:not(.preview) .signature-line input,body:not(.preview) .discount-input input,
  dialog input,dialog textarea,dialog select{font-size:16px;min-height:44px}
  body:not(.preview) .field>span{font-size:12px;color:#637568}
  body:not(.preview) .fields{padding:0 14px 18px;gap:14px}
  .field-remove{width:32px;height:28px}
  .field-remove svg{width:15px;height:15px}
  body:not(.preview) .table-wrap{overflow:visible;padding:0 12px 2px}
  body:not(.preview) .table-wrap table{display:block;min-width:0!important;width:100%;table-layout:auto}
  body:not(.preview) .table-wrap colgroup,body:not(.preview) .table-wrap thead{display:none}
  body:not(.preview) .table-wrap tbody{display:block}
  body:not(.preview) .table-wrap tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;padding:10px 12px 14px;margin-bottom:12px;border:1px solid var(--line);border-radius:9px;background:#fff}
  body:not(.preview) .table-wrap td{display:block;padding:0;border:0;min-width:0;text-align:left}
  body:not(.preview) .table-wrap td[data-label]::before{content:attr(data-label);display:block;font-size:11px;line-height:1.6;color:#697c6e;margin-bottom:5px;overflow-wrap:anywhere}
  body:not(.preview) .table-wrap td.row-number{grid-column:1;grid-row:1;display:flex;align-items:center;gap:6px;color:var(--green);font-size:13px;font-weight:600;padding:0}
  body:not(.preview) .table-wrap td.row-number::before{margin:0;font-size:13px;color:inherit}
  body:not(.preview) .table-wrap td.row-tools{grid-column:2;grid-row:1;padding:0;align-self:center}
  body:not(.preview) .row-actions{justify-content:flex-end;opacity:1;gap:4px}
  body:not(.preview) .row-actions .icon-button{width:auto;min-width:44px;min-height:42px;gap:3px;padding:6px}
  body:not(.preview) .mobile-action-label{display:inline;font-size:11px}
  body:not(.preview) .table-wrap td :is(input,textarea){border:1px solid #dfe7df;border-radius:6px;background:#fcfdfb;font-size:16px;height:44px;padding:8px;text-align:left}
  body:not(.preview) .table-wrap td :is(input,textarea):focus{border-color:#77a78e;background:#fff}
  body:not(.preview) .table-wrap td.calculated{background:transparent;padding:0}
  body:not(.preview) .table-wrap td.calculated [data-computed]{display:flex;align-items:center;min-height:44px;padding:8px;border:1px solid #e4eee5;background:#f0f7f1;border-radius:6px;color:var(--green);font-size:15px;overflow-wrap:anywhere}
  body:not(.preview) .table-wrap td[data-key="name"],body:not(.preview) .table-wrap td[data-key="notes"],body:not(.preview) .table-wrap td[data-custom-kind="text"]{grid-column:1/-1}
  body:not(.preview) .mobile-columns{display:flex;flex-direction:column;gap:7px;margin:0 0 12px}
  .mobile-column{display:flex;align-items:center;gap:7px;padding:5px 8px 5px 10px;border:1px dashed #d7e4d9;border-radius:7px;background:#fafcf8}
  .mobile-column>span{flex:1;min-width:0;font-size:12px;overflow-wrap:anywhere}
  .mobile-column small{display:block;color:#87988a;font-size:10px}
  .mobile-column .icon-button{width:42px;height:42px}
  body:not(.preview) .table-footer{align-items:stretch;flex-direction:column;padding:10px 14px;gap:10px}
  body:not(.preview) .table-footer>button{min-height:44px;border:1px dashed #b9cdbd;background:#f6faf3;width:100%;font-size:13px}
  body:not(.preview) .table-subtotal{gap:10px;justify-content:space-between;font-size:11px;flex-wrap:wrap}
  body:not(.preview) .table-subtotal strong{font-size:12px}
  .add-section{min-height:46px;font-size:13px}
  .sidebar{display:block}
  .summary-card,.note-card{margin-bottom:16px}
  .summary-line{font-size:13px}
  .summary-line .discount-input{width:135px}
  .discount-input span{top:11px;font-size:14px}
  .summary-print .primary{min-height:46px;font-size:14px}
  .signatures{gap:20px;padding:14px}
  body:not(.preview) .signature-line{display:block;margin-bottom:10px}
  body:not(.preview) .mobile-quote-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;position:fixed;z-index:25;bottom:0;left:0;right:0;padding:10px max(16px,env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));background:#fffffff5;border-top:1px solid #dce7dd;box-shadow:0 -3px 18px #253c2908}
  .mobile-quote-bar .primary{min-height:44px;padding:10px 18px;font-size:13px}
  body.is-editing .mobile-quote-bar{display:none}
  .toast{bottom:calc(96px + env(safe-area-inset-bottom,0px));width:max-content;max-width:calc(100vw - 32px)}
  dialog{max-height:85dvh;overflow-y:auto}
  .dialog-head{padding:18px}
  .dialog-body{padding:18px}
  .dialog-actions{padding:0 18px 18px}
  .dialog-actions button{min-height:44px;flex:1}
  .preview-toolbar{flex-wrap:wrap;gap:8px!important;padding:10px}
  .preview-toolbar>span{width:100%;text-align:center;font-size:11px}
  body.preview .preview-toolbar button{min-height:40px;padding:7px 9px;font-size:11px}
  .preview-toolbar select{width:105px!important;min-height:40px}
}
@media screen and (max-width:480px){
  body:not(.preview) .fields{grid-template-columns:minmax(0,1fr)}
  .section-head .quiet.small{font-size:11px;padding:5px}
  .section-title h2{font-size:13px}
  .section-index{width:23px;height:23px;font-size:10px}
  .brand-name{font-size:14px;letter-spacing:1px}
  body:not(.preview) .row-actions .icon-button{padding:5px 3px;min-width:42px}
  body:not(.preview) .row-actions svg{width:12px;height:12px}
}
.customization-footer{padding:12px 22px 16px;border-top:1px dashed var(--line);background:#fcfdfa}
.customization-footer>button{border:1px dashed #c6d8ca;background:#f5faf3;font-size:12px;min-height:38px;padding:7px 13px}
.customization-footer>button svg{width:15px;height:15px}
.custom-fields{padding-top:16px;border-top:1px dashed var(--line)}
.custom-field{align-content:start}
.custom-field-heading{display:flex;min-width:0;align-items:center}
.custom-field .field-name-input{font-weight:600;color:var(--green);background:#f5faf3;border-style:dashed;font-size:12px}
.custom-field-actions{display:flex;justify-content:flex-end}
.custom-field-actions button{padding:3px 5px;font-size:11px}
.custom-field-actions svg{width:13px;height:13px}
.column-settings{display:grid;gap:12px}
.column-setting{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:12px;padding:12px;border:1px solid #e0e9de;border-radius:8px;background:#fff}
.column-setting>button{min-height:38px;margin-bottom:1px}
.column-setting .field{gap:5px}
.customization-help{font-size:11px;color:#788b7b;margin:0 0 12px}
.customization-feedback{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;background:#edf5eb;border-radius:6px;font-size:12px;margin-bottom:12px;color:#49694e}
.customization-feedback>span{min-width:0;overflow-wrap:anywhere}
.customization-feedback>button{flex-shrink:0}
.section-name-input{max-width:350px;font-size:14px;font-weight:600;color:var(--green);border-style:dashed}
.custom-section .section-title{flex:1}
@media screen and (max-width:760px){
  .customization-footer{padding:12px 14px 16px}
  .customization-footer>button{width:100%;min-height:44px;font-size:13px}
  body:not(.preview) .custom-fields{padding-top:14px}
  body:not(.preview) .custom-field .field-name-input{font-size:16px}
  .custom-field-actions button{min-height:40px;padding:6px 8px;font-size:12px}
  .column-setting{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:12px}
  .column-setting>label:first-child{grid-column:1/-1}
  .column-setting>button{min-height:44px;font-size:12px;padding:7px 9px}
  .customization-feedback button{min-height:40px}
  .section-name-input{min-width:0;font-size:16px;min-height:44px}
}
/* Keep the editing surface readable; paper typography remains independent. */
@media screen{
  :root{--ink:#24322b;--muted:#5d6b62;--bg:#f5f6f7;--line:#dfe5e1;--radius:10px;--shadow:none}
  body{font-size:15px;line-height:1.65}
  .app-header{height:62px;padding:0 28px}
  .brand-name{font-size:17px;letter-spacing:.5px}
  .brand-mark{width:32px;height:32px;border-radius:7px}
  .save-state{font-size:13px;color:#536359}
  body:not(.preview) .workspace{padding:28px 28px 50px}
  .page-heading{margin-bottom:22px;gap:24px;flex-wrap:wrap}
  .title-line h1{font-size:28px;line-height:1.4;letter-spacing:.5px}
  .toolbar button,.menu>summary{font-size:14px;min-height:42px}
  .menu-panel{width:225px}
  .menu-panel button{font-size:14px;min-height:42px}
  .section-nav{background:transparent;border:0;border-bottom:1px solid #d6ded8;border-radius:0;padding:0 4px;gap:24px;height:48px;margin-bottom:20px}
  .section-nav a{font-size:14px;font-weight:500;color:#58675d}
  .section-nav a span{font-size:12px;opacity:1;color:#65766b}
  body:not(.preview) .card{box-shadow:none;margin-bottom:20px;border-color:#dfe5e1}
  body:not(.preview) .section-head{padding:19px 22px 16px}
  body:not(.preview) .section-title h2{font-size:17px;font-weight:650;letter-spacing:0}
  body:not(.preview) .section-index{font-size:12px;color:#526c5a;background:transparent;width:23px;height:24px}
  .section-caption,.inline-hint{display:none}
  body:not(.preview) .fields{gap:18px 22px}
  body:not(.preview) .field{gap:7px}
  body:not(.preview) .field>span,.field-label{font-size:14px;line-height:1.5;font-weight:500;color:#48594e}
  body:not(.preview) .field input,body:not(.preview) .field textarea,body:not(.preview) .field select{font-size:16px;line-height:1.6;min-height:44px;padding:9px 11px;color:#22372b;background:#fff;border-color:#cfd9d2}
  body:not(.preview) input::placeholder,body:not(.preview) textarea::placeholder{font-size:14px;color:#66776b;opacity:1}
  body:not(.preview) .configuration-grid .field :is(input,textarea){background:#fff}
  body:not(.preview) #quote-document textarea{resize:none;overflow-y:hidden;overflow-wrap:anywhere;white-space:pre-wrap}
  body:not(.preview) table{font-size:14px}
  body:not(.preview) th{font-size:13px;font-weight:600;color:#3e5546;background:#f3f6f3;line-height:1.7;padding-top:13px;padding-bottom:13px;overflow-wrap:anywhere}
  body:not(.preview) th small{font-size:12px;color:#607267}
  body:not(.preview) td{font-size:14px;color:#293d30;padding-top:9px;padding-bottom:9px}
  body:not(.preview) td:first-child,body:not(.preview) th:first-child{color:#617267}
  body:not(.preview) td :is(input,textarea){font-size:14px;line-height:1.65;padding:8px 5px;min-height:40px;height:auto;color:#213729}
  body:not(.preview) td textarea{resize:none}
  body:not(.preview) td.calculated{color:#175c43;background:#f2f8f3}
  body:not(.preview) td.amount{font-weight:650}
  body:not(.preview) .row-actions{opacity:1}
  .row-actions .icon-button{width:30px;height:34px;color:#65796b}
  .row-actions .danger{color:#ad4545}
  body:not(.preview) .table-footer{background:#fff;padding:12px 18px}
  .table-footer>button{font-size:14px;min-height:40px;color:var(--green)}
  body:not(.preview) .table-subtotal{font-size:13px;color:#4d6152;gap:16px;flex-wrap:wrap}
  body:not(.preview) .table-subtotal strong{font-size:14px;color:#244d35}
  body:not(.preview) .table-hint{font-size:12px;line-height:1.75;color:#596e5e;padding:10px 22px;background:#fff}
  .table-hint svg{width:14px;height:14px;margin-top:3px}
  .customization-footer{background:#fff;border-top:1px solid #e6ebe7;padding-top:13px}
  .customization-footer>button{font-size:14px;min-height:40px;border:1px solid #d3dfd6;background:#fff;color:var(--green)}
  .customization-footer>button:hover{background:#f0f7f1}
  .custom-fields{border-top:1px solid #e6ebe7}
  body:not(.preview) .custom-field .field-name-input{font-size:15px;color:#245d3d;background:#f5f9f5;border-style:solid;font-weight:600}
  .custom-field-actions button,.column-setting>button{font-size:13px;min-height:36px}
  .column-setting{border:0;border-bottom:1px solid #e4ebe5;border-radius:0;padding:4px 0 15px;gap:16px}
  .column-setting:last-of-type{padding-bottom:12px;border-bottom:0}
  .customization-help{font-size:13px;color:#536b5a;line-height:1.7}
  .customization-feedback{font-size:14px;color:#38593f}
  body:not(.preview) .signatures{background:#fff;border-top-style:solid;border-color:#e3e9e4}
  body:not(.preview) .signature-line{font-size:13px;color:#4c6053}
  body:not(.preview) .signature-line input{font-size:15px;color:#243c2b;min-height:40px}
  .add-section{font-size:14px;border-style:solid;background:#fff;color:var(--green)}
  .bottom-note{font-size:12px;color:#64746b;line-height:1.8;letter-spacing:0}
  .summary-card{box-shadow:none;border-color:#dce4dd}
  .summary-top h2{font-size:17px}
  .summary-top>span{font-size:12px;color:#5a7061}
  .summary-line,.summary-line.area{font-size:14px;color:#4b6253}
  .summary-line strong{font-size:14px;color:#223f2d;font-weight:600}
  .summary-line .discount-input{width:116px}
  .discount-input input{min-height:40px;font-size:16px;border-color:#cfd9d2;background:#fff}
  .discount-input span{top:8px;font-size:15px;color:#546d5c}
  .final-total{padding-top:20px;padding-bottom:20px}
  .total-label{font-size:14px;color:#edf7f0}
  .total-label span:last-child{font-size:12px}
  .total-number{font-size:31px;letter-spacing:-.5px;line-height:1.6}
  .amount-words{font-size:12px;line-height:1.8;color:#eef8f1}
  .summary-print .primary{font-size:14px;min-height:44px}
  .summary-print p{font-size:12px;color:#627468}
  .usage-details{background:#fff;border:1px solid var(--line);border-radius:9px;margin-bottom:14px}
  .usage-details>summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;padding:14px 18px;font-size:14px;font-weight:500;color:#445e4d}
  .usage-details>summary::-webkit-details-marker{display:none}
  .usage-details>summary svg{width:15px;height:15px;transition:transform .15s}
  .usage-details[open]>summary svg{transform:rotate(180deg)}
  .usage-details .note-card{border:0;border-radius:0;padding:3px 18px 15px;margin:0}
  .usage-details h3{font-size:14px;color:#425e4b;margin-bottom:8px}
  .note-card p,.note-card .status-row{font-size:13px;color:#526958;line-height:1.8}
  .status-pending{color:#6f694a}
  .local-note{font-size:12px;color:#5e7164;line-height:1.9;text-align:left;padding:0 4px}
  .mobile-total-link span{font-size:12px;color:#526759}
  .dialog-body p{font-size:14px;color:#4f6657}
  .alert,.toast{font-size:13px}
}
@media screen and (max-width:1000px) and (min-width:761px){
  .sidebar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
  .summary-card{grid-row:span 2}
  .usage-details{margin-bottom:0}
}
@media screen and (max-width:760px){
  .app-header{height:60px;padding:0 14px}
  .brand-name{font-size:15px}
  .save-state{font-size:12px}
  .header-right{max-width:50%}
  body:not(.preview) .workspace{padding:22px 12px calc(110px + env(safe-area-inset-bottom,0px))}
  .title-line h1{font-size:25px}
  .page-heading{display:block;margin-bottom:18px}
  .toolbar{gap:9px;margin-top:17px}
  .toolbar>button,.toolbar .menu>summary{font-size:14px;min-height:44px}
  .section-nav{gap:20px;margin-bottom:16px;padding:0 3px}
  .section-nav a{font-size:14px}
  .section-nav a span{display:none}
  body:not(.preview) .section-head{padding:17px 15px 15px}
  body:not(.preview) .section-title h2{font-size:16px}
  body:not(.preview) .fields{padding-left:15px;padding-right:15px;gap:17px}
  body:not(.preview) .field>span{font-size:14px}
  body:not(.preview) .field :is(input,textarea,select){font-size:16px;min-height:46px}
  body:not(.preview) .table-wrap{padding:0 12px 2px}
  body:not(.preview) .table-wrap tr{gap:14px 12px;padding:12px;border-color:#d7e1d9;box-shadow:none}
  body:not(.preview) .table-wrap td{padding:0}
  body:not(.preview) .table-wrap td[data-label]::before{font-size:13px;color:#465f4e;margin-bottom:6px}
  body:not(.preview) .table-wrap td.row-number,body:not(.preview) .table-wrap td.row-number::before{font-size:14px}
  body:not(.preview) .table-wrap td :is(input,textarea){font-size:16px;line-height:1.65;min-height:46px;height:auto;padding:9px 8px;border-color:#cfd9d2;background:#fff}
  body:not(.preview) .table-wrap td.calculated [data-computed]{font-size:16px;min-height:46px;color:#18543d;background:#edf5ee;border-color:#dbe8dd}
  body:not(.preview) .row-actions .icon-button{min-width:42px;min-height:42px;padding:5px 3px}
  body:not(.preview) .mobile-action-label{font-size:12px}
  body:not(.preview) .table-footer{padding:12px 14px;gap:12px}
  body:not(.preview) .table-footer>button{font-size:14px;border:1px solid #cdddcf;background:#fff}
  body:not(.preview) .table-subtotal{font-size:12px;gap:9px}
  body:not(.preview) .table-subtotal strong{font-size:13px}
  body:not(.preview) .table-hint{font-size:12px;padding:10px 15px}
  .customization-footer{padding:12px 15px 16px}
  .customization-footer>button{font-size:14px;min-height:44px}
  .column-setting{gap:12px;padding:4px 0 15px}
  .column-setting>button{min-height:46px;font-size:13px}
  .customization-help{font-size:12px}
  body:not(.preview) .custom-field .field-name-input{font-size:16px}
  .custom-field-actions button{min-height:40px}
  body:not(.preview) .signatures{gap:18px;padding:15px}
  .summary-line .discount-input{width:135px}
  .summary-line :is(input){font-size:16px;min-height:44px}
  .mobile-total-link strong{font-size:22px}
  .mobile-quote-bar .primary{font-size:14px;padding:10px 14px}
  .usage-details>summary{min-height:48px}
}
.signature-label{flex:none;white-space:nowrap}
.signature-line{min-width:0}
.signature-line input,.signature-line .print-value{min-width:0;flex:1}
@media screen and (max-width:760px){
  body:not(.preview) .signatures{grid-template-columns:repeat(2,minmax(0,1fr))}
  body:not(.preview) .signature-label{display:block}
}
@page{size:A4 portrait;margin:10mm}
@media print{
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}html,body{background:#fff!important;color:#222!important;font-size:9pt;width:auto!important;margin:0!important;padding:0!important}.app-header,.page-heading,.section-nav,.sidebar,.screen-only,.bottom-note,.preview-toolbar,body.preview .preview-toolbar,.toast,dialog{display:none!important}.workspace,body.preview .workspace{padding:0!important;margin:0!important;max-width:none!important;width:auto!important;box-shadow:none!important}.layout{display:block!important}.editor,body.preview .editor{padding:0!important}.print-header,.print-summary,.print-footer{display:block!important}.card,body.preview .card{overflow:visible!important;box-shadow:none!important;border:1px solid #d6dfd7;border-radius:0!important;margin-bottom:4mm!important}.section-head,body.preview .section-head{padding:2.5mm 3mm!important;break-after:avoid;page-break-after:avoid}.section-title h2{font-size:10pt}.section-index{width:18px;height:18px;font-size:8px;border-radius:3px}.section-caption{display:none}.fields,body.preview .fields{grid-template-columns:repeat(3,minmax(0,1fr));padding:0 3mm 3mm!important;gap:2mm 4mm!important}.configuration-grid,.terms-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important}.field{gap:1mm;break-inside:avoid;page-break-inside:avoid}.field>span{font-size:7pt!important;color:#657367}.field input,.field textarea,.field select,.edit-cell,.signature-line input{display:none!important}.print-value,body.preview .print-value{display:block!important;white-space:pre-wrap;overflow-wrap:anywhere;font-size:8pt;min-height:10px}.print-heading{padding-bottom:4mm;margin-bottom:4mm}.print-heading h1{font-size:19pt}.print-heading p{font-size:7pt}.print-meta{font-size:7pt}.table-wrap{overflow:visible!important;padding:0}table{min-width:0!important;width:100%!important;table-layout:fixed;border-collapse:collapse;font-size:7pt}thead{display:table-header-group}tfoot{display:table-row-group}tr{break-inside:avoid;page-break-inside:avoid}th,body.preview th{padding:2mm 1mm!important;font-size:6.7pt!important;color:#485b4b;overflow-wrap:anywhere;border:1px solid #dce3db}th small{font-size:6pt}td,body.preview td{padding:1.8mm 1mm!important;font-size:7pt!important;overflow-wrap:anywhere;border:1px solid #e2e7df}td .print-value,body.preview td .print-value{font-size:7pt!important;min-height:0}td.calculated{background:#f5f8f4!important}th:first-child,td:first-child{padding-left:1mm!important}col.actions-col{display:none}.table-footer{padding:2mm 3mm;background:#f8faf6;break-inside:avoid;page-break-inside:avoid}.table-subtotal{margin-left:auto;font-size:7pt;gap:5mm}.table-subtotal strong{font-size:8pt}.table-hint{padding:1.5mm 3mm;font-size:6.5pt!important}.table-hint svg{display:none}.print-summary{break-inside:avoid;page-break-inside:avoid}.print-summary-inner{padding:3mm;font-size:8pt}.print-final{font-size:12pt}.print-uppercase{font-size:8pt}.signatures,body.preview .signatures{padding:3mm!important;break-inside:avoid;page-break-inside:avoid}.signature-line{font-size:8pt;display:flex}.signature-line .print-value{flex:1;border-bottom:1px solid #cdd8ce;min-height:5mm}.print-footer{text-align:center;font-size:6.5pt;color:#8a968c;margin-top:4mm}.custom-section{break-inside:avoid;page-break-inside:avoid}body{orphans:3;widows:3}
}

/* Presentation formerly stored in static HTML style attributes. */
#print-orientation{width:130px;font-size:12px;padding:5px 8px}
svg.icon-13{width:13px}
svg.icon-15{width:15px}
svg.icon-16{width:16px}
.save-dot.is-warning{background:#c39046}

/* Named pages keep orientation switching independent of inline styles. */
@page quote-landscape{size:A4 landscape;margin:10mm}
body.print-landscape{page:quote-landscape}
body.preview .workspace{width:210mm}
body.preview.print-landscape .workspace{width:297mm}
