*{box-sizing:border-box}body{margin:0;background:#f3f8fe;color:#173657;font-family:CashThai,Tahoma,sans-serif;font-size:15px}header{height:70px;border-bottom:1px solid #d9e6f5;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 5vw}.brand{font-size:17px;letter-spacing:1px;font-weight:bold;text-decoration:none;color:#1d5d9b}.brand span{font-weight:normal;color:#6c839d}main{max-width:1250px;margin:auto;padding:32px 28px}h1{font-size:32px;margin:4px 0}h2{font-size:23px;margin:0}.eyebrow{font-size:12px;letter-spacing:1px;color:#71879f;margin:0}.top,.toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px}.top p{color:#687d95}button,select,input,textarea{font:inherit;border:1px solid #c6d9ed;border-radius:8px;background:white;color:#173657;padding:9px 13px}button{cursor:pointer}button:hover{background:#eaf3ff}button:disabled{opacity:.5;cursor:wait}.primary{background:#2779c8;color:#fff;border-color:#2779c8}.primary:hover{background:#1b62a6}.tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat{background:#fff;border:1px solid #d9e6f5;border-radius:12px;padding:18px}.stat strong{display:block;font-size:26px;margin-top:8px;font-weight:normal}.stat small{color:#687d95}nav{display:flex;gap:4px;border-bottom:1px solid #cedff1;margin-bottom:18px}nav button{background:none;border:0;border-radius:0;padding:13px 18px;color:#647d98}nav .selected{border-bottom:3px solid #2779c8;color:#185b9c;font-weight:bold}.toolbar{margin-bottom:16px;font-size:13px;color:#637c98}.table-wrap{overflow-x:auto;border:1px solid #cedff1;border-radius:10px;background:#fff}table{width:100%;border-collapse:collapse}th{background:#e8f2ff;text-align:left;color:#42658a;font-size:13px}td,th{padding:12px;border-bottom:1px solid #e2ebf6;vertical-align:top}.calendar th:not(:first-child),.calendar td:not(:first-child){border-left:2px solid #b3cce8;width:23%}.calendar th:first-child,.calendar td:first-child{width:8%;text-align:center}.calendar td{height:72px}.day-cell{display:block;text-align:left;border:0;background:none;padding:0;width:100%;border-radius:0}.day-cell .cash{font-size:19px;font-variant-numeric:tabular-nums;color:#1d5c99}.sub{font-size:12px;color:#72869e;display:block;margin-top:4px}.badge{display:inline-block;border-radius:5px;background:#edf3fa;color:#617a95;padding:3px 7px;font-size:12px;margin:3px 3px 0 0}.badge.ok{background:#e4efe3;color:#2e6239}.badge.warn{background:#fff0d3;color:#946016}.badge.bad{background:#f9e3dd;color:#a24b36}.muted{color:#91a2b6}.source{padding:9px 0;font-size:12px;color:#617b98;line-height:1.8}.empty{background:#fff;border:1px dashed #bdd4ed;padding:40px;border-radius:12px;text-align:center;color:#6a839e}.bag{background:#fff;border:1px solid #d5e4f4;border-radius:12px;padding:18px;margin-bottom:12px}.bag-head{display:flex;justify-content:space-between;gap:12px}.bag-head strong{font-size:22px}.bag h3{margin:0 0 5px}.bag .tools{margin-top:12px}.bag .photo{max-width:130px;max-height:160px;border-radius:8px;margin:8px 8px 0 0;object-fit:contain}.legend,footer{font-size:12px;color:#7a8fa8;margin-top:20px}footer{display:flex;justify-content:space-between;border-top:1px solid #d3e2f2;padding-top:14px}#notice:not(:empty){border:1px solid #dec58e;background:#fff4de;color:#73541d;border-radius:8px;padding:12px;margin-top:16px}#notice a{color:inherit}dialog{border:1px solid #c8dcf1;border-radius:14px;width:min(650px,94vw);padding:24px;color:#173657}dialog::backdrop{background:#112b4b88}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.dialog-head button{border:0;font-size:24px;padding:0 10px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}label{display:block;margin:12px 0 5px;font-size:14px}label input[type=checkbox]{margin-right:8px}input:not([type=checkbox]),textarea,select.full{width:100%}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.line{display:grid;grid-template-columns:1fr 1fr 40px;gap:8px;margin-bottom:8px}.line button{padding:5px}.note{font-size:12px;color:#71849c;line-height:1.6}#form-error{color:#b04f36}.total{font-size:24px;text-align:right;margin-top:15px}.permission-row{padding:14px 0;border-bottom:1px solid #d8e6f5}.permission-row label{display:inline-flex;margin:8px 10px 0 0}.print-only{display:none}details{margin-top:12px}summary{cursor:pointer;font-size:13px;color:#66819d}pre{white-space:pre-wrap;font:12px Tahoma;color:#617b97}.login{text-align:center;padding:70px 20px}.preview-switch{font:12px Tahoma;padding:5px}.checked{font-size:11px;color:#3e754a;margin-right:4px}
@media screen and (max-width:760px){
  body{font-size:12px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  header{padding:0 10px;height:42px}.brand{font-size:12px}#identity{font-size:11px}
  main{padding:12px 8px}.top{align-items:flex-start;flex-direction:column;gap:5px}
  h1{font-size:21px;margin:2px 0}h2{font-size:18px}.eyebrow{font-size:9px}
  .top p{margin:4px 0;font-size:11px}
  button,select{padding:6px 8px;border-radius:6px}
  .tools{gap:4px}.tools button,.tools select{font-size:11px;padding:6px 7px}
  .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:12px 0}
  .stat{padding:7px 5px;border-radius:7px;min-width:0}.stat strong{font-size:17px;margin-top:4px;line-height:1.2}
  .stat small{font-size:9px;line-height:1.25;display:block}
  nav{gap:0;margin-bottom:10px}nav button{font-size:11px;padding:9px 6px;white-space:nowrap;flex:1}
  .toolbar{align-items:flex-start;flex-direction:column;gap:6px;margin-bottom:9px;font-size:10px}
  .table-wrap{border-radius:6px;overflow-x:hidden}.calendar{width:100%;min-width:0;table-layout:fixed}
  .calendar th,.calendar td{padding:5px 3px;overflow-wrap:anywhere}
  .calendar th{font-size:11px}.calendar td{height:48px;font-size:11px}
  .calendar th:first-child,.calendar td:first-child{width:8%;padding-left:1px;padding-right:1px}
  .calendar th:not(:first-child),.calendar td:not(:first-child){width:23%;border-left-width:2px}
  .day-cell{min-width:0;line-height:1.2}.day-cell .cash{font-size:13px;font-weight:600;white-space:nowrap}
  .sub{font-size:9px;line-height:1.25;margin-top:2px}.badge{font-size:9px;line-height:1.25;padding:1px 2px;margin:2px 0 0}
  .checked{font-size:9px;margin-right:1px}.source{font-size:9px;line-height:1.5;padding:6px 0}
  .bag{padding:10px;border-radius:8px;margin-bottom:8px}.bag-head{gap:5px}.bag-head strong{font-size:17px}
  .bag h3{font-size:14px}.bag p{margin:6px 0}.bag .tools{margin-top:7px}
  .legend,footer{font-size:9px;margin-top:12px}.note{font-size:10px}
  #notice:not(:empty){padding:8px;margin-top:8px;font-size:11px}
  dialog{padding:14px;width:96vw}.dialog-head{margin-bottom:12px}
  .dialog-actions{margin-top:14px}.grid2{gap:6px}.line{gap:5px;grid-template-columns:1fr 1fr 30px}
  dialog input:not([type=checkbox]),dialog select,dialog textarea{font-size:16px;padding:7px;min-width:0}
  dialog label{font-size:12px}.total{font-size:19px}
}
@media screen and (max-width:380px){.stat strong{font-size:15px}nav button{font-size:10px;padding-left:3px;padding-right:3px}.tools button,.tools select{font-size:10px}.day-cell .cash{font-size:12px}}
@media print{@page{size:A4 portrait;margin:9mm}body{background:#fff;color:#000;font-size:9pt}header,nav,.top .tools,.toolbar,.legend,footer,#notice,dialog,.preview-switch,.no-print{display:none!important}main{padding:0;width:100%;max-width:none}h1{font-size:16pt}.top p{margin:2px 0}.stats{margin:8px 0;gap:4px}.stat{border-radius:0;padding:5px}.stat strong{font-size:13pt;margin:2px 0}.table-wrap{border-radius:0;overflow:visible}.calendar{min-width:0}.calendar td,.calendar th{padding:3px 5px;height:auto;font-size:8pt}.day-cell .cash{font-size:10pt}.sub,.badge{font-size:7pt;margin:1px 0;padding:0;background:none}.calendar td:not(:first-child),.calendar th:not(:first-child){border-left:1.5pt solid #444}.source{font-size:7pt;padding:4px 0}.print-only{display:inline}.bag{break-inside:avoid;padding:7px;border-radius:0}.bag .tools,.bag .photo{display:none}tr{break-inside:avoid}}

.photo{max-width:100%;max-height:420px;object-fit:contain;border-radius:8px;margin:10px 0}

.line-text{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:inherit}#line-rows .line{grid-template-columns:1fr 1fr 75px}
