/* PNFS UI refresh layer (2026-11-12).
   Only restyles icons, tables, buttons and inputs; layout and features are untouched.
   Every rule is scoped to html.ui-refresh, so removing that class (ui-refresh.js / ?ui=classic)
   instantly restores the previous look. */
@media screen{
html.ui-refresh{
  --ui-ink:#1a2433;--ui-muted:#6b7686;--ui-faint:#a1aab6;--ui-line:#e3e7ed;--ui-line2:#eef1f5;--ui-head:#f7f8fa;
  --ui-panel:#fff;--ui-hover:#f6f8fb;--ui-brand:#e5373d;--ui-brand-soft:#fdeeee;--ui-badge:#f1f3f6;--ui-badge-ink:#3d4757;
  --ui-i-moon:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5z'/></svg>");
  --ui-i-sun:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><circle cx='12' cy='12' r='4'/><path d='M12 2.5v2m0 15v2M2.5 12h2m15 0h2M5.3 5.3l1.4 1.4m10.6 10.6 1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4'/></svg>");
  --ui-i-xls:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/><path d='M14 3v5h5M9.5 12.5l5 5m0-5-5 5'/></svg>");
  --ui-i-refresh:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M20 11a8 8 0 0 0-14.6-4.5L4 8M4 4v4h4M4 13a8 8 0 0 0 14.6 4.5L20 16m0 4v-4h-4'/></svg>");
  --ui-i-gear:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3'/><path d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z'/></svg>");
  --ui-i-logout:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/></svg>");
  --ui-i-factory:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 21V10l6 4v-4l6 4V6l6-3v18z'/><path d='M7 17h2m4 0h2'/></svg>");
  --ui-i-box:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M21 8l-9-5-9 5v8l9 5 9-5z'/><path d='M3 8l9 5 9-5M12 13v8'/></svg>");
  --ui-i-check:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='4' width='14' height='17' rx='2'/><path d='M9 4V3h6v1M9 12l2 2 4-4'/></svg>");
  --ui-i-wrench:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M14.7 6.3a4 4 0 0 0 5 5L21 13l-8 8-3-3 8-8zM3 21l6-6'/></svg>");
  --ui-i-ship:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 15l2 5h14l2-5zM5 15V9h14v6M12 9V4M9 6h6'/></svg>");
  --ui-i-edit:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 20h4L19 9l-4-4L4 16zM13 7l4 4'/></svg>");
  --ui-i-trash:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6m4-6v6'/></svg>");
  --ui-i-cal:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='16' rx='2'/><path d='M3 10h18M8 3v4m8-4v4'/></svg>");
  --ui-i-ok:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5 9-10'/></svg>");
  --ui-i-plus:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><path d='M12 5v14M5 12h14'/></svg>");
  --ui-i-left:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 6l-6 6 6 6'/></svg>");
  --ui-i-right:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 6l6 6-6 6'/></svg>");
}
html.ui-refresh[data-theme="dark"]{
  --ui-ink:#e6ecf4;--ui-muted:#a7b3c4;--ui-faint:#6f7d90;--ui-line:#344052;--ui-line2:#2a3545;--ui-head:#242e3d;
  --ui-panel:#1d2532;--ui-hover:#243042;--ui-brand:#ff6b70;--ui-brand-soft:#402a33;--ui-badge:#2a3546;--ui-badge-ink:#d4dce8;
}

/* ---------- Header action icons: one monochrome line set ---------- */
html.ui-refresh #appShell>.topbar .actions>button:not(#nasAiButton){border:1px solid var(--ui-line)!important;background:var(--ui-panel)!important;color:#4a5566!important;box-shadow:none!important}
html.ui-refresh[data-theme="dark"] #appShell>.topbar .actions>button:not(#nasAiButton){color:#c3cdda!important}
html.ui-refresh #appShell>.topbar .actions>button:not(#nasAiButton):is(:hover,:focus-visible){color:var(--ui-ink)!important;border-color:#c8cfd9!important;background:var(--ui-hover)!important}
html.ui-refresh #appShell>.topbar .actions>button:not(#nasAiButton)::before{inset:8px;background:currentColor;-webkit-mask:var(--ui-ic) center/contain no-repeat;mask:var(--ui-ic) center/contain no-repeat}
html.ui-refresh #appShell>.topbar .actions [data-theme-toggle]{--ui-ic:var(--ui-i-moon)}
html.ui-refresh[data-theme="dark"] #appShell>.topbar .actions [data-theme-toggle]{--ui-ic:var(--ui-i-sun)}
html.ui-refresh #appShell>.topbar .actions #exportExcel{--ui-ic:var(--ui-i-xls)}
html.ui-refresh #appShell>.topbar .actions #refreshAppButton{--ui-ic:var(--ui-i-refresh)}
html.ui-refresh #appShell>.topbar .actions #openAdmin{--ui-ic:var(--ui-i-gear)}
html.ui-refresh #appShell>.topbar .actions #logoutButton{--ui-ic:var(--ui-i-logout)}
html.ui-refresh #appShell>.topbar .actions>button:not(#nasAiButton)::before{inset:9px}
html.ui-refresh #appShell>.topbar .login-user-badge{display:inline-flex!important;align-items:center;gap:8px;box-sizing:border-box;border:1px solid var(--ui-line)!important;border-radius:999px!important;background:var(--ui-panel)!important;color:var(--ui-ink)!important;font-size:13px;font-weight:700;padding:0 12px 0 4px!important;height:36px;line-height:1}
html.ui-refresh #appShell>.topbar .login-user-badge[data-initials]::before{content:attr(data-initials);flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--ui-ink);color:var(--ui-panel);font-size:11px;font-weight:800;letter-spacing:0}
.ui-sep{display:none}
html.ui-refresh #appShell>.topbar .actions>.ui-sep{display:block;flex:none;width:1px;height:22px;margin:0 4px;background:var(--ui-line)}

/* ---------- Side menu: monochrome line icons ---------- */
html.ui-refresh #nasSide summary[data-dept] .dept-icon{display:none}
html.ui-refresh #nasSide summary[data-dept]::before{display:block!important;content:"";flex:none;width:20px;height:20px;padding:0;margin:0 2px 0 4px;border-radius:0;opacity:1;background:currentColor;-webkit-mask:var(--ui-ic) center/contain no-repeat;mask:var(--ui-ic) center/contain no-repeat;color:inherit}
html.ui-refresh #nasSide summary[data-dept]{color:var(--nav-ink)}
html.ui-refresh #nasSide [data-dept=openProductionApp]{--ui-ic:var(--ui-i-factory)}
html.ui-refresh #nasSide [data-dept=openMaterialApp]{--ui-ic:var(--ui-i-box)}
html.ui-refresh #nasSide [data-dept=openQualityApp]{--ui-ic:var(--ui-i-check)}
html.ui-refresh #nasSide [data-dept=openMaintenanceApp]{--ui-ic:var(--ui-i-wrench)}
html.ui-refresh #nasSide [data-dept=openImportApp]{--ui-ic:var(--ui-i-ship)}
html.ui-refresh #appShell.nas-folded #nasSide>details>summary[data-dept]::before{margin:0}
html.ui-refresh #nasSide summary:after{width:5px;height:5px;opacity:.45}
/* Menu structure as in the mockup: grey department row, bold branch titles, one guide line, soft active item */
html.ui-refresh #nasSide>strong{font-size:11px;font-weight:700;color:var(--ui-faint);letter-spacing:.4px;border-bottom:0;padding:0 0 4px;margin:0 6px 4px}
html.ui-refresh #appShell #nasSide>details[data-department]>summary{min-height:36px;padding:6px 8px!important;border-radius:8px;font-weight:700;color:var(--nav-ink)!important;background:transparent!important;box-shadow:none!important}
html.ui-refresh #appShell #nasSide>details[data-department][open]>summary{background:var(--ui-head)!important}
html.ui-refresh #appShell #nasSide>details[data-department]>summary:hover{background:var(--ui-hover)!important}
html.ui-refresh #appShell:not(.nas-folded) #nasSide [data-department]>.performance-branch{margin:0 0 0 17px!important;padding:2px 0 2px 10px!important;border:0!important;border-left:1.5px solid var(--ui-line)!important}
html.ui-refresh #appShell:not(.nas-folded) #nasSide [data-department]>.performance-branch:first-of-type{margin-top:4px!important}
html.ui-refresh #appShell:not(.nas-folded) #nasSide [data-department]>.performance-branch:last-of-type{margin-bottom:6px!important}
html.ui-refresh #appShell #nasSide [data-department] .performance-branch>summary{min-height:30px;padding:5px 8px!important;border-radius:7px;background:transparent!important;color:var(--nav-ink)!important;font-size:13px;font-weight:700;box-shadow:none!important}
html.ui-refresh #appShell #nasSide [data-department] .performance-branch>summary:hover{background:var(--ui-hover)!important}
html.ui-refresh #appShell #nasSide [data-department] .performance-branch>button{width:calc(100% - 6px)!important;margin:1px 0 1px 6px!important;min-height:30px;padding:5px 8px!important;border-radius:7px;border:0!important;font-size:13px;font-weight:500;color:var(--ui-muted)!important;background:transparent!important;box-shadow:none!important}
html.ui-refresh #appShell #nasSide [data-department] .performance-branch>button::before,html.ui-refresh #appShell #nasSide [data-department] .performance-branch>button::after{content:none!important;display:none!important}
html.ui-refresh #appShell #nasSide [data-department] .performance-branch>button:hover{background:var(--ui-hover)!important;color:var(--ui-ink)!important}
html.ui-refresh #appShell #nasSide [data-department] .performance-branch>button[aria-current="page"]{background:var(--ui-brand-soft)!important;color:var(--ui-brand)!important;font-weight:700;box-shadow:none!important}
html.ui-refresh #appShell #nasSide .dept-calendar{border-color:var(--ui-line);border-radius:10px}
html.ui-refresh #appShell #nasSide .cal-week{color:var(--ui-faint)}

/* ---------- Side calendar: round "today" marker ---------- */
html.ui-refresh #nasSide .cal-grid span:not(.cal-week){display:grid;place-items:center;width:24px;height:24px;margin:auto;line-height:24px}
html.ui-refresh #nasSide .cal-grid [aria-current=date]{border-radius:50%;background:var(--ui-brand);color:#fff;box-shadow:none}
html.ui-refresh #nasSide .cal-tools .cal-now{border:1px solid var(--nav-edge);border-radius:999px;padding:0 8px;min-height:22px}

/* ---------- Filter & entry cards ---------- */
html.ui-refresh #appShell :is(.filterbar,.editor-panel){border-color:var(--ui-line);border-radius:12px;box-shadow:none}
html.ui-refresh #appShell :is(.filterbar,.edit-form) label{font-size:11.5px;font-weight:600;color:var(--ui-muted)}
html.ui-refresh #appShell :is(.filterbar,.edit-form) :is(input:not([type=date]):not([type=hidden]),select){border-color:var(--ui-line);border-radius:8px}
html.ui-refresh #appShell :is(.filterbar,.edit-form) :is(input,select):focus{border-color:#7aa2e8;box-shadow:0 0 0 3px #2f6fdb22;outline:0}
html.ui-refresh #appShell .product-with-add{display:flex;align-items:stretch;gap:0!important}
html.ui-refresh #appShell .product-with-add select{border-top-right-radius:0!important;border-bottom-right-radius:0!important;flex:1;min-width:0}
html.ui-refresh #appShell .product-with-add .icon-add-button{position:relative;width:36px;min-width:36px;margin:0;padding:0;font-size:0!important;border:1px solid var(--ui-line)!important;border-left:0!important;border-radius:0 8px 8px 0!important;background:var(--ui-panel)!important;color:var(--ui-brand)!important;box-shadow:none!important}
html.ui-refresh #appShell .product-with-add .icon-add-button::before{content:"";position:absolute;inset:9px;background:currentColor;-webkit-mask:var(--ui-i-plus) center/contain no-repeat;mask:var(--ui-i-plus) center/contain no-repeat}
html.ui-refresh #appShell .pnfs-date-picker>span[aria-hidden]{font-size:0!important;display:inline-block;width:16px;height:16px;background:var(--ui-muted);-webkit-mask:var(--ui-i-cal) center/contain no-repeat;mask:var(--ui-i-cal) center/contain no-repeat}
html.ui-refresh #appShell .form-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:8px;font-weight:700}
html.ui-refresh #appShell .form-actions button[type=submit]::before,html.ui-refresh #appShell .form-actions button.light::before{content:"";width:15px;height:15px;flex:none;background:currentColor}
html.ui-refresh #appShell .form-actions button[type=submit]::before{-webkit-mask:var(--ui-i-ok) center/contain no-repeat;mask:var(--ui-i-ok) center/contain no-repeat}
html.ui-refresh #appShell .form-actions button.light::before{-webkit-mask:var(--ui-i-edit) center/contain no-repeat;mask:var(--ui-i-edit) center/contain no-repeat}
html.ui-refresh #appShell .form-actions button.light{border-color:var(--ui-line)!important;background:var(--ui-panel)!important;color:var(--ui-ink)!important}

/* ---------- Pager: neutral buttons with chevrons ---------- */
html.ui-refresh #productionRecordPager button{display:inline-flex;align-items:center;gap:4px;min-height:30px;height:30px;padding:0 10px;border:1px solid var(--ui-line)!important;border-radius:8px;background:var(--ui-panel)!important;color:var(--ui-ink)!important;font-weight:700;font-size:12.5px;box-shadow:none!important}
html.ui-refresh #productionRecordPager button:disabled{color:var(--ui-faint)!important;opacity:1;cursor:default}
html.ui-refresh #productionRecordPager button[data-prev]::before,html.ui-refresh #productionRecordPager button[data-next]::after{content:"";width:14px;height:14px;background:currentColor}
html.ui-refresh #productionRecordPager button[data-prev]::before{-webkit-mask:var(--ui-i-left) center/contain no-repeat;mask:var(--ui-i-left) center/contain no-repeat}
html.ui-refresh #productionRecordPager button[data-next]::after{-webkit-mask:var(--ui-i-right) center/contain no-repeat;mask:var(--ui-i-right) center/contain no-repeat}
html.ui-refresh #productionRecordPager span{color:var(--ui-muted);font-size:12px;font-variant-numeric:tabular-nums}

/* ---------- Tables (main window) ---------- */
html.ui-refresh #appShell .table-wrap{border-color:var(--ui-line);border-radius:12px;box-shadow:none}
html.ui-refresh #appShell .table-wrap table{border-collapse:separate;border-spacing:0}
html.ui-refresh #appShell .table-wrap th{background:var(--ui-head)!important;color:var(--ui-muted)!important;font-weight:600;font-size:12px;border:0!important;border-bottom:1px solid var(--ui-line)!important}
html.ui-refresh #appShell .table-wrap td{border:0!important;border-bottom:1px solid var(--ui-line2)!important;padding-top:5px!important;padding-bottom:5px!important;height:auto!important}
html.ui-refresh #appShell .table-wrap th{padding-top:8px!important;padding-bottom:8px!important}
html.ui-refresh #appShell .row-actions button:is([data-edit],[data-del],.delete){width:28px!important;min-width:28px!important;height:28px!important;min-height:28px!important}
html.ui-refresh #appShell .table-wrap tbody tr:hover td{background:var(--ui-hover)!important}
html.ui-refresh #appShell .table-sort-button{color:var(--ui-ink)!important;font-weight:600}
html.ui-refresh #appShell .table-wrap td .muted{color:var(--ui-faint)}
/* Production records: text left, numbers right, quiet date/month */
html.ui-refresh #recordsBody td:nth-child(1),html.ui-refresh #recordsBody td:nth-child(6){color:var(--ui-muted);font-variant-numeric:tabular-nums}
html.ui-refresh #appShell .table-wrap table:has(#recordsBody) :is(th,td){text-align:center!important}
html.ui-refresh #recordsBody td:nth-child(2){font-weight:400}
html.ui-refresh #recordsBody td:nth-child(3){font-weight:400;font-variant-numeric:tabular-nums}
html.ui-refresh #recordsBody .ui-unit{color:var(--ui-faint);font-size:11.5px;font-weight:inherit}
html.ui-refresh .ui-line-badge{display:inline-block;min-width:44px;text-align:center;font-size:12px;font-weight:600;padding:2px 8px;border-radius:6px;background:var(--ui-badge);color:var(--ui-badge-ink)}

/* ---------- Row actions: edit / delete as icons ---------- */
html.ui-refresh #appShell .row-actions{gap:4px;justify-content:center}
html.ui-refresh #appShell .row-actions button:is([data-edit],[data-del],.delete){position:relative;width:30px;min-width:30px;height:30px;min-height:30px;padding:0;font-size:0!important;border:1px solid transparent!important;border-radius:7px;background:transparent!important;color:#5a6576!important;box-shadow:none!important}
html.ui-refresh[data-theme="dark"] #appShell .row-actions button:is([data-edit],[data-del],.delete){color:#b9c4d3!important}
html.ui-refresh #appShell .row-actions button:is([data-edit],[data-del],.delete)::before{content:"";position:absolute;inset:7px;background:currentColor;-webkit-mask:var(--ui-i-edit) center/contain no-repeat;mask:var(--ui-i-edit) center/contain no-repeat}
html.ui-refresh #appShell .row-actions button:is([data-del],.delete)::before{-webkit-mask-image:var(--ui-i-trash);mask-image:var(--ui-i-trash)}
html.ui-refresh #appShell .row-actions button:is([data-del],.delete){color:var(--ui-faint)!important}
html.ui-refresh #appShell tr:hover .row-actions button:is([data-edit],[data-del],.delete){border-color:var(--ui-line)!important;background:var(--ui-panel)!important}
html.ui-refresh #appShell tr:hover .row-actions button:is([data-del],.delete){color:var(--ui-brand)!important}
html.ui-refresh #appShell .row-actions button:is([data-edit],[data-del],.delete):focus-visible{outline:2px solid #7aa2e8;outline-offset:1px}
}
