/* P28A UI pass 2: Web theme only. Shared LAB theme remains unchanged. */
:root {
 --accent:#2196F3;
 --accent-action:#1976D2;
 --accent-action-hover:#1565C0;
 --accent-hover-soft:#1565C0;
 --accent-line:#2196F3;
 --accent-soft:#E3F2FD;
 --accent-dark:#1976D2;
 --focus-ring:#E3F2FD;
 --primary:#2196F3;
 --primary-action:#1976D2;
 --primary-action-hover:#1565C0;
 --primary-action-pressed:#0D47A1;
 --primary-hover:#1E88E5;
 --primary-pressed:#1976D2;
 --primary-soft:#E3F2FD;
 --primary-softest:#F5FAFF;
 --app-bg:#F7F9FC;
 --surface:#FFFFFF;
 --grid-header-bg:#0D1726;
 --border-soft:#D9E2EC;
 --border-medium:#C7D2E0;
 --text-main:#1F2937;
 --text-secondary:#6B7280;
 --text-muted:#9CA3AF;
 --disabled-bg:#E5E7EB;
 --disabled-text:#9CA3AF;
}
body {background:var(--app-bg)}
.nomina-shell {
 --ink:var(--text-main);
 --muted:var(--text-secondary);
 --line:var(--border-soft);
 --bg:var(--app-bg);
 --accent:var(--primary);
 --accent-hover-soft:var(--primary-hover);
 --accent-line:var(--primary);
 --accent-soft:var(--primary-soft);
 --accent-action:var(--primary-action);
 --accent-action-hover:var(--primary-action-hover);
 --accent-dark:var(--primary-pressed);
 --focus-ring:var(--primary-soft);
 /* Redeclare aliases here so they resolve against the Web palette. */
 --accent-bright:var(--primary);
 --accent-strong:var(--primary);
 --accent-hover:var(--primary-action-hover);
 --soft:var(--primary-soft);
 --light:var(--primary-soft);
 --green:var(--primary);
 --green-dark:var(--primary-hover);
 background:var(--app-bg);
 color:var(--text-main);
}

.nomina-header,.catalog-workspace,.employee-workspace-surface {
 background:var(--surface);border-color:var(--border-soft);
}
.shell-topbar {background:var(--surface);border-color:var(--border-soft)}
.shell-context {color:var(--text-main)}
.nomina-shell .button {
 --accent-action:var(--primary-action);
 --focus-ring:var(--primary-soft);
 background:var(--primary-action);color:var(--surface);box-shadow:var(--shadow-card);
}
.nomina-shell .button:hover {background:var(--primary-action-hover)}
.nomina-shell .button:not([aria-disabled=true]):active {background:var(--primary-action-pressed)}
.nomina-shell :is(.button,button):not(.tab-close):not(.searchable-trigger):not(.searchable-option):not(.quiet-button):not(.nav-toggle):not(:disabled):not(.pre-grid table *):not(.nomina-grid *):active {
 background:var(--primary-action-pressed);color:var(--surface);
}
.nomina-shell :is(.quiet-button,.workspace-actions [data-edit-pending],.pre-page button:not(#calculate)) {
 background:var(--surface);border:1px solid var(--primary-action);color:var(--primary-action);
}
.nomina-shell :is(.quiet-button,.workspace-actions [data-edit-pending],.pre-page button:not(#calculate)):not(:disabled):hover {
 background:var(--primary-softest);border-color:var(--primary-action);color:var(--primary-action-hover);
}
.nomina-shell :is(.quiet-button,.workspace-actions [data-edit-pending],.pre-page button:not(#calculate)):not(:disabled):not(.pre-grid table *):not(.nomina-grid *):active {
 background:var(--primary-soft);color:var(--primary-pressed);
}
.nomina-shell :is(input,select,textarea,.searchable-trigger,.searchable-input) {
 background:var(--surface);border-color:var(--border-medium);color:var(--text-main);
}
.nomina-shell :is(input,textarea)::placeholder {color:var(--text-muted);opacity:1}
.nomina-shell :is(input,select,textarea,.searchable-trigger):focus {
 border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-soft);
}
.nomina-shell .searchable-trigger:hover {background:var(--surface);border-color:var(--primary)}
.nomina-shell .searchable-trigger[aria-invalid=true] {border-color:var(--red)}
.nomina-shell :is(button,input,select,textarea,.quiet-button):disabled,
.nomina-shell .button[aria-disabled=true] {
 background:var(--disabled-bg);color:var(--disabled-text);border-color:var(--border-soft);
 opacity:1;box-shadow:none;transform:none;
}
.catalog-workspace .employee-search,.workspace-actions {
 background:var(--primary-softest);border-color:var(--border-soft);
}
.catalog-workspace .employee-table-scroll,.workspace-header,
.employee-workspace-surface .employee-workspace-content>section,
.employee-workspace-surface .employee-workspace-content>section>article {
 border-color:var(--border-soft);
}
.workspace-header {border-top-color:var(--primary)}
.employee-workspace-surface .employee-workspace-content>section>article {background:var(--surface)}
.workspace-context-band {background:var(--primary-softest);border-color:var(--border-soft);color:var(--text-secondary)}
.workspace-context-band:before {color:var(--primary-pressed)}
.readiness-badge.neutral,.readiness-card.is-neutral,.mode-badge {
 background:var(--primary-soft);color:var(--primary-pressed);border-color:var(--primary-soft);
}
.employee-edit-mode .mode-badge,.employee-edit-mode .employee-workspace-content>section {
 border-color:var(--primary);
}
.nomina-shell .kpi-strip article {border-color:var(--border-soft);box-shadow:var(--shadow-card)}
.nomina-shell #calculate:not(:disabled):hover {background:var(--primary-action-hover);border-color:var(--primary-action-hover)}
.nomina-shell #calculate:not(:disabled):active {background:var(--primary-action-pressed);border-color:var(--primary-action-pressed)}
.nomina-shell #calculate:disabled {background:var(--disabled-bg);color:var(--disabled-text);border-color:var(--border-soft)}

.nomina-shell .quiet-button:focus-visible {
 background:var(--primary-soft);border-color:var(--primary);
}
/* The header's context and language form must share the available width. */
@media(min-width:681px) and (max-width:1000px) {
 .nomina-header {height:auto;min-height:58px;flex-wrap:wrap;gap:8px;padding-block:10px}
 .header-primary,.header-actions {min-width:0;max-width:100%;flex-wrap:wrap}
 .header-actions {margin-left:auto}
 .header-date {white-space:nowrap}
}
@media(max-width:680px) {
 .nomina-header {height:auto;min-height:58px;flex-wrap:wrap;gap:8px;padding:10px 20px}
 .header-primary,.header-actions {min-width:0;max-width:100%;flex-wrap:wrap}
 .header-actions {margin-left:auto}
 .language-form {min-width:0;max-width:100%}
 .language-form select {min-width:0}
 .shell-context {overflow-wrap:anywhere}
 .panel-heading {flex-wrap:wrap}
 .new-employee fieldset {min-width:0;grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr))}
 .new-employee label,.workspace-identity,.workspace-identity>div {min-width:0}
 .workspace-header h1 {overflow-wrap:anywhere}
}


/* Blue navigation, tabs and data surfaces; dimensions and behavior are unchanged. */
.sidebar nav a.active,.sidebar .nav-link.selected {background:var(--primary-action);color:var(--surface);border-color:var(--primary-action);box-shadow:inset 3px 0 var(--primary),0 5px 14px #00000022}
.sidebar nav a.active:hover,.sidebar .nav-link.selected:hover {background:var(--primary-action-hover)}
.nomina-shell .workspace-tab.active {background:var(--primary-softest);color:var(--primary-action);border-color:var(--border-soft);border-bottom-color:var(--primary)}
.nomina-shell .workspace-tab:hover,.nomina-shell :is(.employee-tabs,.workspace-subtabs) a:hover {background:var(--primary-softest);color:var(--primary-action-hover)}
.nomina-shell :is(.employee-tabs,.workspace-subtabs) a[aria-current=page] {background:var(--primary-softest);color:var(--primary-action);border-bottom-color:var(--primary)}
.nomina-shell .workspace-tab .tab-close {color:var(--text-secondary)}
.nomina-shell .workspace-tab .tab-close:hover {background:var(--border-soft);color:var(--text-main)}
/* P28A UI BLUE 03A: scoped header and single white separators. */
.nomina-shell :is(.nomina-grid,.employee-table,.pre-grid table) thead th {background:var(--grid-header-bg);color:#FFFFFF;border-color:#FFFFFF}
.nomina-shell :is(.nomina-grid,.employee-table,.pre-grid table) {border-collapse:collapse;border-spacing:0}
.nomina-shell :is(.nomina-grid,.employee-table,.pre-grid table) :is(td,th) {border:0;border-right:1px solid #FFFFFF;border-bottom:1px solid #FFFFFF}
.nomina-shell table tbody td {color:var(--text-main)}
.nomina-shell table tbody tr:nth-child(3n+1) td {background:#E3F2FD}
.nomina-shell table tbody tr:nth-child(3n+2) td {background:#F5FAFF}
.nomina-shell table tbody tr:nth-child(3n) td {background:#FFFFFF}
.nomina-shell table tbody tr:hover td {background:#BBDEFB}
.nomina-shell table tbody :is(tr.selected,tr[aria-selected=true]) td {background:#90CAF9!important;color:var(--text-main)}
.nomina-shell table tbody :is(tr.selected,tr[aria-selected=true]):hover td {background:#64B5F6!important}
.nomina-shell table tbody :is(tr.selected,tr[aria-selected=true]) td:first-child {box-shadow:inset 3px 0 #0D47A1}
.nomina-shell table th[aria-sort]:not([aria-sort=none]) {color:#FFFFFF;box-shadow:inset 0 -2px #FFFFFF}
.nomina-shell :is(.employee-search a,.employee-back) {color:var(--primary-action)}
.nomina-shell :is(.employee-search a,.employee-back):hover {color:var(--primary-action-hover)}
:focus-visible {outline:2px solid var(--primary);outline-offset:2px;box-shadow:0 0 0 4px var(--primary-soft)}
.nomina-shell .employee-row:focus-visible {outline-offset:-2px}
.nomina-shell :is(.quiet-button,.workspace-actions [data-edit-pending],.pre-page button:not(#calculate)):not(:disabled):focus-visible {background:var(--primary-soft);color:var(--primary-action-pressed);border-color:var(--primary-action)}
.nomina-shell ::selection {background:var(--primary-soft);color:var(--text-main)}

.nomina-shell :is(button,a,input,select,textarea,[tabindex]):focus-visible,.sidebar a:focus-visible {outline:2px solid var(--primary);outline-offset:2px;box-shadow:0 0 0 4px var(--primary-soft)}
.nomina-shell .employee-row:focus-visible {outline:2px solid var(--primary);outline-offset:-2px}

.nomina-shell .context-bar a,.nomina-shell .patronal-form a {color:var(--primary-action)}
.nomina-shell .context-bar a:hover,.nomina-shell .patronal-form a:hover {color:var(--primary-action-hover)}
/* Preserve horizontal tab scrolling instead of compressing labels/close controls. */
.nomina-shell .workspace-tab {flex-shrink:0}
.nomina-shell .workspace-tab-link {overflow:hidden;text-overflow:ellipsis}
.nomina-shell .workspace-tab .tab-close {flex-shrink:0}
.nomina-shell .workspace-tab-link:focus-visible {outline-offset:-3px}
/* P28A UI BLUE 03B: compact work-grid body cells; preserve header and horizontal padding. */
.nomina-shell :is(.nomina-grid,.employee-table,.pre-grid table) tbody td {
 padding-top:7px;
 padding-bottom:7px;
}

/* P28A-49: "← Portal" compacto al inicio de la barra superior, en la misma fila también en celular. */
.nomina-header .portal-return {margin:0;flex:0 0 auto}
.nomina-header .portal-return button {white-space:nowrap;padding:6px 12px;font-size:13px;line-height:1.2}
