@import"https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700&display=swap";:root{font-family:Prompt,Noto Sans Thai,sans-serif;color:#0f172a;background:#f8fafc;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}.app{max-width:1100px;margin:auto;padding:32px 24px}.brand{display:flex;align-items:center;gap:14px}.logo{border-radius:16px;background:#d1fae5;color:#059669;width:52px;height:52px;display:grid;place-items:center;font-size:29px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px}h1{font-size:26px;letter-spacing:-.03em;margin:0}small,.muted{color:#64748b}small{display:block}.tag{background:#d1fae5;padding:6px 12px;border-radius:999px;color:#047857;font-size:12px;font-weight:700}nav{display:flex;gap:8px;margin-bottom:24px;background:#e9eff3;padding:6px;border-radius:16px}nav button{flex:1;border-color:transparent;background:transparent}nav .active{color:#047857;background:#fff;border-color:#e2e8f0;box-shadow:0 2px 8px #0f172a0c}.button{border:1px solid #dbe4ea;background:#fff;border-radius:12px;padding:11px 16px;color:inherit;font-weight:600;transition:background .15s,box-shadow .15s,transform .15s}.button:hover:not(:disabled){background:#f1f5f9;box-shadow:0 3px 12px #0f172a0d}.button:active:not(:disabled){transform:translateY(1px)}.button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #6ee7b7;outline-offset:2px}.button:disabled{opacity:.5;cursor:not-allowed}.panel{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:26px;margin-bottom:18px;box-shadow:0 8px 30px #0f172a0a}h2{font-size:19px;margin:0 0 18px;letter-spacing:-.02em}h3{font-size:15px;border-bottom:1px solid #e2e8f0;padding-bottom:10px;margin-top:28px}.categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:22px}.categories button{min-height:52px}.categories .chosen{color:#fff;background:#059669;border-color:#059669}.categories .chosen:hover{background:#047857}.fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}label{font-weight:600;display:block;margin-bottom:16px;font-size:14px}input,select{width:100%;display:block;margin-top:8px;border:1px solid #cbd5e1;background:#fff;border-radius:12px;padding:12px 14px;min-width:0;color:#0f172a}input:hover,select:hover{border-color:#94a3b8}.preview,.total{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#ecfdf5;padding:18px;border-radius:14px;margin:18px 0}.preview strong,.total strong{color:#047857}.total strong{font-size:23px}.primary{width:100%;background:#059669;color:#fff;border-color:#059669;font-weight:700;padding:14px}.primary:hover:not(:disabled){background:#047857;color:#fff}.line,.price-line{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e2e8f0;padding:14px 0}.line div{flex:1}.line strong{white-space:nowrap}.price-line span{flex:1}.price-line input{max-width:150px}.remove{padding:7px 12px;color:#b91c1c}.heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.heading h2{margin:0}.notice{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#ecfdf5;border:1px solid #a7f3d0;padding:10px 14px;border-radius:12px;margin-bottom:18px;color:#065f46}.notice button{border:0;background:transparent;padding:4px 9px}.state{color:#64748b;text-align:center;border:1px dashed #cbd5e1;border-radius:14px;padding:28px;margin:14px 0}.muted{font-size:13px}footer{text-align:center;color:#94a3b8;font-size:12px;padding:22px}@media(max-width:640px){.app{padding:16px}.panel{padding:18px}.categories{grid-template-columns:repeat(2,minmax(0,1fr))}.categories button{font-size:13px;padding:8px}.fields{gap:10px}.line{flex-wrap:wrap}h1{font-size:22px}nav{gap:2px}nav button{padding:10px 4px}}.app-shell{min-height:100vh;display:grid;grid-template-columns:256px minmax(0,1fr)}.app-content{min-width:0}.app{max-width:1100px;width:100%}.desktop-sidebar{position:sticky;top:0;height:100vh;padding:28px 16px;background:#fff;border-right:1px solid #e2e8f0;box-shadow:4px 0 22px #0f172a05}.sidebar-brand{display:flex;align-items:center;gap:11px;padding:0 9px 32px;min-width:0}.sidebar-brand strong{font-size:19px;letter-spacing:-.03em}.sidebar-brand small{font-size:10px;white-space:nowrap}.desktop-sidebar nav{display:flex;flex-direction:column;gap:6px;margin:0;background:none;padding:0;border-radius:0}.desktop-sidebar nav button{display:flex;align-items:center;gap:13px;width:100%;min-height:48px;text-align:left;border:0;border-radius:12px;background:transparent;color:#475569;padding:12px 16px;font-weight:600}.desktop-sidebar nav button:hover{background:#f1f5f9}.desktop-sidebar nav button.active{background:#ecfdf5;color:#047857;box-shadow:none}.mobile-header,.mobile-nav{display:none}.app-shell button{min-height:44px}@media(max-width:767px){.app-shell{display:block}.desktop-sidebar{display:none}.app{padding-bottom:calc(104px + env(safe-area-inset-bottom,0px))}.mobile-header{display:flex}.mobile-nav{position:fixed;z-index:20;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0;padding:7px 8px calc(7px + env(safe-area-inset-bottom,0px));border-top:1px solid #e2e8f0;border-radius:16px 16px 0 0;background:#fff;box-shadow:0 -8px 24px #0f172a12}.mobile-nav button{min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px 4px;border:0;border-radius:12px;background:transparent;color:#64748b;font-size:11px;font-weight:600}.mobile-nav button.active{color:#059669;background:#ecfdf5;box-shadow:none}.mobile-nav button span{line-height:1.3}.keyboard-open .mobile-nav{display:none}.keyboard-open .app{padding-bottom:24px}}.material-categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0 24px}.material-category{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:106px;padding:12px 5px;border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc;color:#334155;transition:transform .15s,background .15s,border-color .15s}.material-category:hover{transform:translateY(-2px);border-color:#6ee7b7}.material-category.selected{border-color:#059669;background:#ecfdf5;color:#047857;box-shadow:0 0 0 2px #a7f3d044}.material-category strong{font-size:13px;line-height:1.25;text-align:center;overflow-wrap:anywhere}.material-category small{font-size:11px}.category-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#e2f2ed;color:#059669}.material-category:nth-child(4n+2) .category-icon{background:#e0f2fe;color:#0284c7}.material-category:nth-child(4n+3) .category-icon{background:#fef3c7;color:#b45309}.material-category:nth-child(4n+4) .category-icon{background:#ede9fe;color:#7c3aed}.material-search{display:flex;align-items:center;gap:8px;border:1px solid #cbd5e1;border-radius:14px;padding:0 12px;color:#64748b;background:#fff}.material-search:focus-within{outline:3px solid #6ee7b7;outline-offset:2px}.material-search input{border:0;outline:0;margin:0;padding:13px 2px;min-width:0}.material-search input:focus-visible{outline:0}.material-search button{display:grid;place-items:center;min-width:44px;min-height:44px;border:0;background:transparent;color:#64748b}.material-panel>h3{margin:24px 0 12px}.material-products{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:10px}.material-product{display:flex;align-items:center;gap:10px;min-width:0;min-height:70px;text-align:left;padding:10px 12px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;transition:transform .15s,border-color .15s,background .15s}.material-product:hover{transform:translateY(-2px);border-color:#6ee7b7}.material-product.selected{border-color:#059669;background:#ecfdf5;box-shadow:0 0 0 2px #a7f3d044}.product-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:11px;background:#f1f5f9;color:#059669}.product-info{flex:1;min-width:0}.product-info strong{display:block;overflow-wrap:anywhere;font-size:13px}.product-price{text-align:right;white-space:nowrap}.product-price strong{display:block;color:#047857}.product-price small{font-size:11px}.material-entry{margin-top:24px;padding-top:4px;border-top:1px solid #e2e8f0}.material-entry h3{margin-top:18px}@media(min-width:600px){.material-categories{grid-template-columns:repeat(4,minmax(0,1fr))}.material-products{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:1100px){.material-categories{grid-template-columns:repeat(6,minmax(0,1fr))}.material-products{grid-template-columns:repeat(3,minmax(0,1fr))}}.purchase-calculator{margin-top:24px;padding:20px;border:1px solid #d1fae5;border-radius:16px;background:linear-gradient(145deg,#f8fffb,#fff);box-shadow:0 8px 28px #0478570b}.calculator-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.calculator-heading h3{margin:2px 0 0;border:0;padding:0;font-size:20px;color:#0f172a}.calculator-heading small{color:#047857;font-weight:600}.calculator-unit{padding:6px 11px;border-radius:999px;background:#d1fae5;color:#047857;font-size:12px;font-weight:700}.calculator-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.calculator-field{min-width:0}.calculator-field input{font-size:22px;font-weight:600;padding:14px 16px;min-height:58px}.calculation-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;padding:18px;background:#ecfdf5;border-radius:14px}.calculation-summary strong{font-size:28px;color:#047857;white-space:nowrap}.calculation-summary strong small{display:inline;color:inherit;font-size:15px}.calculator-add{min-height:56px;font-size:16px}@media(max-width:600px){.purchase-calculator{padding:16px}.calculator-fields{grid-template-columns:1fr;gap:0}.calculation-summary strong{font-size:25px}}.purchase-layout,.bill-panel{min-width:0}.bill-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.bill-heading h2{margin:0}.bill-heading small{font-size:12px}.bill-toggle{white-space:nowrap}.bill-total{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0;padding:16px;background:#ecfdf5;border-radius:14px}.bill-total strong{color:#047857;font-size:23px;white-space:nowrap}.bill-item{padding:14px 0;border-bottom:1px solid #e2e8f0}.bill-item-main{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.bill-item-main>div{min-width:0}.bill-item-main strong{overflow-wrap:anywhere}.bill-item-main>strong{white-space:nowrap;color:#047857}.bill-item-actions{display:flex;gap:8px;margin-top:10px}.bill-item-actions button{min-height:44px}.bill-edit{padding:14px 0;border-bottom:1px solid #e2e8f0}.bill-edit-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}.bill-edit-fields label{min-width:0}.bill-edit-total{color:#047857;font-weight:700}.bill-edit-actions{display:flex;gap:8px}.bill-edit-actions .primary{width:auto}.bill-save{min-height:56px;margin-top:16px}.bill-details{min-width:0}@media(max-width:767px){.bill-details:not(.expanded){display:none}.bill-panel{margin-bottom:calc(18px + env(safe-area-inset-bottom,0px))}}@media(min-width:1200px){.purchase-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;align-items:start;gap:18px}.bill-panel{position:sticky;top:18px;max-height:calc(100vh - 36px);overflow:auto}}.price-management{min-width:0}.price-management .heading{align-items:flex-start;margin-bottom:20px}.price-management h2{margin:0}.price-management .heading p{margin:4px 0 0}.price-add{white-space:nowrap}.price-filters{display:flex;gap:8px;overflow-x:auto;padding:12px 0 16px;margin-bottom:4px;scrollbar-width:thin}.price-filters button{white-space:nowrap;flex:none;min-height:44px}.price-filters button.selected{background:#059669;border-color:#059669;color:#fff}.price-products{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:10px}.price-product{display:flex;align-items:center;gap:12px;min-width:0;padding:14px;border:1px solid #e2e8f0;border-radius:14px;background:#fff}.price-product-info{flex:1;min-width:0}.price-product-info strong{display:block;overflow-wrap:anywhere}.price-product-value{text-align:right;white-space:nowrap}.price-product-value strong{display:block;color:#047857;font-size:18px}.price-product small{font-size:11px}.price-dialog-backdrop{position:fixed;z-index:50;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:16px;background:#0f172a88}.price-dialog{width:min(100%,480px);max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border-radius:16px;background:#fff;box-shadow:0 20px 60px #0f172a40}.price-dialog form{margin-top:18px}.price-dialog-actions{display:flex;gap:8px}.price-dialog-actions .primary{width:auto;flex:1}.price-error{color:#b91c1c;font-size:13px}.price-delete{width:100%;margin-top:20px}.price-dialog .heading h2{margin:0}@media(min-width:700px){.price-products{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.price-management .heading{flex-wrap:wrap}.price-add{width:100%}.price-product{flex-wrap:wrap}.price-product-info{flex-basis:calc(100% - 110px)}.price-product button{width:100%}.price-dialog-backdrop{padding:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}.price-dialog{max-height:calc(100dvh - 16px - env(safe-area-inset-bottom,0px))}}.daily-dashboard{min-width:0}.daily-header h2{font-size:24px;margin:0}.daily-header p{margin:4px 0 20px}.daily-summary-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:18px}.daily-summary-card{display:flex;flex-direction:column;gap:10px;min-width:0;padding:18px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 8px 30px #0f172a0a}.daily-summary-card span{color:#64748b;font-size:12px}.daily-summary-card strong{color:#047857;font-size:22px;overflow-wrap:anywhere}.daily-sections{display:grid;grid-template-columns:minmax(0,1fr);gap:18px}.daily-panel{min-width:0;margin-bottom:0}.category-breakdown{padding:13px 0;border-bottom:1px solid #e2e8f0}.category-breakdown:last-child{border-bottom:0}.category-breakdown-heading{display:flex;justify-content:space-between;gap:8px}.category-breakdown-heading strong:last-child{white-space:nowrap;color:#047857}.category-breakdown small{margin:4px 0 8px}.category-bar{height:9px;border-radius:999px;background:#e2e8f0;overflow:hidden}.category-bar span{display:block;height:100%;border-radius:999px;background:#059669}.daily-bill{border-bottom:1px solid #e2e8f0}.daily-bill summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:64px;cursor:pointer;list-style:none}.daily-bill summary::-webkit-details-marker{display:none}.daily-bill summary>span{min-width:0}.daily-bill summary>strong{color:#047857;white-space:nowrap}.daily-bill-detail{padding:4px 0 14px}.daily-bill-line{display:flex;align-items:start;justify-content:space-between;gap:10px;padding:9px 0}.daily-bill-line>div{min-width:0}.daily-bill-line strong{overflow-wrap:anywhere}.daily-bill-line>strong{white-space:nowrap}.daily-bill-total{display:flex;justify-content:space-between;gap:8px;padding:12px;background:#ecfdf5;border-radius:12px}.daily-footnote{margin-top:18px}@media(min-width:900px){.daily-summary-cards{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:1200px){.daily-sections{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:400px){.daily-summary-card{padding:14px}.daily-summary-card strong{font-size:19px}}:root{line-height:1.5}button,input,select{line-height:1.4}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #059669;outline-offset:2px}button:disabled{box-shadow:none;transform:none}.material-category,.material-product,.price-product,.daily-summary-card{border-radius:16px}.material-category strong,.product-info strong,.price-product-info strong,.bill-item-main strong,.daily-bill-line strong{line-height:1.4;word-break:normal;overflow-wrap:anywhere}.bill-total,.calculation-summary,.daily-summary-card strong,.category-breakdown-heading strong,.daily-bill summary>strong{font-variant-numeric:tabular-nums}.bill-total strong,.calculation-summary strong,.daily-bill summary>strong{white-space:normal;text-align:right;overflow-wrap:anywhere}.purchase-calculator{scroll-margin-top:16px}.price-dialog-backdrop{top:var(--visual-viewport-top,0px);bottom:auto;height:var(--visual-viewport-height,100dvh)}.price-dialog{max-height:calc(var(--visual-viewport-height,100dvh) - 32px)}.price-dialog input,.price-dialog select{font-size:16px}.price-dialog-actions button{min-height:48px}@media(max-width:520px){.price-dialog{max-height:calc(var(--visual-viewport-height,100dvh) - 16px - env(safe-area-inset-bottom,0px))}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}.primary:disabled{background:#e2e8f0;border-color:#e2e8f0;color:#475569;opacity:1}.notice.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}.notice.error button{color:#991b1b}
