@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700&display=swap');
:root{--bg:#f5f6f2;--ink:#203b34;--muted:#77827b;--green:#184d40;--line:#e3e8e0;--orange:#bc632e;--soft:#edf3e9;--white:#fff;--red:#b34242;--radius:17px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px 'Noto Sans Thai',Tahoma,sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}a{color:inherit}button{border:0}.shell{display:grid;grid-template-columns:235px minmax(0,1fr);min-height:100vh}.sidebar{background:#153d35;color:#e1eee6;padding:32px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;gap:12px;align-items:center;padding:0 10px 32px}.brandmark{background:#d8e9bd;color:#173c34;width:39px;height:39px;border-radius:12px;display:grid;place-items:center}.brand strong{font-size:23px;letter-spacing:-1px;line-height:1.2}.brand small{font-size:10px;display:block;color:#9cb7a9;letter-spacing:2px;margin-top:5px}.nav-label{color:#8ca99b;letter-spacing:1px;font-size:10px;margin:22px 14px 8px}.nav-btn{background:transparent;color:#becfc5;display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border-radius:10px;text-align:left;margin:3px 0;font-size:13px}.nav-btn:hover{background:#214b40;color:white}.nav-btn.active{background:#dcebc9;color:#193d31;font-weight:600}.nav-btn svg,.ico svg{width:20px;height:20px;flex-shrink:0}.sidebar-footer{margin-top:auto;padding:25px 13px 0;color:#96b0a1;font-size:11px}.sidebar-footer b{color:#e6efe6;display:block;margin-bottom:5px}.main{min-width:0}.topbar{height:84px;display:flex;align-items:center;justify-content:space-between;padding:0 42px;background:rgba(255,255,255,.75);border-bottom:1px solid var(--line);gap:16px}.breadcrumb{color:var(--muted);font-size:12px}.breadcrumb b{color:var(--ink);font-weight:500}.user-switch{display:flex;align-items:center;gap:10px}.user-switch select{max-width:215px;padding:8px 28px 8px 10px;background:transparent;border:1px solid var(--line);border-radius:8px;font-size:12px}.avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#e2e9dd;color:var(--green);font-weight:600}.content{max-width:1450px;margin:auto;padding:28px 42px 40px}.prototype{display:flex;gap:10px;align-items:center;background:#f0eee4;border:1px solid #e8e3d1;color:#756d4e;padding:10px 15px;border-radius:9px;font-size:11px;margin-bottom:28px}.prototype strong{white-space:nowrap}.heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.eyebrow{color:var(--muted);font-size:10px;letter-spacing:1.7px;text-transform:uppercase;margin-bottom:8px}h1{font-size:28px;letter-spacing:-.7px;margin:0 0 5px;font-weight:600}h2{font-size:17px;margin:0;font-weight:600}h3{font-size:14px;margin:0 0 6px}p{line-height:1.75}.sub{color:var(--muted);font-size:12px;margin:0}.btn{padding:11px 17px;border-radius:9px;font-size:12px;font-weight:500;display:inline-flex;gap:8px;align-items:center;justify-content:center;white-space:nowrap;background:#fff;color:var(--ink);border:1px solid var(--line);text-decoration:none}.btn.primary{background:var(--green);color:white;border-color:var(--green)}.btn.primary:hover{background:#23614f}.btn.soft{background:var(--soft);border-color:transparent}.btn.danger{color:var(--red)}.btn.small{padding:7px 11px;font-size:11px}.btn svg{width:16px;height:16px}.hero{display:grid;grid-template-columns:1fr 255px;position:relative;overflow:hidden;background:#e7eddf;border:1px solid #dce4d2;border-radius:var(--radius);padding:28px 30px;margin-bottom:25px;min-height:176px}.hero h2{font-size:24px;margin:5px 0 7px;max-width:600px}.hero p{color:#60735f;max-width:540px;font-size:12px;margin:0 0 17px}.hero-art{position:relative;display:flex;align-items:center;justify-content:center}.hero-art svg{width:210px;height:150px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:28px}.stat{background:white;border:1px solid var(--line);padding:19px 20px;border-radius:14px;position:relative}.stat .stat-label{font-size:11px;color:var(--muted);margin-bottom:13px}.stat-value{font-size:30px;line-height:1.2;letter-spacing:-1px;font-weight:600}.stat-value small{font-size:11px;font-weight:400;letter-spacing:0;color:var(--muted);margin-left:5px}.stat .foot{font-size:10px;margin-top:12px;color:var(--muted)}.stat .ico{position:absolute;right:17px;top:17px;color:#738870}.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:4px 0 16px}.section-head .sub{margin-top:4px}.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:29px}.quick{background:#fff;border:1px solid var(--line);padding:21px;text-align:left;border-radius:13px;color:var(--ink);transition:transform .15s,border-color .15s}.quick:hover{transform:translateY(-3px);border-color:#9daf97}.quick .ico{width:40px;height:40px;background:#eef3e9;color:#48613e;display:grid;place-items:center;border-radius:11px;margin-bottom:18px}.quick:nth-child(2) .ico{background:#faf0df;color:#b87729}.quick:nth-child(3) .ico{background:#eaf0f5;color:#5e7b8d}.quick:nth-child(4) .ico{background:#f2ecf5;color:#8b6598}.quick strong{display:block;font-size:13px;margin-bottom:5px}.quick span.text{font-size:11px;color:var(--muted);line-height:1.7}.split{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(270px,1fr);gap:22px}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:23px;min-width:0;margin-bottom:20px}.panel.flush{padding:0;overflow:hidden}.panel-head{padding:20px 23px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.activity{display:flex;gap:12px;padding:17px 0;border-bottom:1px solid #eef0ec;align-items:flex-start}.activity:last-child{border-bottom:0}.activity .ico{background:#f1f4eb;color:#718168;padding:9px;border-radius:10px;display:flex}.activity-body{flex:1;min-width:0}.activity strong{font-size:12px;display:block}.activity p{margin:3px 0 0;font-size:11px;color:var(--muted);overflow-wrap:anywhere}.activity time{font-size:10px;color:var(--muted)}.pill{border-radius:6px;padding:4px 8px;font-size:10px;display:inline-flex;align-items:center;white-space:nowrap;background:#f1f2ef;color:#6d7971}.pill.green{background:#e8f3e6;color:#41713d}.pill.amber{background:#fff1dc;color:#a67530}.pill.red{background:#faeaea;color:#a54b4b}.pill.blue{background:#eaf0f7;color:#4b728a}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.toolbar input,.toolbar select{max-width:100%;border:1px solid var(--line);border-radius:9px;padding:10px 12px;background:#fff;color:var(--ink);min-width:150px}.toolbar .search{flex:1;min-width:200px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px;text-align:left}th{background:#f8f9f5;color:#818a7f;font-size:10px;letter-spacing:.3px;font-weight:500;padding:12px 17px;white-space:nowrap}td{padding:15px 17px;border-bottom:1px solid #edf0e9;vertical-align:top}tr:last-child td{border-bottom:0}td strong{font-size:12px;font-weight:500}td small{display:block;color:var(--muted);font-size:10px;margin-top:4px}td .sku{font-family:ui-monospace,monospace;color:#6f806b;font-size:11px}.empty{padding:38px 20px;text-align:center;color:var(--muted)}.empty svg{width:34px;height:34px;margin-bottom:8px}.empty b{display:block;color:#607262;margin:4px 0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.field{display:flex;flex-direction:column;gap:7px}.field.wide,.wide{grid-column:1/-1}.field label{font-size:12px;font-weight:500}.field input,.field select,.field textarea{width:100%;border:1px solid #dce3d8;border-radius:8px;padding:11px 12px;color:var(--ink);background:#fff;min-height:43px}.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid #a4ba94;border-color:transparent}.field small{font-size:10px;color:var(--muted)}.field textarea{min-height:86px;resize:vertical}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:23px}.notice{padding:12px 15px;border-radius:9px;background:#f1f5ec;color:#65765b;font-size:12px;line-height:1.8;margin:15px 0}.notice.error{background:#fff0ee;color:#a44740}.notice.amber{background:#fcf4e7;color:#947342}.tabs{display:flex;gap:6px;background:#e9ede5;padding:5px;border-radius:10px;width:max-content;max-width:100%;margin-bottom:20px;overflow-x:auto}.tabs button{background:none;padding:9px 17px;border-radius:7px;color:#6d7d67;white-space:nowrap;font-size:12px}.tabs button.active{background:#fff;box-shadow:0 2px 5px #213c3110;color:var(--ink)}.balance-card{background:#1b4b3d;color:#eef5e9;padding:26px;border-radius:14px;margin-bottom:20px}.balance-card .sub{color:#abc2ae}.balance-card strong{font-size:47px;font-weight:500;line-height:1.5}.balance-card small{font-size:13px;margin-left:10px;color:#b8cdb9}.balance-details{border-top:1px solid #ffffff22;padding-top:12px;margin-top:7px;display:flex;justify-content:space-between;font-size:11px;color:#c6d8c5}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:0;border-left:1px solid var(--line);border-top:1px solid var(--line)}.day{min-height:100px;padding:10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);font-size:12px;background:white}.day.off{background:#f4f6ef}.day.today{box-shadow:inset 0 0 0 2px #68905d}.day.muted{color:#bdc5b8;background:#fafbf8}.weekday{text-align:center;padding:10px;color:var(--muted);font-size:11px}.day .event{font-size:9px;background:#e8f0de;color:#4a663c;border-radius:4px;padding:4px;margin-top:5px}.day .event.holiday{background:#fbf0de;color:#98733c}.month-plan{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-top:15px}.month-plan .field input{text-align:center;padding:7px}.month-plan label{font-size:10px;color:var(--muted);text-align:center}.upload{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;border:1.5px dashed #b6c6aa;padding:30px;background:#f7f9f3;border-radius:12px;text-align:center;cursor:pointer}.upload svg{width:30px;height:30px;color:#6b845d}.upload input{max-width:100%;font-size:12px}.pager{padding:15px 20px;display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.summary-row{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:13px 0;font-size:12px}.summary-row:last-child{border:0}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.line-item{display:grid;grid-template-columns:1.4fr 1.7fr .7fr .7fr auto;gap:8px;margin-top:10px;align-items:end}.line-item input{width:100%;padding:10px;border:1px solid var(--line);border-radius:7px}.line-item label{font-size:10px;color:var(--muted);display:block;margin-bottom:5px}.audit{font-size:11px;color:var(--muted);border-top:1px solid var(--line);padding:12px 0}.attachment{max-width:100%;max-height:240px;border-radius:8px;margin-top:10px}dialog{border:0;border-radius:18px;padding:28px;width:min(720px,calc(100vw - 28px));max-height:90vh;box-shadow:0 25px 100px #0c2d3033;color:var(--ink)}dialog::backdrop{background:#102e2ab0;backdrop-filter:blur(3px)}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:23px}.close{background:#eef1eb;width:30px;height:30px;border-radius:50%;font-size:20px;color:#617159}.modal-head h2{font-size:21px}.modal-head p{margin:6px 0 0}.mobile-menu{display:none}#toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,20px);background:#173f34;color:white;box-shadow:0 8px 30px #173f3430;border-radius:10px;padding:13px 23px;font-size:13px;z-index:100;opacity:0;pointer-events:none;transition:.2s;max-width:90vw}#toast.show{opacity:1;transform:translate(-50%,0)}.footer-note{color:#87907f;font-size:10px;margin-top:20px;text-align:center}.mini-progress{height:5px;border-radius:5px;background:#e8eddf;margin:10px 0;overflow:hidden}.mini-progress span{display:block;background:#829e64;height:100%;border-radius:5px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.checkrow{display:flex;align-items:center;gap:8px;font-size:12px;margin:10px 0}.checkrow input{accent-color:#24523e}.text-link{color:#66804e;background:none;font-size:11px;padding:5px}.cell-truncate{max-width:310px;overflow-wrap:anywhere}.section-divider{height:1px;background:var(--line);margin:23px 0}.card-tag{display:inline-block;color:#6a805c;background:#ecf2e5;padding:4px 9px;font-size:10px;border-radius:5px}.role-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.badge-count{margin-left:auto;background:#f2d7aa;color:#6a4a27;padding:1px 6px;border-radius:5px;font-size:10px}.menu-backdrop{display:none}
.sidebar{overflow-y:auto}.mobile-menu{flex-shrink:0}.mobile-menu svg{width:24px;height:24px}.brandmark svg{width:27px;height:27px}
@media(max-width:720px){.heading{flex-wrap:wrap}.heading>.row-actions{width:100%}.mobile-menu{min-width:36px;min-height:40px;align-items:center;justify-content:center}.user-switch{gap:6px}.topbar{gap:8px}}
@media(min-width:1600px){.content{padding-top:38px}.hero{min-height:195px}.quick{padding:25px}}
@media(max-width:1100px){.shell{grid-template-columns:205px minmax(0,1fr)}.sidebar{padding:28px 13px}.content{padding:25px}.topbar{padding:0 25px}.quick-grid{grid-template-columns:repeat(2,1fr)}.hero{grid-template-columns:1fr 180px}.hero-art svg{width:170px}.split{grid-template-columns:1fr}.stats{gap:10px}.stat{padding:17px 14px}.stat .ico{display:none}.settings-grid{grid-template-columns:1fr}}
@media(max-width:720px){.shell{display:block}.sidebar{position:fixed;left:-270px;top:0;width:240px;z-index:50;transition:left .2s}.shell.menu-open .sidebar{left:0}.shell.menu-open .menu-backdrop{display:block;position:fixed;inset:0;background:#12352c80;z-index:49}.mobile-menu{display:flex;background:none;color:var(--ink);padding:5px}.topbar{height:67px;padding:0 16px;position:sticky;top:0;z-index:20;background:#fffffff2}.breadcrumb{display:none}.user-switch{margin-left:auto}.user-switch select{font-size:11px;max-width:215px}.content{padding:20px 16px 35px}.prototype{font-size:10px;margin-bottom:23px;align-items:flex-start}.heading{align-items:flex-start;gap:10px}h1{font-size:24px}.heading .btn{padding:9px 12px}.hero{padding:24px 20px;grid-template-columns:1fr;min-height:0}.hero h2{font-size:21px}.hero-art{display:none}.stats{grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:25px}.stat{padding:16px}.stat-value{font-size:28px}.quick-grid{gap:10px}.quick{padding:17px}.quick .ico{margin-bottom:12px}.quick strong{font-size:12px}.quick span.text{font-size:10px}.panel{padding:19px}.panel.flush{padding:0}.form-grid{gap:14px}.form-grid .field{grid-column:1/-1}.form-grid .field.half{grid-column:auto}.month-plan{grid-template-columns:repeat(4,1fr)}.month-plan .field{grid-column:auto}.day{min-height:77px;padding:5px}.day .event{font-size:8px;overflow-wrap:anywhere}.line-item{grid-template-columns:1fr 1fr}.line-item>div:nth-child(2){grid-column:auto}.line-item .btn{grid-column:1/-1}.calendar-panel{padding:10px}.toolbar input,.toolbar select{min-width:120px;flex:1}.toolbar .search{min-width:100%;}.avatar{display:none}.hero .btn{font-size:11px}.role-grid{grid-template-columns:1fr}.form-actions{flex-wrap:wrap}.tabs{width:100%}dialog{padding:21px}.cell-truncate{min-width:180px}}

.brand strong{font-size:18px;letter-spacing:.1px}.brand small{letter-spacing:2px;font-size:9px}.brand{gap:9px;padding-left:5px;padding-right:5px}.brandmark{flex-shrink:0}

.login-shell{min-height:100vh;display:grid;place-items:center;padding:22px;background:radial-gradient(ellipse at 20% 20%,#dce8d2,transparent 60%),#f4f6ee}.login-card{max-width:440px;width:100%;background:#fff;padding:34px;border:1px solid var(--line);border-radius:20px;box-shadow:0 20px 60px #254f3010}.login-card h1{margin:12px 0}.login-card form{margin:25px 0 20px;display:grid;gap:17px}.login-footer{font-size:10px;text-align:center;color:var(--muted);margin-top:30px}.prototype .btn{margin-left:auto}.login-card .btn{width:100%}
.product-search{grid-column:1/-1}.product-results{max-height:240px;overflow:auto;border:1px solid var(--line);border-radius:8px}.product-results button{display:flex;flex-direction:column;text-align:left;gap:4px;width:100%;padding:12px;background:white;color:var(--ink);border-bottom:1px solid var(--line)}.product-results button:hover,.product-results button:focus{background:var(--soft)}.product-results small{display:block;padding:12px}.quantity-control{display:flex;align-items:stretch;min-width:0}.quantity-control input{min-width:0;flex:1;border-radius:8px 0 0 8px!important}.quantity-control button{flex:0 0 40px;border:1px solid var(--line);background:var(--soft);color:var(--green);font-size:22px;min-height:43px}.quantity-control button:last-child{border-radius:0 8px 8px 0}.quantity-control button:focus-visible{outline:2px solid var(--green)}
.attendance-calendar{display:grid;grid-template-columns:repeat(7,minmax(100px,1fr));gap:8px;overflow:auto}.attendance-day{min-height:115px;text-align:left;border:1px solid var(--line);border-radius:9px;background:white;padding:9px;color:var(--ink)}.attendance-day.selected{outline:2px solid var(--green)}.attendance-chip{display:block;margin-top:6px;padding:5px;border-radius:5px;font-size:10px;background:#edf3e8}.attendance-chip small{display:block}.attendance-chip.unchecked,.attendance-chip.review{background:#fff4da}.attendance-chip.absent,.attendance-chip.conflict{background:#ffe5e2}.attendance-chip.leave{background:#e9eafb}.attendance-chip.off{background:#eee}.attendance-chip.holidayWork{background:#dcefed}#attendance-form input,#attendance-form select{padding:9px;border:1px solid var(--line);border-radius:7px;max-width:220px}
.calendar-weekday{text-align:center;font-weight:600;padding:8px;color:var(--green)}.calendar-empty{min-height:1px}.attendance-chip.notScheduled{background:#eee}.quantity-control button:disabled{opacity:.4;cursor:not-allowed}.quantity-control input[readonly]{background:#f2f3ef}
