:root{--ink:#12231c;--green:#176b4a;--lime:#dff46a;--cream:#f6f5ef;--line:#dfe5df;--muted:#637069}*{box-sizing:border-box}html{scroll-behavior:smooth}body{color:var(--ink);background:#fbfcfa;margin:0;font-family:Tahoma,Noto Sans Thai,Arial,sans-serif}.app{min-height:100vh}.topbar{border-bottom:1px solid var(--line);z-index:20;background:#fffffff0;justify-content:space-between;align-items:center;height:76px;padding:0 max(5vw,24px);display:flex;position:sticky;top:0}.brand{color:var(--ink);font:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:12px;display:flex}.brand span{background:var(--green);color:#fff;border-radius:12px;place-items:center;width:40px;height:40px;font-size:13px;font-weight:800;display:grid}.brand b{letter-spacing:.02em;font-size:18px}.header-note,.status{color:var(--muted);font-size:13px}.hero{grid-template-columns:1fr 280px;gap:48px;max-width:1400px;margin:auto;padding:84px max(7vw,28px) 74px;display:grid}.eyebrow{color:var(--green);letter-spacing:.13em;margin-bottom:15px;font-size:12px;font-weight:800;display:inline-block}.hero h1,.editor-head h1{letter-spacing:-.04em;margin:0;font-size:clamp(40px,5vw,68px);line-height:1.12}.hero h1 em{color:var(--green);font-style:normal}.hero p{color:var(--muted);max-width:720px;font-size:18px;line-height:1.8}.hero-stat{background:var(--ink);color:#fff;border-radius:28px;flex-direction:column;justify-content:center;padding:32px;display:flex;box-shadow:0 18px 45px #12231c20}.hero-stat strong{color:var(--lime);font-size:58px}.hero-stat span{font-size:18px;font-weight:700}.hero-stat i{color:#b8c5bf;margin-top:22px;font-size:12px;font-style:normal}.library{background:var(--cream);padding:64px max(7vw,28px) 90px}.library-head{justify-content:space-between;align-items:end;gap:30px;max-width:1220px;margin:auto;display:flex}.library h2{margin:0 0 8px;font-size:34px}.library-head p{color:var(--muted);margin:0}.search{border:1px solid var(--line);background:#fff;border-radius:14px;align-items:center;gap:10px;width:min(420px,100%);height:50px;padding:0 16px;display:flex}.search span{font-size:25px}.search input{width:100%;font:inherit;background:0 0;border:0;outline:0}.chips{flex-wrap:wrap;gap:9px;max-width:1220px;margin:28px auto;display:flex}.chips button{border:1px solid var(--line);color:#44534c;cursor:pointer;background:#fff;border-radius:999px;padding:9px 16px}.chips button.active{background:var(--ink);color:#fff;border-color:var(--ink)}.cards{grid-template-columns:repeat(3,1fr);gap:18px;max-width:1220px;margin:auto;display:grid}.card{border:1px solid var(--line);background:#fff;border-radius:20px;flex-direction:column;min-height:255px;padding:24px;transition:all .2s;display:flex}.card:hover{border-color:#b8c9be;transform:translateY(-4px);box-shadow:0 15px 34px #244a3520}.card-top{justify-content:space-between;align-items:center;display:flex}.doc-icon{width:45px;height:45px;color:var(--green);background:#e8f4ed;border-radius:13px;place-items:center;font-weight:800;display:grid}.tag{color:#627068;background:#f1f2ee;border-radius:99px;padding:6px 10px;font-size:11px}.card h3{margin:22px 0 7px;font-size:20px}.card p{color:var(--muted);margin:0;font-size:14px;line-height:1.7}.card button{text-align:left;color:var(--green);cursor:pointer;background:0 0;border:0;margin-top:auto;padding-top:22px;font-size:14px;font-weight:800}.card button span{float:right;font-size:19px}.empty{text-align:center;color:var(--muted);padding:60px}footer{color:var(--muted);justify-content:space-between;gap:25px;padding:34px max(7vw,28px);font-size:12px;display:flex}footer b{color:var(--ink)}.ghost{border:1px solid var(--line);cursor:pointer;background:#fff;border-radius:10px;padding:10px 15px}.editor-head{justify-content:space-between;align-items:end;max-width:1320px;margin:0 auto;padding:46px 28px 30px;display:flex}.editor-head h1{font-size:42px}.editor-head p{color:var(--muted)}.status{color:var(--green);background:#eaf4ee;border-radius:99px;padding:10px 14px}.workspace{grid-template-columns:minmax(0,1fr) minmax(400px,.85fr);align-items:start;gap:22px;max-width:1320px;margin:0 auto;padding:0 28px 80px;display:grid}.form-panel,.preview-panel{border:1px solid var(--line);background:#fff;border-radius:22px;padding:26px}.panel-title,.preview-actions{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;margin-bottom:22px;padding-bottom:18px;display:flex}.panel-title h2,.preview-actions h2{margin:0;font-size:20px}.panel-title button{color:var(--green);cursor:pointer;background:#e7f3ec;border:0;border-radius:9px;padding:9px 12px}.preview-actions span{color:var(--muted);font-size:11px}.fields{grid-template-columns:1fr 1fr;gap:17px;display:grid}.fields label{flex-direction:column;gap:7px;display:flex}.fields label.wide{grid-column:1/-1}.fields label span{font-size:13px;font-weight:700}.fields input,.fields textarea{font:inherit;background:#fcfdfc;border:1px solid #d7dfd9;border-radius:10px;outline:none;padding:12px 13px}.fields input:focus,.fields textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px #176b4a12}.fields textarea{resize:vertical;min-height:88px}.preview-panel{background:#eef1ec;position:sticky;top:98px}.paper{aspect-ratio:210/297;background:#fff;padding:9%;overflow:auto;box-shadow:0 8px 28px #18261f18}.paper h3{text-align:center;margin:0 0 25px;font-size:19px}.paper .company{text-align:center;margin-bottom:28px;font-size:12px;line-height:1.7}.paper p{white-space:pre-wrap;font-family:Tahoma,sans-serif;font-size:12px;line-height:1.85}.paper small{color:#777;border-top:1px solid #ddd;margin-top:30px;padding-top:10px;font-size:9px;display:block}.download-row{grid-template-columns:1fr 1fr;gap:10px;margin-top:18px;display:grid}.download-row button{border:1px solid var(--green);cursor:pointer;border-radius:11px;padding:13px;font-weight:700}.primary{background:var(--green);color:#fff}.secondary{color:var(--green);background:#fff}@media (width<=900px){.hero{grid-template-columns:1fr}.hero-stat{max-width:380px}.library-head{flex-direction:column;align-items:stretch}.cards{grid-template-columns:repeat(2,1fr)}.workspace{grid-template-columns:1fr}.preview-panel{position:static}.editor-head{flex-direction:column;align-items:start;gap:15px}}@media (width<=600px){.topbar{height:66px}.header-note,.brand b{display:none}.hero{padding-top:55px}.hero h1{font-size:40px}.cards{grid-template-columns:1fr}.library{padding-left:18px;padding-right:18px}.fields{grid-template-columns:1fr}.fields label.wide{grid-column:auto}.workspace,.editor-head{padding-left:15px;padding-right:15px}.download-row{grid-template-columns:1fr}footer{flex-direction:column}.paper{aspect-ratio:auto;min-height:600px}}.trust-row{flex-wrap:wrap;gap:9px;margin-top:22px;display:flex}.trust-row span{color:var(--green);background:#eaf4ee;border-radius:99px;padding:8px 12px;font-size:12px;font-weight:700}.category-overview{grid-template-columns:repeat(3,1fr);gap:14px;max-width:1180px;margin:0 auto 58px;padding:0 28px;display:grid}.category-overview div{border:1px solid var(--line);background:#fff;border-radius:18px;align-items:center;gap:14px;padding:22px;display:flex}.category-overview b{color:var(--green);font-size:30px}.category-overview span{color:var(--muted);font-weight:700}.review-tag{color:#94620a;background:#fff5d8;border-radius:7px;margin-top:14px;padding:6px 8px;font-size:10px;font-weight:700;display:inline-flex}.panel-tools{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:7px;display:flex}.logo-upload{background:var(--ink);color:#fff;cursor:pointer;border-radius:9px;padding:9px 12px;font-size:12px;font-weight:700}.logo-upload input{display:none}.review-note{color:#704b08;background:#fff5d8;border-left:4px solid #e8a91c;border-radius:8px;max-width:720px;margin-top:14px;padding:11px 14px;font-size:12px;line-height:1.6}.paper-logo{object-fit:contain;max-width:100px;max-height:66px;margin:0 auto 12px;display:block}.legal-source{text-align:center;color:#fff;background:#10241b;padding:60px max(7vw,28px)}.legal-source h2{margin:0 0 10px;font-size:28px}.legal-source p{color:#b9c8c0;max-width:760px;margin:0 auto 24px;line-height:1.7}.legal-source div{flex-wrap:wrap;justify-content:center;gap:10px;display:flex}.legal-source a{color:#e6f47b;border:1px solid #456052;border-radius:9px;padding:10px 13px;font-size:12px;text-decoration:none}@media (width<=700px){.category-overview{grid-template-columns:1fr;margin-bottom:35px}.panel-title{flex-direction:column;align-items:flex-start;gap:12px}.panel-tools{justify-content:flex-start}.legal-source{text-align:left}.legal-source div{justify-content:flex-start}}.signature-section{border-top:1px solid var(--line);margin-top:30px;padding-top:26px}.signature-section-head{justify-content:space-between;align-items:start;gap:15px;margin-bottom:18px;display:flex}.signature-section-head h2{margin:0 0 5px;font-size:20px}.signature-section-head p{color:var(--muted);margin:0;font-size:12px}.signature-section-head>span{color:var(--green);background:#e9f3ed;border-radius:99px;padding:7px 10px;font-size:10px;font-weight:800}.signer-cards{grid-template-columns:repeat(2,1fr);gap:12px;display:grid}.signer-card{border:1px solid var(--line);border-radius:14px;flex-direction:column;gap:9px;padding:14px;display:flex}.signer-card>b{font-size:13px}.signer-card>input{border:1px solid #d7dfd9;border-radius:8px;padding:9px}.signature-image-box{background:#f8faf8;border:1px dashed #bdc9c1;border-radius:9px;justify-content:center;align-items:center;height:72px;display:flex}.signature-image-box img{object-fit:contain;max-width:150px;max-height:66px}.signature-image-box span{color:#89938e;font-size:10px}.signer-actions{flex-wrap:wrap;gap:6px;display:flex}.signer-actions button,.signer-actions label{color:var(--green);cursor:pointer;background:#e9f3ed;border:0;border-radius:7px;padding:7px 9px;font-size:10px;font-weight:700}.signer-actions label input{display:none}.intent-check{color:#5f6964;align-items:flex-start;gap:7px;font-size:9px;line-height:1.45;display:flex}.intent-check input{margin-top:2px}.esign-note{color:#68716c;background:#f5f6f3;border-radius:8px;padding:10px 12px;font-size:10px;line-height:1.6}.preview-signatures{grid-template-columns:repeat(2,1fr);gap:18px 10px;margin-top:30px;display:grid}.preview-signatures>div{text-align:center;font-size:9px}.preview-signatures span,.preview-signatures b,.preview-signatures small{display:block}.preview-signatures b{font-size:9px}.preview-signatures small{color:#69736d}.preview-sig-space{justify-content:center;align-items:end;height:45px;display:flex}.preview-sig-space img{object-fit:contain;max-width:90px;max-height:43px}.signature-modal{z-index:100;background:#07120dbd;place-items:center;padding:18px;display:grid;position:fixed;inset:0}.signature-dialog{background:#fff;border-radius:22px;width:min(620px,100%);padding:24px;box-shadow:0 25px 80px #0006}.signature-dialog span{color:var(--muted);font-size:11px}.signature-dialog h2{margin:4px 0 16px}.signature-dialog canvas{aspect-ratio:560/220;touch-action:none;background:#fff;border:2px dashed #aebdb4;border-radius:12px;width:100%;height:auto;display:block}.signature-dialog p{color:var(--muted);font-size:11px}.signature-dialog-actions{justify-content:flex-end;gap:8px;display:flex}.signature-dialog-actions button{border:1px solid var(--line);cursor:pointer;background:#fff;border-radius:9px;padding:10px 13px}.signature-dialog-actions button.primary{background:var(--green);color:#fff;border-color:var(--green)}@media (width<=700px){.signer-cards{grid-template-columns:1fr}.signature-dialog{padding:17px}.signature-dialog-actions{flex-wrap:wrap}.preview-signatures{grid-template-columns:1fr 1fr}}.legal-source:before{content:"กรณีต้องการแบบฟอร์มเพิ่มเติมจากนี้";width:min(1100px,100% - 32px);color:var(--ink);text-align:center;background:linear-gradient(135deg,#dff46a,#f3fac7);border-radius:20px;margin:-98px auto 54px;padding:26px 30px;font-size:clamp(20px,3vw,30px);font-weight:800;line-height:1.4;display:block;box-shadow:0 16px 38px #07120d30}@media (width<=700px){.legal-source:before{text-align:left;margin-top:-88px;padding:22px 18px}}.structured-preview{font-size:10px}.preview-category{color:var(--green);background:#e8f4ed;border-radius:99px;margin-bottom:9px;padding:4px 9px;font-weight:800;display:inline-block}.structured-preview table{border-collapse:collapse;table-layout:fixed;width:100%}.structured-preview th,.structured-preview td{vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid #cbd9d0;padding:7px 6px}.structured-preview thead th{background:var(--green);color:#fff;text-align:left}.structured-preview thead th:first-child{text-align:center;width:42px}.structured-preview tbody td:first-child{text-align:center;color:#6d7771;width:42px}.structured-preview tbody th{text-align:left;color:#244b3b;background:#edf6f0;width:34%}.structured-preview tbody tr:nth-child(2n) td{background:#f8faf8}.structured-preview .money-row th,.structured-preview .money-row td{background:#f2f8d9;font-weight:800}.commercial-preview{color:#22342c;font-size:9px}.commercial-preview-meta{border-top:3px solid var(--green);border-bottom:1px solid #aebdb4;grid-template-columns:1.4fr .8fr;margin-bottom:12px;display:grid}.commercial-preview-meta>div{padding:10px}.commercial-preview-meta>div+div{border-left:1px solid #cdd8d1}.commercial-preview-meta small,.commercial-preview-meta b,.commercial-preview-meta span{display:block}.commercial-preview-meta small{color:#6d7872}.commercial-preview-meta b{margin:2px 0;font-size:11px}.items-preview{border-collapse:collapse;table-layout:fixed;width:100%;min-height:170px}.items-preview th{color:#174c35;text-align:left;background:#dff0e5;border-top:1px solid #aac2b4;border-bottom:1px solid #aac2b4;padding:7px 6px}.items-preview td{vertical-align:top;border-bottom:1px solid #dfe6e1;padding:8px 6px}.items-preview th:not(:nth-child(2)),.items-preview td:not(:nth-child(2)){text-align:right}.items-preview th:first-child,.items-preview td:first-child{text-align:left}.preview-totals{border-top:2px solid var(--green);grid-template-columns:1fr 1fr;gap:14px;padding-top:10px;display:grid}.preview-totals>div b,.preview-totals>div span{display:block}.preview-totals>div span{color:#6c7771;white-space:pre-wrap;margin-top:5px}.preview-totals dl{grid-template-columns:1fr auto;margin:0;display:grid}.preview-totals dt,.preview-totals dd{border-bottom:1px solid #d8e1db;margin:0;padding:4px 6px}.preview-totals dd{text-align:right}.preview-totals .grand{color:#173b2b;background:#e7f3c2;font-size:10px;font-weight:800}.tabular-paper{flex-direction:column;padding:7.5%;display:flex}.tabular-paper h3{text-align:left;margin-bottom:6px;font-size:21px}.tabular-paper .company{text-align:left;border-bottom:2px solid var(--ink);margin-bottom:16px;padding-bottom:12px}.tabular-paper .preview-signatures{margin-top:auto;padding-top:34px}.voucher-preview{font-size:9px}.voucher-preview-info{grid-template-columns:1fr 1fr;gap:24px;margin:8px 0 24px;display:grid}.voucher-preview-info small,.voucher-preview-info b,.voucher-preview-info span{display:block}.voucher-preview-info small{color:#6c7771;margin-bottom:7px}.voucher-preview-info b{margin-bottom:5px;font-size:10px}.voucher-preview-info span{color:#65716a;line-height:1.7}.voucher-preview table{border-collapse:collapse;table-layout:fixed;width:100%}.voucher-preview th,.voucher-preview td{border:1px solid #d7dfda;padding:8px}.voucher-preview thead th{color:#66716a;text-align:left;background:#f4f6f4}.voucher-preview thead th:first-child{text-align:center;width:44px}.voucher-preview thead th:last-child{text-align:right;width:110px}.voucher-preview tbody td:first-child{text-align:center}.voucher-preview tbody td:last-child{text-align:right}.voucher-summary th,.voucher-total th{text-align:left}.voucher-total th,.voucher-total td{background:#eef3ef;font-weight:800}.voucher-amount{background:#e9f3e8;justify-content:space-between;align-items:center;margin-top:12px;padding:12px 14px;display:flex}.voucher-amount span{color:#647168}.voucher-amount b{color:#176b4a;font-size:11px}.voucher-payment{flex-direction:column;gap:5px;margin-top:18px;display:flex}.voucher-payment span{color:#67726c}.repeat-field{background:#f9fbf9;border:1px solid #d8e1db;border-radius:14px;grid-column:1/-1;padding:15px}.repeat-head{justify-content:space-between;align-items:end;gap:12px;margin-bottom:11px;display:flex}.repeat-head b{font-size:13px}.repeat-head span{color:var(--muted);font-size:10px}.repeat-table{background:#fff;border:1px solid #d4ddd7;border-radius:10px;overflow:hidden}.repeat-row{grid-template-columns:54px repeat(2,minmax(100px,1fr)) 42px;align-items:center;display:grid}.repeat-row>*{min-width:0}.repeat-row b,.repeat-row span{text-align:center;padding:9px;font-size:11px}.repeat-row input{font:inherit;border:0;border-left:1px solid #e0e6e2;border-radius:0;outline:none;padding:10px}.repeat-row input:last-of-type{text-align:right}.repeat-row button{color:#a54040;cursor:pointer;background:#fff;border:0;border-left:1px solid #e0e6e2;height:100%;font-size:19px}.repeat-row button:disabled{color:#cdd3cf;cursor:not-allowed}.repeat-row+.repeat-row{border-top:1px solid #e0e6e2}.repeat-labels{color:#58665f;background:#edf4ef;font-weight:700}.repeat-labels span{border-left:1px solid #d9e2dc}.add-row{color:var(--green);cursor:pointer;background:#e8f3ec;border:1px solid #bad0c1;border-radius:9px;margin-top:10px;padding:9px 13px;font-weight:800}@media (width<=650px){.repeat-head{flex-direction:column;align-items:flex-start}.repeat-row{grid-template-columns:38px 1fr 105px 36px}.repeat-row input{padding:9px 7px;font-size:12px}}.repeat-row.cols-3{grid-template-columns:48px repeat(3,minmax(85px,1fr)) 40px}.repeat-row.cols-4{grid-template-columns:48px minmax(150px,2fr) repeat(3,minmax(80px,1fr)) 40px}@media (width<=650px){.repeat-table{overflow-x:auto}.repeat-row.cols-3{min-width:610px}.repeat-row.cols-4{min-width:760px}}.theme-picker{background:#f8faf8;border:1px solid #d8e1db;border-radius:14px;justify-content:space-between;align-items:center;gap:18px;margin:0 0 22px;padding:15px 17px;display:flex}.theme-picker>div:first-child b,.theme-picker>div:first-child span{display:block}.theme-picker>div:first-child b{font-size:13px}.theme-picker>div:first-child span{color:var(--muted);margin-top:4px;font-size:10px}.color-options{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.color-options>button{cursor:pointer;border:3px solid #fff;border-radius:50%;width:28px;height:28px;padding:0;box-shadow:0 0 0 1px #cbd6cf}.color-options>button.active{transform:scale(1.08);box-shadow:0 0 0 3px #1c2d24}.custom-color{cursor:pointer;border:1px solid #cbd6cf;border-radius:9px;align-items:center;gap:7px;height:32px;padding:4px 7px;font-size:10px;font-weight:700;display:flex}.custom-color input{cursor:pointer;background:0 0;border:0;width:24px;height:22px;padding:0}.tabular-paper .company{border-bottom-color:var(--doc-color)}.commercial-preview-meta{border-top-color:var(--doc-color)}.items-preview th{background:var(--doc-soft);color:var(--doc-color)}.preview-totals{border-top-color:var(--doc-color)}.preview-totals .grand{background:var(--doc-soft);color:var(--doc-color)}.voucher-amount{background:var(--doc-soft)}.voucher-amount b{color:var(--doc-color)}.voucher-preview tbody tr:first-child{height:auto}.voucher-preview tbody tr:not(.voucher-summary):not(.voucher-total){height:44px}.voucher-preview thead th:first-child{width:10%}.voucher-preview thead th:nth-child(2){width:67%}.voucher-preview thead th:last-child{width:23%}.voucher-preview th,.voucher-preview td{padding:9px 10px}.preview-signatures{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px}.preview-signatures>div{padding:0 10px}@media (width<=700px){.theme-picker{flex-direction:column;align-items:flex-start}.color-options{width:100%}}.repeat-row input,.paper,.paper table,.paper th,.paper td{font-kerning:normal;text-align-last:auto;letter-spacing:0!important;word-spacing:normal!important}.repeat-row input{font-family:Tahoma,Noto Sans Thai,Arial,sans-serif!important}.voucher-preview td:nth-child(2),.items-preview td:nth-child(2){word-break:normal;overflow-wrap:break-word;text-align:left!important;letter-spacing:0!important}.paper{line-height:1.55}.paper .company,.voucher-preview-info span{line-height:1.5}.voucher-preview th,.voucher-preview td{line-height:1.45}.voucher-preview thead th{background:#f2f5f3!important}.voucher-summary th,.voucher-summary td{background:#f7f9f7!important}.voucher-total th,.voucher-total td,.voucher-amount{background:var(--doc-soft)!important}.logo-size{color:#506058;background:#fff;border:1px solid #d4dfd8;border-radius:9px;align-items:center;padding:6px 9px;font-weight:700;flex-direction:row!important;gap:7px!important;font-size:10px!important;display:flex!important}.logo-size input{width:92px;accent-color:var(--green);border:0;padding:0}.logo-size b{min-width:38px;color:var(--green);font-size:10px}.paper-logo{width:auto;height:auto;transition:max-width .18s,max-height .18s}.repeat-row input{font-variant-ligatures:normal;text-rendering:optimizelegibility;letter-spacing:0!important;word-spacing:0!important}.panel-title .sample-fill{color:#74510b;background:#fff3cf;border:1px solid #e7c867;font-weight:800}.panel-title .sample-fill:hover{background:#ffeaa7}
