/* Shared handheld layout and scanner keyboard. */
.mobile-menu-button,.mobile-menu-backdrop { display:none; }
.nk-keyboard-field { display:flex;gap:8px;align-items:center;min-width:0; }
.nk-keyboard-field input { min-width:0;flex:1; }
.nk-keyboard-field button { flex:none;width:44px!important;min-width:44px;margin-top:6px; }
.nk-keyboard[hidden] { display:none; }
.nk-keyboard { position:fixed;z-index:70;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,580px);max-height:65dvh;overflow:auto;padding:10px 10px max(10px,env(safe-area-inset-bottom));border:1px solid #d4d8dc;border-radius:18px 18px 0 0;background:#eef0f3;box-shadow:0 -8px 40px #1113; }
.nk-keyboard button { touch-action:manipulation;user-select:none;min-width:0;min-height:44px;border:1px solid #d1d6dd;border-radius:8px;padding:5px;color:#121820;background:white;font-size:18px;font-weight:600;box-shadow:0 2px 0 #bdc3cb; }
.nk-keyboard button:active { background:#dce1e8; }
.nk-keyboard-heading { display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px; }
.nk-keyboard-heading strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.nk-keyboard-heading button { min-height:36px;font-size:13px;padding:5px 10px;background:transparent;box-shadow:none;flex:none; }
.nk-keyboard-preview { display:flex;gap:6px;align-items:center;margin:7px 0; }
.nk-keyboard-preview button { flex:none;width:36px;font-size:24px;min-height:40px; }
.nk-keyboard-value { overflow-x:auto;white-space:pre;flex:1;min-width:0;min-height:42px;border:1px solid #d4d8dc;border-radius:8px;padding:9px;background:white;font:600 18px Consolas,monospace; }
.nk-keyboard-caret { border-left:2px solid var(--nk-red);background:#ffe0e3; }
.nk-keyboard-row { display:flex;justify-content:center;gap:5px;margin:6px 0; }
.nk-keyboard-row button { flex:1; }
.nk-keyboard-row .nk-keyboard-space { flex:4;font-size:14px; }
.nk-keyboard-keys:not(.is-numeric) .nk-keyboard-row:nth-child(2) { padding:0 4%; }
.nk-keyboard-actions { display:flex;gap:7px;margin-top:9px; }
.nk-keyboard-actions button { flex:1;font-size:14px; }
.nk-keyboard-actions [data-kb-action="done"] { background:var(--nk-red);color:white;border-color:var(--nk-red); }
body.nk-keyboard-open { padding-bottom:var(--nk-keyboard-height,360px); }
html:has(.nk-keyboard-open) { scroll-padding-bottom:var(--nk-keyboard-height,360px); }
.shell,.card,.hero>*,.section-heading>*,form,label { min-width:0; }
.hero.compact { align-items:flex-start;flex-direction:column;gap:5px; }
.section-heading { flex-wrap:wrap; }
.hero nav { flex-wrap:wrap; }
input,select,textarea { max-width:100%; }
.sidebar { overflow-y:auto;overscroll-behavior:contain; }
.mobile-records tr[hidden] { display:none!important; }
.consolidated-search { max-width:680px; }
.identifier-registration .section-heading { margin-bottom:16px; }
.identifier-registration .section-heading h2 { font-size:24px;margin-bottom:6px; }
.identifier-registration .section-heading p { margin:0;color:var(--nk-gray-600); }
.identifier-lookup-form { display:grid;gap:12px;margin:0 0 18px;max-width:900px; }
.identifier-lookup-form label { margin:0; }
.identifier-lookup-actions { display:flex;flex-wrap:wrap;gap:10px; }
.identifier-lookup-actions>* { display:inline-flex;align-items:center;justify-content:center;min-height:44px;text-decoration:none; }
.identifier-empty-guide { border:1px solid var(--nk-gray-200);border-radius:10px;background:var(--nk-gray-50);padding:14px;max-width:900px;font-size:14px; }
.identifier-empty-guide p { margin:6px 0 0;color:var(--nk-gray-600); }
.identifier-step-title { margin-top:24px; }
.identifier-registration .identifier-title-search { align-items:center; }
.identifier-registration .identifier-title-search label { margin:0; }
@media(max-width:1024px) and (min-width:761px) {
 .shell { padding:20px; }.hero { flex-wrap:wrap; }.hero h1 { font-size:30px; }.card { padding:20px; }
 .grid.two { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:760px) {
 html { min-width:0;scroll-padding-top:72px; }body { font-size:14px; }
 .topbar { height:58px;padding:0 10px;gap:8px;z-index:50; }
 .brand { gap:7px; }.brand-name { font-size:9px;letter-spacing:.14em; }.brand-divider { display:none; }.brand-mark { font-size:28px; }
 .account-avatar,.account-identity small { display:none; }.account-identity { max-width:95px; }.account-identity strong { font-size:10px; }
 .topbar-account { margin-left:auto;gap:3px; }.logout-button { min-height:44px;padding:5px;font-size:12px; }
 .mobile-menu-button { display:grid;place-items:center;flex:none;width:40px;min-height:42px;padding:6px;background:white;color:var(--nk-black);border:1px solid var(--nk-gray-200);font-size:22px; }
 .mobile-menu-backdrop:not([hidden]) { display:block;position:fixed;inset:58px 0 0;z-index:39;background:#10151b80;border:0;border-radius:0; }
 .sidebar { display:none;position:fixed;z-index:40;left:0;top:58px;bottom:0;width:min(300px,86vw);height:calc(100dvh - 58px);overflow-y:auto;flex:none;box-shadow:8px 0 25px #0003; }
 .mobile-menu-open .sidebar { display:flex; }.mobile-menu-open { overflow:hidden; }
 .sidebar-nav { display:grid;overflow:visible;padding:10px;gap:5px; }
 .sidebar-link { min-height:48px;border:0;border-left:3px solid transparent;border-radius:8px;font-size:14px;gap:12px;padding:10px 12px; }
 .sidebar-link span { max-width:none;opacity:1;white-space:normal; }.sidebar-link.is-active { border-left-color:var(--nk-red);background:#7d1520; }
 .sidebar-footer { display:none; }.sidebar-link svg { width:20px;height:20px; }
 .app-frame { min-height:calc(100dvh - 58px); }.shell,.wide-shell.authenticated-shell { width:100%;padding:14px 12px 30px; }
 .hero { flex-direction:column;align-items:stretch;gap:10px;margin-bottom:14px; }.hero h1 { font-size:26px; }.hero .eyebrow { font-size:10px; }
 .hero nav { display:flex;flex-wrap:wrap;gap:6px;font-size:0; }.hero nav a { flex:1;min-height:40px;font-size:12px; }
 h2 { font-size:19px; }h3 { font-size:17px; }.card { padding:14px;margin-bottom:12px;border-radius:14px;box-shadow:0 2px 8px #18212b06; }
 .card>p,.notice,.muted { overflow-wrap:anywhere; }.section-heading { align-items:flex-start;gap:8px; }.section-heading .pill { white-space:normal; }
 .status,.pill { max-width:100%;white-space:normal;overflow-wrap:anywhere; }
 .filter-form { display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:12px 0; }.filter-form label { margin:0; }
 .filter-form button { width:100%; }.identifier-scan-field { flex-basis:auto!important; }
 .identifier-registration .section-heading h2 { font-size:19px; }
 .identifier-lookup-actions { display:grid;grid-template-columns:1fr;gap:8px; }
 .identifier-lookup-actions>* { width:100%;margin:0; }
 .identifier-empty-guide { padding:12px;font-size:13px; }
 .settings-tabs { display:grid;grid-template-columns:minmax(0,1fr);gap:4px;margin-bottom:14px;border:0; }
 .settings-tab { min-height:44px;justify-content:space-between;gap:5px;padding:9px 12px;background:white;border:1px solid var(--nk-gray-200);border-radius:9px;font-size:13px; }
 .settings-tab.is-active { background:var(--nk-red-soft);border-color:#f2bac0; }
 .settings-tab .pill { padding:2px 6px;font-size:11px; }.operation-tabs { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:14px; }
 .operation-tabs a { text-align:center;padding:9px 6px;font-size:12px;min-height:40px; }
 .form-grid,.operations-create,.operations-import,.grid.two { grid-template-columns:minmax(0,1fr);gap:8px; }
 label { font-size:13px;margin:8px 0; }label small { font-size:11px; }button { white-space:normal;overflow-wrap:anywhere; }
 input,select,textarea { font-size:16px;min-width:0; }input[type=file] { font-size:13px;padding:8px; }
 .check,.operation-check { align-items:flex-start;gap:8px; }input[type=checkbox] { flex-shrink:0; }
 .pagination,.manager-kpi-pagination,.operator-scan-pagination { gap:8px;justify-content:space-between;font-size:12px; }
 .pagination a,.manager-kpi-pagination a,.operator-scan-pagination a { display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:6px 10px;border:1px solid var(--nk-gray-200);border-radius:8px;background:white;text-decoration:none; }
 .table-wrap:has(>.mobile-records) { border:0;overflow:visible; }
 .mobile-records { min-width:0!important;display:block;width:100%; }
 .mobile-records>thead { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
 .mobile-records>tbody { display:grid;gap:10px; }
 .mobile-records>tbody>tr { display:block;padding:10px;border:1px solid var(--nk-gray-200);border-radius:10px;background:white; }
 .mobile-records>tbody>tr>td { display:block;border:0;padding:5px 0;white-space:normal;overflow-wrap:anywhere;max-width:100%;font-size:13px; }
 .mobile-records td[data-label]::before { content:attr(data-label);display:block;color:var(--nk-gray-600);font-size:10px;font-weight:650;letter-spacing:.02em;margin-bottom:2px; }
 .mobile-records td>form { min-width:0; }.mobile-records td button { max-width:100%; }
 .mobile-records td pre { white-space:pre-wrap;overflow-wrap:anywhere; }
 .operator-workspace,.operation-workspace,.manager-kpi-details { scroll-margin-top:72px; }
 .operator-hero.has-session h1 { font-size:22px; }.operator-session { padding:12px; }
 .operator-session-overview { margin-bottom:9px;padding-bottom:8px; }.operator-session-overview .eyebrow { display:none; }
 .operator-input-with-keyboard { gap:6px; }.operator-keyboard-toggle,.operator-location-clear { min-width:42px;min-height:44px; }
 .operator-scan-form,.operator-pending-panel { padding:10px; }.operator-help { font-size:11px; }
 .operator-scan-form>button[type=submit],.operation-primary { min-height:46px;margin-top:10px; }
 .operation-quantity { flex-wrap:wrap; }.operation-quantity input { max-width:90px; }
 .manager-kpi { flex-basis:calc(50% - 8px);padding:10px; }.manager-kpi strong { font-size:25px; }
 .counting-duration { font-size:21px; }.login-card { width:100%;margin:14px auto; }
 .nk-keyboard { border-radius:14px 14px 0 0;padding:8px 6px max(8px,env(safe-area-inset-bottom)); }
 .nk-keyboard-row { gap:4px;margin:5px 0; }.nk-keyboard-keys:not(.is-numeric) button { font-size:16px;min-height:43px;padding:3px 0; }
 .nk-keyboard-actions { gap:6px; }.nk-keyboard-actions button { font-size:13px; }
}
@media(max-width:359px) { .brand-name { display:none; }.account-identity { max-width:105px; }.nk-keyboard-row { gap:3px; } }
@media(max-height:500px) { .nk-keyboard { max-height:78dvh; }.nk-keyboard button { min-height:34px; }.nk-keyboard-row { margin:4px 0; }.nk-keyboard-value { min-height:34px;padding:5px; } }
