/* P11.10 — Import owns its viewport; global modal rules must not resize it. */
html body dialog.nk-import-dialog{position:fixed;inset:0;margin:auto;width:min(1040px,calc(100vw - 48px));max-width:calc(100vw - 48px);height:min(780px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);min-width:0;padding:0;overflow:hidden;border:1px solid #d4e2e2;border-radius:20px;background:#fff;color:#123c4a;font-family:var(--font-th,"IBM Plex Sans Thai",sans-serif);font-size:14px;line-height:1.6;box-sizing:border-box}
html body dialog.nk-import-dialog[open]{display:flex;flex-direction:column}
.nk-import-dialog::backdrop{background:#123c4a80}
.nk-import-dialog [hidden]{display:none!important}
.nk-import-dialog *{box-sizing:border-box;min-width:0}
.nk-import-dialog>header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;border-bottom:1px solid #dce7e7;background:#fff}
.nk-import-dialog .kicker{margin:0 0 3px;color:#04878a;font-size:11px;letter-spacing:.04em}
.nk-import-dialog h2{margin:0;font-size:22px;line-height:1.4}
.nk-import-dialog [data-company]{display:block;margin-top:5px;max-width:720px;color:#647b82;font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.nk-import-dialog header button{flex:none;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:12px;background:#eef6f6;color:#123c4a;font:inherit;font-size:22px;touch-action:manipulation}
.nk-import-dialog main{flex:1 1 auto;min-height:0;max-height:none;margin:0;padding:24px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding:24px}
.nk-import-dialog main>h3{margin:18px 0 8px;font-size:20px;line-height:1.45;overflow-wrap:anywhere}
.nk-import-dialog main>p{margin:10px 0 18px}
.nk-import-dialog [data-error]:empty{display:none}
.nk-import-dialog [data-error]:not(:empty){flex:none;max-height:100px;overflow:auto;margin:12px 24px 0;padding:10px 12px;border-radius:8px;background:#fff0ed;color:#a03522;font-size:13px}
.nk-import-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;list-style:none;margin:0 0 22px;padding:0;font-size:12px;color:#647b82}
.nk-import-steps li{display:flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:6px;border-radius:9px;background:#f4f7f7;white-space:nowrap}
.nk-import-steps li>span{display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:50%;background:#e5eded;font-size:11px}
.nk-import-steps [aria-current=step]{background:#e6f5f3;color:#087c80;font-weight:600}
.nk-import-steps [aria-current=step]>span,.nk-import-steps .done>span{background:#04878a;color:white}
.nk-import-intro{color:#647b82;font-size:14px;line-height:1.8}
.nk-import-upload{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:7px;min-height:180px;margin:22px 0 18px;padding:24px;border:1.5px dashed #77b4b4;border-radius:14px;background:#f2fafa;text-align:center;cursor:pointer}
.nk-import-upload svg{width:32px;height:32px;margin-bottom:4px;color:#04878a;fill:none;stroke:currentColor;stroke-width:1.6}
.nk-import-upload strong{font-size:16px;color:#087c80}
.nk-import-upload>span{font-size:12px;color:#647b82}
.nk-import-dialog .nk-import-upload input[type=file]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer}
.nk-import-upload:focus-within{outline:3px solid #8fd6c8;outline-offset:3px}
.nk-import-help{padding:12px 14px;border:1px solid #e0eaea;border-radius:10px;color:#647b82;font-size:13px}
.nk-import-help summary{cursor:pointer;color:#123c4a;font-weight:500}
.nk-import-help p{margin:8px 0 0}
.nk-import-footer{flex:none;max-height:40%;overflow:auto;padding:14px 24px;border-top:1px solid #dce7e7;background:#fff;box-shadow:0 -4px 18px #123c4a05}
.nk-import-footer[hidden]{display:none}
.nk-import-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin:0}
.nk-import-actions button{min-height:44px;font-size:14px;white-space:normal;line-height:1.5;touch-action:manipulation}
.nk-import-actions [data-preview],.nk-import-actions [data-commit]{margin-left:auto}
.nk-import-start-actions{justify-content:space-between}
.nk-import-dialog .text-btn{background:transparent;color:#087c80;border:0;padding:8px}
.nk-import-options,.nk-import-edit{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.nk-import-options label,.nk-import-edit label{display:grid;gap:7px;font-size:13px}
.nk-import-dialog input:not([type=checkbox]):not([type=file]),.nk-import-dialog select{display:block;width:100%;min-height:44px;border:1px solid #c5d6da;border-radius:9px;padding:9px 11px;background:#fff;color:#123c4a;font:inherit;font-size:16px;line-height:1.4}
.nk-import-options small{color:#647b82;font-size:12px}
.nk-import-check{display:flex;align-items:flex-start;gap:9px;margin:18px 0;font-size:13px}
.nk-import-check input{flex:none;width:18px;height:18px;margin:2px 0 0;accent-color:#04878a}
.nk-import-table{overflow:auto;max-height:360px;margin:16px 0}
.nk-import-table table{width:100%;border-collapse:collapse;text-align:left}
.nk-import-table th,.nk-import-table td{min-width:140px;padding:10px 12px;border-bottom:1px solid #e0eaea;overflow-wrap:anywhere}
.nk-import-table th{position:sticky;top:0;background:#f0f7f7;font-size:12px}
.nk-import-dialog .nk-import-filename{font-size:16px}
.nk-import-summary{padding:12px 14px;border-radius:10px;background:#e7f5f4;font-size:14px;font-weight:600}
.nk-import-review{display:grid;gap:10px}
.nk-import-review details,.nk-import-review article{padding:14px;border:1px solid #d8e5e5;border-radius:10px;overflow-wrap:anywhere}
.nk-import-review summary{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;cursor:pointer;font-size:14px}
.nk-import-review summary span{flex:none;padding:2px 7px;border-radius:6px;background:#f0f7f7;color:#087c80;font-size:11px;white-space:nowrap}
.nk-import-invalid{padding:8px;color:#a03522;background:#fff4f0;font-size:13px}
.nk-import-edit{margin-top:16px}
.nk-import-dialog button:disabled{opacity:.5;cursor:wait}
.nk-import-dialog[data-busy=true] main,.nk-import-dialog[data-busy=true] footer{opacity:.65;pointer-events:none}
.nk-import-dialog [data-lock=true]{cursor:not-allowed}
@media(max-width:720px){
 html body dialog.nk-import-dialog[open],html.nk-p10 body dialog.nk-import-dialog[open]{position:fixed!important;inset:0!important;top:0!important;margin:0!important;width:100%!important;max-width:100%!important;height:100vh!important;height:100dvh!important;max-height:100vh!important;max-height:100dvh!important;border:0!important;border-radius:0!important;padding:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
 .nk-import-dialog>header{gap:12px;padding:calc(12px + env(safe-area-inset-top,0px)) 16px 12px}
 .nk-import-dialog .kicker{display:none}
 .nk-import-dialog h2{font-size:18px}
 .nk-import-dialog [data-company]{max-width:calc(100vw - 92px);margin-top:3px;font-size:11px}
 .nk-import-dialog header button{width:40px;height:40px;min-height:40px;font-size:20px}
 .nk-import-dialog main{flex:1 1 auto!important;min-height:0!important;max-height:none!important;padding:18px 16px 22px!important;overflow-y:auto!important;overflow-x:hidden!important}
 .nk-import-dialog main>h3{font-size:18px;margin:16px 0 7px}
 .nk-import-dialog main>p{font-size:13px;line-height:1.7;margin:8px 0 16px}
 .nk-import-dialog [data-error]:not(:empty){margin:8px 16px 0;font-size:12px;max-height:80px}
 .nk-import-steps{gap:5px;margin-bottom:20px;font-size:11px}
 .nk-import-steps li{gap:5px;min-height:36px;padding:5px 3px}
 .nk-import-steps li>span{width:20px;height:20px;font-size:10px}
 .nk-import-upload{min-height:150px;margin:18px 0 16px;padding:20px 12px}
 .nk-import-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));max-height:40%}
 .nk-import-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .nk-import-actions button{width:100%;min-height:44px;margin:0!important;padding:10px 8px;font-size:13px}
 .nk-import-actions [data-preview],.nk-import-actions [data-commit],.nk-import-actions [data-done],.nk-import-actions [data-template],.nk-import-actions [data-start]{grid-column:1/-1;order:-1}
 .nk-import-actions [data-back],.nk-import-start-actions [data-history],.nk-import-actions [data-done]+[data-history]{grid-column:1/-1}
 .nk-import-start-actions [data-history]{min-height:36px;padding:5px}
 .nk-import-options,.nk-import-edit{grid-template-columns:1fr;gap:14px}
 .nk-import-table.nk-import-mapping,.nk-import-table.nk-import-changes{overflow:visible;max-height:none}
 .nk-import-mapping table,.nk-import-mapping tbody,.nk-import-mapping tr,.nk-import-mapping td,.nk-import-changes table,.nk-import-changes tbody,.nk-import-changes tr,.nk-import-changes td{display:block;width:100%;min-width:0}
 .nk-import-mapping thead,.nk-import-changes thead{display:none}
 .nk-import-mapping tr,.nk-import-changes tr{padding:12px;margin:0 0 12px;border:1px solid #d8e5e5;border-radius:12px;background:#fff}
 .nk-import-mapping td,.nk-import-changes td{padding:6px 0;border:0;font-size:13px}
 .nk-import-mapping td::before,.nk-import-changes td::before{content:attr(data-label);display:block;margin-bottom:4px;color:#647b82;font-size:11px}
 .nk-import-mapping td:first-child{font-weight:600;padding-top:0}
 .nk-import-mapping td:last-child{margin-top:4px;padding:8px 10px;background:#f4f8f8;border-radius:7px}
 .nk-import-review summary{gap:8px;font-size:13px}
 .nk-import-review details,.nk-import-review article{padding:12px}
 .nk-import-help{font-size:12px}
}
@media(max-width:360px){.nk-import-dialog h2{font-size:17px}.nk-import-steps{font-size:10px}.nk-import-actions button{font-size:12px}}

@media(max-width:720px){.nk-import-actions [data-recheck]{grid-column:1/-1;order:-1}.nk-import-actions [data-map-back]{grid-column:1/-1}.nk-import-actions:has([data-errors]:not([hidden])) [data-map-back]{grid-column:auto}}

.nk-import-settings{margin:16px 0;padding:12px 14px;border:1px solid #e0eaea;border-radius:10px;font-size:13px}.nk-import-settings>summary{cursor:pointer;color:#123c4a;font-weight:500}.nk-import-settings[open]>.nk-import-options{margin-top:16px}.nk-import-settings .nk-import-check{margin-bottom:0}
@media(max-width:720px){.nk-import-options.nk-import-sheet-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.nk-import-settings{font-size:12px}.nk-import-dialog .nk-import-map-hint{font-size:12px}}

@media(max-width:720px){.nk-import-dialog .nk-import-mapping td,.nk-import-dialog .nk-import-changes td{text-align:left!important}}
