/*
 * BPW Population Worker Management System - unified blue + #FAF88E background and header layer v8
 * Loaded LAST on every admin, portal, login, intake and download page.
 * Purpose: remove legacy green/BPW presentation and enforce one high-contrast
 * BPW blue, gold and white visual system throughout the ERP.
 */

:root {
  --bpw-blue-950: #06244a;
  --bpw-blue-900: #07356d;
  --bpw-blue-800: #074b96;
  --bpw-blue-700: #0057a8;
  --bpw-blue-600: #0b6bc2;
  --bpw-blue-100: #eaf4ff;
  --bpw-blue-50: #f5f9ff;
  --bpw-gold-700: #c98300;
  --bpw-gold-600: #e59f00;
  --bpw-gold-500: #fdb515;
  --bpw-gold-100: #fff1bd;
  --bpw-gold-50: #fff9e8;
  --bpw-ink: #102b4c;
  --bpw-text: #1d3652;
  --bpw-muted: #5c7086;
  --bpw-border: #cddded;
  --bpw-soft-border: #e3edf6;
  --bpw-panel: #ffffff;
  --bpw-page: #f3f7fc;
  --bpw-danger: #b42318;
  --bpw-success: #0057a8;
  --bpw-shadow: 0 14px 36px rgba(4, 57, 112, .10);
  --bpw-shadow-strong: 0 24px 68px rgba(4, 49, 101, .17);
  --bpw-nextly-text: var(--bpw-ink) !important;
  --bpw-nextly-muted: var(--bpw-muted) !important;
  --bpw-nextly-primary: var(--bpw-blue-700) !important;
  --bpw-nextly-primary-2: var(--bpw-gold-500) !important;
  --bpw-nextly-line: rgba(0, 87, 168, .18) !important;
  --bpw-nextly-shadow: var(--bpw-shadow-strong) !important;
  --erp-primary: var(--bpw-blue-700) !important;
  --erp-primary-dark: var(--bpw-blue-900) !important;
  --erp-text: var(--bpw-ink) !important;
  --erp-muted: var(--bpw-muted) !important;
  --erp-border: var(--bpw-border) !important;
  --erp-soft: var(--bpw-blue-50) !important;
}

html {
  color-scheme: light !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body,
input,
select,
textarea,
button {
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
}

body {
  color: var(--bpw-text) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  background:
    radial-gradient(circle at 92% 4%, rgba(253, 181, 21, .10), transparent 27%),
    linear-gradient(145deg, #f8fbff 0%, #eef5fc 100%) !important;
}

body :where(h1, h2, h3, h4, h5, h6) {
  color: var(--bpw-ink);
  text-wrap: balance;
}

body :where(p, li, td, th, label, small, em, span) {
  text-rendering: optimizeLegibility;
}

.muted,
.help-text,
.field-help,
.portal-install-note,
.card-head p,
.module-head p {
  color: var(--bpw-muted) !important;
}

/* ---------------- ADMIN / BACK-OFFICE ---------------- */
body.role-standard,
body.role-viewer {
  background: linear-gradient(145deg, #f8fbff, #eef5fc) !important;
}

.sidebar {
  background:
    radial-gradient(circle at 0 100%, rgba(253, 181, 21, .12), transparent 34%),
    linear-gradient(180deg, #07356d 0%, #0057a8 58%, #07356d 100%) !important;
  border-right: 1px solid rgba(253, 181, 21, .44) !important;
  box-shadow: 14px 0 38px rgba(4, 47, 96, .16) !important;
}

.sidebar .brand {
  min-height: 70px !important;
  gap: 12px !important;
}

.sidebar .brand-mark,
.sidebar .bpw-brand-mark {
  width: 58px !important;
  min-width: 58px !important;
  height: 58px !important;
  padding: 5px !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(0, 25, 60, .24) !important;
}

.sidebar .bpw-brand-copy strong {
  color: #fff !important;
  font-size: 16px !important;
  line-height: 1.22 !important;
  font-weight: 850 !important;
}

.sidebar .bpw-brand-copy span {
  color: #dbeafe !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
  font-weight: 650 !important;
}

.sidebar .nav-title {
  color: #d5e8fb !important;
  font-size: 11px !important;
  font-weight: 850 !important;
}

.sidebar .nav a,
.sidebar .nav-group-toggle {
  min-height: 44px !important;
  color: #f7fbff !important;
  font-size: 14px !important;
  font-weight: 760 !important;
  line-height: 1.25 !important;
  border-color: transparent !important;
}

.sidebar .nav a:hover,
.sidebar .nav a.active,
.sidebar .nav-group.open > .nav-group-toggle {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(253, 181, 21, .30), rgba(255,255,255,.09)) !important;
  border-color: rgba(253, 181, 21, .62) !important;
  box-shadow: inset 4px 0 0 var(--bpw-gold-500) !important;
}

.sidebar .nav-index {
  color: #fff7d5 !important;
  background: rgba(253, 181, 21, .20) !important;
  border-color: rgba(253, 181, 21, .45) !important;
}

.main {
  background: transparent !important;
}

.topbar h1 {
  color: var(--bpw-ink) !important;
  font-size: clamp(22px, 2vw, 28px) !important;
  font-weight: 850 !important;
}

.topbar small {
  color: var(--bpw-muted) !important;
  font-size: 13px !important;
}

.userbox,
.card,
.stat-card,
.metric-card,
.bpw-panel,
.dashboard-hub-card,
.modal-card {
  background: rgba(255,255,255,.99) !important;
  border-color: var(--bpw-border) !important;
  box-shadow: var(--bpw-shadow) !important;
}

.card h2,
.card h3,
.module-head h2,
.module-head h3,
.bpw-panel h2,
.bpw-panel h3 {
  color: var(--bpw-ink) !important;
}

.module-head,
.hero-card {
  background: linear-gradient(135deg, #fff 0%, #f5f9ff 72%, #fff7dc 100%) !important;
  border-left: 4px solid var(--bpw-blue-700) !important;
}

.bpw-dash-hero,
.dashboard-hero,
.security-command-hero,
.validation-command-hero {
  background:
    radial-gradient(circle at 92% 15%, rgba(253, 181, 21, .22), transparent 30%),
    linear-gradient(118deg, #07356d 0%, #0057a8 62%, #0d74c8 100%) !important;
  border-color: rgba(255,255,255,.20) !important;
  box-shadow: 0 18px 44px rgba(2, 55, 110, .20) !important;
}

.bpw-dash-hero :where(h1, h2, h3, p, strong, span),
.dashboard-hero :where(h1, h2, h3, p, strong, span),
.security-command-hero :where(h1, h2, h3, p, strong, span),
.validation-command-hero :where(h1, h2, h3, p, strong, span) {
  color: #fff !important;
  text-shadow: none !important;
}

.bpw-dash-hero .bpw-eyebrow,
.dashboard-hero .eyebrow,
.security-command-hero .eyebrow,
.validation-command-hero .eyebrow {
  color: #ffe28b !important;
}

.btn.primary,
button.primary,
.dashboard-hub-actions .btn,
.pagination a.active,
.portal-pagination a.active {
  color: #fff !important;
  background: linear-gradient(135deg, var(--bpw-blue-700), var(--bpw-blue-900)) !important;
  border-color: var(--bpw-blue-700) !important;
  box-shadow: 0 8px 20px rgba(0, 87, 168, .20) !important;
}

.btn.primary:hover,
button.primary:hover,
.dashboard-hub-actions .btn:hover {
  background: linear-gradient(135deg, #0b6bc2, #07356d) !important;
}

.btn.ghost,
.btn:not(.danger):not(.primary) {
  color: var(--bpw-blue-900) !important;
  background: #f7fbff !important;
  border-color: #bcd2e8 !important;
}

label,
.field-title {
  color: var(--bpw-ink) !important;
  font-weight: 780 !important;
}

input,
select,
textarea {
  min-height: 44px;
  color: #172f4c !important;
  background: #fff !important;
  border-color: #bfcfe0 !important;
  font-size: 14px !important;
}

textarea { min-height: 92px; }

input::placeholder,
textarea::placeholder {
  color: #718399 !important;
  opacity: 1 !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--bpw-blue-700) !important;
  box-shadow: 0 0 0 4px rgba(0, 87, 168, .13) !important;
}

.table-wrap,
.portal-table {
  border-color: var(--bpw-border) !important;
  background: #fff !important;
}

th,
.portal-table th {
  color: #234b73 !important;
  background: linear-gradient(180deg, #f6faff, #eaf3fb) !important;
  border-color: #d8e5f1 !important;
  font-weight: 850 !important;
}

td,
.portal-table td {
  color: #273f59 !important;
  border-color: #e5edf5 !important;
}

tr:hover td {
  background: #f7fbff !important;
}

.detail-grid div,
.pagination-wrap,
.metric-card,
.portal-detail-list div,
.portal-payment-summary div {
  background: #f9fbfe !important;
  border-color: #d7e4ef !important;
}

/* ---------------- AUTH / LOGIN PAGES ---------------- */
body.auth-page,
body.portal-auth-page {
  color: var(--bpw-text) !important;
  background:
    radial-gradient(circle at 4% 0%, rgba(0, 87, 168, .18), transparent 32%),
    radial-gradient(circle at 96% 8%, rgba(253, 181, 21, .16), transparent 30%),
    linear-gradient(135deg, #eaf3fc 0%, #f8fbff 46%, #fffaf0 100%) !important;
}

.login-card,
.portal-login-card {
  background: #fff !important;
  border: 1px solid #bfd3e7 !important;
  box-shadow: 0 28px 80px rgba(3, 49, 100, .21) !important;
}

.login-panel,
.portal-login-panel {
  background: #fff !important;
}

.login-panel h1,
.login-panel h2,
.portal-login-panel h1,
.portal-login-panel h2 {
  color: var(--bpw-ink) !important;
  font-weight: 850 !important;
}

.login-hero,
.portal-login-hero {
  color: #fff !important;
  background:
    radial-gradient(circle at 90% 10%, rgba(253, 181, 21, .20), transparent 34%),
    linear-gradient(145deg, #07356d 0%, #0057a8 66%, #0c71c5 100%) !important;
}

.login-hero :where(h1, h2, h3, h4, p, strong, small, span),
.portal-login-hero :where(h1, h2, h3, h4, p, strong, small, span) {
  color: #fff !important;
}

.login-hero p,
.portal-login-hero p {
  color: #eaf4ff !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
}

.pill-grid span,
.portal-chip-row span {
  color: #11355d !important;
  background: #fff4c9 !important;
  border-color: rgba(253, 181, 21, .55) !important;
  font-weight: 850 !important;
}

.login-account-showcase,
.portal-login-hero .login-account-showcase {
  color: #fff !important;
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.28) !important;
}

.login-account-entry,
.portal-login-hero .login-account-entry {
  color: #fff !important;
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.24) !important;
  box-shadow: none !important;
}

.portal-login-panel .login-account-showcase,
.login-panel .login-account-showcase {
  color: var(--bpw-text) !important;
  background: var(--bpw-blue-50) !important;
  border-color: var(--bpw-border) !important;
}

.portal-login-panel .login-account-entry,
.login-panel .login-account-entry {
  color: var(--bpw-text) !important;
  background: #fff !important;
  border-color: var(--bpw-border) !important;
}

.login-account-role,
.login-account-status {
  color: var(--bpw-gold-100) !important;
}

.portal-login-panel .login-account-role,
.portal-login-panel .login-account-status,
.login-panel .login-account-role,
.login-panel .login-account-status {
  color: var(--bpw-blue-700) !important;
}

.login-account-data b,
.portal-login-hero .login-account-data b {
  color: #fff !important;
}

.portal-login-panel .login-account-data b,
.login-panel .login-account-data b {
  color: var(--bpw-ink) !important;
}

.portal-login-links a {
  color: var(--bpw-blue-900) !important;
  background: #f7fbff !important;
  border-color: #bfd4e8 !important;
}

.bpw-login-brand strong {
  color: var(--bpw-blue-900) !important;
  font-size: 19px !important;
  line-height: 1.2 !important;
}

.bpw-login-brand span {
  color: var(--bpw-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

/* ---------------- PORTAL NAVBAR ---------------- */
body.portal-page.bpw-nextly-theme {
  color: var(--bpw-text) !important;
  background:
    radial-gradient(circle at 5% 10%, rgba(0, 87, 168, .10), transparent 31%),
    radial-gradient(circle at 95% 8%, rgba(253, 181, 21, .12), transparent 30%),
    linear-gradient(145deg, #f8fbff 0%, #eef5fc 100%) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-navbar {
  display: grid !important;
  grid-template-columns: minmax(350px, 1.15fr) minmax(430px, 1.65fr) minmax(235px, .85fr) !important;
  gap: 22px !important;
  min-height: 100px !important;
  padding: 16px 24px !important;
  color: var(--bpw-text) !important;
  background:
    linear-gradient(108deg, rgba(239, 247, 255, .98), rgba(255,255,255,.98) 57%, rgba(255, 248, 225, .94)) !important;
  border: 1px solid #bfd3e7 !important;
  box-shadow: 0 18px 48px rgba(3, 54, 109, .14) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-brand {
  min-width: 0 !important;
  max-width: none !important;
  width: 100% !important;
  gap: 14px !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-brand-mark {
  width: 60px !important;
  height: 60px !important;
  flex: 0 0 60px !important;
  padding: 5px !important;
  background: #fff !important;
  border-color: #c9daea !important;
  box-shadow: 0 9px 24px rgba(0, 64, 126, .15) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy {
  grid-template-columns: auto minmax(0, 1fr) !important;
  column-gap: 10px !important;
  row-gap: 3px !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy b {
  color: var(--bpw-blue-700) !important;
  font-size: 24px !important;
  font-weight: 900 !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy small {
  color: var(--bpw-ink) !important;
  font-size: 13px !important;
  font-weight: 820 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy em {
  color: #536b83 !important;
  font-size: 10.5px !important;
  font-weight: 760 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-desktop-nav {
  gap: clamp(18px, 2vw, 34px) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-top-trigger,
body.portal-page.bpw-nextly-theme .bpw-nextly-top-text {
  color: var(--bpw-ink) !important;
  font-size: 14px !important;
  font-weight: 760 !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-top-trigger:hover,
body.portal-page.bpw-nextly-theme .bpw-nextly-top-trigger:focus-visible,
body.portal-page.bpw-nextly-theme .bpw-nextly-nav-group.active > .bpw-nextly-top-trigger,
body.portal-page.bpw-nextly-theme .bpw-nextly-nav-group.open > .bpw-nextly-top-trigger {
  color: var(--bpw-blue-700) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-top-text::after,
body.portal-page.bpw-nextly-theme .bpw-nextly-mobile-text::after,
body.portal-page.bpw-nextly-theme .bpw-nextly-sub-text::after {
  background: linear-gradient(90deg, var(--bpw-blue-700), var(--bpw-gold-500)) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-profile-button {
  min-height: 58px !important;
  color: var(--bpw-ink) !important;
  background: #fff !important;
  border-color: #d1dfec !important;
  box-shadow: 0 8px 20px rgba(0, 62, 123, .08) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-avatar {
  color: #fff !important;
  background: linear-gradient(135deg, var(--bpw-blue-700), var(--bpw-blue-900)) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-profile-copy b {
  color: var(--bpw-ink) !important;
  font-size: 13px !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-profile-copy small {
  color: var(--bpw-muted) !important;
  font-size: 11px !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-desktop-panel,
body.portal-page.bpw-nextly-theme .bpw-nextly-profile-dropdown,
body.portal-page.bpw-nextly-theme .bpw-nextly-mobile-menu {
  color: var(--bpw-text) !important;
  background: #fff !important;
  border-color: #c9d9e8 !important;
  box-shadow: var(--bpw-shadow-strong) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-sub-link,
body.portal-page.bpw-nextly-theme .bpw-nextly-mobile-trigger,
body.portal-page.bpw-nextly-theme .bpw-nextly-profile-action {
  color: var(--bpw-text) !important;
}

body.portal-page.bpw-nextly-theme .bpw-nextly-sub-link:hover,
body.portal-page.bpw-nextly-theme .bpw-nextly-profile-action:hover {
  color: var(--bpw-blue-900) !important;
  background: var(--bpw-blue-50) !important;
}

/* ---------------- PORTAL CONTENT / EMPLOYEE / PORTAL USER ---------------- */
body.portal-page .portal-main {
  color: var(--bpw-text) !important;
}

body.portal-page .employee-dashboard-hero,
body.portal-page .portal-user-dashboard-hero,
body.portal-page .portal-hero,
body.portal-page.nextly-portal-theme .employee-dashboard-hero {
  color: #fff !important;
  background:
    radial-gradient(circle at 90% 12%, rgba(253,181,21,.22), transparent 32%),
    linear-gradient(118deg, #07356d 0%, #0057a8 58%, #0c72c5 100%) !important;
  border-color: rgba(255,255,255,.20) !important;
  box-shadow: 0 18px 44px rgba(2, 54, 108, .20) !important;
}

body.portal-page .employee-dashboard-hero :where(h1, h2, h3, p, strong, span),
body.portal-page .portal-user-dashboard-hero :where(h1, h2, h3, p, strong, span),
body.portal-page .portal-hero :where(h1, h2, h3, p, strong, span),
body.portal-page.nextly-portal-theme .employee-dashboard-hero :where(h1, h2, h3, p, strong, span) {
  color: #fff !important;
  text-shadow: none !important;
}

body.portal-page .employee-dashboard-hero .eyebrow,
body.portal-page .portal-user-dashboard-hero .eyebrow,
body.portal-page .portal-hero .eyebrow,
body.portal-page.nextly-portal-theme .employee-dashboard-hero .eyebrow {
  color: #ffe28a !important;
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.26) !important;
}

body.portal-page .employee-hero-meta > span,
body.portal-page .portal-user-hero-meta > span,
body.portal-page.nextly-portal-theme .employee-hero-meta > span {
  color: #fff !important;
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.24) !important;
}

body.portal-page .employee-dashboard-time,
body.portal-page.nextly-portal-theme .employee-dashboard-time {
  color: #fff !important;
  background: rgba(3, 36, 77, .42) !important;
  border-color: rgba(255,255,255,.24) !important;
}

body.portal-page .employee-dashboard-time :where(small, strong, span),
body.portal-page.nextly-portal-theme .employee-dashboard-time :where(small, strong, span) {
  color: #fff !important;
}

body.portal-page .employee-dashboard-time small,
body.portal-page.nextly-portal-theme .employee-dashboard-time small {
  color: #ffe28a !important;
}

body.portal-page .portal-stat,
body.portal-page .portal-card-panel,
body.portal-page .employee-action-center,
body.portal-page .employee-connection-panel,
body.portal-page .employee-activity-card,
body.portal-page .employee-announcement-card,
body.portal-page .portal-user-action-center,
body.portal-page .portal-user-connection-panel,
body.portal-page .portal-user-master-profile,
body.portal-page .portal-portal-user-detail-group,
body.portal-page .employee-profile-shell,
body.portal-page .employee-profile-content,
body.portal-page .employee-profile-sidebar,
body.portal-page .portal-section,
body.portal-page .portal-panel {
  color: var(--bpw-text) !important;
  background: #fff !important;
  border-color: var(--bpw-border) !important;
  box-shadow: var(--bpw-shadow) !important;
}

body.portal-page :where(.portal-stat, .portal-card-panel, .employee-action-center, .employee-connection-panel, .employee-activity-card, .employee-announcement-card, .portal-user-action-center, .portal-user-connection-panel, .portal-user-master-profile, .portal-portal-user-detail-group, .portal-section, .portal-panel) :where(h1, h2, h3, h4, strong, b, label) {
  color: var(--bpw-ink) !important;
}

body.portal-page :where(.portal-stat, .portal-card-panel, .employee-action-center, .employee-connection-panel, .employee-activity-card, .employee-announcement-card, .portal-user-action-center, .portal-user-connection-panel, .portal-user-master-profile, .portal-portal-user-detail-group, .portal-section, .portal-panel) :where(p, small, em) {
  color: var(--bpw-muted) !important;
}

body.portal-page .portal-stat {
  background: linear-gradient(180deg, #fff, #f8fbff) !important;
  border-color: #d2e0ed !important;
}

body.portal-page .portal-stat strong {
  color: var(--bpw-blue-900) !important;
  font-size: 20px !important;
}

body.portal-page .portal-stat small,
body.portal-page .portal-stat em {
  color: var(--bpw-muted) !important;
}

body.portal-page .employee-quick-actions > a,
body.portal-page .portal-user-quick-actions > a,
body.portal-page .employee-connection-list > a,
body.portal-page .portal-user-connection-list > a,
body.portal-page .employee-activity-item,
body.portal-page .employee-announcement-list > a {
  color: var(--bpw-text) !important;
  background: #fbfdff !important;
  border-color: #d7e4ef !important;
}

body.portal-page .employee-quick-actions > a:hover,
body.portal-page .portal-user-quick-actions > a:hover,
body.portal-page .employee-connection-list > a:hover,
body.portal-page .portal-user-connection-list > a:hover {
  color: var(--bpw-blue-900) !important;
  background: #f2f8fe !important;
  border-color: #a9c7e2 !important;
  box-shadow: 0 8px 20px rgba(0, 77, 153, .08) !important;
}

body.portal-page .employee-quick-actions > a > span,
body.portal-page .portal-user-quick-actions > a > span,
body.portal-page .employee-connection-list .ico,
body.portal-page .portal-user-connection-list .ico {
  background: var(--bpw-blue-50) !important;
  border-color: #c9ddeb !important;
}

body.portal-page .portal-portal-user-detail-item,
body.portal-page .portal-user-profile-summary,
body.portal-page .employee-profile-field,
body.portal-page .employee-profile-summary-card,
body.portal-page .employee-profile-readonly-field {
  color: var(--bpw-text) !important;
  background: #f9fbfe !important;
  border-color: #d7e4ef !important;
}

body.portal-page .portal-portal-user-detail-head,
body.portal-page .employee-profile-section-head {
  border-color: #dce7f1 !important;
}

body.portal-page .portal-portal-user-detail-head h2,
body.portal-page .portal-user-profile-summary h3,
body.portal-page .portal-portal-user-detail-item b {
  color: var(--bpw-ink) !important;
}

body.portal-page .portal-portal-user-detail-item small {
  color: #597087 !important;
}

body.portal-page .portal-empty {
  color: var(--bpw-muted) !important;
  background: var(--bpw-blue-50) !important;
  border-color: #d7e4ef !important;
}

body.portal-page .badge.good,
body.portal-page .status-good {
  color: #07356d !important;
  background: #e5f6ee !important;
}

body.portal-page .badge.warn,
body.portal-page .status-warn {
  color: #785100 !important;
  background: #fff2c2 !important;
}

/* Employee Profile left tabs */
body.portal-page .employee-profile-nav a,
body.portal-page .employee-profile-sidebar a,
body.portal-page .profile-side-nav a,
body.portal-page .employee-profile-tab {
  color: var(--bpw-text) !important;
  background: #fff !important;
  border-color: #dce6f0 !important;
}

body.portal-page .employee-profile-nav a.active,
body.portal-page .employee-profile-sidebar a.active,
body.portal-page .profile-side-nav a.active,
body.portal-page .employee-profile-tab.active {
  color: #fff !important;
  background: linear-gradient(135deg, var(--bpw-blue-700), var(--bpw-blue-900)) !important;
  border-color: var(--bpw-blue-700) !important;
}

/* ---------------- PUBLIC PRE-EMPLOYMENT ---------------- */
body.hr-intake-body,
body.intake-public-page {
  color: var(--bpw-text) !important;
  background:
    radial-gradient(circle at 5% 4%, rgba(0,87,168,.12), transparent 30%),
    radial-gradient(circle at 95% 6%, rgba(253,181,21,.12), transparent 28%),
    linear-gradient(145deg, #f8fbff, #eef5fc) !important;
}

.hr-intake-card,
.intake-card {
  background: #fff !important;
  border-color: var(--bpw-border) !important;
  box-shadow: var(--bpw-shadow-strong) !important;
}

.hr-intake-header,
.intake-header {
  color: #fff !important;
  background:
    radial-gradient(circle at 90% 15%, rgba(253,181,21,.18), transparent 32%),
    linear-gradient(118deg, #07356d, #0057a8 65%, #0c72c5) !important;
}

.hr-intake-header :where(h1,h2,h3,p,span,strong),
.intake-header :where(h1,h2,h3,p,span,strong) {
  color: #fff !important;
}

.intake-section-title,
.hr-intake-section-title {
  color: var(--bpw-blue-900) !important;
  background: linear-gradient(90deg, #eef6ff, #fff7da) !important;
  border-color: #cbdceb !important;
}

/* Keep text itself stable; only icons may animate on hover. */
body a:hover,
body button:hover,
body .btn:hover {
  font-size: inherit !important;
}

body a:hover:not(.btn),
body button:hover,
body .btn:hover {
  zoom: 1 !important;
}

body button:hover,
body .btn:hover,
body button:focus-visible,
body .btn:focus-visible {
  transform: none !important;
}

body button:hover .ico,
body .btn:hover .ico {
  transform: none !important;
}

/* ---------------- RESPONSIVE READABILITY ---------------- */
@media (max-width: 1480px) {
  body.portal-page.bpw-nextly-theme .bpw-nextly-navbar {
    grid-template-columns: minmax(300px, 1fr) minmax(380px, 1.45fr) minmax(210px, .8fr) !important;
    gap: 15px !important;
  }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy small { font-size: 12px !important; }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy em { font-size: 9.5px !important; }
  body.portal-page.bpw-nextly-theme .bpw-nextly-desktop-nav { gap: 17px !important; }
}

@media (max-width: 1180px) {
  body.portal-page.bpw-nextly-theme .bpw-nextly-navbar {
    display: flex !important;
    min-height: 82px !important;
  }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand { min-width: 260px !important; }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand-mark {
    width: 50px !important;
    height: 50px !important;
    flex-basis: 50px !important;
  }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy b { font-size: 21px !important; }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy small { font-size: 11.5px !important; }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy em { display: none !important; }
}

@media (max-width: 760px) {
  body { font-size: 14px !important; }
  body.portal-page.bpw-nextly-theme .bpw-nextly-navbar {
    padding: 10px 12px !important;
    border-radius: 18px !important;
  }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand {
    min-width: 0 !important;
    gap: 9px !important;
  }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand-mark {
    width: 44px !important;
    height: 44px !important;
    flex-basis: 44px !important;
  }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy b { font-size: 19px !important; }
  body.portal-page.bpw-nextly-theme .bpw-nextly-brand-copy small {
    display: block !important;
    font-size: 10.5px !important;
    max-width: 185px !important;
    white-space: normal !important;
  }
  body.portal-page .employee-dashboard-hero,
  body.portal-page .portal-user-dashboard-hero {
    padding: 22px !important;
  }
  body.portal-page .employee-dashboard-hero h1,
  body.portal-page .portal-user-dashboard-hero h1 {
    font-size: 28px !important;
  }
  .login-panel,
  .portal-login-panel { padding: 24px !important; }
}

/* Employee profile and 201-file details use the same BPW visual language. */
body.portal-page .employee-profile-hero,
body.role-standard .employee-profile-hero,
body.role-viewer .employee-profile-hero {
  color: #fff !important;
  background:
    radial-gradient(circle at 90% 10%, rgba(253,181,21,.22), transparent 34%),
    linear-gradient(118deg, #07356d 0%, #0057a8 58%, #0c72c5 100%) !important;
  border-color: rgba(255,255,255,.20) !important;
  box-shadow: 0 18px 44px rgba(2,54,108,.20) !important;
}

.employee-profile-hero :where(h1,h2,h3,p,span,strong,small),
.employee-profile-hero-copy :where(h1,h2,h3,p,span,strong,small),
.employee-profile-quickfacts :where(h1,h2,h3,p,span,strong,small) {
  color: #fff !important;
}

.employee-profile-badges span,
.employee-profile-quickfacts div {
  color: #fff !important;
  background: rgba(3,36,77,.30) !important;
  border-color: rgba(255,255,255,.24) !important;
}

.employee-profile-side,
.employee-profile-content,
.employee-portal-readonly-profile .employee-profile-content,
.employee-portal-readonly-profile .employee-profile-side {
  background: #fff !important;
  border-color: var(--bpw-border) !important;
  box-shadow: var(--bpw-shadow) !important;
}

.employee-profile-side-photo {
  background: linear-gradient(180deg, #f5f9ff, #fff9e9) !important;
  border-color: #dce7f1 !important;
}

.employee-profile-side-photo strong,
.employee-profile-field > span,
.employee-profile-section-head h3,
.employee-portal-profile-value,
.employee-portal-profile-empty-state b {
  color: var(--bpw-ink) !important;
}

.employee-profile-side-photo span,
.employee-profile-photo-upload small,
.employee-profile-section-head p,
.employee-profile-savebar span,
.employee-portal-profile-empty-state {
  color: var(--bpw-muted) !important;
}

.employee-profile-tabs button {
  color: var(--bpw-text) !important;
  background: #fff !important;
  border-color: #dce7f1 !important;
}

.employee-profile-tabs button:hover,
.employee-profile-tabs button.active {
  color: #fff !important;
  background: linear-gradient(135deg, var(--bpw-blue-700), var(--bpw-blue-900)) !important;
  border-color: var(--bpw-blue-700) !important;
}

.employee-profile-tabs button:hover :where(b,span,em),
.employee-profile-tabs button.active :where(b,span,em) {
  color: #fff !important;
}

.employee-profile-section-head {
  background: linear-gradient(90deg, #f2f8ff, #fff9e8) !important;
  border-color: #dce7f1 !important;
}

.employee-profile-section-head > div > span,
.employee-profile-count {
  color: var(--bpw-blue-900) !important;
  background: #eaf4ff !important;
  border-color: #c9dceb !important;
}

.employee-profile-field input,
.employee-profile-field select,
.employee-profile-field textarea,
.employee-portal-profile-value,
.employee-profile-check {
  color: var(--bpw-text) !important;
  background: #f9fbfe !important;
  border-color: #cbd9e6 !important;
}

.employee-profile-field input:focus,
.employee-profile-field select:focus,
.employee-profile-field textarea:focus {
  border-color: var(--bpw-blue-700) !important;
  outline: 3px solid rgba(0,87,168,.12) !important;
}

.employee-portal-profile-note,
.employee-portal-profile-empty-state {
  color: var(--bpw-text) !important;
  background: #f5f9ff !important;
  border-color: #d2e0ed !important;
}


