
:root{--red:#ed0018;--red2:#ff2a3d;--deep:#a30b17;--soft:#fff0f1;--bg:#faf9f9;--ink:#1d1b1c;--muted:#777276;--line:#eee7e8;--shadow:0 12px 28px rgba(77,31,34,.08)}
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI","Noto Sans Thai",Tahoma,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh}.app-header{position:sticky;top:0;z-index:50;background:linear-gradient(135deg,#ef0019,#f40b20);color:white;height:112px;padding:18px max(28px,calc((100vw - 1040px)/2));display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:18px;cursor:pointer}.brand-logo{width:76px;height:76px;border-radius:21px;object-fit:cover;box-shadow:0 5px 16px rgba(70,0,0,.18)}.brand-text{font-weight:900;font-size:38px;letter-spacing:-1px}.header-tools{display:flex;align-items:center;gap:22px}.search-btn{font-size:42px;background:transparent;border:0;color:white;line-height:1}.profile-btn{position:relative;border:3px solid white;background:white;padding:0;width:68px;height:68px;border-radius:50%;overflow:visible}.profile-btn img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}.profile-camera{position:absolute;right:-4px;bottom:-4px;width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:white;border:2px solid var(--red);font-size:12px;box-shadow:0 2px 6px rgba(0,0,0,.16)}.content{max-width:1040px;margin:auto;padding:0 24px 120px}.page{display:none}.page.active{display:block}.summary-card{margin-top:0;transform:translateY(-1px);background:white;border-radius:0 0 28px 28px;padding:28px 30px;display:grid;grid-template-columns:170px 1fr 230px;gap:22px;align-items:center;box-shadow:var(--shadow)}.progress-ring{--p:0;width:146px;height:146px;border-radius:50%;background:conic-gradient(var(--red) calc(var(--p)*1%),#f0e7e8 0);display:grid;place-items:center}.progress-ring:before{content:"";position:absolute}.progress-ring>div{width:120px;height:120px;border-radius:50%;background:white;display:grid;place-items:center;align-content:center}.progress-ring b{font-size:37px;color:var(--red);line-height:1}.progress-ring span{font-size:17px;font-weight:800;margin-top:8px}.summary-main h1{font-size:35px;margin:0}.summary-main h1 strong{font-size:50px;color:var(--red)}.summary-main p{margin:2px 0 12px;font-size:20px;color:#565055}.summary-stats{display:flex;gap:20px;flex-wrap:wrap;font-size:16px}.s-done{color:#df0b1b}.s-doing{color:#cc8b00}.s-wait{color:#8d898b}.alert-state{border:0;background:var(--soft);border-radius:22px;padding:17px 14px;color:var(--red);display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px 8px;text-align:left}.alert-state>span{font-size:30px}.alert-state b{font-size:18px}.alert-state small{grid-column:1/-1;color:#6c6669;text-align:center;font-size:13px;line-height:1.4}.home-section{margin-top:28px}.section-head{display:flex;align-items:center;justify-content:space-between;margin:0 6px 14px}.section-head h2{font-size:29px;color:#c10e1a;margin:0;font-weight:900}.section-head button{border:0;background:transparent;color:var(--red);font-size:19px}.section-icon{display:inline-grid;place-items:center;background:var(--red);color:white;border-radius:50%;width:47px;height:47px;font-size:24px}.section-icon.bell{font-size:0}.section-icon.bell:after{content:"🔔";font-size:22px}.section-icon.robot{font-size:0}.section-icon.robot:after{content:"🤖";font-size:22px}.card-row{display:grid;gap:12px}.card-row.four{grid-template-columns:repeat(4,1fr)}.card-row.three{grid-template-columns:repeat(3,1fr)}.big-card{position:relative;border:1px solid #efe8e9;background:white;border-radius:24px;min-height:325px;padding:15px 12px 18px;box-shadow:0 5px 15px rgba(85,50,50,.05);display:flex;flex-direction:column;align-items:center;color:var(--ink)}.big-card img{width:100%;height:190px;object-fit:contain;object-position:center center;mix-blend-mode:multiply;padding-top:8px}.big-card h3{font-size:23px;margin:4px 0 5px;line-height:1.25}.big-card>span{font-size:14px;color:var(--red);background:var(--soft);border-radius:999px;padding:5px 10px}.big-card i{font-style:normal;margin-top:auto;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:white;border:1px solid #f0e5e6;color:var(--red);font-size:28px;box-shadow:0 3px 8px rgba(50,0,0,.06)}.today-list-head{display:flex;justify-content:space-between;align-items:center;margin:14px 4px 8px}.today-list-head button{border:0;background:var(--red);color:white;border-radius:12px;padding:8px 12px;font-weight:800}.simple-list,.task-list{display:grid;gap:9px}.empty{padding:24px;border:1px dashed #dfd6d7;border-radius:18px;text-align:center;color:var(--muted);background:white}.task-item{display:grid;grid-template-columns:auto 1fr auto;gap:11px;align-items:start;background:white;border:1px solid var(--line);border-radius:18px;padding:13px 14px;box-shadow:0 4px 13px rgba(0,0,0,.025)}.check{width:34px;height:34px;border-radius:50%;border:2px solid #e6c9cc;background:white}.task-title{font-weight:850;font-size:16px}.task-meta{font-size:12px;color:var(--muted);margin-top:5px;line-height:1.55}.badge{display:inline-block;background:#f4f1f2;border-radius:999px;padding:3px 7px;margin:0 3px 3px 0}.badge.red{background:#ffe5e7;color:#a50c17}.badge.gold{background:#fff0d6;color:#875400}.badge.green{background:#e6f6ea;color:#28713b}.task-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.mini{border:1px solid var(--line);background:white;border-radius:9px;padding:6px 7px;font-size:11px}.inner-head{display:flex;align-items:center;justify-content:space-between;padding:28px 4px 16px}.inner-head-left{display:flex;align-items:flex-start;gap:12px}.back-btn{border:1px solid #e6dfe0;background:white;color:var(--red);border-radius:12px;padding:8px 12px;font-weight:800;line-height:1;box-shadow:0 4px 10px rgba(0,0,0,.04)}.inner-head h1{font-size:34px;margin:0}.inner-head p{color:var(--muted);margin:4px 0}.red-btn,.ghost-btn{border:0;border-radius:13px;padding:10px 14px;font-weight:850}.red-btn{background:var(--red);color:white}.ghost-btn{background:white;border:1px solid #dfd9da;color:#333}.search-area{display:grid;grid-template-columns:1fr 200px;gap:10px;margin-bottom:13px}.search-area input,.search-area select,.setting-box input,.setting-box select,.form-grid input,.form-grid select,.form-grid textarea{border:1px solid #ded7d8;border-radius:13px;padding:11px 12px;background:white;outline:none}.setting-box{display:grid;grid-template-columns:1fr auto 145px;gap:14px;align-items:center;background:white;border:1px solid var(--line);border-radius:20px;padding:16px;margin-bottom:11px;box-shadow:var(--shadow)}.setting-box p{margin:4px 0 0;color:var(--muted);font-size:13px}.switch input{display:none}.switch span{display:block;width:52px;height:29px;background:#ddd;border-radius:999px;position:relative}.switch span:after{content:"";position:absolute;top:3px;left:3px;width:23px;height:23px;background:white;border-radius:50%;box-shadow:0 2px 5px #aaa;transition:.2s}.switch input:checked+span{background:var(--red)}.switch input:checked+span:after{transform:translateX(23px)}.note-box{background:#fff8df;border:1px solid #f2dda0;color:#69551f;border-radius:15px;padding:13px 15px;font-size:13px}.reminder-title{display:flex;justify-content:space-between;align-items:center;margin:24px 3px 10px}.reminder-title h2{margin:0;color:#af111b}.reminder-title button{border:0;background:transparent;color:var(--red)}.plan-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.plan-card{border:1px solid var(--line);border-radius:20px;background:white;padding:18px 12px;box-shadow:var(--shadow);min-height:145px}.plan-card span{font-size:38px;display:block}.plan-card b{font-size:17px;display:block;margin:7px 0}.plan-card small{color:var(--muted)}.panel{margin-top:16px}.panel-box{background:white;border:1px solid var(--line);border-radius:20px;padding:16px;box-shadow:var(--shadow)}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.panel-head h2{margin:0}.category-row,.customer-row,.trash-row{display:grid;grid-template-columns:auto 1fr auto auto auto;gap:8px;align-items:center;border-bottom:1px solid var(--line);padding:9px 0}.cat-btn{border:1px solid var(--line);background:white;border-radius:9px;padding:6px 8px}.bottom-nav{position:fixed;z-index:70;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,1040px);display:grid;grid-template-columns:repeat(4,1fr);background:rgba(255,255,255,.97);backdrop-filter:blur(14px);border:1px solid #eee6e7;border-bottom:0;border-radius:27px 27px 0 0;padding:8px 10px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -10px 30px rgba(40,20,20,.08)}.bottom-nav button{border:0;background:transparent;color:#8e898b;border-radius:18px;padding:7px}.bottom-nav button b{display:block;font-size:12px;margin-top:3px}.nav-svg{display:block;width:28px;height:28px;margin:0 auto 2px;color:currentColor}.nav-svg svg{width:100%;height:100%;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.bottom-nav button.active{background:var(--soft);color:var(--red)}.fab{position:fixed;z-index:80;right:max(18px,calc((100vw - 1040px)/2 + 18px));bottom:92px;width:58px;height:58px;border:0;border-radius:50%;background:var(--red);color:white;font-size:32px;box-shadow:0 8px 22px rgba(230,0,20,.3)}dialog{border:0;border-radius:22px;padding:0;width:min(94vw,720px);box-shadow:0 30px 90px rgba(0,0,0,.28)}dialog::backdrop{background:rgba(31,22,23,.5);backdrop-filter:blur(3px)}.modal{padding:18px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.modal-head h2{margin:0}.modal-head button{border:0;border-radius:50%;width:34px;height:34px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.form-grid label{font-size:12px;color:var(--muted)}.form-grid label>*{width:100%;display:block;margin-top:5px}.form-grid .wide{grid-column:1/-1}.form-grid textarea{min-height:90px;resize:vertical}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.summary-modal canvas{width:100%;height:auto;border:1px solid var(--line);border-radius:16px}.button-row{display:flex;gap:8px;flex-wrap:wrap}.file-btn input{display:none}#toast{position:fixed;z-index:100;left:50%;bottom:95px;transform:translate(-50%,20px);background:#222;color:white;border-radius:999px;padding:10px 16px;font-size:13px;opacity:0;transition:.2s;pointer-events:none}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:820px){.app-header{height:92px;padding:13px 18px}.brand-logo{width:62px;height:62px}.brand-text{font-size:29px}.profile-btn{width:55px;height:55px}.search-btn{font-size:34px}.content{padding:0 14px 110px}.summary-card{grid-template-columns:120px 1fr;padding:21px 17px;gap:13px;border-radius:0 0 25px 25px}.progress-ring{width:108px;height:108px}.progress-ring>div{width:88px;height:88px}.progress-ring b{font-size:27px}.progress-ring span{font-size:13px}.summary-main h1{font-size:23px}.summary-main h1 strong{font-size:34px}.summary-main p{font-size:15px}.summary-stats{font-size:12px;gap:9px}.alert-state{grid-column:1/-1;width:100%;grid-template-columns:auto auto 1fr;justify-content:center}.alert-state small{grid-column:auto;text-align:left}.section-head h2{font-size:23px}.section-icon{width:39px;height:39px;font-size:19px}.section-head button{font-size:15px}.card-row.four{grid-template-columns:repeat(2,1fr)}.big-card{min-height:275px;padding:10px 8px}.big-card img{height:165px}.big-card h3{font-size:19px}.big-card>span{font-size:12px}.card-row.three .big-card{min-height:260px}.card-row.three .big-card img{height:150px}.plan-grid{grid-template-columns:repeat(2,1fr)}.setting-box{grid-template-columns:1fr auto}.setting-box>input,.setting-box>select,.setting-box>button{grid-column:1/-1}.search-area{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.category-row,.customer-row,.trash-row{grid-template-columns:auto 1fr auto auto}.category-row .last,.customer-row .last,.trash-row .last{grid-column:4}.fab{right:16px}}
@media(max-width:520px){.brand-text{font-size:25px}.brand-logo{width:54px;height:54px}.app-header{height:82px}.profile-btn{width:48px;height:48px}.header-tools{gap:12px}.summary-card{grid-template-columns:92px 1fr}.progress-ring{width:84px;height:84px}.progress-ring>div{width:68px;height:68px}.progress-ring b{font-size:21px}.progress-ring span{font-size:10px}.summary-main h1{font-size:19px}.summary-main h1 strong{font-size:30px}.section-head h2{font-size:20px}.section-head button{font-size:14px}.big-card{min-height:235px}.big-card img{height:135px}.big-card h3{font-size:17px}.card-row.three{grid-template-columns:repeat(3,1fr);gap:8px}.card-row.three .big-card{min-height:210px}.card-row.three .big-card img{height:100px}.card-row.three .big-card h3{font-size:14px}.card-row.three .big-card>span{font-size:9px;padding:4px 5px}.big-card i{width:30px;height:30px;font-size:22px}.task-item{grid-template-columns:auto 1fr}.task-actions{grid-column:2}}

@media(max-width:820px){
  .inner-head-left{align-items:center}
  .back-btn{padding:7px 10px;font-size:14px}
}
@media(max-width:520px){
  .nav-svg{width:24px;height:24px}
  .big-card img{padding-top:4px}
}

@media(max-width:820px){.profile-camera{width:22px;height:22px;font-size:10px}}
@media(max-width:520px){.profile-camera{width:20px;height:20px;font-size:9px;right:-3px;bottom:-3px}}
