/* KEMREX CI v1.8.2 recolored */
/* Sale Check List. Scoped under ck-* to keep existing SO100/dispatch screens unchanged. */
.ck-message{display:flex;gap:13px;align-items:center;border:1px solid #c5d5e9;border-left:4px solid #1e4a80;
 border-radius:0;background:#eef2f8;color:#02397c;padding:13px 18px;margin:0 0 20px;font-size:13px;line-height:1.65}
.ck-message>span{font-size:22px;flex-shrink:0}.ck-message strong{font-weight:500}
.ck-form{max-width:1120px}.ck-doc-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 13px}
.ck-doc-meta>span{background:#fff;border:1px solid #e2e4e6;padding:14px 18px;border-radius:0;color:#5e666d;font-size:13px;line-height:1.7}
.ck-doc-meta strong{color:#023574;font-size:12px}
.ck-section{background:white;border:1px solid #e2e4e6;border-radius:0;margin:0 0 16px;padding:24px 26px 26px;box-shadow:0 2px 8px rgba(1,31,68,.025)}
.ck-section-head{display:flex;align-items:flex-start;gap:14px;margin-bottom:21px;padding-bottom:15px;border-bottom:1px solid #e5ecf5}
.ck-section-num{background:#e8eef6;border-radius:10px;color:#02418d;font-size:15px;font-weight:600;min-width:42px;height:42px;display:grid;place-items:center}
.ck-section-head h2{font-size:19px;color:#012d62;margin:0 0 5px;font-weight:500}.ck-section-head p{color:#7b848c;margin:0;line-height:1.5;font-size:12px}
.ck-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px;min-width:0}
.ck-wide{grid-column:1/-1}.ck-field{display:flex;flex-direction:column;gap:7px;color:#023f8a;font-size:13px;font-weight:500;min-width:0}
.ck-field em{color:#c83f4a;font-weight:500}.ck-field input,.ck-field select,.ck-field textarea,
.ck-upload input,.ck-upload select{font:inherit;font-size:14px;color:#012551;background:white;border:1px solid #cbd9ea;border-radius:10px;padding:10px 13px;min-height:42px;width:100%;max-width:100%;box-sizing:border-box}
.ck-field textarea{resize:vertical;line-height:1.55}.ck-field input:focus,.ck-field textarea:focus,.ck-field select:focus{outline:2px solid #1e4a7f;outline-offset:1px}
.ck-ppe{padding:15px;background:#f4f7fb;border:1px dashed #c5d4e7;border-radius:0;display:flex;gap:10px 22px;flex-wrap:wrap}
.ck-ppe h3{flex:0 0 100%;margin:0;font-size:13px;color:#023f8a}
.ck-tick{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:550;color:#023d84}.ck-tick input{accent-color:#1e4a80;width:18px;height:18px}
.ck-item-wrap{margin-bottom:13px}.ck-items{width:100%;min-width:590px;border-collapse:separate;border-spacing:0}
.ck-items thead{background:#f0f4f9}.ck-items th{padding:10px;text-align:left;font-size:12px;color:#626970}
.ck-items td{padding:7px;border-bottom:1px solid #eceeef}
.ck-items input{width:100%;min-width:55px;box-sizing:border-box;padding:8px;border-radius:10px;border:1px solid #ccd9ea;font-size:13px}
.ck-items th:nth-child(1){width:19%}.ck-items th:nth-child(2){width:48%}.ck-items th:nth-child(3){width:14%}.ck-items th:nth-child(4){width:13%}.ck-items th:nth-child(5){width:6%}
.ck-icon-btn{border:0;background:transparent;color:#ad4b58;cursor:pointer;font-size:22px;min-height:35px;min-width:35px}
.ck-after-table{margin-top:22px}.ck-hint{font-size:12px;color:#7e868e;line-height:1.7;margin:8px 0}.ck-attachments{display:flex;flex-direction:column;gap:7px;margin:12px 0}
.ck-attachment{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f5f8fb;border:1px solid #d9e3ef;border-radius:0;padding:10px 13px}
.ck-attachment>div{min-width:0;overflow-wrap:anywhere}.ck-attachment strong,.ck-attachment small{display:block}.ck-attachment small{margin-top:3px;color:#7f8890}
.ck-upload{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-top:10px;padding:14px;border-radius:0;background:#f6f8fb}
.ck-upload label{flex:1 1 200px;font-size:12px;font-weight:500;color:#023f8a}.ck-upload small{color:#868e95;flex:1 0 100%}
.ck-footer{background:#f7f9fc;border-radius:0;display:flex;justify-content:space-between;align-items:end;padding:16px 20px;gap:14px;margin-bottom:20px;border:1px solid #e2e3e5}
.ck-footer .ck-field{width:min(340px,100%)}
@media(max-width:720px){.ck-grid,.ck-doc-meta{grid-template-columns:1fr}.ck-section{padding:17px 13px}.ck-attachment,.ck-footer{align-items:stretch;flex-direction:column}.ck-footer .ck-field{width:100%}}
@media print{.ck-section{break-inside:avoid;box-shadow:none}.ck-doc-meta{break-inside:avoid}}
/* v1.5.6: in-form lookups and Google Maps position picker */
.ck-code-entry{display:flex;align-items:center;gap:6px}
.ck-code-entry input{min-width:75px;flex:1}
.ck-code-entry button{white-space:nowrap;min-height:38px}
.ck-inline-select{display:flex;gap:8px;align-items:stretch;min-width:0}
.ck-inline-select input[type=text],.ck-inline-select input:not([type]){flex:1;min-width:0}
.ck-inline-select button{white-space:nowrap;flex:none}
.ck-map-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.ck-map-actions .ck-hint{flex-basis:100%;margin:0}
.ck-dialog{border:1px solid #d7e1ee;border-radius:0;padding:22px;width:min(980px,calc(100% - 30px));max-width:980px;max-height:90%;color:#012a5b;box-shadow:0 18px 56px rgba(1,31,68,.22)}
.ck-dialog::backdrop{background:rgba(1,31,68,.55)}
.ck-dialog-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding-bottom:10px;border-bottom:1px solid #e2eaf3;margin-bottom:14px}
.ck-dialog-head h2{font-size:20px;margin:0 0 5px;color:#012858}
.ck-dialog-head p{font-size:12px;margin:0;color:#757e86}
.ck-lookup-search{display:flex;gap:10px;margin:13px 0}
.ck-lookup-search input{flex:1;min-width:0;border-radius:10px;border:1px solid #c5d5e8;padding:10px 12px;font-size:15px}
.ck-dialog-results{max-height:55vh;overflow:auto;min-height:100px}
.ck-dialog-results td,.ck-dialog-results th{padding:9px;border-bottom:1px solid #e2eaf3;text-align:left}
.ck-map-canvas{height:420px;width:100%;border:1px solid #dfe1e3;border-radius:0;background:#f0f4f9}
.ck-dialog-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:13px}
@media(max-width:650px){.ck-dialog{padding:13px;max-height:94%}.ck-map-canvas{height:300px}.ck-inline-select,.ck-lookup-search{flex-wrap:wrap}.ck-inline-select button{width:100%}.ck-dialog-head h2{font-size:17px}}

.ck-attachment-thumb{max-width:76px;width:76px;max-height:68px;object-fit:cover;border:1px solid #d2deed;border-radius:7px;background:#fff;flex-shrink:0}

/* v1.5.7: complete WINSpeed lookup with sortable, server-paginated tables. */
.ck-lookup-controls{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:11px 0 14px}
.ck-lookup-controls[hidden],.ck-pagination[hidden],.ck-pagination-buttons[hidden],#ck-lookup-more[hidden]{display:none}
.ck-lookup-controls label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:500;color:#28558c;flex:1 1 165px}
.ck-lookup-controls select{min-height:39px;width:100%;font-size:14px;padding:8px 10px;background:#fff;color:#02316b;border:1px solid #c1d2e6;border-radius:10px}
.ck-lookup-controls button{min-height:40px}
.ck-dialog-results{max-height:min(50vh,460px);min-height:120px;overflow:auto;overscroll-behavior:contain;border-radius:0}
.ck-dialog-results .ck-lookup-table{border-collapse:separate;border-spacing:0;min-width:680px;width:100%}
.ck-dialog-results .ck-lookup-table th{position:sticky;top:0;background:#eff3f8;z-index:1;border-bottom:2px solid #c1d1e5;font-size:12px;white-space:nowrap}
.ck-dialog-results .ck-lookup-table td{font-size:13px;vertical-align:middle;max-width:320px;overflow-wrap:anywhere}
.ck-dialog-results .ck-lookup-table tr:nth-child(even){background:#fafcfd}
.ck-dialog-results .ck-lookup-table tr:hover{background:#e9eff6}
.ck-sort-button{font:inherit;font-size:12px;display:inline-flex;align-items:center;gap:4px;cursor:pointer;color:#02418d;text-align:left;background:transparent;border:0;padding:7px 0;min-height:36px}
.ck-sort-button:hover,.ck-sort-button:focus-visible{color:#023d86;text-decoration:underline}
.ck-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;padding-top:14px;border-top:1px solid #e3eaf3}
.ck-pagination>span{color:#575e65;font-size:13px;font-weight:500}
.ck-pagination-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.ck-pagination-buttons label{display:inline-flex;gap:6px;align-items:center;font-size:13px;color:#5b6269}
.ck-pagination-buttons input{width:67px;min-height:36px;padding:5px 7px;border:1px solid #c8d6e8;border-radius:10px;font-size:14px}
.ck-pagination button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:650px){.ck-lookup-controls label{flex-basis:125px}.ck-dialog-results .ck-lookup-table{min-width:610px}.ck-pagination{align-items:flex-start;flex-direction:column}}

/* v1.5.9 -- totals and independent coring / jack providers */
.ck-total-row th,.ck-total-row td{background:#e4ebf4!important;color:#012d62;font-weight:500;padding:12px!important;border-top:2px solid #024494}
.ck-total-row td:last-child{font-weight:400;color:#6c757d}
.ck-equipment-fieldset{border:1px solid #cedbec;border-radius:10px;margin:14px 0 18px;padding:18px;min-width:0}
.ck-equipment-fieldset legend{color:#012b5f;font-size:1.06rem;font-weight:600;padding:0 9px}
.ck-equipment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.ck-equipment-card{background:#f6f9fc;padding:16px;border:1px solid #dbe4f0;border-radius:0;display:grid;gap:12px}
.ck-equipment-card h3{margin:0;color:#012c61}
.ck-equipment-card .ck-field{min-width:0}
.ck-equipment-card .ck-field[hidden]{display:none!important}
@media(max-width:850px){.ck-equipment-grid{grid-template-columns:1fr}}
/* v1.6.7: 3.4 เครื่องมือในการติดตั้ง (เลือกจากเมนูเครื่องมือช่าง หลายรายการ) */
.ck-tools-block h3{margin:4px 0 2px;font-size:14px}
.ck-items input[readonly]{background:#f6f8fb;color:#02326c}
.ck-tool-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}
/* v1.7.0 */
.ck-row-used td{color:#9aa1a8}
.ck-used{display:inline-block;font-size:12px;font-weight:500;color:#9a6a12;white-space:nowrap}.ck-used small{display:block;font-weight:600;color:#8a7a5a}

/* v1.8.6 Role: ซ่อนคอลัมน์ / ปุ่มของตาราง 03 และ 3.4 (class ck-hide-<key> ที่กรอบตาราง) */
.ck-hide-item_code .ck-col-item_code,
.ck-hide-item_search .ck-col-item_search,
.ck-hide-item_description .ck-col-item_description,
.ck-hide-item_quantity .ck-col-item_quantity,
.ck-hide-item_unit .ck-col-item_unit,
.ck-hide-item_remove .ck-col-item_remove,
.ck-hide-item_total .ck-col-item_total,
.ck-hide-item_add .ck-col-item_add,
.ck-hide-tool_code .ck-col-tool_code,
.ck-hide-tool_search .ck-col-tool_search,
.ck-hide-tool_name .ck-col-tool_name,
.ck-hide-tool_category .ck-col-tool_category,
.ck-hide-tool_quantity .ck-col-tool_quantity,
.ck-hide-tool_remove .ck-col-tool_remove,
.ck-hide-tool_total .ck-col-tool_total,
.ck-hide-tool_add .ck-col-tool_add,
.ck-hide-tool_multi .ck-col-tool_multi{display:none!important}
.search-row #ck-status-filter{width:auto;min-width:220px;max-width:280px;flex:0 0 auto}
/* v2.23.0 4.4 วัสดุใต้ดิน (Checkbox) · ช่องบังคับตามเงื่อนไข · 4.7 การเตรียมพื้นที่ */
.ck-safety-notes .ck-req-mark{display:none}.ck-safety-notes.ck-required .ck-req-mark{display:inline}
.ck-safety-notes .ck-req-hint{color:#c83f4a;margin:4px 0 0}
.ck-prep-block{padding:15px;background:#f4f7fb;border:1px dashed #c5d4e7}
.ck-prep-block h3{margin:0;font-size:13px;color:#023f8a}.ck-prep-block h3 em{color:#c83f4a;font-style:normal}
.ck-prep-block .ck-hint{margin:4px 0 10px}
