.dbd-lookup{margin:10px 0 14px;min-width:0;font-size:.84rem}.dbd-lookup-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.dbd-lookup small,.dbd-lookup-hint{color:var(--color-on-surface-muted);line-height:1.55}.dbd-lookup-actions small{flex:1 1 190px}.dbd-lookup button{white-space:normal;text-align:left}.dbd-lookup-error{background:var(--status-danger-bg);color:var(--status-danger-fg);padding:10px 12px;border-radius:8px}.dbd-company-result{margin-top:10px;padding:14px;background:#f0f7ff;border:1px solid #b9d5f2;border-radius:10px;overflow-wrap:anywhere}.dbd-company-result p{margin:6px 0;white-space:pre-wrap}.dbd-result-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.dbd-result-heading strong{flex:1 1 160px}.dbd-source-label{background:#daeaff;color:#164f8c;padding:3px 8px;border-radius:20px;font-weight:700}.dbd-company-result>.dbd-lookup-actions{margin-top:12px}.dbd-existing-customers{margin:12px 0;padding:10px;border:1px solid #c4d3e4;border-radius:8px;background:#fff}.dbd-existing-customers>div{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:8px 0}.dbd-lookup-warning{padding:8px;color:#854d0e;background:#fef3c7;border-radius:6px}.dbd-prefill-notice{padding:10px;background:var(--status-production-bg);color:var(--status-production-fg);border-radius:8px;margin-bottom:12px;font-size:.85rem}.customer-search-control{margin-bottom:10px;min-width:0}.customer-search-control input{width:100%}.dbd-spinner{animation:dbd-spin 1s linear infinite}@keyframes dbd-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.dbd-spinner{animation:none}}@media(max-width:480px){.dbd-lookup-actions{align-items:stretch}.dbd-company-result{padding:10px}}.quote-status-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border:1px solid;border-radius:999px;font-size:.75rem;line-height:1.25;font-weight:700;white-space:nowrap;vertical-align:middle}.quote-status-badge svg{flex-shrink:0}.quote-status-draft{background:#f1f5f9;color:#475569;border-color:#cbd5e1}.quote-status-confirmed{background:#f3e8ff;color:#6b21a8;border-color:#d8b4fe}.quote-status-sent{background:#e0f2fe;color:#075985;border-color:#7dd3fc}.quote-status-approved{background:#dcfce7;color:#166534;border-color:#86efac}.quote-status-lost{background:#fff7ed;color:#9a3412;border-color:#fdba74}.quote-status-cancelled{background:#fee2e2;color:#991b1b;border-color:#fca5a5}.quote-delete-success{padding:12px 16px;margin-bottom:16px;border-radius:8px;background:#dcfce7;color:#166534;font-weight:600}.quote-delete-button{margin-left:auto}@media(max-width:480px){.quote-delete-button{margin-left:0}}.general-quote-items{border:1px solid var(--color-outline);border-radius:12px;background:var(--color-surface-elevated);overflow:hidden}.general-quote-heading{padding:18px 20px}.general-quote-heading h2{margin:0 0 6px;font-size:1.08rem}.general-quote-heading p{margin:0;font-size:.82rem;color:var(--color-on-surface-muted)}.general-quote-columns,.general-quote-row{display:grid;grid-template-columns:42px minmax(160px,1fr) 85px 95px 135px 110px 98px;gap:10px;align-items:start;padding:14px}.general-quote-columns{align-items:center;background:#eff7fa;color:#126580;font-size:.8rem;font-weight:700}.general-quote-row{border-top:1px solid var(--color-outline)}.general-quote-row label{min-width:0}.general-quote-row input,.general-quote-row textarea{width:100%;min-width:0}.general-quote-row textarea{resize:vertical;min-height:82px}.general-quote-number{padding-top:10px;text-align:center;font-weight:700}.general-quote-amount{text-align:right;padding-top:10px;overflow-wrap:anywhere}.general-quote-actions{display:grid;grid-template-columns:repeat(2,44px);gap:6px}.general-quote-actions button{min-width:44px;min-height:44px;padding:8px;justify-content:center}.general-mobile-label{display:none}.general-rounded-price{display:block;margin-top:5px;color:var(--color-on-surface-muted);font-size:.72rem}@media(max-width:1050px){.general-quote-columns{display:none}.general-quote-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px}.general-quote-number{grid-column:1 / -1;text-align:left;padding:0;color:var(--color-on-surface-muted)}.general-quote-number:before{content:"รายการที่ "}.general-quote-description{grid-column:1 / -1}.general-mobile-label{display:block;font-size:.8rem;font-weight:600;margin-bottom:6px;color:var(--color-on-surface-muted)}.general-quote-amount{padding-top:0;text-align:left}.general-quote-amount strong{display:block;padding-top:9px;font-size:1.08rem}.general-quote-actions{grid-column:1 / -1;display:flex;justify-content:flex-end}}.quote-editor-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:16px}.quote-editor-toolbar small{display:block;margin-top:6px;color:var(--color-on-surface-muted)}.quote-editor-actions{display:flex;flex-wrap:wrap;gap:8px}.quote-editor-actions button{min-height:44px}.quote-vat-mode{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}.quote-vat-mode .surface-select{width:auto;flex:1 1 260px;max-width:440px}.quote-vat-mode p{flex-basis:100%;margin:0;font-size:.85rem;color:var(--color-on-surface-muted)}@media(max-width:600px){.quote-editor-actions{width:100%}.quote-editor-actions button{flex:1 1 160px}.quote-vat-mode .surface-select{max-width:none;width:100%}}.quote-save-notice{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;margin-top:12px;border:1px solid currentColor;border-radius:var(--radius-md);font-size:.88rem;line-height:1.5}.quote-save-notice>svg{flex-shrink:0;margin-top:2px}.quote-save-notice-copy{min-width:0;flex:1;overflow-wrap:anywhere}.quote-save-notice-copy strong{display:block}.quote-save-notice-copy p{margin:3px 0 0;font-size:.8rem}.quote-save-notice-saving{background:var(--status-development-bg);color:var(--status-development-fg)}.quote-save-notice-saved{background:var(--status-production-bg);color:var(--status-production-fg)}.quote-save-notice-unsaved{background:var(--status-mock-bg);color:var(--status-mock-fg)}.quote-save-notice-error{background:var(--status-danger-bg);color:var(--status-danger-fg)}.quote-save-notice-floating{position:fixed;right:18px;z-index:50;width:min(440px,calc(100vw - 36px));margin:0;box-shadow:var(--shadow-raised)}.quote-save-dismiss{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;margin:-6px -8px -6px 0;padding:0;border:0;border-radius:var(--radius-sm);color:inherit;background:transparent}.quote-save-dismiss:hover{background:#0000000f}.quote-save-dismiss:focus-visible{outline:2px solid currentColor;outline-offset:2px}.quote-save-retry{margin-top:9px;min-height:40px;font-size:.82rem}.quote-save-validation-hint{margin:8px 0 0;font-size:.8rem;color:var(--color-on-surface-muted)}.quote-save-summary-status{display:block;margin-top:3px;font-size:.74rem;line-height:1.35;color:#fff}.quote-save-summary-status[data-save-state=saved]{color:#bbf7d0}.quote-save-summary-status[data-save-state=unsaved]{color:#fde68a}.quote-save-summary-status[data-save-state=error]{color:#fecaca}.quote-save-spinner{animation:quote-save-spin 1s linear infinite}@keyframes quote-save-spin{to{transform:rotate(360deg)}}@media(max-width:640px){.quote-save-notice-floating{left:12px;right:12px;width:auto}}@media(prefers-reduced-motion:reduce){.quote-save-spinner{animation:none}}@media print{.quote-save-notice,.quote-save-summary-status{display:none!important}}.company-profile-switcher{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}.company-profile-switcher>button{flex:1 1 200px;justify-content:center;min-height:46px}.company-profile-context{display:flex;flex-direction:column;gap:4px;padding:12px 14px;margin-bottom:18px;border:1px solid var(--color-outline);border-left:4px solid var(--color-primary);border-radius:8px;background:var(--color-surface)}.company-profile-context>span{font-size:.84rem;color:var(--color-on-surface-muted)}.company-profile-context>.company-profile-unsaved{font-weight:600;color:var(--color-primary)}.company-profile-fields{border:0;padding:0;margin:0;min-width:0}.company-profile-logo-grid{max-width:680px;margin-bottom:16px}.company-profile-load-error{padding:12px;margin-bottom:16px;border-radius:8px;background:var(--status-danger-bg);color:var(--status-danger-fg)}.po-workspace{min-width:0;padding-bottom:32px}.po-workspace h1{font-size:1.45rem;margin:0 0 6px}.po-workspace h2{display:flex;align-items:center;gap:8px;font-size:1.08rem;margin:0 0 10px}.po-workspace h3{font-size:1rem}.po-heading,.po-history-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px}.po-heading{margin-bottom:18px}.po-heading p,.po-muted,.po-import>p{color:var(--color-on-surface-muted);font-size:.86rem}.po-workspace>.card-elevated,.po-workspace section.card-elevated,.po-history-row{margin-bottom:16px}.po-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}.po-actions .surface-input{flex:1 1 230px;width:auto}.po-form{display:flex;flex-direction:column;gap:14px}.po-form label{display:flex;flex-direction:column;gap:6px;font-size:.9rem;font-weight:600;min-width:0}.po-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:12px}.po-editor-fields,.po-form fieldset{border:0;padding:0;margin:0;min-width:0}.po-form fieldset{display:flex;flex-direction:column;gap:14px}.po-item{display:grid;grid-template-columns:minmax(180px,3fr) repeat(4,minmax(85px,1fr)) minmax(110px,1fr);gap:10px;align-items:start;padding:14px 0;border-top:1px solid var(--color-outline)}.po-item-total{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding-top:22px}.po-item-total strong{font-variant-numeric:tabular-nums}.po-totals{align-self:flex-end;width:min(100%,440px);display:flex;flex-direction:column;gap:10px}.po-totals>div{display:flex;justify-content:space-between;gap:15px;font-variant-numeric:tabular-nums}.po-grand-total{padding-top:12px;border-top:2px solid var(--color-outline);font-size:1.15rem;color:var(--color-primary-strong)}.po-info,.po-warning,.po-error,.po-success{padding:12px 14px;border-radius:8px;margin:10px 0;overflow-wrap:anywhere;font-size:.9rem}.po-info{background:#eaf2f7;color:#204b63}.po-warning{background:#fff5d6;color:#7d4f0b}.po-error{background:#ffeded;color:#a21d2b}.po-success{background:#e5f8eb;color:#1c6837}.po-status{display:inline-flex;border-radius:99px;padding:3px 9px;font-size:.77rem;font-weight:700;margin-left:8px}.po-status-draft{background:#eceef2;color:#485466}.po-status-issued{background:#daf6e5;color:#176135}.po-status-void{background:#ffe4e5;color:#a51b29}.po-check,.po-form .po-check{display:flex;flex-direction:row;align-items:flex-start;gap:10px;font-size:.86rem;line-height:1.6}.po-check input{width:18px;height:18px;flex-shrink:0;margin-top:3px}.po-file-link{display:inline-block;margin:8px 0}.po-reference-note{white-space:pre-wrap;padding:12px;border-left:3px solid var(--color-primary);background:var(--color-background)}.po-table-scroll{max-width:100%;overflow-x:auto}.po-table-scroll table{width:100%;border-collapse:collapse;font-size:.84rem}.po-table-scroll th,.po-table-scroll td{padding:9px;text-align:left;vertical-align:top;border-bottom:1px solid var(--color-outline)}.po-table-scroll td:nth-child(2){min-width:180px;white-space:pre-wrap}.po-ai-review{border:1px solid var(--color-outline);border-radius:10px;padding:16px;margin-top:12px}.po-document-preview{overflow:auto;max-height:75vh;background:#e5e5e5;padding:14px}.po-document-preview .a4-quotation-pages-stack{width:794px;margin:auto}.po-import input[type=file]{max-width:100%;font:inherit;font-size:.85rem}@media(max-width:1000px){.po-item{grid-template-columns:repeat(2,minmax(0,1fr))}.po-item-description{grid-column:1/-1}.po-item-total{grid-column:1/-1;padding-top:0}}@media(max-width:480px){.po-form-grid{grid-template-columns:minmax(0,1fr)}.po-heading h1{font-size:1.25rem}.po-actions button{flex-grow:1}.po-ai-review{padding:10px}.po-history-row{align-items:flex-start}}@font-face{font-family:Sarabun;src:url(/fonts/Sarabun-Regular.ttf) format("truetype");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Sarabun;src:url(/fonts/Sarabun-Bold.ttf) format("truetype");font-weight:700;font-style:normal;font-display:swap}:root{--color-background: #fcfaf7;--color-on-background: #423d38;--color-surface: #f3f4f6;--color-surface-soft: #edebe9;--color-surface-elevated: #ffffff;--color-on-surface: #423d38;--color-on-surface-muted: #797067;--color-outline: #e3e0dd;--color-outline-strong: #d1d5dc;--color-primary: #fe6e00;--color-primary-strong: #ff6b00;--color-primary-warm: #ffb74d;--color-primary-focus: #f97015;--color-on-primary: #ffffff;--color-shell-base: rgba(0, 0, 0, .78);--color-on-shell: #ffffff;--color-shell-border: rgba(255, 255, 255, .12);--color-success: #00c758;--color-warning: #edb200;--color-danger: #fb2c36;--color-info: #3080ff;--status-mock-bg: #fef9c2;--status-mock-fg: #874b00;--status-planned-bg: #f3f4f6;--status-planned-fg: #364153;--status-development-bg: #dbeafe;--status-development-fg: #1447e6;--status-integrated-bg: #f3e8ff;--status-integrated-fg: #8200da;--status-production-bg: #dcfce7;--status-production-fg: #016630;--status-danger-bg: #fee2e2;--status-danger-fg: #b91c1c;--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Sarabun", "Noto Sans Thai", sans-serif;--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Sarabun", monospace;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-pill: 9999px;--space-xs: 4px;--space-sm: 8px;--space-md: 12px;--space-lg: 16px;--space-xl: 24px;--space-2xl: 32px;--shadow-subtle: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);--shadow-raised: 0 4px 12px rgba(0, 0, 0, .12);--shadow-dialog: 0 20px 25px rgba(0, 0, 0, .14), 0 8px 10px rgba(0, 0, 0, .06);--ease-standard: cubic-bezier(.4, 0, .2, 1)}*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;width:100%;max-width:100vw;overflow-x:hidden;background-color:var(--color-background);color:var(--color-on-background);font-family:var(--font-sans);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}input,select,textarea,button{font-family:inherit;font-size:16px}button{cursor:pointer}.tabular-nums{font-family:var(--font-mono);font-variant-numeric:tabular-nums}.app-shell{min-height:100dvh;display:flex;flex-direction:column;background-color:var(--color-background)}.shell-header{position:sticky;top:0;z-index:40;background-color:var(--color-shell-base);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);color:var(--color-on-shell);border-bottom:1px solid var(--color-shell-border);padding:0 var(--space-md)}.shell-header-inner{max-width:1400px;margin:0 auto;min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);flex-wrap:wrap;padding:6px 0}.brand-cluster{display:flex;align-items:center;gap:10px}.brand-mark{width:36px;height:36px;border-radius:var(--radius-md);background:linear-gradient(135deg,var(--color-primary) 0%,var(--color-primary-warm) 100%);color:var(--color-on-primary);font-weight:800;font-size:.95rem;display:flex;align-items:center;justify-content:center;letter-spacing:-.03em;flex-shrink:0}.brand-title{font-weight:700;font-size:1rem;color:var(--color-on-shell);line-height:1.2}.brand-subtitle{font-size:.72rem;color:#ffffffa6;letter-spacing:.04em;text-transform:uppercase}.shell-nav{display:flex;align-items:center;gap:4px;overflow-x:auto;max-width:100%;scrollbar-width:none}.shell-nav::-webkit-scrollbar{display:none}.nav-item{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:6px 12px;border-radius:var(--radius-md);border:none;background:transparent;color:#ffffffbd;font-size:.85rem;font-weight:700;white-space:nowrap;transition:all .15s var(--ease-standard)}.nav-item:hover{background:#ffffff1a;color:#fff}.nav-item-active{background-color:var(--color-primary);color:var(--color-on-primary)}.nav-item-active:hover{background-color:var(--color-primary-strong)}.shell-actions{display:flex;align-items:center;gap:8px}.btn-ghost-shell{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;padding:0 10px;border-radius:var(--radius-md);border:1px solid rgba(255,255,255,.14);background:#ffffff0f;color:#ffffffd9;font-size:.8125rem;font-weight:600;transition:all .15s var(--ease-standard)}.btn-ghost-shell:hover{background:#fe6e0040;border-color:var(--color-primary);color:#fff}.workspace-main{flex:1;width:100%;max-width:1400px;margin:0 auto;padding:var(--space-lg) var(--space-md) 140px}@media(min-width:768px){.workspace-main{padding:var(--space-xl) var(--space-2xl) 100px}}.card-elevated{background-color:var(--color-surface-elevated);border:1px solid var(--color-outline);border-radius:var(--radius-lg);box-shadow:var(--shadow-subtle);padding:var(--space-lg)}.card-soft{background-color:var(--color-surface-soft);border:1px solid var(--color-outline);border-radius:var(--radius-lg);padding:var(--space-md)}.field-label{display:block;font-size:.78rem;font-weight:700;color:var(--color-on-surface-muted);margin-bottom:4px;letter-spacing:.02em}.surface-input,.surface-select,.surface-textarea{width:100%;min-height:44px;padding:8px 12px;font-size:16px;color:var(--color-on-surface);background-color:var(--color-surface-elevated);border:1px solid var(--color-outline-strong);border-radius:var(--radius-sm);transition:border-color .15s var(--ease-standard),box-shadow .15s var(--ease-standard)}.surface-input:focus,.surface-select:focus,.surface-textarea:focus{outline:none;border-color:var(--color-primary-focus);box-shadow:0 0 0 3px #f970152e}.surface-input:disabled,.surface-select:disabled{background-color:var(--color-surface);color:var(--color-on-surface-muted);cursor:not-allowed}.btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;background-color:var(--color-primary);color:var(--color-on-primary);border:none;border-radius:var(--radius-sm);font-size:.9rem;font-weight:600;transition:background-color .15s var(--ease-standard),transform .1s ease}.btn-primary:hover:not(:disabled){background-color:var(--color-primary-strong)}.btn-primary:disabled{opacity:.55;cursor:not-allowed}.btn-secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 14px;background-color:var(--color-surface-elevated);color:var(--color-on-surface);border:1px solid var(--color-outline-strong);border-radius:var(--radius-sm);font-size:.875rem;font-weight:600;transition:all .15s var(--ease-standard)}.btn-secondary:hover:not(:disabled){border-color:var(--color-primary);color:var(--color-primary-strong);background-color:#fe6e000a}.btn-secondary:disabled{opacity:.4;cursor:not-allowed}.btn-danger-ghost{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;padding:0 10px;background:transparent;color:var(--color-danger);border:1px solid transparent;border-radius:var(--radius-sm);font-size:.85rem;font-weight:600}.btn-danger-ghost:hover{background-color:var(--status-danger-bg);border-color:#fb2c3640}.status-badge{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:var(--radius-pill);font-size:.75rem;font-weight:700;letter-spacing:.02em;line-height:1.1;white-space:nowrap}.badge-mock{background-color:var(--status-mock-bg);color:var(--status-mock-fg)}.badge-planned{background-color:var(--status-planned-bg);color:var(--status-planned-fg)}.badge-development{background-color:var(--status-development-bg);color:var(--status-development-fg)}.badge-integrated{background-color:var(--status-integrated-bg);color:var(--status-integrated-fg)}.badge-production{background-color:var(--status-production-bg);color:var(--status-production-fg)}.badge-danger{background-color:var(--status-danger-bg);color:var(--status-danger-fg)}.login-screen{min-height:100dvh;display:grid;grid-template-columns:1fr;background-color:var(--color-background)}@media(min-width:900px){.login-screen{grid-template-columns:1.05fr .95fr}}.login-telemetry-side{padding:var(--space-xl);display:flex;flex-direction:column;justify-content:space-between;background-color:var(--color-background);border-bottom:1px solid var(--color-outline)}@media(min-width:900px){.login-telemetry-side{padding:48px;border-bottom:none;border-right:1px solid var(--color-outline)}}.login-orange-panel{background-color:var(--color-primary-strong);color:var(--color-on-primary);padding:var(--space-xl) var(--space-lg);display:flex;align-items:center;justify-content:center}@media(min-width:900px){.login-orange-panel{padding:48px}}.login-card{width:100%;max-width:440px;background-color:var(--color-surface-elevated);color:var(--color-on-surface);border-radius:var(--radius-md);padding:var(--space-2xl);box-shadow:var(--shadow-dialog)}.mobile-items-list{display:flex;flex-direction:column;gap:var(--space-md)}.desktop-items-table-wrap{display:none}@media(min-width:960px){.mobile-items-list{display:none}.desktop-items-table-wrap{display:block;background:var(--color-surface-elevated);border:1px solid var(--color-outline);border-radius:var(--radius-lg);box-shadow:var(--shadow-subtle);overflow:hidden}}.cmd-table{width:100%;border-collapse:collapse}.cmd-table th{background-color:#fe6e000f;color:var(--color-primary-strong);font-size:.75rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;height:46px;padding:0 10px;text-align:left;border-bottom:1px solid var(--color-outline)}.cmd-table td{padding:10px;border-bottom:1px solid var(--color-outline);vertical-align:top;font-size:.875rem}.sticky-summary-bar{position:fixed;bottom:0;left:0;right:0;z-index:35;background-color:#000000db;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);color:#fff;border-top:1px solid rgba(255,255,255,.14);padding:10px var(--space-md) calc(10px + env(safe-area-inset-bottom,0px))}.sticky-summary-inner{max-width:1400px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:var(--space-md)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:60;background-color:#0009;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:flex-end;justify-content:center;padding:0}@media(min-width:640px){.modal-backdrop{align-items:center;padding:var(--space-lg)}}.bottom-sheet-panel{width:100%;max-width:640px;max-height:92dvh;overflow-y:auto;background-color:var(--color-surface-elevated);color:var(--color-on-surface);border-radius:var(--radius-lg) var(--radius-lg) 0 0;box-shadow:var(--shadow-dialog);padding:var(--space-xl) var(--space-lg) calc(var(--space-xl) + env(safe-area-inset-bottom,0px))}@media(min-width:640px){.bottom-sheet-panel{border-radius:var(--radius-lg);padding:var(--space-xl)}}.checkered-preview-box{background-color:#f8fafc;background-image:linear-gradient(45deg,#e2e8f0 25%,transparent 25%),linear-gradient(-45deg,#e2e8f0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e2e8f0 75%),linear-gradient(-45deg,transparent 75%,#e2e8f0 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}.a4-preview-viewport{width:100%;background-color:#d6d3d1;border:1px solid var(--color-outline-strong);border-radius:var(--radius-md);padding:16px 12px;overflow-x:auto;overflow-y:auto;max-height:70dvh;display:flex;justify-content:center;align-items:flex-start}.a4-preview-scale-wrapper{--a4-scale: 1;width:210mm;transform:scale(var(--a4-scale));transform-origin:top center;margin-bottom:calc((var(--a4-scale) - 1) * 297mm)}.a4-quotation-pages-stack{display:flex;flex-direction:column;gap:20px;width:210mm}.a4-sheet{position:relative;width:210mm;min-height:297mm;padding:13mm 14mm 12mm;background-color:#fff;color:#111827;font-family:Sarabun,Noto Sans Thai,sans-serif;font-size:12.5px;line-height:1.42;box-shadow:0 10px 25px #0000002e;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}.a4-corner-accent{position:absolute;top:0;right:0;width:0;height:0;border-style:solid;border-width:0 48px 48px 0;border-color:transparent var(--document-color, #ea580c) transparent transparent;pointer-events:none;-webkit-print-color-adjust:exact;print-color-adjust:exact}.a4-sheet-top-content{display:flex;flex-direction:column;flex:1 1 auto}.a4-header-grid{display:grid;grid-template-columns:1.35fr .95fr;gap:16px;align-items:start;margin-bottom:12px}.a4-issuer-block{min-width:0}.a4-logo-wrap{margin-bottom:8px}.a4-default-px-logo{position:relative;width:46px;height:46px;border-radius:7px;background-color:#181f2c;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;-webkit-print-color-adjust:exact;print-color-adjust:exact}.a4-default-px-dot{position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:50%;background-color:var(--document-color, #ea580c)}.a4-default-px-main{font-weight:800;font-size:15px;line-height:1;letter-spacing:-.02em}.a4-default-px-sub{font-weight:700;font-size:8px;letter-spacing:.08em;color:#cbd5e1;margin-top:2px}.a4-issuer-name{font-weight:700;font-size:13.5px;color:#111827;margin-bottom:2px}.a4-issuer-line{font-size:11.8px;color:#334155;line-height:1.38}.a4-doc-meta-block{text-align:right;padding-top:4px}.a4-doc-title-th{font-weight:700;font-size:25px;line-height:1.1;color:var(--document-color, #ea580c);padding-right:10px}.a4-doc-title-en{font-weight:700;font-size:13.5px;color:#475569;margin-top:2px;margin-bottom:10px;padding-right:10px}.a4-doc-meta-table{border-top:1px solid #cbd5e1;border-bottom:1px solid #cbd5e1;padding:6px 4px;display:flex;flex-direction:column;gap:3px;text-align:left;max-width:245px;margin-left:auto}.a4-doc-meta-row{display:grid;grid-template-columns:58px 1fr;font-size:12px;align-items:baseline}.a4-doc-meta-label{font-weight:700;color:#334155}.a4-doc-meta-value{color:#0f172a}.a4-customer-block{margin-bottom:12px}.a4-section-orange-label{font-weight:700;font-size:12.5px;color:var(--document-color, #ea580c);margin-bottom:2px}.a4-customer-primary{font-weight:700;font-size:13px;color:#111827}.a4-customer-line{font-size:11.8px;color:#334155;line-height:1.38}.a4-continuation-header{display:flex;justify-content:space-between;align-items:baseline;border-bottom:1px solid #cbd5e1;padding-bottom:6px;margin-bottom:10px}.a4-continuation-title{font-weight:700;font-size:13.5px;color:var(--document-color, #ea580c)}.a4-continuation-meta{font-size:11.5px;color:#475569}.a4-items-table{width:100%;table-layout:fixed;border-collapse:collapse;margin-bottom:10px}.a4-items-table thead th{border-top:1.5px solid #1e293b;border-bottom:1.5px solid #1e293b;padding:6px;font-weight:700;font-size:12px;color:#0f172a;background:transparent}.a4-items-table tbody td{border-bottom:1px solid #e2e8f0;padding:6px;font-size:12px;color:#1e293b;vertical-align:top}.a4-items-table .col-no{width:38px;text-align:center}.a4-items-table .col-desc{text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}.a4-items-table .col-qty{width:68px;text-align:right}.a4-items-table .col-unit{width:62px;text-align:center;overflow-wrap:anywhere}.a4-items-table .col-unit-price,.a4-items-table .col-line-total{width:105px;text-align:right}.a4-summary-and-notes{margin-top:6px}.a4-summary-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:16px;align-items:end}.a4-baht-text-column{padding-bottom:4px}.a4-thai-baht-text{font-size:12px;color:#1e293b}.a4-totals-column{display:flex;flex-direction:column;gap:4px}.a4-total-row{display:grid;grid-template-columns:1fr 120px;gap:8px;text-align:right;font-size:12.2px;align-items:baseline}.a4-total-label{font-weight:700;color:var(--document-color, #ea580c)}.a4-total-value{color:#0f172a}.a4-grand-total-row{padding-top:3px;padding-bottom:3px;border-bottom:3px double #cbd5e1}.a4-grand-total-value{font-weight:700;font-size:13px}.a4-note-block{margin-top:14px}.a4-note-text{font-size:11.8px;color:#334155;white-space:pre-wrap}.a4-signing-footer{margin-top:22px;padding-top:8px;display:grid;grid-template-columns:1fr 130px 1fr;gap:12px;align-items:end;break-inside:avoid}.a4-sign-col{display:flex;flex-direction:column;align-items:center;text-align:center}.a4-sign-behalf{font-weight:700;font-size:11.8px;color:#1e293b;margin-bottom:8px}.a4-sign-space{min-height:46px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding-bottom:3px}.a4-approver-printed-name{font-size:11.5px;color:#1e293b}.a4-sign-line{width:165px;border-bottom:1px solid #cbd5e1;margin-bottom:4px}.a4-sign-subname{font-size:11px;color:#475569}.a4-sign-role{font-weight:700;font-size:11.5px;color:#1e293b}.a4-sign-date-value{margin-top:8px;font-size:11.2px;color:#1e293b;min-height:16px}.a4-sign-date-line{width:140px;border-bottom:1px solid #cbd5e1;margin-bottom:3px}.a4-stamp-col{display:flex;align-items:center;justify-content:center;padding-bottom:18px}.a4-stamp-placeholder{width:82px;height:62px;border:1px dashed #cbd5e1;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:10.5px;color:#94a3b8}.a4-page-number-footer{margin-top:8px;padding-top:4px;border-top:1px solid #f1f5f9;display:flex;justify-content:space-between;font-size:10.5px;color:#64748b}@page{size:A4 portrait;margin:12mm}@media print{html,body{width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important;color:#000!important;overflow:visible!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}#root,.no-print{display:none!important}.a4-modal-backdrop,.a4-modal-sheet,.a4-preview-viewport,.a4-preview-scale-wrapper,.a4-quotation-pages-stack{position:static!important;display:block!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;border:none!important;box-shadow:none!important;background:transparent!important;overflow:visible!important;transform:none!important}.a4-sheet{width:100%!important;min-height:0!important;height:auto!important;padding:0!important;margin:0!important;border:none!important;box-shadow:none!important;background:#fff!important;page-break-after:always;break-after:page}.a4-sheet-last{page-break-after:auto!important;break-after:auto!important}.a4-corner-accent{top:-12mm;right:-12mm}}.document-dialog{border:1px solid var(--color-outline);border-radius:16px;padding:22px;color:var(--color-on-surface);background:var(--color-surface, #fff);width:min(760px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box}.document-dialog::backdrop{background:#0f172aa6}.document-dialog-wide{width:min(1050px,calc(100vw - 24px))}.document-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.document-dialog-header h2{font-size:1.1rem;margin:0;overflow-wrap:anywhere}.document-form{display:flex;flex-direction:column;gap:16px}.document-form label,.document-form-grid label{display:flex;flex-direction:column;gap:6px;font-size:.88rem;font-weight:600;min-width:0}.document-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:12px;margin-bottom:12px}.document-form fieldset{border:1px solid var(--color-outline);border-radius:8px;padding:12px;min-width:0}.document-form legend{font-weight:700;font-size:.9rem}.document-form .document-delivery-row{display:grid;grid-template-columns:minmax(0,1fr) 95px;align-items:center;gap:12px;margin:12px 0}.document-delivery-row small,.document-timeline-item small{display:block;font-size:.75rem;color:var(--color-on-surface-muted)}.document-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:12px 0}.document-actions label{display:inline-flex;gap:6px;align-items:center}.document-actions .surface-select{width:auto;max-width:100%}.document-muted{font-size:.85rem;color:var(--color-on-surface-muted)}.document-error,.document-void-confirm{background:#fff1f2;color:#9f1239;border-radius:8px;padding:12px}.document-timeline{display:grid;gap:8px;margin-bottom:12px}.document-timeline-item{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;text-align:left;border:1px solid var(--color-outline);border-radius:8px;background:var(--color-surface);color:inherit;padding:12px;cursor:pointer;font:inherit;overflow-wrap:anywhere}.document-is-void{opacity:.65}.related-documents{margin-top:16px}.related-documents h3{margin-bottom:6px}.documents-list{display:grid;gap:12px}.document-list-card{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;overflow-wrap:anywhere}.document-preview-scroll{overflow:auto;background:#e2e8f0;padding:18px;border-radius:8px;margin-top:16px;max-height:72dvh}.a4-copy-label{color:var(--document-color);font-size:10px;margin-top:5px}.a4-document-details{font-size:10px;margin:8px 0;color:#475569}.a4-deposit-summary{text-align:right;font-size:11px;line-height:1.8;margin:6px 0;color:#111827}.a4-document-watermark{position:absolute;bottom:8mm;left:0;right:0;text-align:center;color:#be123c;font:700 15px Sarabun,sans-serif}.calculator-edit-fields{margin:0;padding:0;border:0;min-width:0}.business-workspace-hidden{display:none!important}.business-badge{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border:1px solid transparent;border-radius:var(--radius-pill);font-size:.75rem;font-weight:700;line-height:1.4;white-space:nowrap;vertical-align:middle}.business-badge-px{background:#fff1e6;border-color:#ffd2ae;color:#934000}.business-badge-phoenix{background:var(--status-integrated-bg);border-color:#e8cdff;color:var(--status-integrated-fg)}.business-badge-symbol{font-size:.7rem}.business-logo{display:block;width:76px;height:44px;object-fit:contain;flex-shrink:0}.brand-cluster .business-logo{background:var(--color-surface-elevated);padding:3px;border-radius:var(--radius-xs)}.business-logo-placeholder{display:inline-flex;align-items:center;justify-content:center;width:76px;min-height:44px;padding:4px;border:1px dashed currentColor;border-radius:var(--radius-xs);opacity:.7;font-size:.65rem;text-align:center}.business-selector{min-height:100dvh;display:grid;place-items:center;padding:40px 24px;background:var(--color-background)}.business-selector-panel{width:min(840px,100%)}.business-selector-heading{margin-bottom:28px}.business-selector-eyebrow{color:var(--color-primary-strong);font-size:.8rem;font-weight:700;margin:0 0 8px}.business-selector-heading h1{margin:0 0 10px;font-size:clamp(1.6rem,4vw,2rem);line-height:1.3}.business-selector-heading p:last-child{margin:0;color:var(--color-on-surface-muted)}.business-selector-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.business-selector-card{display:flex;flex-direction:column;align-items:flex-start;min-height:265px;padding:28px;text-align:left;border:1px solid var(--color-outline);border-radius:var(--radius-lg);color:var(--color-on-surface);background:var(--color-surface-elevated);box-shadow:var(--shadow-subtle);transition:border-color .15s var(--ease-standard),box-shadow .15s var(--ease-standard)}.business-selector-card:hover{border-color:var(--color-primary);box-shadow:var(--shadow-raised)}.business-selector-card:focus-visible{outline:3px solid var(--color-primary-focus);outline-offset:4px}.business-selector-logo{display:flex;align-items:center;min-height:66px;margin-bottom:20px}.business-selector-logo .business-logo{width:160px;height:64px;object-position:left center}.business-selector-logo .business-logo-placeholder{width:130px;min-height:62px;color:var(--color-on-surface-muted);font-size:.75rem}.business-selector-card h2{margin:0 0 8px;font-size:1.35rem;line-height:1.4}.business-selector-card p{margin:0 0 24px;font-size:.9rem;color:var(--color-on-surface-muted)}.business-selector-open{display:inline-flex;align-items:center;gap:8px;margin-top:auto;color:var(--color-primary-strong);font-weight:700;font-size:.9rem}.business-selector-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:24px}.business-logo-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px}.business-logo-settings-section{display:flex;flex-direction:column;gap:12px;min-width:0}.business-logo-settings-section h3{margin:0;font-size:1rem}@media(max-width:640px){.business-selector{padding:28px 16px}.business-selector-grid,.business-logo-settings-grid{grid-template-columns:minmax(0,1fr)}.business-selector-card{min-height:240px;padding:24px}}@media print{.business-badge,.business-selector{display:none!important}}
