html {
  font-size: 14px;
}

:root {
  /* Public brand palette — aligned to MARPIS forest greens */
  --forest: #4a773c;
  --forest-deep: #2e4d23;
  --olive: #3e5c31;
  --olive-dark: #314a28;
  --gold: #c9a227;
  --gold-bright: #e4be3d;
  --navy: #0B1E32;
  --paper: #f4f7f2;
  --ink: #1f2a20;
  --slate: #5c6b5d;
  --line: #dce3d6;
  --hero-photo-url: none;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', Arial, sans-serif;

  /* App / dashboard greens — from Intelligence Officer redesign reference */
  --mrps-green: #4a773c;       /* medium: active nav, outline buttons */
  --mrps-green-dark: #2e4d23;  /* deep forest: sidebar */
  --mrps-green-light: #e9f0e6; /* pale mint: table headers, chips */
  --mrps-green-deep: #243d1c;  /* darkest: hover / depth */
  --mrps-green-muted: #f4f7f2; /* page background */
  --mrps-green-mid: #3e5c31;   /* titles, solid primary buttons */
  --mrps-text: #1f2937;
  --mrps-muted: #5c6b5d;
  --mrps-border: #dce3d6;
  --mrps-shadow: rgba(46, 77, 35, 0.14);
  --mrps-radius: 0.5rem;
  --mrps-radius-sm: 0.375rem;
  --mrps-success: #166534;
  --mrps-warning: #92400e;
  --mrps-danger: #991b1b;
  --mrps-info: #1e3a5f;
  --mrps-sidebar-width: 20rem;
  --mrps-risk-high: #c53030;
  --mrps-risk-medium: #d69e2e;
  --mrps-stat-neutral: #6b7280;
  --bs-primary: #3e5c31;
  --bs-primary-rgb: 62, 92, 49;
  --bs-link-color: #3e5c31;
  --bs-link-hover-color: #2e4d23;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background: var(--mrps-green-muted);
  color: var(--mrps-text);
  margin: 0;
}

.page-shell {
  display: flex;
  min-height: 100vh;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.sidebar {
  width: var(--mrps-sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--mrps-green-dark) 0%, var(--mrps-green-deep) 100%);
  color: #ffffff;
  box-shadow: 4px 0 24px rgba(46, 77, 35, 0.18);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.1rem 1.05rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.sidebar-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-user {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.85rem;
}

.sidebar-user-text {
  min-width: 0;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.sidebar-user-role {
  font-size: 0.8rem;
  opacity: 0.85;
}

.sidebar-user-location {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  opacity: 0.9;
  line-height: 1.3;
  display: flex;
  gap: 0.25rem;
  align-items: flex-start;
}

.sidebar-user-location-icon {
  flex-shrink: 0;
}

.brand {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 0.2rem;
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
}

.sidebar-section {
  margin-bottom: 0.7rem;
}

.sidebar-section h6 {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 0.6rem;
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar .nav-link.active {
  background: var(--mrps-green);
  color: #ffffff;
  border-left: 3px solid #e4be3d;
  padding-left: calc(0.75rem - 3px);
}

.sidebar .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  color: #ffffff;
}

.content-area {
  flex: 1;
  padding: 0.7rem 1rem 0.55rem;
}

.content-area > main {
  padding-bottom: 0.5rem !important;
}

.content-area main .mb-4 {
  margin-bottom: 0.8rem !important;
}

.content-area main .mt-4 {
  margin-top: 0.8rem !important;
}

.content-area main .row.g-4 {
  --bs-gutter-x: 0.8rem;
  --bs-gutter-y: 0.8rem;
}

.content-area main .row.g-3 {
  --bs-gutter-x: 0.7rem;
  --bs-gutter-y: 0.7rem;
}

.app-footer {
  background: #ffffff;
  padding: 0.85rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.intel-dashboard-hero {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 0.9rem 1.15rem;
  box-shadow: 0 6px 20px var(--mrps-shadow);
  border-left: 4px solid var(--mrps-green);
}

.intel-dashboard-kicker {
  color: var(--mrps-green-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intel-dashboard-hero .dashboard-quick-actions {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.stat-card-intel {
  border-top: 3px solid var(--mrps-green);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.7rem 1rem;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 6px 20px var(--mrps-shadow);
  border-left: 4px solid var(--mrps-green);
}

.topbar-badge {
  background: var(--mrps-green-light);
  color: var(--mrps-green-deep);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
}

.stat-card,
.dashboard-card {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 6px 20px var(--mrps-shadow);
}

.dashboard-card .card-title {
  color: var(--mrps-green-deep);
  font-weight: 700;
}

.table thead th {
  background: var(--mrps-green-light);
  color: var(--mrps-green-deep);
  border-bottom: 2px solid rgba(74, 119, 60, 0.35);
}

.stat-card .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--mrps-green-deep);
}

.stat-card .label {
  font-size: 0.9rem;
  color: #64748b;
}

.stat-card .trend {
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-card .trend.positive {
  color: #15803d;
}

.stat-card .trend.warning {
  color: #7c2d12;
}

.custom-progress {
  height: 0.7rem;
}

.dashboard-mini-stat {
  background: var(--mrps-green-light);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.dashboard-mini-stat span {
  display: block;
  font-size: 0.8rem;
}

.dashboard-mini-stat strong {
  font-size: 1.25rem;
  color: var(--mrps-green-deep);
}

.dashboard-quick-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.dashboard-activity-list .list-group-item {
  border-color: #e2e8f0;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  height: 180px;
}

.chart-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.chart-item .bar {
  width: 100%;
  min-height: 24px;
  border-radius: 0.4rem 0.4rem 0 0;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(74, 119, 60, 0.45);
}

.btn-primary {
  --bs-btn-bg: var(--mrps-green-mid);
  --bs-btn-border-color: var(--mrps-green-mid);
  --bs-btn-hover-bg: var(--mrps-green-dark);
  --bs-btn-hover-border-color: var(--mrps-green-dark);
  --bs-btn-active-bg: var(--mrps-green-dark);
  --bs-btn-active-border-color: var(--mrps-green-dark);
  --bs-btn-disabled-bg: var(--mrps-green-mid);
  --bs-btn-disabled-border-color: var(--mrps-green-mid);
}

.btn-outline-primary {
  --bs-btn-color: var(--mrps-green-mid);
  --bs-btn-border-color: var(--mrps-green);
  --bs-btn-hover-bg: var(--mrps-green-light);
  --bs-btn-hover-border-color: var(--mrps-green-mid);
  --bs-btn-hover-color: var(--mrps-green-dark);
  --bs-btn-active-bg: var(--mrps-green-light);
  --bs-btn-active-border-color: var(--mrps-green-mid);
  --bs-btn-active-color: var(--mrps-green-dark);
}

a {
  color: var(--mrps-green-dark);
}

a:hover {
  color: var(--mrps-green-deep);
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

.footer {
  background: #ffffff;
  padding: 1rem 0;
}

.app-footer a {
  color: var(--mrps-green-dark);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-role {
  background: var(--mrps-green-light);
  color: var(--mrps-green-mid);
  font-weight: 600;
}

.badge-risk-low::before,
.badge-risk-medium::before,
.badge-risk-high::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex: 0 0 auto;
  background: currentColor;
}

.badge-risk-low,
.badge-risk-medium,
.badge-risk-high {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35em 0.65em;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-risk-low {
  background: #dcfce7;
  color: #14532d;
}

.badge-risk-medium {
  background: #fef3c7;
  color: #92400e;
}

.badge-risk-high {
  background: #fee2e2;
  color: #991b1b;
}

/* DICT government public site layout */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 0.25rem;
}

.skip-link:focus {
  top: 0.5rem;
}

.gov-verification-bar {
  background: var(--navy);
  color: #e4e9e2;
  font-size: 0.85rem;
  padding: 0.2rem 0;
}

.gov-verification-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.25rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.gov-verification-identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.gov-png-flag {
  width: 42px;
  height: 28px;
  flex: 0 0 auto;
  object-fit: fill;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.gov-lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  white-space: nowrap;
}

.public-body .gov-lang-switch {
  display: none;
}

.gov-lang-switch a {
  color: #fff;
  text-decoration: none;
}

.gov-lang-switch a:hover,
.gov-lang-switch a:focus {
  text-decoration: underline;
}

.gov-lang-switch a.active {
  text-decoration: underline;
}

.gov-flag {
  display: inline;
  margin-right: 0.4rem;
  line-height: 1.2;
}

.gov-verification-text,
.gov-verification-inner > span:not(.gov-flag) {
  display: inline;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.gov-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.gov-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.gov-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.gov-header-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
}

.gov-header-agency {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--forest);
}

.gov-header-system {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--olive-dark);
}

.gov-eservice-badge {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate);
}

.gov-header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

.gov-header-nav a {
  color: var(--forest-deep);
  text-decoration: none;
}

.gov-header-nav a:hover,
.gov-header-nav a:focus {
  color: var(--forest);
  text-decoration: underline;
}

.gov-header-login {
  font-weight: 600;
  background: var(--forest) !important;
  color: #fff !important;
  border-radius: 3px;
  padding: 0.35rem 0.9rem !important;
}

.gov-header-login:hover,
.gov-header-login:focus {
  background: var(--forest-deep) !important;
  color: #fff !important;
  text-decoration: none !important;
}

.gov-horizontal-nav {
  background: var(--olive-dark);
  max-width: 100%;
}

.gov-horizontal-nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0;
  overflow-x: auto;
}

.gov-nav-link {
  color: #e8efe3;
  text-decoration: none;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.gov-nav-link:hover,
.gov-nav-link:focus {
  background: var(--forest-deep);
  color: #fff;
}

.gov-nav-link.active {
  background: var(--forest-deep);
  color: #fff;
  border-bottom-color: var(--gold-bright);
}

.gov-accessibility-controls {
  display: flex;
  gap: 0.35rem;
}

.public-body {
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'IBM Plex Sans', Arial, sans-serif;
}

.public-body h1,
.public-body h2,
.public-body h3,
.public-body .h1,
.public-body .h2,
.public-body .h3,
.public-body .h5,
.public-body .public-hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
}

.public-body .gov-header-nav,
.public-body .gov-nav-link,
.public-body .gov-header-login,
.public-body .gov-footer,
.public-body .btn,
.public-body button {
  font-family: 'IBM Plex Sans', Arial, sans-serif;
}

.public-main {
  flex: 1;
  padding: 0.55rem 0 0.75rem;
}

.public-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

body.public-home .public-main {
  padding: 0;
}

body.public-home .public-content {
  max-width: none;
  padding: 0;
}

.public-content .page-heading {
  margin-bottom: 0.55rem;
  color: var(--forest);
}

.public-content .mb-4 {
  margin-bottom: 0.75rem !important;
}

.public-content .mt-4 {
  margin-top: 0.75rem !important;
}

.public-home-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 0.25rem;
  box-shadow: 0 2px 8px rgba(27, 42, 56, 0.06);
  padding: 0.9rem 1.15rem 0.75rem;
}

.public-hero {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  box-shadow: none;
}

.public-home-cards {
  margin: 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.public-home-tile h2,
.public-home-contact h2 {
  color: var(--forest);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.public-home-tile p,
.public-home-contact p {
  color: var(--slate);
  line-height: 1.45;
}

.public-home-contact {
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.public-hero .lead {
  margin-bottom: 0.75rem;
}

.public-kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 0.3rem;
}

.public-hero-logo {
  max-width: 148px;
  border-radius: 50%;
  background: #fff;
  padding: 0.35rem;
  box-shadow: 0 4px 16px var(--mrps-shadow);
}

.gov-footer {
  background: var(--navy);
  color: #b9c4b2;
  padding: 1.15rem 0 0.75rem;
  margin-top: auto;
}

.gov-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
}

.gov-footer h6 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.gov-footer a {
  color: #d3dbcc;
  text-decoration: none;
}

.gov-footer a:hover,
.gov-footer a:focus {
  color: #fff;
  text-decoration: underline;
}

.gov-footer-divider {
  border-color: #475569;
  margin: 1.5rem 0 1rem;
}

.gov-footer-copy {
  color: #94a3b8;
}

.login-gov-bar,
.login-chrome {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
}

.login-topbar {
  border-bottom: 2px solid var(--mrps-green);
}

.login-topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.4rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.login-topbar-official {
  margin: 0;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.35;
}

.login-chrome .gov-accessibility-controls .btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.login-chrome .gov-accessibility-controls .btn:hover,
.login-chrome .gov-accessibility-controls .btn:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.login-footer {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  text-align: center;
  padding: 0.85rem 1.25rem;
  background: #1e293b;
  color: #94a3b8;
  font-size: 0.85rem;
}

.login-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.7rem;
}

.login-footer a {
  color: #94d4a4;
  text-decoration: none;
}

.login-footer a:hover,
.login-footer a:focus {
  color: #fff;
  text-decoration: underline;
}

.app-gov-footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
}

.app-gov-footer a {
  color: #94d4a4;
  text-decoration: none;
}

.app-gov-footer a:hover {
  text-decoration: underline;
}

.topbar-accessibility {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

html.high-contrast {
  --mrps-text: #000;
  --mrps-green-muted: #fff;
}

html.high-contrast body {
  background: #fff;
  color: #000;
}

html.high-contrast .sidebar {
  background: #000;
}

html.high-contrast .card,
html.high-contrast .dashboard-card {
  border: 2px solid #000;
}

html.high-contrast a {
  text-decoration: underline;
}

/* Agent external submission portal */
.agent-portal-body {
  background: #f1f5f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.agent-portal-header {
  background: #fff;
  border-bottom: 3px solid var(--mrps-green);
}

.agent-portal-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agent-portal-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
}

.agent-portal-title {
  font-weight: 700;
  color: var(--mrps-green-deep);
}

.agent-portal-subtitle {
  font-size: 0.85rem;
  color: #64748b;
}

.agent-portal-nav {
  background: var(--mrps-green-deep);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1.25rem;
  max-width: 100%;
}

.agent-nav-link {
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}

.agent-nav-link:hover,
.agent-nav-link:focus,
.agent-nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.agent-portal-main {
  flex: 1;
  padding: 0.7rem 0 0.9rem;
}

.agent-portal-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.agent-portal-footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
}

.agent-portal-footer a {
  color: #94d4a4;
}

.login-body {
  --login-green: var(--olive);
  --login-green-dark: var(--forest);
  --login-green-light: var(--paper);
  --login-green-deep: var(--forest-deep);
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  min-height: 100dvh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.login-background {
  position: fixed;
  inset: 0;
  background: url('/images/4.jpg') center 30% / cover no-repeat;
  z-index: 0;
}

.login-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(115deg,
      rgba(18, 32, 8, 0.88) 0%,
      rgba(24, 42, 12, 0.72) 34%,
      rgba(0, 0, 0, 0.42) 62%,
      rgba(0, 0, 0, 0.28) 100%);
  z-index: 1;
}

.login-shell {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.login-panel {
  width: 100%;
  max-width: min(72rem, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 1fr);
  gap: 3rem;
  align-items: center;
}

.login-hero {
  color: #ffffff;
  padding: 1.5rem 1.25rem;
  max-width: 32rem;
  background: linear-gradient(90deg, rgba(12, 22, 6, 0.55), rgba(12, 22, 6, 0.18) 70%, transparent);
  border-radius: 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.login-hero-kicker {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.25rem;
  text-shadow: none;
}

.login-hero-agency {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.login-hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--gold-bright);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.login-hero-system-name {
  margin: 0 0 1.15rem;
  font-size: 1.15rem;
  font-weight: 500;
  opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.login-hero-divider {
  width: 3.5rem;
  height: 3px;
  background: var(--login-green);
  border-radius: 2px;
  margin-bottom: 1rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.login-tagline {
  max-width: 26rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  opacity: 0.96;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.login-hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.login-hero-points li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.92rem;
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.login-hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--login-green);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.login-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 0.35rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
}

.login-card-logo {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 0.35rem;
  border: 3px solid var(--login-green);
  box-shadow: 0 6px 18px rgba(46, 77, 35, 0.18);
  margin: 0 auto 1.25rem;
}

.login-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 1.35rem;
  padding: 2.5rem 2.5rem 2.25rem;
  min-height: 0;
  width: 100%;
  max-width: 32rem;
  justify-self: end;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.login-card-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.15rem;
  border-bottom: 2px solid var(--login-green-light);
  text-align: center;
}

.login-card-header .h4 {
  font-size: 1.65rem;
  font-weight: 700;
}

.login-card-header .text-muted {
  font-size: 1rem;
}

.login-form .mb-3 {
  margin-bottom: 1.25rem !important;
}

.login-form .mb-4 {
  margin-bottom: 1.5rem !important;
}

.login-form .form-label {
  font-weight: 600;
  font-size: 1rem;
  color: #334155;
  margin-bottom: 0.45rem;
}

.login-form .form-control {
  min-height: 3.15rem;
  font-size: 1.05rem;
  padding: 0.75rem 1rem;
}

.login-password-field {
  position: relative;
}

.login-password-field .form-control {
  padding-right: 4.75rem;
}

.login-password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  min-height: 2.25rem;
  padding: 0.25rem 0.65rem;
  border: 0;
  background: transparent;
  color: var(--login-green-deep);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.login-password-toggle:focus-visible {
  outline: 2px solid var(--login-green-dark);
  outline-offset: 2px;
}

.login-form .form-control:focus {
  border-color: var(--login-green);
  box-shadow: 0 0 0 0.2rem rgba(74, 119, 60, 0.25);
}

.login-form .form-check-label {
  font-size: 0.98rem;
}

html.text-enlarged .login-shell {
  align-items: flex-start;
  padding: 2.25rem 1.75rem 2.5rem;
}

html.text-enlarged .login-panel {
  max-width: min(80rem, 100%);
  gap: 3.25rem;
}

html.text-enlarged .login-hero {
  max-width: 36rem;
  padding: 1.75rem 1.4rem;
}

html.text-enlarged .login-card {
  max-width: 36rem;
  padding: 2.75rem 2.75rem 2.5rem;
}

html.text-enlarged .login-card-header {
  margin-bottom: 2rem;
  padding-bottom: 1.35rem;
}

html.text-enlarged .login-form .mb-3 {
  margin-bottom: 1.5rem !important;
}

html.text-enlarged .login-form .mb-4 {
  margin-bottom: 1.75rem !important;
}

html.text-enlarged-lg .login-panel {
  grid-template-columns: 1fr;
  max-width: 40rem;
  gap: 2rem;
}

html.text-enlarged-lg .login-hero,
html.text-enlarged-lg .login-card {
  max-width: none;
  justify-self: stretch;
}

html.text-enlarged-lg .login-card {
  padding: 2.5rem 2.25rem;
}

.login-form .validation-summary-valid {
  display: none;
}

.btn-login {
  background: var(--login-green-dark);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  min-height: 3.25rem;
  padding: 0.85rem 1.25rem;
}

.btn-login:hover,
.btn-login:focus {
  background: var(--login-green-dark);
  color: #ffffff;
}

.demo-accounts {
  background: var(--login-green-light);
  border: 1px solid rgba(74, 119, 60, 0.45);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
}

.demo-title {
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--login-green-deep);
}

.demo-accounts ul {
  padding-left: 1.1rem;
  color: #475569;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .login-panel {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
  }

  .login-card {
    justify-self: stretch;
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 2.25rem 1.75rem;
  }

  .login-hero {
    text-align: left;
    padding-bottom: 0;
    max-width: none;
    width: 100%;
  }

  .login-hero-divider {
    margin-left: 0;
    margin-right: 0;
  }

  .login-hero-points {
    display: grid;
    width: 100%;
    text-align: left;
  }

  .login-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .login-tagline {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  .login-overlay {
    background:
      linear-gradient(180deg,
        rgba(12, 22, 6, 0.88) 0%,
        rgba(18, 32, 8, 0.74) 42%,
        rgba(0, 0, 0, 0.52) 100%);
  }

  .sidebar {
    width: 100%;
  }

  .sidebar-inner {
    min-height: auto;
  }

  .page-shell {
    flex-direction: column;
  }

  .content-wrapper {
    min-height: auto;
  }
}

/* Application splash / loading branding */
.mrps-app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.96) 0%, rgba(236, 244, 230, 0.98) 45%, rgba(232, 240, 225, 1) 100%);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mrps-app-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.mrps-app-splash-inner {
  text-align: center;
  padding: 1.5rem;
}

.mrps-app-splash-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 28px;
  background: transparent;
  box-shadow: 0 10px 28px rgba(20, 40, 10, 0.22);
  margin-bottom: 1rem;
}

.mrps-app-splash-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--mrps-green-deep, #1f3d0f);
}

.mrps-app-splash-agency {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #4a5c3a;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }

  .mrps-app-splash {
    transition: none;
  }
}

/* ==========================================================================
   MARPIS dashboard design system — presentation refinements
   Shared look for all role portals. Does not change layout structure.
   ========================================================================== */

.page-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mrps-green-deep);
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.page-heading + .text-muted,
.page-lede {
  color: var(--mrps-muted);
  margin-bottom: 1.25rem;
  max-width: 52rem;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}

.sidebar-inner {
  height: 100vh;
}

.sidebar-section h6 {
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

.sidebar .nav-link {
  display: block;
  padding: 0.5rem 0.8rem;
  margin-bottom: 0.15rem;
  font-size: 0.92rem;
  line-height: 1.35;
  border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar .nav-link.active {
  background: var(--mrps-green);
  color: #ffffff;
  font-weight: 600;
  border-left-color: #e4be3d;
  padding-left: calc(0.8rem - 3px);
}

.sidebar .nav-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.sidebar-user-role {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sidebar-footer .btn {
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.75rem;
}

.topbar {
  gap: 1rem;
  align-items: flex-start;
}

.topbar h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mrps-green-deep);
  letter-spacing: -0.015em;
}

.topbar .text-muted {
  font-size: 0.92rem;
  max-width: 40rem;
}

.topbar-badge {
  white-space: nowrap;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid rgba(46, 77, 35, 0.25);
}

.topbar-alert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(46, 77, 35, 0.28);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.topbar-alert-link:hover {
  background: #eef4e8;
  color: inherit;
}

.topbar-alert-count {
  min-width: 1.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: #c2410c;
  color: #fff;
  font-size: 0.72rem;
  text-align: center;
}

.topbar-accessibility .btn {
  min-width: 2.25rem;
  font-weight: 700;
}

.dashboard-hero,
.intel-dashboard-hero {
  background: #ffffff;
  border-radius: var(--mrps-radius);
  padding: 0.9rem 1.15rem;
  box-shadow: 0 4px 16px var(--mrps-shadow);
  border: 1px solid rgba(74, 119, 60, 0.18);
  border-left: 4px solid var(--mrps-green);
}

.dashboard-kicker,
.intel-dashboard-kicker {
  color: var(--mrps-green-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero h4,
.intel-dashboard-hero h4 {
  font-weight: 700;
  color: var(--mrps-text);
  letter-spacing: -0.015em;
}

.stat-card,
.dashboard-card {
  background: #ffffff;
  border: 1px solid rgba(74, 119, 60, 0.16);
  border-radius: var(--mrps-radius);
  box-shadow: 0 4px 14px var(--mrps-shadow);
}

.stat-card .card-body,
.dashboard-card .card-body {
  padding: 0.85rem 1rem;
}

.stat-card .label,
.dashboard-card .label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mrps-muted);
  letter-spacing: 0.02em;
}

.stat-card .value,
.stat-card .h3,
.dashboard-card .h3,
.dashboard-card .h4 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--mrps-green-deep);
  margin: 0.2rem 0 0.35rem;
}

.stat-card .trend {
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-card-accent-success {
  border-top: 3px solid #16a34a;
}

.stat-card-accent-warning {
  border-top: 3px solid var(--mrps-risk-medium);
}

.stat-card-accent-danger {
  border-top: 3px solid #dc2626;
}

.stat-card-accent-info {
  border-top: 3px solid #2563eb;
}

.stat-card-accent-neutral,
.stat-card-intel {
  border-top: 3px solid var(--mrps-green);
}

.dashboard-card .card-title,
.dashboard-card h2.h5,
.dashboard-card .h5 {
  color: var(--mrps-green-deep);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.dashboard-task-list .list-group-item,
.dashboard-activity-list .list-group-item {
  padding: 0.8rem 0;
  border-color: var(--mrps-border);
}

.dashboard-task-list .list-group-item {
  padding-left: 0.15rem;
}

.dashboard-workflow {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.dashboard-workflow li {
  margin-bottom: 0.65rem;
  padding-left: 0.25rem;
  color: #334155;
}

.dashboard-workflow li:last-child {
  margin-bottom: 0;
}

.dashboard-decision-badges .badge {
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
}

.custom-progress {
  height: 0.65rem;
  background: #eef2e8;
  border-radius: 999px;
  overflow: hidden;
}

.custom-progress .progress-bar {
  border-radius: 999px;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: var(--mrps-green-light);
  color: var(--mrps-green-deep);
  border-bottom: 2px solid rgba(74, 119, 60, 0.35);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.8rem 0.9rem;
  white-space: nowrap;
}

.table tbody td {
  padding: 0.85rem 0.9rem;
  color: #334155;
  border-color: #eef2f6;
}

.table-hover tbody tr:hover {
  background-color: var(--mrps-green-muted);
}

.table-responsive {
  border-radius: 0 0 var(--mrps-radius) var(--mrps-radius);
}

.badge {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-risk-low,
.badge-risk-medium,
.badge-risk-high {
  padding: 0.35em 0.65em;
  border-radius: 999px;
}

.form-label {
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.form-control,
.form-select,
.form-control:not(textarea) {
  min-height: 2.5rem;
}

.form-control,
.form-select {
  border-color: #d5dde6;
  border-radius: var(--mrps-radius-sm);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--mrps-green);
  box-shadow: 0 0 0 0.2rem rgba(74, 119, 60, 0.22);
}

.field-validation-error,
.text-danger.small {
  font-size: 0.8rem;
}

.alert {
  border-radius: var(--mrps-radius-sm);
  border-width: 1px;
  border-left-width: 4px;
}

.alert-success {
  border-left-color: #16a34a;
}

.alert-warning {
  border-left-color: #d97706;
}

.alert-danger {
  border-left-color: #dc2626;
}

.alert-info {
  border-left-color: #2563eb;
}

.btn {
  border-radius: var(--mrps-radius-sm);
  font-weight: 600;
}

.btn-sm {
  padding: 0.3rem 0.65rem;
}

.dashboard-quick-actions .btn {
  min-height: 2.15rem;
}

.agent-portal-body {
  background: var(--mrps-green-muted);
}

.agent-portal-header-inner {
  align-items: center;
  gap: 1rem;
}

.agent-portal-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: right;
}

.agent-portal-user-text {
  min-width: 0;
}

.agent-portal-user-name {
  font-size: 0.85rem;
  color: var(--mrps-muted);
}

.agent-portal-user-role {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--mrps-green-light);
  color: var(--mrps-green-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.agent-portal-nav {
  justify-content: flex-start;
  padding: 0 1.25rem;
}

.agent-nav-link {
  border-bottom: 3px solid transparent;
}

.agent-nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  border-bottom-color: var(--mrps-green);
  font-weight: 600;
}

.agent-portal-nav .btn {
  margin: 0.4rem 0 0.4rem auto;
}

.agent-stat-card .label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mrps-muted);
}

html.high-contrast .stat-card,
html.high-contrast .dashboard-card,
html.high-contrast .dashboard-hero,
html.high-contrast .intel-dashboard-hero,
html.high-contrast .topbar {
  border: 2px solid #000;
  box-shadow: none;
}

html.high-contrast .topbar-badge,
html.high-contrast .badge-role,
html.high-contrast .agent-portal-user-role {
  border: 1px solid #000;
  background: #fff;
  color: #000;
}

html.high-contrast .table thead th {
  background: #000;
  color: #fff;
}

html.high-contrast .sidebar .nav-link.active {
  outline: 2px solid #fff;
}

@media (max-width: 900px) {
  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
  }

  .sidebar-inner {
    height: auto;
    min-height: 0;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .stat-card .value,
  .stat-card .h3,
  .dashboard-card .h3,
  .dashboard-card .h4 {
    font-size: 1.5rem;
  }
}

.app-frame {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-frame .page-shell {
  flex: 1;
}

.app-frame .sidebar {
  height: auto;
  align-self: stretch;
  max-height: none;
}

.app-frame .sidebar-inner {
  min-height: calc(100vh - 2.25rem);
  height: auto;
}

a.brand {
  text-decoration: none;
  color: inherit;
}

a.brand:hover,
a.brand:focus {
  color: #ffffff;
}

a.brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.topbar-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mrps-green-mid);
  letter-spacing: -0.015em;
  margin: 0 0 0.25rem;
  line-height: 1.25;
}

.dashboard-welcome {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--mrps-text);
  letter-spacing: -0.015em;
}

.gov-breadcrumb {
  margin-bottom: 0.35rem;
}

.gov-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--mrps-muted);
}

.gov-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #94a3b8;
}

.gov-breadcrumb a {
  color: var(--mrps-green-dark);
  text-decoration: none;
}

.gov-breadcrumb a:hover,
.gov-breadcrumb a:focus {
  text-decoration: underline;
}

.gov-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.gov-footer-links a {
  color: #94d4a4;
  text-decoration: none;
}

.gov-footer-links a:hover,
.gov-footer-links a:focus {
  color: #fff;
  text-decoration: underline;
}

.decision-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--mrps-border);
  border-left: 4px solid var(--mrps-green);
  border-radius: var(--mrps-radius);
}

.decision-flow li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #334155;
}

.decision-flow li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--mrps-green-light);
  color: var(--mrps-green-deep);
  font-size: 0.8rem;
}

.xai-factor-panel {
  padding: 0.85rem 1rem;
  border-radius: var(--mrps-radius-sm);
  border: 1px solid var(--mrps-border);
}

.xai-factor-increase {
  border-left: 4px solid #dc2626;
  background: #fff8f8;
}

.xai-factor-reduce {
  border-left: 4px solid #16a34a;
  background: #f4faf4;
}

.access-denied-card {
  max-width: 40rem;
}

.form-label[for] + [required],
.form-control[required] {
  border-left: 3px solid rgba(46, 77, 35, 0.45);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .content-area {
    padding: 1rem 0.9rem 0.75rem;
  }

  .dashboard-hero,
  .intel-dashboard-hero,
  .topbar {
    padding: 1rem 1.05rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.7rem 0.65rem;
  }

  .agent-portal-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .agent-portal-user {
    text-align: left;
  }

  .agent-portal-nav {
    flex-wrap: wrap;
  }

  .decision-flow {
    flex-direction: column;
  }
}

html.high-contrast .decision-flow,
html.high-contrast .xai-factor-panel,
html.high-contrast .gov-breadcrumb {
  border-color: #000;
}

html.high-contrast .xai-factor-increase,
html.high-contrast .xai-factor-reduce {
  background: #fff;
}

.public-hero-title {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 700;
  color: var(--mrps-green-deep);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.45rem;
}

.public-hero .lead {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #334155;
}

.empty-state {
  color: var(--mrps-muted);
  font-size: 0.95rem;
  padding: 0.75rem 0;
}

.report-list {
  padding-left: 1.1rem;
  margin-top: 0.5rem;
}

.report-list li {
  margin-bottom: 0.45rem;
  line-height: 1.45;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-content {
  border-radius: var(--mrps-radius);
  border: 1px solid var(--mrps-border);
}

.pagination .page-link {
  color: var(--mrps-green-deep);
}

.pagination .page-item.active .page-link {
  background: var(--mrps-green-dark);
  border-color: var(--mrps-green-dark);
}

.stat-card,
.dashboard-card,
.topbar,
.dashboard-hero,
.intel-dashboard-hero,
.public-home-panel {
  box-shadow: 0 2px 8px var(--mrps-shadow);
}

.public-home-panel .public-hero {
  box-shadow: none;
  border: 0;
}

.gov-header-nav a:focus-visible,
.gov-nav-link:focus-visible,
.agent-nav-link:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--forest-deep);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.topbar,
.dashboard-hero,
.intel-dashboard-hero,
.public-hero,
.page-lede,
.login-card {
  overflow-wrap: anywhere;
}

html.high-contrast .login-card,
html.high-contrast .public-hero {
  border: 2px solid #000;
  box-shadow: none;
}

/* ==========================================================================
   Responsive layout ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â mobile-first refinements
   Drawer navigation, overflow control, touch targets, fluid type.
   Does not change application behaviour.
   ========================================================================== */

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  min-width: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

.page-shell,
.content-wrapper,
.content-area,
.public-content,
.agent-portal-content,
.public-main,
main {
  min-width: 0;
  max-width: 100%;
}

.page-heading,
.topbar-title {
  font-size: clamp(1.15rem, 1.2vw + 1rem, 1.5rem);
  overflow-wrap: anywhere;
}

.dashboard-welcome {
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.2rem);
}

.app-mobile-bar,
.sidebar-toggle,
.gov-nav-toggle,
.agent-nav-toggle {
  display: none;
}

.nav-backdrop {
  display: none;
}

.sidebar .nav-link {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

.btn {
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
}

.btn-sm {
  min-height: 2.25rem;
  min-width: 2.25rem;
}

.topbar-accessibility .btn,
.gov-accessibility-controls .btn {
  min-height: 2.25rem;
  min-width: 2.25rem;
}

.form-control,
.form-select,
textarea.form-control {
  max-width: 100%;
  width: 100%;
}

textarea.form-control {
  min-height: 6rem;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chart-bars {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.modal-dialog {
  margin: 0.75rem;
  max-width: calc(100vw - 1.5rem);
}

.modal-body {
  max-height: min(70vh, 32rem);
  overflow-y: auto;
}

.dropdown-menu {
  max-width: calc(100vw - 2rem);
}

.gov-header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-search {
  display: flex;
  align-items: stretch;
  min-width: min(100%, 16rem);
  max-width: 22rem;
}

.site-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #94a3b8;
  border-right: 0;
  border-radius: 0.25rem 0 0 0.25rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
}

.site-search button {
  border: 1px solid var(--mrps-green-dark);
  border-radius: 0 0.25rem 0.25rem 0;
  background: var(--mrps-green-dark);
  color: #fff;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.site-search button:hover,
.site-search button:focus {
  background: var(--mrps-green-deep);
}

.site-search-page {
  max-width: 36rem;
}

.login-tools-bar {
  background: #13253c;
  border-bottom: 2px solid var(--mrps-green);
}

.login-tools-bar .site-search input[type="search"] {
  border-color: rgba(255, 255, 255, 0.35);
}

.contact-map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 20rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  overflow: hidden;
  background: #e2e8f0;
}

.contact-map {
  width: 100%;
  height: 100%;
  border: 0;
}

.site-map-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-map-tree ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--mrps-green);
}

.site-map-tree li {
  margin: 0.35rem 0;
}

.site-map-tree > li > a {
  font-weight: 700;
}

.gov-footer-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 0.75rem;
}

.gov-footer-meta {
  color: #94a3b8;
}

.print-only {
  display: none;
}

.gov-verification-inner {
  min-width: 0;
}

.gov-verification-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sidebar-toggle,
.gov-nav-toggle,
.agent-nav-toggle {
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--mrps-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: var(--mrps-green-dark);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.gov-nav-toggle,
.agent-nav-toggle {
  border-color: var(--mrps-green-dark);
}

.sidebar-toggle-bars,
.sidebar-toggle-bars::before,
.sidebar-toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.sidebar-toggle-bars {
  position: relative;
}

.sidebar-toggle-bars::before,
.sidebar-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.sidebar-toggle-bars::before {
  top: -5px;
}

.sidebar-toggle-bars::after {
  top: 5px;
}

@media (max-width: 991.98px) {
  .app-mobile-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    background: var(--mrps-green-deep);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1020;
  }

  .app-mobile-bar-title {
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .sidebar-toggle,
  .gov-nav-toggle,
  .agent-nav-toggle {
    display: inline-flex;
  }

  .page-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(22rem, 90vw);
    height: 100%;
    max-height: 100dvh;
    z-index: 1045;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }

  .sidebar-inner {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    transform: none;
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.28);
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.45);
  }

  .nav-backdrop[hidden] {
    display: none;
  }

  .content-wrapper,
  .content-area {
    width: 100%;
    min-height: 0;
  }

  .gov-header-nav {
    display: none;
  }

  .gov-header-inner {
    gap: 0.75rem;
  }

  .gov-horizontal-nav {
    display: none;
  }

  body.gov-nav-open .gov-horizontal-nav {
    display: block;
  }

  .gov-horizontal-nav-inner {
    flex-direction: column;
    padding: 0;
    overflow: visible;
  }

  .gov-nav-link {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
  }

  .agent-portal-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }

  body.agent-nav-open .agent-portal-nav {
    display: flex;
  }

  .agent-nav-link {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
  }

  .agent-portal-nav .btn,
  .agent-portal-nav form {
    margin: 0.5rem 1rem 0.75rem;
  }

}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .sidebar {
    width: 18rem;
  }
}

@media (max-width: 767.98px) {
  .content-area {
    padding: 0.85rem 0.75rem 0.75rem;
  }

  .topbar,
  .dashboard-hero,
  .intel-dashboard-hero,
  .public-hero {
    padding: 0.9rem 1rem;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-badge {
    white-space: normal;
  }

  .dashboard-quick-actions .d-flex,
  .public-hero .d-flex.flex-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-quick-actions .btn,
  .dashboard-card .card-body > .btn,
  .intel-dashboard-hero .btn {
    width: 100%;
    justify-content: center;
  }

  .public-home .public-hero .btn {
    width: auto;
  }

  .dashboard-card .card-body > .btn + .btn {
    margin-top: 0.35rem;
  }

  .app-gov-footer .d-flex,
  .agent-portal-footer .d-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-card .value,
  .stat-card .h3,
  .dashboard-card .h3,
  .dashboard-card .h4 {
    font-size: 1.45rem;
  }

  .public-hero {
    padding: 1.25rem 1rem;
  }

  .public-main {
    padding: 1.25rem 0;
  }

  .gov-footer {
    padding: 1.5rem 0 1rem;
  }
}

@media (max-width: 479.98px) {
  .gov-header-logo,
  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .login-card-logo {
    width: 96px;
    height: 96px;
  }

  .mrps-app-splash-logo {
    width: 120px;
    height: 120px;
  }

  .gov-verification-inner {
    font-size: 0.78rem;
  }
}

@media (min-width: 1280px) {
  .content-area {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (min-width: 1536px) {
  .public-content,
  .agent-portal-content {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 576px) {
  .modal-dialog {
    margin: 1.75rem auto;
    max-width: min(500px, calc(100vw - 2rem));
  }

  .modal-dialog.modal-lg {
    max-width: min(800px, calc(100vw - 2rem));
  }
}

html.high-contrast .sidebar-toggle,
html.high-contrast .gov-nav-toggle,
html.high-contrast .agent-nav-toggle,
html.high-contrast .app-mobile-bar {
  border: 2px solid #fff;
  background: #000;
  color: #fff;
}

@media (max-width: 991.98px) {
  .app-frame .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(22rem, 90vw);
    height: 100%;
    max-height: 100dvh;
    align-self: auto;
  }

  .app-frame .sidebar-inner {
    min-height: 0;
    height: 100%;
  }

  .table tbody td {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  pre,
  code {
    max-width: 100%;
    overflow-x: auto;
  }
}

/* ==========================================================================
   Login / landing page ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â mobile and tablet
   Full-viewport layout. Desktop two-column design is unchanged (ÃƒÂ¢Ã¢â‚¬Â°Ã‚Â¥901px).
   ========================================================================== */

html:has(body.login-body) {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  width: 100%;
}

body.login-body {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  body.login-body {
    display: flex;
    flex-direction: column;
  }

  .login-background {
    background-image: url("/images/4.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 4% 48%;
  }

  .login-gov-bar,
  .login-chrome,
  .login-chrome .gov-verification-bar,
  .login-chrome .gov-verification-inner,
  .login-gov-bar .gov-verification-bar,
  .login-gov-bar .gov-verification-inner,
  .login-shell,
  .login-panel,
  .login-hero,
  .login-card,
  .login-footer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .login-gov-bar,
  .login-chrome {
    flex: 0 0 auto;
  }

  .login-topbar-inner {
    padding: 0.4rem 1rem;
  }

  .login-gov-bar .gov-verification-bar,
  .login-chrome .gov-verification-bar {
    padding: 0.28rem 0;
  }

  .login-gov-bar .gov-verification-inner,
  .login-chrome .gov-verification-inner {
    display: block;
    margin: 0;
    padding: 0.25rem 1rem;
  }

  .login-gov-bar .gov-flag,
  .login-chrome .gov-flag {
    line-height: 1.3;
  }

  .login-gov-bar .gov-verification-text,
  .login-chrome .gov-verification-text {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  .login-shell {
    display: block;
    margin: 0;
    padding: 0;
    min-height: 0;
    flex: 1 0 auto;
    align-items: stretch;
    justify-content: flex-start;
  }

  .login-panel {
    display: flex;
    flex-direction: column;
    margin: 0;
    gap: 0;
    align-items: stretch;
  }

  .login-hero {
    text-align: left;
    padding: clamp(1.35rem, 4.2vh, 1.9rem) 1.15rem 1.55rem;
  }

  .login-hero,
  .login-hero p,
  .login-hero li,
  .login-tagline,
  .login-card,
  .login-card p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: manual;
  }

  .login-hero-kicker {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
  }

  .login-hero-agency {
    font-size: clamp(0.95rem, 3.6vw, 1.08rem);
    line-height: 1.4;
  }

  .login-hero-title {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    letter-spacing: 0.07em;
    line-height: 1.15;
    max-width: 100%;
  }

  .login-hero-system-name {
    font-size: clamp(0.98rem, 3.8vw, 1.12rem);
    margin-bottom: 0.85rem;
  }

  .login-tagline {
    max-width: none;
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.15rem;
  }

  .login-hero-points {
    display: grid;
    width: 100%;
    gap: 0.55rem;
  }

  .login-hero-points li {
    font-size: 0.92rem;
  }

  .login-card {
    justify-self: stretch;
    margin: 0;
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 1.5rem 1rem 1.75rem;
    min-height: 0;
  }

  .login-card-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.9rem;
  }

  .login-footer {
    padding: 1rem;
    flex: 0 0 auto;
  }
}

@media (min-width: 480px) and (max-width: 900px) {
  .login-hero {
    padding-inline: 1.35rem;
    padding-block: clamp(1.4rem, 4.5vh, 2.1rem) 1.6rem;
  }

  .login-card {
    padding-inline: 1.35rem;
  }

  .login-gov-bar .gov-verification-inner,
  .login-chrome .gov-verification-inner,
  .login-topbar-inner {
    padding-inline: 1.35rem;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  .login-hero {
    padding: 2.15rem 1.75rem 1.75rem;
  }

  .login-hero-title {
    font-size: clamp(2.1rem, 5vw, 2.6rem);
    letter-spacing: 0.1em;
  }

  .login-tagline {
    font-size: 1.02rem;
    max-width: 42rem;
  }

  .login-card {
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 2rem 1.75rem 2.15rem;
  }

  .login-footer {
    padding-inline: 1.75rem;
  }
}

@media (max-width: 479.98px) {
  .login-hero-kicker {
    letter-spacing: 0.04em;
    font-size: 0.68rem;
    padding: 0.28rem 0.55rem;
  }

  .login-hero-title {
    letter-spacing: 0.05em;
  }

  .login-card-logo {
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 900px) and (max-height: 700px) {
  .login-hero {
    padding-block: 1.15rem 1.2rem;
  }

  .login-hero-kicker {
    margin-bottom: 0.55rem;
  }

  .login-hero-title {
    margin-bottom: 0.2rem;
  }

  .login-hero-system-name,
  .login-hero-divider {
    margin-bottom: 0.7rem;
  }

  .login-tagline {
    margin-bottom: 0.85rem;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .login-background {
    background-position: 18% 42%;
  }

  .login-hero {
    padding-block: 1rem 1.1rem;
  }
}

/* Inspection list and detail ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â presentation only */
.inspection-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.inspection-summary li {
  background: #fff;
  border: 1px solid var(--mrps-border);
  border-left: 4px solid var(--mrps-green);
  border-radius: var(--mrps-radius-sm);
  padding: 0.7rem 0.85rem;
  box-shadow: 0 1px 4px var(--mrps-shadow);
}

.inspection-summary-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--mrps-muted);
  margin-bottom: 0.2rem;
}

.inspection-summary-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mrps-green-deep);
  line-height: 1.2;
}

.inspection-ref {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #334155;
}

.assignment-you {
  display: inline-block;
  padding: 0.2em 0.55em;
  border-radius: 999px;
  background: var(--mrps-green-light);
  color: var(--mrps-green-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-status-pending,
.badge-status-assigned,
.badge-status-progress,
.badge-status-completed {
  padding: 0.35em 0.65em;
  border-radius: 999px;
}

.badge-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-status-assigned {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-status-progress {
  background: #dbeafe;
  color: #1e3a5f;
}

.badge-status-completed {
  background: #dcfce7;
  color: #166534;
}

.detail-list {
  margin: 0.75rem 0 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #eef2f6;
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mrps-muted);
}

.detail-list dd {
  margin: 0;
  color: #334155;
}

.inspection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.35rem;
}

@media (max-width: 900px) {
  .inspection-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-list > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

html.high-contrast .inspection-summary li,
html.high-contrast .assignment-you,
html.high-contrast .badge-status-pending,
html.high-contrast .badge-status-assigned,
html.high-contrast .badge-status-progress,
html.high-contrast .badge-status-completed {
  border: 1px solid #000;
  background: #fff;
  color: #000;
}

.user-avatar {
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--mrps-green-light);
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-avatar-sm {
  width: 2.75rem;
  height: 2.75rem;
}

.user-avatar-md {
  width: 3.5rem;
  height: 3.5rem;
}

.user-avatar-lg {
  width: 4.5rem;
  height: 4.5rem;
}

.user-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  color: var(--mrps-green-deep);
  letter-spacing: 0.02em;
}

.user-avatar-sm .user-avatar-initials {
  font-size: 0.8rem;
}

.user-avatar-lg .user-avatar-initials {
  font-size: 1.15rem;
}

.dashboard-identity {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.dashboard-hero .user-avatar,
.intel-dashboard-hero .user-avatar {
  border-color: var(--mrps-green);
}

.sidebar .user-avatar {
  border-color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 576px) {
  .dashboard-identity {
    flex-direction: column;
    align-items: flex-start;
  }
}

html.high-contrast .user-avatar {
  border: 2px solid #000;
}

.user-mgmt-photo-preview {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 50%;
  margin-top: 0.6rem;
  border: 2px solid var(--mrps-green);
}

.user-mgmt-photo-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 11rem;
}

.user-mgmt-photo-cell .user-avatar {
  border-color: var(--mrps-green);
}

.user-mgmt-photo-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 14rem;
}

.stat-card-empty {
  background: #f4f6f3;
}

.stat-card-empty .value {
  color: #4b5563;
}

.stat-card .trend.empty {
  color: #3f4a3a;
  font-weight: 600;
  line-height: 1.35;
}

.location-scope-banner {
  background: #eef4e8;
  border: 1px solid rgba(46, 77, 35, 0.28);
  border-left: 4px solid var(--mrps-green-dark);
  border-radius: var(--mrps-radius-sm);
  padding: 0.5rem 0.8rem;
  margin: 0 0 0.75rem;
  color: #334155;
  font-size: 0.92rem;
}

.sidebar-hint {
  margin: 0.15rem 0.85rem 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.35;
}

#port-alerts {
  scroll-margin-top: 1.25rem;
}

.port-alert-list {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 1200px) {
  .port-alert-list {
    grid-template-columns: 1fr 1fr;
  }
}

.port-alert-item {
  border: 1px solid #e2e8f0;
  border-radius: var(--mrps-radius-sm);
  background: #fff;
}

.port-alert-item.is-unread {
  border-left: 4px solid #c2410c;
  background: #fff7ed;
}

.port-alert-link {
  display: block;
  padding: 0.55rem 0.75rem;
  color: inherit;
  text-decoration: none;
}

.port-alert-link:hover {
  background: #f8fafc;
}

.dashboard-activity-list {
  max-height: 22rem;
  overflow-y: auto;
}

.dashboard-activity-list .list-group-item {
  border-color: #eef2f6;
}

.login-forgot-link {
  color: #fff;
  font-weight: 600;
}

.login-card .login-forgot-link {
  color: var(--mrps-green-deep);
}

html.high-contrast .login-topbar {
  background: #000;
  border-bottom: 2px solid #fff;
}

html.high-contrast .login-topbar-official,
html.high-contrast .login-chrome .gov-accessibility-controls .btn {
  color: #fff;
}

@media (max-width: 900px) {
  .login-background {
    background-position: 18% 28%;
  }
}

.monthly-report {
  background: #fff;
  border: 1px solid var(--mrps-border);
  border-radius: var(--mrps-radius);
  padding: 1.5rem 1.6rem 1.25rem;
}

.monthly-report-header {
  border-bottom: 3px solid var(--mrps-green);
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
}

.monthly-report-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mrps-green-deep);
}

.monthly-report-period {
  font-size: 1.15rem;
  font-weight: 600;
  color: #334155;
}

.monthly-report-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.monthly-report-meta dt {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.monthly-report-meta dd {
  margin: 0.15rem 0 0;
  color: #1f2937;
}

.monthly-report-footnote {
  margin-top: 1.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--mrps-border);
  font-size: 0.8rem;
  color: #64748b;
}

@media (max-width: 700px) {
  .monthly-report-meta {
    grid-template-columns: 1fr;
  }
}

@media print {
  .skip-link,
  .gov-verification-bar,
  .gov-header,
  .gov-header-nav,
  .gov-horizontal-nav,
  .gov-header-tools,
  .gov-nav-toggle,
  .site-search,
  .gov-footer,
  .sidebar,
  .app-mobile-bar,
  .topbar,
  .app-gov-footer,
  .nav-backdrop,
  .no-print,
  .login-tools-bar,
  .login-chrome,
  .login-footer,
  .agent-portal-header,
  .agent-portal-nav,
  .agent-portal-footer {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .public-print-banner {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000;
  }

  .app-frame,
  .page-shell,
  .content-wrapper,
  .content-area,
  main {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .monthly-report {
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .monthly-report-header {
    break-after: avoid;
  }

  a[href]::after {
    content: none !important;
  }
}

/* ==========================================================================
   Public homepage redesign (forest / gold) ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â visual layer only
   ========================================================================== */

.public-home {
  width: 100%;
}

.public-home-body {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem 3.5rem;
  text-align: left;
}

.public-home > .public-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--forest-deep) 0%, var(--forest) 55%, var(--olive) 100%);
  color: #fff;
  padding: 3.5rem 0 0;
  text-align: left;
}

.public-hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  opacity: 0;
}

.public-hero-photos {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.public-hero-photo-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.public-hero.has-photo .public-hero-photo.is-active {
  opacity: 1;
}

.public-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.5rem 2rem;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
  box-sizing: border-box;
  align-items: center;
  text-align: left;
}

.public-hero-copy {
  min-width: 0;
  max-width: 32.5rem;
  text-align: left;
}

.public-home .public-kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-bright);
  margin-bottom: 0.85rem;
}

.public-kicker-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--gold-bright);
  flex: none;
}

.public-home .public-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.12;
  color: #fff;
  max-width: 32.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-align: left;
}

.public-home .public-hero-title .public-hero-em,
.public-home .public-hero .lead .public-hero-em {
  font-style: normal;
  color: var(--gold-bright);
}

.public-home .public-hero .lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #e8efe3;
  max-width: 32.5rem;
  margin-bottom: 0;
  text-align: left;
}

.public-hero-ctas {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.85rem;
}

.public-btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--forest-deep);
  font-weight: 700;
  border-radius: 3px;
}

.public-btn-gold:hover,
.public-btn-gold:focus {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--forest-deep);
}

.public-btn-outline {
  background: transparent;
  border: 1.5px solid #c5d6b5;
  color: #fff;
  font-weight: 600;
  border-radius: 3px;
}

.public-btn-outline:hover,
.public-btn-outline:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.public-radar-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 1rem;
  min-width: 0;
  width: 100%;
}

.public-radar {
  width: 100%;
  max-width: 380px;
  height: auto;
  color: #6f8f4f;
}

.public-radar-ring,
.public-radar-axis {
  stroke: #4d7237;
}

.public-radar-axis {
  stroke: #3e611f;
}

.public-radar-sweep {
  fill: var(--gold);
  opacity: 0.14;
}

.public-radar-blip {
  fill: #cfe0be;
}

.public-radar-blip-active,
.public-radar-ship {
  fill: var(--gold-bright);
}

.public-radar-blip-ring {
  stroke: var(--gold-bright);
  opacity: 0.55;
}

.public-hero-wave {
  position: relative;
  z-index: 1;
  margin-top: 2.25rem;
  line-height: 0;
}

.public-hero-wave svg {
  width: 100%;
  height: 70px;
  display: block;
}

.public-lede {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.public-lede-copy h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  color: var(--forest);
  max-width: 26rem;
  margin-bottom: 0.85rem;
  text-align: left;
}

.public-lede-copy p {
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.85rem;
  max-width: 28rem;
  text-align: left;
}

.public-lede-copy p:last-child {
  margin-bottom: 0;
}

.public-app-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  padding: 1.4rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  min-width: 0;
  box-shadow: 0 4px 18px rgba(27, 42, 56, 0.06);
}

.public-app-card-copy {
  min-width: 0;
}

.public-app-card h3 {
  font-size: 1.05rem;
  color: var(--forest);
  margin-bottom: 0.35rem;
}

.public-app-card p {
  font-size: 0.85rem;
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 0.45rem;
}

.public-app-card p:last-child {
  margin-bottom: 0;
}

.public-app-qr {
  width: 7.5rem;
  height: 7.5rem;
  flex: none;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.35rem;
}

.public-app-qr-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  color: var(--mrps-danger);
  padding: 0.5rem;
}

.public-home-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.public-home-panel-item {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--line);
  min-width: 0;
  overflow-wrap: anywhere;
}

.public-home-panel-item:last-child {
  border-right: none;
}

.public-home-panel-item h2 {
  font-size: 1.05rem;
  color: var(--forest);
  margin-bottom: 0.65rem;
}

.public-home-panel-item p {
  font-size: 0.875rem;
  color: var(--slate);
  line-height: 1.65;
}

.public-panel-icon {
  width: 2.125rem;
  height: 2.125rem;
  margin-bottom: 1rem;
  color: var(--forest);
}

.public-panel-icon-notice {
  color: #b8860b;
}

.public-home-panel-notice {
  background: #fbf4e8;
}

.public-home .public-home-contact {
  padding: 2rem 0 0;
  border-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.public-home .public-home-contact h2 {
  color: var(--forest);
  margin-bottom: 0.5rem;
}

.public-contact-addr {
  color: var(--slate);
  font-size: 0.9rem;
  max-width: 28rem;
}

.public-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.public-contact-links a {
  color: var(--forest);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.public-contact-links a:hover,
.public-contact-links a:focus {
  color: var(--forest-deep);
  text-decoration: underline;
}

.public-body .gov-header-nav a:focus-visible,
.public-body .gov-nav-link:focus-visible,
.public-body .gov-header-login:focus-visible,
.public-body .gov-accessibility-controls .btn:focus-visible,
.public-body .gov-footer a:focus-visible,
.public-body .public-btn-gold:focus-visible,
.public-body .public-btn-outline:focus-visible,
.public-body .public-contact-links a:focus-visible,
.public-body .skip-link:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
}

.login-body {
  --login-accent: var(--forest);
}

@media (max-width: 991.98px) {
  .public-lede {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 2.25rem 0 2rem;
  }

  .public-home-panels {
    grid-template-columns: 1fr;
  }

  .public-home-panel-item {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .public-home-panel-item:last-child {
    border-bottom: none;
  }

  .public-radar {
    max-width: 280px;
  }
}

@media (max-width: 767.98px) {
  .public-home > .public-hero {
    padding: 2.25rem 0 0;
  }

  .public-hero-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 1rem;
  }

  .public-radar-wrap {
    order: 2;
    padding-bottom: 0.25rem;
    justify-content: flex-start;
  }

  .public-radar {
    max-width: 240px;
  }

  .public-hero-wave {
    margin-top: 1.5rem;
  }

  .public-hero-wave svg {
    height: 48px;
  }

  .public-hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .public-hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .public-home-body {
    padding: 0 1rem 2.5rem;
  }

  .public-app-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.15rem 1.1rem;
  }

  .public-home .public-home-contact {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 359.98px) {
  .public-home-body {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .public-app-qr {
    width: 6.25rem;
    height: 6.25rem;
  }

  .public-home .public-hero-title {
    font-size: 1.45rem;
  }
}

html.high-contrast .public-home > .public-hero {
  background: #000;
  border: 2px solid #fff;
}

html.high-contrast .public-home .public-hero .lead,
html.high-contrast .public-home .public-kicker,
html.high-contrast .public-home .public-hero-title {
  color: #fff;
}

html.high-contrast .public-btn-gold {
  background: #ff0;
  border-color: #ff0;
  color: #000;
}

html.high-contrast .public-app-card,
html.high-contrast .public-home-panel-item {
  border-color: #000;
}

/* ===== Intelligence Officer Dashboard redesign (scoped) ===== */
.app-frame {
  font-family: Arial, Helvetica, sans-serif;
}

.app-frame .gov-verification-bar {
  background: #0B1E32;
  color: #e8eef4;
}

.topbar-alert-icon {
  display: block;
}

.topbar-alert-link {
  min-width: 2.4rem;
  min-height: 2.4rem;
  justify-content: center;
  padding: 0.35rem 0.55rem;
}

.stat-card-variant-neutral {
  border: 1px solid #e5e7eb;
  border-top: 3px solid #9ca3af;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.stat-card-variant-neutral .value {
  color: #1f2937;
}

.stat-card-variant-risk-high {
  border: 1px solid #fecaca;
  border-top: 3px solid var(--mrps-risk-high);
  box-shadow: 0 2px 10px rgba(185, 28, 28, 0.08);
}

.stat-card-variant-risk-high .value {
  color: var(--mrps-risk-high);
}

.stat-card-variant-risk-high .stat-card-risk-dot {
  background: var(--mrps-risk-high);
}

.stat-card-variant-risk-medium {
  border: 1px solid #fde68a;
  border-top: 3px solid var(--mrps-risk-medium);
  box-shadow: 0 2px 10px rgba(180, 83, 9, 0.08);
}

.stat-card-variant-risk-medium .value {
  color: var(--mrps-risk-medium);
}

.stat-card-variant-risk-medium .stat-card-risk-dot {
  background: var(--mrps-risk-medium);
}

.stat-card-risk-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.stat-card-variant-neutral.stat-card-empty .value,
.stat-card-variant-risk-high.stat-card-empty .value,
.stat-card-variant-risk-medium.stat-card-empty .value {
  color: #4b5563;
}

.intel-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intel-welcome-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--mrps-green-dark);
  border-radius: var(--mrps-radius-sm);
  padding: 0.7rem 1rem;
}

.intel-welcome-text {
  color: #1f2937;
  font-size: 0.98rem;
  line-height: 1.4;
  min-width: 0;
  flex: 1 1 16rem;
}

.intel-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.intel-welcome-link {
  color: var(--mrps-green-deep);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.intel-welcome-link:hover,
.intel-welcome-link:focus {
  text-decoration: underline;
  color: var(--mrps-green-deep);
}

.intel-inline-notice {
  margin: 0;
  padding: 0.35rem 0 0.55rem;
  border-bottom: 1px solid #dbe3d4;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.45;
}

.intel-arrival-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.intel-arrival-dot {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--mrps-green-dark);
  flex: 0 0 auto;
}

.intel-arrival-dot.is-active {
  background: #c2410c;
}

.intel-arrival-link {
  color: var(--mrps-green-deep);
  font-weight: 600;
  text-decoration: none;
}

.intel-arrival-link:hover,
.intel-arrival-link:focus {
  text-decoration: underline;
}

.intel-stat-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.intel-stat-item .stat-card {
  height: 100%;
  border-radius: var(--mrps-radius-sm);
}

.intel-stat-item .stat-card .value {
  font-size: 1.85rem;
  overflow-wrap: anywhere;
}

.intel-stat-item .stat-card .trend {
  overflow-wrap: anywhere;
  white-space: normal;
}

.intel-history-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--mrps-radius);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.intel-history-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.intel-history-header .h5 {
  color: var(--mrps-green-deep);
  font-weight: 700;
}

.intel-history-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.intel-history-table {
  width: 100%;
  min-width: 960px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

.intel-history-table .col-run { width: 11rem; }
.intel-history-table .col-vessel { width: 11rem; }
.intel-history-table .col-score { width: 5rem; }
.intel-history-table .col-risk { width: 7.5rem; }
.intel-history-table .col-action-rec { width: 11rem; }
.intel-history-table .col-recorded { width: 7.5rem; }
.intel-history-table .col-decision { width: 16rem; }
.intel-history-table .col-view { width: 5.5rem; }

.intel-history-table thead th {
  background: var(--mrps-green-light);
  color: var(--mrps-green-mid);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--mrps-border);
  vertical-align: bottom;
}

.intel-history-table tbody td {
  padding: 0.7rem;
  border-bottom: 1px solid #eef2f0;
  color: #1f2937;
  font-size: 0.92rem;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.intel-history-table tbody tr:hover {
  background: var(--mrps-green-muted);
}

.intel-run-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.intel-run-id {
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
}

.intel-run-tag {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.3;
}

@media (max-width: 1399.98px) {
  .intel-stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023.98px) {
  .intel-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intel-welcome-strip {
    align-items: stretch;
  }
}

@media (max-width: 575.98px) {
  .intel-stat-row {
    grid-template-columns: 1fr;
  }

  .intel-history-table {
    min-width: 0;
  }

  .intel-history-table thead {
    display: none;
  }

  .intel-history-table,
  .intel-history-table tbody,
  .intel-history-table tr,
  .intel-history-table td {
    display: block;
    width: 100%;
  }

  .intel-history-table tbody tr {
    border: 1px solid #e5e7eb;
    border-radius: var(--mrps-radius-sm);
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.15rem;
    background: #fff;
  }

  .intel-history-table tbody td {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    gap: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.45rem 0.65rem;
  }

  .intel-history-table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--mrps-green-deep);
    font-size: 0.78rem;
  }
}

/* ===== Shared role dashboard theme (all officer + agent dashboards) ===== */
.app-frame,
.agent-portal-body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--mrps-text);
}

.app-frame .gov-verification-bar,
.agent-portal-body .gov-verification-bar {
  background: #0B1E32;
  color: #e8eef4;
}

.role-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.role-welcome-strip,
.intel-welcome-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--mrps-green-dark);
  border-radius: var(--mrps-radius-sm);
  padding: 0.7rem 1rem;
}

.role-welcome-text,
.intel-welcome-text {
  color: #1f2937;
  font-size: 0.98rem;
  line-height: 1.4;
  min-width: 0;
  flex: 1 1 16rem;
}

.role-welcome-actions,
.intel-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.role-welcome-link,
.intel-welcome-link {
  color: var(--mrps-green-deep);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.role-welcome-link:hover,
.role-welcome-link:focus,
.intel-welcome-link:hover,
.intel-welcome-link:focus {
  text-decoration: underline;
  color: var(--mrps-green-deep);
}

.role-inline-notice,
.intel-inline-notice,
.location-scope-banner {
  margin: 0;
  padding: 0.35rem 0 0.55rem;
  border: 0;
  border-bottom: 1px solid #dbe3d4;
  border-radius: 0;
  background: transparent;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.45;
}

.role-stat-row {
  display: grid;
  gap: 0.75rem;
}

.role-stat-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-stat-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.role-stat-row-5,
.intel-stat-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.role-stat-item .stat-card,
.intel-stat-item .stat-card {
  height: 100%;
  border-radius: var(--mrps-radius-sm);
}

.role-stat-item .stat-card .value,
.intel-stat-item .stat-card .value {
  font-size: 1.85rem;
  overflow-wrap: anywhere;
}

.role-stat-item .stat-card .trend,
.intel-stat-item .stat-card .trend {
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Legacy accent cards ? same neutral/risk look as variants */
.app-frame .stat-card-accent-info,
.app-frame .stat-card-accent-success,
.app-frame .stat-card-accent-warning,
.app-frame .stat-card-accent-neutral,
.app-frame .stat-card:not([class*="stat-card-variant"]):not([class*="stat-card-accent-danger"]),
.agent-portal-body .stat-card {
  border: 1px solid #e5e7eb;
  border-top: 3px solid #9ca3af;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.app-frame .stat-card-accent-info .value,
.app-frame .stat-card-accent-success .value,
.app-frame .stat-card-accent-warning .value,
.app-frame .stat-card-accent-neutral .value,
.app-frame .stat-card:not([class*="stat-card-variant"]):not([class*="stat-card-accent-danger"]) .value,
.agent-portal-body .stat-card .value {
  color: #1f2937;
}

.app-frame .stat-card-accent-danger {
  border: 1px solid #fecaca;
  border-top: 3px solid var(--mrps-risk-high);
}

.app-frame .stat-card-accent-danger .value {
  color: var(--mrps-risk-high);
}

.app-frame .dashboard-card,
.agent-portal-body .dashboard-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--mrps-radius);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.app-frame .dashboard-card .card-title,
.app-frame .dashboard-card h2.h5,
.app-frame .dashboard-card .h5,
.agent-portal-body .dashboard-card .card-title,
.agent-portal-body .dashboard-card h2.h5,
.agent-portal-body .dashboard-card .h5 {
  color: var(--mrps-green-deep);
  font-weight: 700;
}

.app-frame .role-data-table thead th,
.app-frame .table thead th,
.agent-portal-body .table thead th {
  background: var(--mrps-green-light);
  color: var(--mrps-green-deep);
  font-weight: 700;
  border-bottom: 1px solid var(--mrps-border);
}

.app-frame .dashboard-mini-stat,
.agent-portal-body .dashboard-mini-stat {
  background: var(--mrps-green-muted);
  border: 1px solid #e5e7eb;
  border-radius: var(--mrps-radius-sm);
  padding: 0.75rem 1rem;
}

.app-frame .topbar-title {
  color: var(--mrps-green-mid);
  font-family: Arial, Helvetica, sans-serif;
}

@media (max-width: 1199.98px) {
  .role-stat-row-5,
  .intel-stat-row,
  .role-stat-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .role-stat-row-3,
  .role-stat-row-4,
  .role-stat-row-5,
  .intel-stat-row {
    grid-template-columns: 1fr;
  }
}
