:root{font-family:Arial,'Noto Sans Thai',sans-serif;color:#1d2939;background:#f2f5f8}*{box-sizing:border-box}body{margin:0}header{background:linear-gradient(110deg,#172630,#384a56);color:white;padding:20px 26px;display:flex;justify-content:space-between;align-items:center;gap:10px}header h1{font-size:21px;margin:0}header small{opacity:.8}header span{font-size:12px;opacity:.9;text-align:right}.wrap{max-width:1550px;margin:auto;padding:18px}nav{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}button,select,input,textarea{font:inherit}button{border:1px solid #ccd4dd;background:white;border-radius:8px;padding:10px 13px;cursor:pointer}button:hover{filter:brightness(.96)}button:disabled{opacity:.55;cursor:not-allowed}button.primary{background:#172b38;color:white;border-color:#172b38}button.red{background:#d92d20;color:white;border:0}button.secondary{background:#eef1f5}.link{border:0;color:#14618e;background:transparent;text-decoration:underline}nav button.active{background:#172b38;color:white}.logout{margin-left:auto}.card{background:white;border:1px solid #dfe5ec;border-radius:12px;padding:17px;margin-bottom:13px;box-shadow:0 2px 9px #1d293910}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat{font-size:30px;font-weight:bold;margin:6px 0}.muted{color:#697586;font-size:13px}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.row>label,#loginForm label,#recoveryView label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:bold}input,select,textarea{border:1px solid #cbd5e1;border-radius:7px;padding:9px;background:white}input[type=date],select{min-width:140px}textarea{width:100%;min-height:65px}.hidden{display:none!important}.scroll{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}th{background:#293943;color:white}td,th{padding:9px;border:1px solid #d4dbe3;text-align:left;vertical-align:top}tbody tr:nth-child(even){background:#f7f9fb}.pill{padding:5px 9px;border-radius:30px;background:#e9f3ef;color:#147c56;font-size:12px}.warn{background:#fff6df;color:#936300}.danger{color:#c92121}.ok{color:#079455}.check-item{border-bottom:1px solid #e5e7eb;padding:13px 4px}.check-item:last-child{border:0}.check-item p{margin:5px 0}.choices{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}.choices label{padding:8px 12px;border:1px solid #dbe1e8;border-radius:7px;cursor:pointer}.choices label:has(input:checked){background:#e8f2fa;border-color:#3171a7}.donut{width:200px;height:200px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#15946e 0 0%,#eab54e 0 100%);margin:10px auto}.donut div{border-radius:50%;width:140px;height:140px;background:white;display:grid;place-items:center;font-size:29px;font-weight:bold}.columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.badge{font-size:12px;background:#edf2f7;border-radius:5px;padding:4px 7px}.review{background:#f1edff;color:#5f41a6}.message{padding:13px;border-radius:7px;background:#fff5dc;margin-bottom:14px}.message.success{background:#e3f5ee;color:#116543}.message.error{background:#fff0ef;color:#aa2424}.center{text-align:center}.machine-info{margin:15px 0}.statuslegend{margin-bottom:12px}.actionbar{margin-top:14px}.blocklabel{display:block;font-weight:bold;margin-top:15px}.blocklabel textarea{display:block;margin-top:5px}.error-text{color:#aa2424}.search{min-width:270px}.check-item input[type=number]{min-width:160px;max-width:230px}.check-item .remark{width:100%;margin-top:7px}.item-header{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.item-num{background:#e9eef3;padding:5px 8px;border-radius:6px;font-weight:700}.due-note{font-weight:600;color:#956006}.auto-status{display:inline-block;margin:8px 0;font-weight:bold}.section-heading{background:#ecf0f5;padding:10px;border-left:4px solid #34495e;margin-top:14px;font-weight:700}#loginForm{max-width:440px}#loginForm label,#recoveryView label{margin-bottom:12px}#loginForm input{width:100%}#recoveryView{max-width:650px}.approval-detail{border:1px solid #e3e7ec;padding:12px;margin:10px 0;border-radius:8px}footer{padding:16px;text-align:center;color:#667085;font-size:12px}@media(max-width:750px){.grid{grid-template-columns:repeat(2,1fr)}.columns{grid-template-columns:1fr}header{display:block}header span{display:block;text-align:left;margin-top:6px}th,td{padding:6px}.wrap{padding:10px}.card{padding:13px}.choices{gap:5px}.choices label{padding:7px 8px}.logout{margin-left:0}}

/* Dashboard extension: machine-by-machine check completion; all existing cards unchanged */
.machine-status-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.machine-status-top h3{margin:2px 0 7px}
.machine-status-top p{margin:0 0 12px}
.machine-status-controls{display:flex;gap:9px;flex-wrap:wrap}
.machine-status-search-label{display:flex;flex-direction:column;gap:5px;font-weight:600;font-size:12px;color:#46566a}
.machine-status-controls input{min-width:190px}
.machine-status-controls select{min-width:125px}
.machine-status-table{margin-top:12px}
.machine-status-table th{white-space:nowrap}
.machine-status-table td:last-child,.machine-status-table td:nth-last-child(2){white-space:nowrap}
.machine-check-badge{display:inline-block;border-radius:99px;padding:5px 9px;font-size:12px;font-weight:700;white-space:nowrap}
.machine-check-badge.checked{background:#e3f5ee;color:#116543}
.machine-check-badge.pending{background:#fff3d6;color:#915f06}
.machine-empty{padding:12px}
@media(max-width:750px){.machine-status-controls,.machine-status-search-label{width:100%}.machine-status-controls input,.machine-status-controls select{width:100%}.machine-status-table{min-width:540px}}

/* V6.3: Numeric standards require measured values, no OK/NG buttons when auto-evaluable. */
.numeric-badge{background:#e6f1ff;color:#135b9e;font-weight:700}.numeric-label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#183a57;margin-top:10px;max-width:320px}.numeric-label input{width:100%;font-size:18px;border:2px solid #8aa9c8}.numeric-label input:focus{outline:2px solid #397fc0;outline-offset:1px}.auto-status.ok{background:#e9f8f0;color:#127a46;padding:6px 10px;border-radius:6px}.auto-status.danger{background:#fff1f0;color:#b42318;padding:6px 10px;border-radius:6px}

/* Daily Check V7 — photo-assisted check UI; Dashboard is unchanged */
.machine-summary{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid #dce6ef;background:#f7fafc;border-radius:12px}.machine-summary h3{margin:0 0 8px}.machine-avatar{background:#e4ebf4;border-radius:12px;font-size:32px;padding:14px}.check-item{padding:16px 12px;margin:12px 0;border:1px solid #dce4ec;border-radius:12px;background:#fff}.check-item:has(.auto-status.danger){background:#fff7f7;border-color:#f2bdbd}.inspection-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(245px,330px);gap:20px;margin-top:8px}.inspection-main p{margin:9px 0}.photo-column{display:grid;gap:9px}.ref-photo,.issue-photo{border:1px solid #dce6ef;border-radius:10px;padding:10px;background:#f7f9fc}.photo-title{font-weight:700;font-size:13px;margin-bottom:6px}.photo-column .muted{line-height:1.4}.photo-button,.file-button{display:inline-flex;align-items:center;background:#edf5ff;color:#0c5194;border:1px solid #9ebfe4;border-radius:8px;font-size:12px;font-weight:700;padding:8px 10px;cursor:pointer;max-width:100%;margin-top:5px}.file-button input[type=file]{width:100%;max-width:240px;display:block;margin-top:6px;background:white;font-size:11px}.file-button .hidden-upload{font-size:11px}.photo-previews{display:flex;gap:6px;flex-wrap:wrap;padding:7px 0}.photo-previews img{object-fit:cover;width:74px;height:74px;border-radius:7px;border:1px solid #ccd9e8}.note-label{font-size:13px;font-weight:700;display:block;margin-top:12px}.photo-modal{width:min(850px,95vw);max-height:88vh;border:1px solid #bcd0df;border-radius:14px;box-shadow:0 12px 40px #0004}.photo-modal::backdrop{background:#0e2431b8}.photo-modal-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.photo-modal-body{display:grid;gap:14px;overflow-y:auto}.photo-modal-body img{max-width:100%;max-height:65vh;object-fit:contain;margin:auto;border-radius:8px}.numeric-label{max-width:100%}@media(max-width:800px){.inspection-layout{grid-template-columns:1fr}.photo-column{grid-template-columns:1fr}.machine-summary{align-items:flex-start}.check-item{padding:12px 10px}}

/* V8 — monthly report and monthly approval panels */
.monthly-table{min-width:1500px;font-size:11px}.monthly-table th,.monthly-table td{padding:4px 6px;white-space:nowrap}.monthly-table td:nth-child(2){min-width:220px}.monthly-table td:nth-child(3){min-width:140px}.monthly-table td:nth-child(4){min-width:140px}#reportPreview .scroll{max-height:570px;margin:10px 0 18px}.approval-detail .row>label{display:flex;flex-direction:column;gap:6px}#adminPinPanel .row>label{display:flex;flex-direction:column;gap:6px}#adminPinPanel input{min-width:260px}#adminPinPanel select{max-width:450px}
