:root{--app-bg: #f4f6fb;--app-surface: #ffffff;--app-border: #e2e8f0;--app-primary: #0f172a;--app-accent: #2563eb;--text: #0f172a;--text-muted: #64748b;--danger: #dc2626;--radius: 12px;--shadow: 0 1px 3px rgb(15 23 42 / 8%);font-family:DM Sans,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.5;color:var(--text);background:var(--app-bg)}*,*:before,*:after{box-sizing:border-box}body{margin:0;min-height:100vh}a{color:var(--app-accent);text-decoration:none}a:hover{text-decoration:underline}.app-shell{min-height:100vh;display:flex;flex-direction:column}.app-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.875rem 1.5rem;background:var(--app-surface);border-bottom:1px solid var(--app-border);position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:.65rem}.brand-mark{width:10px;height:28px;border-radius:3px;background:linear-gradient(180deg,var(--app-accent),#1d4ed8)}.brand-name{font-weight:700;font-size:1.125rem;letter-spacing:-.02em}.nav{display:flex;gap:1.25rem}.nav a{text-decoration:none;font-size:.9375rem}.nav a:hover{text-decoration:none;opacity:.85}.header-user{display:flex;align-items:center;gap:.65rem;flex-shrink:0}.header-user-email{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem}.app-main{flex:1;padding:1.75rem 1.5rem 3rem;max-width:960px;margin:0 auto;width:100%}.page.narrow{max-width:640px;margin:0 auto}.page-head{margin-bottom:1.5rem}.page-head h1{margin:0 0 .35rem;font-size:1.65rem;letter-spacing:-.03em}.muted{color:var(--text-muted);margin:0}.small{font-size:.8125rem}.inline-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.8em;background:#f1f5f9;padding:.1em .35em;border-radius:4px}.settings-save-bar{position:sticky;bottom:1rem;margin-top:.5rem}.row{display:flex;align-items:center;gap:.75rem}.row.space-between{justify-content:space-between}.row.align-start{align-items:flex-start}.row.align-center{align-items:center}.row.wrap{flex-wrap:wrap}.stack{display:flex;flex-direction:column;gap:.5rem}.stack.gap-md{gap:1rem}.card{background:var(--app-surface);border:1px solid var(--app-border);border-radius:var(--radius);padding:1.25rem 1.35rem;box-shadow:var(--shadow)}.login-card{display:flex;flex-direction:column;gap:1rem;padding:1.5rem}.form-error{margin:0;padding:.65rem .75rem;border-radius:8px;font-size:.875rem;color:var(--danger);background:#dc262614;border:1px solid rgb(220 38 38 / 20%)}.form-actions{display:flex;justify-content:flex-end;margin-top:.25rem}.card h2{margin:0 0 1rem;font-size:1rem;font-weight:600}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media(max-width:640px){.grid-2{grid-template-columns:1fr}}.grid-3{display:grid;grid-template-columns:2fr 1fr 1fr;gap:1rem}@media(max-width:640px){.grid-3{grid-template-columns:1fr}}.field{display:flex;flex-direction:column;gap:.35rem}.field span{font-size:.8125rem;font-weight:500;color:var(--text-muted)}.field input[type=text],.field input[type=email],.field input[type=password],.field textarea{font:inherit;padding:.55rem .65rem;border:1px solid var(--app-border);border-radius:8px;background:#fff;color:var(--text)}.field textarea{resize:vertical;min-height:120px}.color-row{display:flex;gap:.5rem;align-items:center}.color-row input[type=color]{width:48px;height:40px;padding:0;border:1px solid var(--app-border);border-radius:8px;cursor:pointer}.color-row input[type=text]{flex:1}.hidden-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}.logo-preview{width:120px;height:80px;border:1px dashed var(--app-border);border-radius:8px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#f8fafc}.logo-preview img{max-width:100%;max-height:100%;object-fit:contain}.gap-lg{gap:1.25rem}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;padding:.55rem 1rem;font:inherit;font-weight:600;font-size:.9375rem;border:none;border-radius:8px;cursor:pointer;background:var(--app-primary);color:#fff;text-decoration:none;transition:opacity .15s}.btn:hover{opacity:.92;text-decoration:none}.btn:disabled{opacity:.55;cursor:not-allowed}.btn.secondary{background:#fff;color:var(--app-primary);border:1px solid var(--app-border)}.btn.ghost{background:transparent;color:var(--text);border:1px solid transparent}.btn.ghost:hover{background:#f1f5f9}.btn.danger{background:var(--danger)}.btn.danger.ghost{background:transparent;color:var(--danger)}.btn.small{padding:.35rem .65rem;font-size:.8125rem}.empty{text-align:center;padding:2.5rem 1rem}.empty p{margin:0 0 1rem}.quote-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.65rem}.quote-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding:.9rem 1.1rem}.quote-row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:.15rem;text-decoration:none;color:inherit}.quote-row-main:hover .quote-title{color:var(--app-accent)}.quote-title{font-weight:600;font-size:1rem}.quote-row-actions{display:flex;align-items:center;gap:.5rem;position:relative}.confirm-pop{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap}.error-text{color:var(--danger);margin:0;font-size:.9rem}details.card summary{cursor:pointer;font-weight:600}.prompt-pre{margin:1rem 0 0;white-space:pre-wrap;font-size:.85rem;color:var(--text-muted);background:#f8fafc;padding:.75rem;border-radius:8px;border:1px solid var(--app-border)}.quote-preview-section{margin:1.5rem 0 2.25rem}.quote-preview-intro{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:.75rem 1.25rem;margin-bottom:1rem;padding:.15rem 0}.quote-preview-intro>div:first-child{flex:1;min-width:min(100%,14rem)}.quote-preview-title{margin:0 0 .25rem;font-size:1.2rem;font-weight:700;letter-spacing:-.03em;color:var(--text)}.quote-preview-sub{margin:0;font-size:.875rem;line-height:1.5;max-width:36rem}.quote-preview-badge{flex-shrink:0;font-family:DM Sans,system-ui,sans-serif;font-size:.6875rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);padding:.35rem .65rem;border-radius:999px;border:1px solid var(--app-border);background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 1px 2px #0f172a0d}.quote-preview-canvas{position:relative;padding:1.75rem 1rem 2.25rem;border-radius:18px;border:1px solid rgb(203 213 225 / .85);background:radial-gradient(ellipse 100% 120% at 50% -30%,rgb(255 255 255 / .75),transparent 52%),radial-gradient(ellipse 70% 50% at 100% 100%,rgb(37 99 235 / .06),transparent 55%),radial-gradient(ellipse 60% 45% at 0% 100%,rgb(15 23 42 / .04),transparent 50%),linear-gradient(168deg,#e8edf6,#eef2f8 38%,#e2e8f0);box-shadow:inset 0 1px #ffffffd9,inset 0 -1px #0f172a0a,0 1px 2px #0f172a0d,0 16px 40px #0f172a12;overflow:hidden}.quote-preview-canvas:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");pointer-events:none;mix-blend-mode:multiply}@media(min-width:640px){.quote-preview-canvas{padding:2rem 1.5rem 2.5rem}}.quote-paper{position:relative;z-index:1;max-width:220mm;margin:0 auto;background:#fff;border-radius:14px;padding:clamp(1.15rem,3.2vw,1.85rem) clamp(1.1rem,3vw,2.1rem) clamp(1.5rem,4vw,2.25rem);box-shadow:0 1px #ffffffe6 inset,0 1px 2px #0f172a0d,0 18px 48px #0f172a1c,0 0 0 1px #0f172a0d}.quote-paper:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 1px #ffffffa6}.quote-document-root.print-root{background:transparent;color:#0f172a;font-family:"Source Serif 4",Georgia,Times New Roman,serif;font-size:10.5pt;line-height:1.58;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.quote-document-body.print-inner{max-width:210mm;margin:0 auto}.quote-print-branding{max-width:210mm;margin:0 auto 1.5rem;padding:0 0 1.1rem;border-bottom:none;background:linear-gradient(to right,var(--qb-primary, #0f172a) 0%,color-mix(in srgb,var(--qb-primary, #0f172a) 55%,transparent) 42%,transparent 100%) 0 100% / 100% 3px no-repeat}.quote-print-branding-inner{display:flex;align-items:flex-end;gap:1.25rem;flex-wrap:wrap;padding:.85rem 1rem;border-radius:12px;background:linear-gradient(135deg,color-mix(in srgb,var(--qb-primary, #0f172a) 5.5%,#ffffff),color-mix(in srgb,var(--qb-secondary, #64748b) 4%,#f8fafc));border:1px solid rgb(15 23 42 / .08);box-shadow:0 1px 2px #0f172a0a}.quote-print-logo-wrap{flex-shrink:0}.quote-print-logo{display:block;max-height:52px;max-width:200px;width:auto;height:auto;object-fit:contain}.quote-print-meta{flex:1;min-width:160px;text-align:left}.quote-print-branding-inner--with-logo .quote-print-meta{text-align:right}.quote-print-company{font-family:DM Sans,system-ui,sans-serif;font-weight:700;font-size:1.08rem;letter-spacing:-.025em;color:var(--qb-primary, #0f172a);line-height:1.2}.quote-print-address.muted-print{font-family:DM Sans,system-ui,sans-serif;font-size:.8125rem;color:var(--qb-secondary, #64748b);margin-top:.4rem;line-height:1.5}.quote-document-root .quote-document-body article,.quote-document-root .quote-document-body .preventivo-doc{margin:0;padding:0}.quote-document-root .quote-document-body .preventivo-doc{position:relative;margin-top:.35rem;padding:1.1rem 0 .25rem}.quote-document-root .quote-document-body .preventivo-doc>*:first-child{margin-top:0}.quote-document-root .quote-document-body>*:first-child{margin-top:0}.quote-document-root .quote-document-body a{color:var(--qb-primary, #1d4ed8);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.15em;text-decoration-color:color-mix(in srgb,var(--qb-primary, #2563eb) 35%,transparent)}.quote-document-root .quote-document-body a:hover{text-decoration-color:var(--qb-primary, #2563eb)}.quote-document-root .quote-document-body blockquote{margin:1rem 0;padding:.65rem 1rem .65rem 1.1rem;border-left:3px solid color-mix(in srgb,var(--qb-secondary, #64748b) 55%,#cbd5e1);background:color-mix(in srgb,var(--qb-secondary, #64748b) 6%,#ffffff);border-radius:0 8px 8px 0;font-style:italic;color:#334155}.quote-document-root .quote-document-body address{font-style:normal;font-family:DM Sans,system-ui,sans-serif;font-size:.9rem;line-height:1.5;color:var(--qb-secondary, #475569)}.quote-document-root .quote-document-body h1,.quote-document-root .quote-document-body h2,.quote-document-root .quote-document-body h3{font-family:DM Sans,system-ui,sans-serif;font-weight:700;color:var(--qb-primary, #0f172a);letter-spacing:-.03em;line-height:1.25}.quote-document-root .quote-document-body h1{font-size:1.55rem;margin:0 0 .85rem;padding-bottom:.55rem;border-bottom:1px solid color-mix(in srgb,var(--qb-primary, #0f172a) 14%,transparent)}.quote-document-root .quote-document-body h2{font-size:1.15rem;margin:1.5rem 0 .65rem}.quote-document-root .quote-document-body h3{font-size:1rem;font-weight:600;margin:1.15rem 0 .5rem;color:var(--qb-secondary, #475569)}.quote-document-root .quote-document-body p{margin:0 0 .65rem}.quote-document-root .quote-document-body .preventivo-doc table{width:100%;border-collapse:collapse;font-size:.92rem;margin:1rem 0 1.25rem;font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1,"lnum" 1}.quote-document-root .quote-document-body .preventivo-doc th,.quote-document-root .quote-document-body .preventivo-doc td{padding:.55rem .65rem;text-align:left;border:1px solid rgb(15 23 42 / .12);vertical-align:top}.quote-document-root .quote-document-body .preventivo-doc th{font-family:DM Sans,system-ui,sans-serif;font-weight:600;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--qb-primary, #0f172a);background:#0f172a0a}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines tbody tr:nth-child(2n){background:color-mix(in srgb,var(--qb-primary, #0f172a) 2.5%,#f8fafc)}.quote-document-root .quote-document-body .preventivo-doc table:not(.quote-lines):not(.quote-totals) tbody tr:nth-child(2n){background:#f8fafccc}.quote-document-root .quote-document-body .preventivo-doc table:not(.quote-totals):not(.quote-lines) td:last-child:not(:first-child),.quote-document-root .quote-document-body .preventivo-doc table:not(.quote-totals):not(.quote-lines) th:last-child:not(:first-child){text-align:right}.quote-document-root .quote-document-body .preventivo-doc table:not(.quote-totals):not(.quote-lines) td:first-child{text-align:left}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines{--quote-lines-radius: 12px;border-collapse:separate;border-spacing:0;border-radius:var(--quote-lines-radius);overflow:hidden;border:1px solid color-mix(in srgb,var(--qb-primary, #0f172a) 12%,#e2e8f0);box-shadow:0 0 0 1px #ffffffa6 inset,0 1px 2px #0f172a0d,0 10px 28px #0f172a12;margin:.75rem 0 1.85rem;font-size:.9rem}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines caption{caption-side:top;text-align:left;font-family:DM Sans,system-ui,sans-serif;font-size:.8125rem;font-weight:600;letter-spacing:-.01em;color:var(--qb-secondary, #475569);padding:0 0 .6rem}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines thead th{background:linear-gradient(168deg,color-mix(in srgb,var(--qb-primary) 14%,#ffffff),color-mix(in srgb,var(--qb-primary) 7%,#f1f5f9));border:none;border-right:1px solid color-mix(in srgb,var(--qb-primary, #0f172a) 8%,transparent);border-bottom:3px solid var(--qb-primary, #0f172a);padding:.85rem 1rem;font-size:.6875rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--qb-primary, #0f172a);vertical-align:bottom;white-space:nowrap}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines thead th:first-child{text-align:left;white-space:normal;min-width:7rem}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines thead th:not(:first-child){text-align:right}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines thead th:last-child{border-right:none}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines tbody td{border:none;border-bottom:1px solid rgb(15 23 42 / .07);border-right:1px solid rgb(15 23 42 / .05);padding:.72rem 1rem;vertical-align:middle;line-height:1.45}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines tbody td:first-child{min-width:8.5rem;max-width:52%;font-weight:500;color:#1e293b;text-align:left;word-break:break-word}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines tbody td:not(:first-child){text-align:right;font-variant-numeric:tabular-nums;font-family:DM Sans,system-ui,sans-serif;font-size:.875rem;color:#334155}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines tbody td:last-child{border-right:none;font-weight:600;color:var(--qb-primary, #0f172a);font-size:.9rem}.quote-document-root .quote-document-body .preventivo-doc table.quote-lines tbody tr:last-child td{border-bottom:none}@media(hover:hover){.quote-document-root .quote-document-body .preventivo-doc table.quote-lines tbody tr:hover td{background:color-mix(in srgb,var(--qb-primary, #0f172a) 4%,#ffffff)}}.quote-document-root .quote-document-body .preventivo-doc table.quote-totals{width:100%;max-width:min(22rem,100%);margin:.5rem 0 1.5rem auto;border-collapse:separate;border-spacing:0;font-size:.9rem;border-radius:12px;overflow:hidden;border:1px solid color-mix(in srgb,var(--qb-primary, #0f172a) 10%,#e2e8f0);box-shadow:0 0 0 1px #ffffffb3 inset,0 2px 12px #0f172a14}.quote-document-root .quote-document-body .preventivo-doc table.quote-totals tbody tr:not(.quote-totals-grand) td{padding:.62rem 1.1rem;border-bottom:1px solid rgb(15 23 42 / .07);background:linear-gradient(180deg,#fcfcfd,#f4f6f9)}.quote-document-root .quote-document-body .preventivo-doc table.quote-totals tbody tr:not(.quote-totals-grand) td:first-child{text-align:left;font-weight:500;font-size:.875rem;color:var(--qb-secondary, #64748b)}.quote-document-root .quote-document-body .preventivo-doc table.quote-totals tbody tr:not(.quote-totals-grand) td:last-child{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;font-family:DM Sans,system-ui,sans-serif;color:var(--qb-primary, #1e293b)}.quote-document-root .quote-document-body .preventivo-doc table.quote-totals tr.quote-totals-grand td{padding:.85rem 1.1rem;font-family:DM Sans,system-ui,sans-serif;font-size:1.02rem;font-weight:700;letter-spacing:-.02em;text-align:right;color:#fff;background:linear-gradient(142deg,color-mix(in srgb,var(--qb-primary) 82%,#000) 0%,var(--qb-primary, #0f172a) 48%,color-mix(in srgb,var(--qb-primary) 70%,#1e293b) 100%);border:none;box-shadow:0 -1px #ffffff1f inset;-webkit-print-color-adjust:exact;print-color-adjust:exact}.quote-document-root .quote-document-body .preventivo-doc table.quote-totals tr.quote-totals-grand td:first-child{text-align:left;font-weight:700;letter-spacing:.01em}.quote-document-root .quote-document-body .preventivo-doc table.quote-totals tr.quote-totals-grand td:last-child{font-variant-numeric:tabular-nums;font-size:1.08rem}.quote-document-root .quote-document-body .preventivo-doc h2+table.quote-totals{margin-top:.65rem}.quote-document-root .quote-document-body hr{border:none;border-top:1px solid rgb(15 23 42 / .1);margin:1.25rem 0}.quote-document-root .quote-document-body ul,.quote-document-root .quote-document-body ol{margin:.5rem 0 .85rem 1.15rem;padding:0}.quote-document-root .quote-document-body li{margin-bottom:.35rem}.quote-document-root .quote-document-body strong{font-weight:600;color:var(--qb-primary, #1e293b)}.quote-document-root .quote-document-body .preventivo-doc table:not(.quote-totals) tfoot td{font-weight:600;font-family:DM Sans,system-ui,sans-serif}.refine-heading{margin:0;font-size:1.05rem;font-weight:600}.refine-card{margin-bottom:1rem;border-left:3px solid var(--app-accent);padding-left:1.15rem}.refine-card-head{margin-bottom:.25rem}.refine-lead{margin:.35rem 0 0;line-height:1.45}.quote-prompt-history summary{color:var(--text-muted)}.quote-print-breaks-card{margin-top:1rem}@media print{.quote-document-root .quote-document-body .preventivo-doc .print-page-break-before{break-before:page!important;page-break-before:always!important}.no-print,.quote-preview-intro{display:none!important}.quote-preview-canvas{padding:0!important;background:none!important;border:none!important;box-shadow:none!important}.quote-preview-canvas:before{display:none!important}.quote-paper{box-shadow:none!important;border-radius:0!important;padding:0!important;max-width:none!important}.quote-paper:after{display:none!important}.quote-document-root{font-size:11pt}.quote-print-branding-inner{box-shadow:none!important;border-radius:0!important;padding:0!important;border:none!important;background:none!important}.quote-print-branding{background:none!important;border-bottom:2px solid var(--qb-primary, #0f172a)!important;padding-bottom:.85rem!important}}
