html {
  font-size: 15px;
  min-height: 100%;
}

:root {
  --a2z-teal: #24309a;
  --a2z-teal-dark: #17206f;
  --a2z-green: #15975b;
  --a2z-green-dark: #0e7445;
  --a2z-ink: #142044;
  --a2z-muted: #63708c;
  --a2z-surface: #ffffff;
  --a2z-border: #d8deee;
  --a2z-soft: #f4f7fb;
  --a2z-warm: #36b36d;
  --a2z-red: #c73745;
}

body {
  min-height: 100%;
  margin-bottom: 72px;
  background: var(--a2z-soft);
  color: var(--a2z-ink);
}

img,
svg,
video {
  max-width: 100%;
}

.dashboard-body {
  margin: 0;
  background: #f4f7fb;
  overflow-x: hidden;
}

.nav-scrim {
  display: none;
}

.side-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: #17206f;
  z-index: 1030;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem .75rem;
  overflow-y: auto;
}

.side-brand {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  text-decoration: none;
  margin-bottom: 1.35rem;
}

.side-brand img {
  width: 54px;
  height: 44px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  padding: 2px;
  flex: 0 0 auto;
}

.side-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.side-brand strong {
  font-size: .98rem;
}

.side-brand small {
  color: rgba(255, 255, 255, .85);
  font-size: .76rem;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  width: 100%;
  align-items: stretch;
}

.side-nav a,
.nav-group summary {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .55rem;
  border-radius: 7px;
  color: #fff;
  text-decoration: none;
  font-size: .91rem;
  font-weight: 500;
  padding: .45rem .6rem;
}

.side-nav a:hover,
.side-nav a:focus,
.side-nav a.active,
.nav-group summary:hover,
.nav-group summary:focus {
  background: #15975b;
  color: #fff;
}

.nav-link-primary {
  margin-bottom: .35rem;
  background: rgba(255, 255, 255, .08);
}

.nav-group {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
}

.nav-group summary {
  cursor: pointer;
  list-style: none;
  font-weight: 750;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "+";
  margin-left: auto;
  color: rgba(255, 255, 255, .75);
  font-weight: 800;
}

.nav-group[open] summary::after {
  content: "-";
}

.nav-group a {
  min-height: 34px;
  margin: 0 .35rem .25rem;
  width: calc(100% - .7rem);
  color: rgba(255, 255, 255, .86);
  font-size: .86rem;
  padding-left: 2.55rem;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: .62rem;
  font-weight: 850;
}

.app-frame {
  min-height: 100vh;
  margin-left: 248px;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 58px;
  background: rgba(255, 255, 255, .92);
  color: var(--a2z-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  box-shadow: 0 1px 0 rgba(0, 63, 72, .08);
  backdrop-filter: blur(12px);
}

.nav-toggle {
  width: 40px;
  height: 40px;
  display: none;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  background: var(--a2z-teal);
  border-radius: 99px;
}

.top-brand {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .9rem;
  font-weight: 700;
  min-width: 260px;
}

.brand-mark {
  color: var(--a2z-teal);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.notification-button {
  position: relative;
  min-height: 32px;
  border: 1px solid var(--a2z-border);
  border-radius: 7px;
  background: transparent;
  color: var(--a2z-teal-dark);
  padding: .25rem .75rem;
  font-size: .86rem;
  font-weight: 700;
}

.notification-button:hover,
.notification-button:focus {
  background: var(--a2z-soft);
  color: var(--a2z-teal-dark);
}

.install-button {
  min-height: 32px;
  border: 1px solid var(--a2z-green);
  border-radius: 7px;
  background: #eef9ea;
  color: var(--a2z-green-dark);
  padding: .25rem .75rem;
  font-size: .86rem;
  font-weight: 800;
}

.install-button:hover,
.install-button:focus {
  background: var(--a2z-green);
  color: #fff;
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--a2z-green);
}

.notification-menu {
  min-width: 260px;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
}

.notification-title {
  padding: .75rem .9rem .35rem;
  color: var(--a2z-teal-dark);
  font-weight: 700;
}

.notification-item {
  padding: .75rem .9rem;
  color: var(--a2z-muted);
  font-size: .9rem;
}

.user-chip {
  color: var(--a2z-muted);
  font-size: .86rem;
  font-weight: 600;
}

.avatar-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: var(--a2z-teal);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.help-assistant {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1040;
  display: grid;
  justify-items: end;
  gap: .6rem;
}

.help-toggle {
  min-width: 62px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--a2z-green);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(0, 63, 72, .18);
}

.help-panel {
  width: min(360px, calc(100vw - 1.5rem));
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 31, 40, .18);
  overflow: hidden;
}

.help-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .9rem;
  background: var(--a2z-teal);
  color: #fff;
}

.help-header button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  background: transparent;
  color: #fff;
}

.help-messages {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: .55rem;
  padding: .85rem;
  background: #f8fbfa;
}

.help-message {
  border-radius: 8px;
  padding: .65rem .75rem;
  font-size: .9rem;
  line-height: 1.4;
}

.help-message.bot {
  background: #fff;
  border: 1px solid var(--a2z-border);
}

.help-message.user {
  margin-left: 2rem;
  background: #eef9ea;
  color: var(--a2z-green-dark);
}

.help-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  padding: .75rem;
  border-top: 1px solid var(--a2z-border);
}

.help-form input {
  min-height: 38px;
  border: 1px solid var(--a2z-border);
  border-radius: 7px;
  padding: .4rem .6rem;
}

.help-form button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: var(--a2z-teal);
  color: #fff;
  font-weight: 800;
  padding: .4rem .8rem;
}

.help-escalate {
  display: block;
  padding: 0 .85rem .85rem;
  color: var(--a2z-teal);
  font-weight: 750;
  text-decoration: none;
}

.app-content {
  padding: 1.2rem 1.4rem 2rem;
}

.command-hero {
  min-height: 128px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #eef8f5 60%, #fff8e8 100%);
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 10px 24px rgba(0, 63, 72, .05);
}

.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  box-shadow: 0 8px 20px rgba(0, 63, 72, .04);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: flex-end;
}

.app-content > .d-flex:first-child,
.app-content > .mb-4:first-child {
  background: #fff;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  padding: .9rem 1rem;
  margin-bottom: .9rem !important;
  box-shadow: 0 8px 20px rgba(0, 63, 72, .04);
}

.analytics-panel {
  background: #fff;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 63, 72, .04);
  overflow: hidden;
}

.analytics-title {
  padding: .8rem 1rem .35rem;
  color: var(--a2z-teal);
  font-weight: 700;
}

.analytics-tabs {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--a2z-border);
  padding: 0 1rem;
}

.analytics-tabs a {
  color: var(--a2z-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: .7rem 0;
  font-size: .86rem;
  font-weight: 650;
  border-bottom: 3px solid transparent;
}

.analytics-tabs a.active,
.analytics-tabs a:hover,
.analytics-tabs a:focus {
  color: var(--a2z-teal);
  border-bottom-color: var(--a2z-green);
}

.filter-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: .65rem;
  padding: .8rem 1rem 1rem;
}

.dashboard-filter-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .65rem;
  align-items: end;
}

.dashboard-filter-form label {
  min-height: 66px;
  border-radius: 7px;
  background: #f8fbfa;
  border: 1px solid var(--a2z-border);
  display: grid;
  align-content: center;
  gap: .3rem;
  padding: .45rem .55rem;
}

.dashboard-filter-form span {
  color: var(--a2z-muted);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08rem;
  text-transform: uppercase;
}

.dashboard-filter-actions {
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  align-items: center;
}

.filter-tile {
  min-height: 56px;
  border-radius: 7px;
  background: #f8fbfa;
  border: 1px solid var(--a2z-border);
  display: grid;
  place-items: center;
  text-align: center;
  padding: .35rem;
}

.filter-tile span {
  color: var(--a2z-muted);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08rem;
  text-transform: uppercase;
}

.filter-tile strong {
  color: var(--a2z-teal-dark);
  font-size: .82rem;
}

.login-header {
  min-height: 64px;
  background: var(--a2z-teal);
  display: flex;
  align-items: center;
  padding: .75rem 1.4rem;
}

.login-header .navbar-brand {
  color: #fff;
  text-decoration: none;
}

.app-shell,
.navbar {
  background: var(--a2z-teal);
}

.navbar-brand {
  letter-spacing: 0;
}

.brand-logo {
  width: 54px;
  height: 38px;
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.78);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #fff;
}

.navbar .nav-link.active {
  color: #fff;
  border-bottom: 2px solid var(--a2z-green);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #142044;
}

.eyebrow {
  color: var(--a2z-teal);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02rem;
  text-transform: uppercase;
}

.module-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.module-card {
  min-height: 130px;
  border: 1px solid var(--a2z-border);
  border-left: 4px solid var(--a2z-teal);
  border-radius: 8px;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 10px 20px rgba(16, 24, 40, 0.04);
}

.module-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #001f28;
  margin-bottom: .45rem;
}

.module-card p {
  color: #4b6274;
  margin-bottom: .8rem;
}

.module-card span {
  color: #405a70;
  font-size: .82rem;
  font-weight: 600;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: .8rem;
}

.module-tile {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .8rem;
  border: 1px solid var(--a2z-border);
  border-left: 4px solid var(--a2z-teal);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  color: var(--a2z-ink);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.module-tile:hover,
.module-tile:focus {
  color: var(--a2z-ink);
  border-color: #bad9d2;
  box-shadow: 0 14px 28px rgba(0, 63, 72, .09);
  transform: translateY(-1px);
}

.module-tile span {
  font-size: 1rem;
  font-weight: 800;
}

.module-tile small {
  color: var(--a2z-muted);
  line-height: 1.4;
}

.module-tile-green {
  border-left-color: var(--a2z-green);
}

.module-tile-amber {
  border-left-color: #b87500;
}

.module-tile-red {
  border-left-color: #c73745;
}

.metric {
  min-height: 104px;
  border: 1px solid var(--a2z-border);
  border-left: 4px solid var(--a2z-teal);
  border-radius: 8px;
  background: var(--a2z-surface);
  padding: 1.1rem;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.05);
}

.executive-metrics .metric {
  min-height: 118px;
}

.section-kicker {
  margin: 1rem 0 .55rem;
  color: var(--a2z-teal-dark);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08rem;
  text-transform: uppercase;
}

.metric-link {
  display: block;
  height: 100%;
  color: var(--a2z-ink);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.metric-link:hover,
.metric-link:focus {
  color: var(--a2z-ink);
  border-color: #bad9d2;
  box-shadow: 0 14px 28px rgba(0, 63, 72, .1);
  transform: translateY(-1px);
}

.metric-link:focus-visible {
  outline: 3px solid rgba(85, 183, 47, .35);
  outline-offset: 2px;
}

.metric-label {
  color: var(--a2z-muted);
  font-size: .98rem;
  font-weight: 500;
  text-transform: none;
}

.metric-value {
  color: #001f28;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.15;
}

.metric-amber {
  border-left-color: var(--a2z-warm);
}

.metric-red {
  border-left-color: var(--a2z-red);
}

.metric-green {
  border-left-color: var(--a2z-green);
}

.exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
}

.powerbi-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.35fr) repeat(2, minmax(260px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.dashboard-powerbi {
  grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.25fr) minmax(280px, .9fr);
}

.analytics-visual {
  min-height: 276px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, .85fr) minmax(300px, .85fr);
  gap: 1rem;
  align-items: start;
}

.action-inbox.compact {
  max-height: 410px;
  overflow: auto;
}

.compact-modules {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-modules .module-tile {
  min-height: 96px;
}

.birthday-list {
  display: grid;
  gap: .6rem;
}

.birthday-list a {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .75rem .85rem;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  color: var(--a2z-ink);
  text-decoration: none;
  background: #f8fbfa;
}

.birthday-list a:hover,
.birthday-list a:focus {
  border-color: rgba(21, 151, 91, .35);
  background: #eef9ea;
}

.birthday-list span {
  display: grid;
  gap: .1rem;
}

.birthday-list small {
  color: var(--a2z-muted);
}

.birthday-list em {
  min-width: 58px;
  border-radius: 999px;
  background: #eef9ea;
  color: var(--a2z-green-dark);
  text-align: center;
  font-style: normal;
  font-weight: 800;
  padding: .3rem .55rem;
}

.visual-wide {
  grid-column: span 2;
}

.visual-header {
  min-height: 42px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.visual-header h2 {
  margin: 0;
  color: #001f28;
  font-size: 1rem;
  font-weight: 800;
}

.visual-header span {
  display: block;
  margin-top: .15rem;
  color: var(--a2z-muted);
  font-size: .78rem;
}

.visual-header a {
  color: var(--a2z-teal);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.donut-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 190px;
}

.donut-chart {
  width: 168px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(0, 63, 72, .08);
}

.donut-chart > div {
  width: 96px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-content: center;
  text-align: center;
  box-shadow: 0 0 0 1px var(--a2z-border), 0 8px 18px rgba(0, 63, 72, .08);
}

.donut-chart strong {
  color: #001f28;
  font-size: 1.35rem;
  line-height: 1;
}

.donut-chart span {
  color: var(--a2z-muted);
  font-size: .72rem;
  font-weight: 700;
}

.chart-legend,
.bar-chart,
.drilldown-stack {
  display: grid;
  gap: .55rem;
}

.chart-legend a,
.chart-bar-row,
.drilldown-stack a {
  min-height: 34px;
  color: var(--a2z-ink);
  text-decoration: none;
  border-radius: 7px;
}

.chart-legend a {
  display: grid;
  grid-template-columns: 12px minmax(80px, 1fr) auto auto;
  gap: .55rem;
  align-items: center;
  padding: .28rem .35rem;
}

.chart-legend a:hover,
.chart-legend a:focus,
.chart-bar-row:hover,
.chart-bar-row:focus,
.drilldown-stack a:hover,
.drilldown-stack a:focus {
  background: #f1f8f6;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.chart-legend span,
.chart-bar-row span,
.drilldown-stack span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .86rem;
  font-weight: 650;
}

.chart-legend strong,
.chart-legend em,
.chart-bar-row strong,
.drilldown-stack strong {
  color: var(--a2z-teal-dark);
  font-size: .82rem;
  font-style: normal;
  font-weight: 800;
}

.chart-legend em {
  color: var(--a2z-muted);
}

.chart-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 2.5fr) 40px;
  gap: .65rem;
  align-items: center;
  padding: .25rem .35rem;
}

.bar-track {
  height: 11px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8efed;
}

.bar-track i {
  display: block;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
}

.bar-chart.compact .chart-bar-row {
  grid-template-columns: minmax(96px, 1fr) minmax(86px, 1.4fr) 34px;
}

.drilldown-stack a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid var(--a2z-border);
  background: #fbfdfc;
  padding: .55rem .7rem;
}

.metric-teal {
  border-left-color: var(--a2z-teal);
}

.surface {
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: var(--a2z-surface);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.05);
}

.checkbox-panel {
  min-height: 58px;
  margin-top: 30px;
  padding: 0.72rem 0.8rem 0.72rem 2.35rem;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #f8fbff;
}

.toolbar {
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: var(--a2z-surface);
  padding: 1rem;
}

.table {
  vertical-align: middle;
}

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

.table thead th {
  color: var(--a2z-muted);
  font-size: .78rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: .25rem .65rem;
  background: #e8f6ef;
  color: var(--a2z-teal);
  font-weight: 650;
}

.progress-bar {
  background-color: var(--a2z-green);
}

.form-control,
.form-select,
.btn {
  border-radius: 7px;
}

.btn-primary {
  background: var(--a2z-teal);
  border-color: var(--a2z-teal);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--a2z-teal-dark);
  border-color: var(--a2z-teal-dark);
}

.btn-outline-primary {
  color: var(--a2z-teal);
  border-color: var(--a2z-teal);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--a2z-teal);
  border-color: var(--a2z-teal);
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
  line-height: 60px;
}

.dashboard-body .footer {
  display: none;
}

.auth-panel {
  max-width: 460px;
  width: 100%;
}

.microsoft-button {
  min-height: 46px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 460px);
  align-items: center;
  gap: 3rem;
  max-width: 1120px;
  min-height: calc(100vh - 190px);
  margin: 0 auto;
}

.offline-shell {
  width: min(92vw, 520px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem 1rem;
}

.offline-shell img {
  width: min(240px, 70vw);
  background: #fff;
  border-radius: 8px;
  padding: .75rem;
  border: 1px solid var(--a2z-border);
}

.login-brand {
  max-width: 620px;
}

.login-logo {
  width: min(280px, 70vw);
  height: auto;
  display: block;
  margin-bottom: 1.5rem;
}

.login-summary {
  max-width: 58ch;
  font-size: 1.04rem;
  line-height: 1.65;
}

.login-overview {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 1.25rem;
}

.login-overview span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--a2z-border);
  border-radius: 999px;
  padding: .3rem .75rem;
  background: #fff;
  color: var(--a2z-teal);
  font-weight: 650;
}

.designed-by {
  color: var(--a2z-green-dark);
  font-weight: 700;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
}

.role-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #fff;
  padding: .75rem;
  font-weight: 650;
}

.access-request-list {
  display: grid;
  gap: .8rem;
}

.access-request-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) minmax(240px, 1fr) auto;
  gap: .8rem;
  align-items: center;
  border: 1px solid var(--a2z-border);
  border-left: 4px solid var(--a2z-green);
  border-radius: 8px;
  background: #f8fbfa;
  padding: .85rem;
}

.compact-role-grid {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.compact-tabs {
  border-bottom-color: var(--a2z-border);
}

.compact-tabs .nav-link {
  color: var(--a2z-muted);
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 700;
}

.compact-tabs .nav-link.active {
  color: var(--a2z-teal);
  border-bottom-color: var(--a2z-green);
}

.timeline-list {
  display: grid;
  gap: .7rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: .8rem;
  padding: .75rem;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #fbfdfc;
}

.timeline-date {
  color: var(--a2z-muted);
  font-size: .84rem;
  font-weight: 700;
}

.employee-profile-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.2fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.05);
}

.employee-profile-hero h2 {
  margin: .45rem 0 .2rem;
  color: var(--a2z-ink);
  font-size: 1.35rem;
  font-weight: 850;
}

.employee-photo-editor {
  display: grid;
  gap: .55rem;
  padding: .75rem;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #f8fbfa;
}

.employee-photo-editor img,
.employee-photo-placeholder {
  width: 112px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  border: 1px solid var(--a2z-border);
  background: #fff;
  object-fit: cover;
}

.employee-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--a2z-muted);
  font-size: .82rem;
  font-weight: 800;
}

.employee-profile-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.employee-profile-photo {
  width: 116px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  border: 1px solid var(--a2z-border);
  background: #fff;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0, 63, 72, .08);
  flex: 0 0 auto;
}

.employee-profile-photo-empty {
  display: grid;
  place-items: center;
  color: var(--a2z-muted);
  font-size: .82rem;
  font-weight: 800;
}

.employee-list-person {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 190px;
}

.employee-list-person img,
.employee-list-person > span {
  width: 38px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--a2z-border);
  object-fit: cover;
  flex: 0 0 auto;
}

.employee-list-person > span {
  display: grid;
  place-items: center;
  background: #eef9ea;
  color: var(--a2z-green-dark);
  font-size: .72rem;
  font-weight: 850;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: .25rem .7rem;
  font-size: .74rem;
  font-weight: 850;
}

.profile-status-active {
  background: #e8f6ef;
  color: var(--a2z-green-dark);
}

.profile-status-inactive {
  background: #fff1f2;
  color: var(--a2z-red);
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}

.profile-facts div {
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #f8fbff;
  padding: .75rem;
}

.profile-facts span {
  display: block;
  color: var(--a2z-muted);
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-facts strong {
  display: block;
  margin-top: .25rem;
  color: var(--a2z-ink);
  font-size: .88rem;
}

.self-service-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: .85rem;
}

.self-service-actions a {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: .3rem;
  border: 1px solid var(--a2z-border);
  border-left: 4px solid var(--a2z-green);
  border-radius: 8px;
  background: #fff;
  color: var(--a2z-ink);
  padding: .9rem 1rem;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.05);
}

.self-service-actions a:hover,
.self-service-actions a:focus {
  border-color: #bad9d2;
  color: var(--a2z-ink);
}

.self-service-actions span {
  font-weight: 850;
}

.self-service-actions small {
  color: var(--a2z-muted);
}

.employee-profile-workspace {
  overflow: hidden;
}

.profile-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.profile-section-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: .85rem;
}

.profile-field {
  min-height: 76px;
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #f8fbff;
  padding: .8rem;
}

.profile-field-wide {
  grid-column: span 2;
}

.profile-field span {
  display: block;
  color: var(--a2z-muted);
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-field strong {
  display: block;
  margin-top: .25rem;
  color: var(--a2z-ink);
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.action-inbox {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: .75rem;
}

.action-inbox-item {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  border: 1px solid var(--a2z-border);
  border-left: 4px solid var(--a2z-teal);
  border-radius: 8px;
  background: #fff;
  color: var(--a2z-ink);
  text-decoration: none;
  padding: .85rem 1rem;
}

.action-inbox-item:hover,
.action-inbox-item:focus {
  color: var(--a2z-ink);
  background: #f8fbff;
  box-shadow: 0 12px 24px rgba(16, 24, 40, .06);
}

.action-inbox-item strong,
.action-inbox-item small {
  display: block;
}

.action-inbox-item small {
  margin-top: .2rem;
  color: var(--a2z-muted);
}

.action-inbox-item em {
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--a2z-teal);
  font-style: normal;
  font-weight: 850;
}

.action-inbox-red {
  border-left-color: var(--a2z-red);
}

.action-inbox-amber {
  border-left-color: #d17b00;
}

.action-inbox-neutral {
  border-left-color: var(--a2z-muted);
}

.dashboard-disclosure {
  border: 1px solid var(--a2z-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(16, 24, 40, .05);
  padding: .85rem 1rem 1rem;
}

.dashboard-disclosure summary {
  cursor: pointer;
  color: var(--a2z-teal-dark);
  font-size: .95rem;
  font-weight: 850;
}

.data-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: .75rem;
}

.data-health-card {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: .2rem;
  border: 1px solid var(--a2z-border);
  border-left: 4px solid var(--a2z-teal);
  border-radius: 8px;
  background: #fff;
  color: var(--a2z-ink);
  text-decoration: none;
  padding: .9rem 1rem;
}

.data-health-card.high {
  border-left-color: var(--a2z-red);
}

.data-health-card.medium {
  border-left-color: #d17b00;
}

.data-health-card.low {
  border-left-color: var(--a2z-green);
}

.data-health-card span,
.data-health-card small {
  color: var(--a2z-muted);
}

.data-health-card strong {
  color: var(--a2z-ink);
  font-size: 1.8rem;
  line-height: 1.1;
}

.quality-progress .bar-track,
.health-score .bar-track {
  height: 8px;
}

.health-score {
  display: grid;
  grid-template-columns: 48px minmax(80px, 1fr);
  align-items: center;
  gap: .5rem;
  min-width: 150px;
}

.health-score span {
  color: var(--a2z-teal-dark);
  font-weight: 800;
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: .2rem .6rem;
  font-size: .74rem;
  font-weight: 850;
}

.severity-high {
  background: #fff1f2;
  color: var(--a2z-red);
}

.severity-medium {
  background: #fff7e6;
  color: #9a5a00;
}

.severity-low {
  background: #e8f6ef;
  color: var(--a2z-green-dark);
}

.empty-state {
  border: 1px dashed var(--a2z-border);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--a2z-muted);
  padding: 1rem;
}

.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  min-width: 210px;
}

.workflow-steps span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--a2z-border);
  border-radius: 999px;
  background: #f8fbff;
  color: var(--a2z-muted);
  padding: .2rem .55rem;
  font-size: .72rem;
  font-weight: 750;
}

.workflow-steps span.done {
  border-color: #bfe5d0;
  background: #e8f6ef;
  color: var(--a2z-green-dark);
}

.balance-editor-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: .75rem;
  align-items: end;
}

.balance-editor-notes {
  grid-column: span 2;
}

@media (max-width: 1199.98px) {
  .powerbi-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .visual-wide {
    grid-column: span 1;
  }

  .side-rail {
    width: 232px;
  }

  .app-frame {
    margin-left: 232px;
  }

  .side-nav a {
    font-size: .86rem;
  }
}

@media (max-width: 991.98px) {
  .dashboard-body.nav-open {
    overflow: hidden;
  }

  .nav-toggle {
    display: grid;
    flex: 0 0 auto;
  }

  .side-rail {
    width: min(82vw, 320px);
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 16px 0 32px rgba(0, 31, 40, .22);
  }

  .dashboard-body.nav-open .side-rail {
    transform: translateX(0);
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 1025;
    background: rgba(0, 31, 40, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .dashboard-body.nav-open .nav-scrim {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .app-frame {
    margin-left: 0;
  }

  .top-bar {
    gap: .75rem;
  }

  .top-brand {
    min-width: 0;
    flex: 1;
  }

  .command-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .exec-kpi-grid,
  .dashboard-lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: auto;
  }

  .login-logo {
    width: min(220px, 70vw);
  }

  .employee-profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .self-service-actions,
  .data-health-grid,
  .balance-editor-grid,
  .access-request-card {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .profile-section-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .balance-editor-notes {
    grid-column: span 1;
  }
}

@media (max-width: 767.98px) {
  html {
    font-size: 14px;
  }

  body {
    margin-bottom: 0;
  }

  .app-content {
    padding: .8rem .75rem 1.5rem;
  }

  .powerbi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-powerbi,
  .exec-kpi-grid,
  .dashboard-lower-grid,
  .compact-modules {
    grid-template-columns: 1fr;
  }

  .analytics-visual {
    min-height: auto;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .chart-legend,
  .bar-chart {
    width: 100%;
  }

  .chart-bar-row,
  .bar-chart.compact .chart-bar-row {
    grid-template-columns: minmax(90px, 1fr) minmax(92px, 1.25fr) 34px;
  }

  .metric-value {
    font-size: 1.65rem;
  }

  .page-title {
    font-size: 1.55rem;
  }

  .top-bar {
    align-items: stretch;
    flex-wrap: wrap;
    padding: .65rem .75rem;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
    gap: .45rem;
  }

  .notification-button {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .help-assistant {
    right: .75rem;
    bottom: .75rem;
  }

  .user-chip {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .command-hero,
  .app-content > .d-flex:first-child,
  .app-content > .mb-4:first-child,
  .surface,
  .toolbar,
  .analytics-panel {
    border-radius: 8px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .navbar-brand span {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .table-responsive {
    border-radius: 8px;
  }

  .table thead th,
  .table tbody td {
    white-space: nowrap;
  }

  .workflow-steps {
    min-width: 180px;
  }

  .self-service-actions,
  .profile-facts,
  .profile-section-grid,
  .data-health-grid,
  .balance-editor-grid,
  .access-request-card {
    grid-template-columns: 1fr;
  }

  .profile-field-wide {
    grid-column: span 1;
  }
}

@media (max-width: 575.98px) {
  .side-nav a {
    min-height: 42px;
    font-size: .9rem;
  }

  .login-header {
    padding: .65rem .85rem;
  }

  .login-header .navbar-brand span {
    max-width: 72vw;
  }

  .login-shell {
    gap: 1.25rem;
  }

  .auth-panel.surface {
    padding: 1rem !important;
  }

  .filter-strip {
    grid-template-columns: 1fr 1fr;
    padding: .75rem;
  }

  .hero-actions,
  .hero-actions .btn,
  .d-flex.gap-2 .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }
}

.guide-toolbar {
  align-items: flex-end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.guide-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.guide-tabs a {
  background: #ffffff;
  border: 1px solid #cbd6ee;
  border-radius: 999px;
  color: #142489;
  font-weight: 700;
  padding: .45rem .85rem;
  text-decoration: none;
}

.guide-section {
  break-inside: avoid;
}

.guide-section-header {
  align-items: flex-start;
  border-bottom: 1px solid #d9e3f2;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
}

.guide-section-header h2 {
  color: #001b44;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 .25rem;
}

.guide-section-header p {
  color: #61708c;
  margin: 0;
}

.guide-role-pill {
  background: #e6f5ee;
  border: 1px solid #b7dfcb;
  border-radius: 999px;
  color: #007d47;
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 800;
  padding: .35rem .7rem;
}

.guide-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
}

.guide-grid h3,
.guide-faq h3 {
  color: #001b44;
  font-size: 1rem;
  font-weight: 800;
  margin: .25rem 0 .6rem;
}

.guide-steps {
  color: #22314d;
  margin-bottom: 1.1rem;
  padding-left: 1.25rem;
}

.guide-steps li {
  margin-bottom: .45rem;
}

.guide-callout {
  background: #fff7d6;
  border: 1px solid #f0dc94;
  border-radius: 8px;
  color: #5c4600;
  padding: .8rem .9rem;
}

.guide-screen {
  background: #f4f7fb;
  border: 1px solid #cbd6ee;
  border-radius: 8px;
  overflow: hidden;
}

.screen-top {
  align-items: center;
  background: #24309a;
  color: #ffffff;
  display: flex;
  gap: .5rem;
  min-height: 36px;
  padding: .5rem .75rem;
}

.screen-top span {
  background: #15975b;
  border: 2px solid #ffffff;
  border-radius: 4px;
  height: 18px;
  width: 28px;
}

.screen-body {
  display: grid;
  gap: .75rem;
  min-height: 250px;
  padding: 1rem;
}

.login-screen {
  align-items: center;
  grid-template-columns: .85fr 1fr;
}

.screen-logo {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #24309a 0 52%, #15975b 52% 100%);
  color: #ffffff;
  display: flex;
  font-size: 2.4rem;
  font-weight: 900;
  justify-content: center;
}

.screen-button,
.screen-save {
  background: #24309a;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 800;
  padding: .7rem .9rem;
  text-align: center;
}

.screen-button.mini {
  justify-self: start;
  padding: .45rem .75rem;
}

.app-screen {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-card,
.screen-kpi {
  background: #ffffff;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 25, 65, .06);
  color: #001b44;
  min-height: 74px;
  padding: .8rem;
}

.screen-card small,
.screen-kpi b {
  color: #61708c;
  display: block;
}

.screen-card.wide {
  grid-column: 1 / -1;
}

.screen-card.action {
  border-color: #a8d9c0;
}

.screen-table {
  background: #ffffff;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1.2fr .8fr .8fr;
  overflow: hidden;
}

.screen-table i,
.screen-table span {
  border-bottom: 1px solid #edf1f7;
  font-style: normal;
  padding: .5rem;
}

.screen-table i {
  background: #eef3fb;
  color: #455574;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.form-screen {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-field {
  background: #ffffff;
  border: 1px solid #cbd6ee;
  border-radius: 6px;
  color: #52617c;
  min-height: 38px;
  padding: .55rem .65rem;
}

.screen-save {
  grid-column: 1 / -1;
}

.report-screen {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-bar {
  background: #dfe7f4;
  border-radius: 999px;
  grid-column: 1 / -1;
  height: 12px;
  overflow: hidden;
}

.screen-bar span {
  background: #15975b;
  display: block;
  height: 100%;
}

.role-chips,
.screen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  grid-column: 1 / -1;
}

.role-chips span,
.screen-actions span {
  background: #e6f5ee;
  border-radius: 999px;
  color: #007d47;
  font-weight: 800;
  padding: .4rem .65rem;
}

.screen-actions span {
  background: #24309a;
  color: #ffffff;
}

.screen-caption {
  background: #ffffff;
  border-top: 1px solid #d9e3f2;
  color: #61708c;
  font-size: .85rem;
  padding: .65rem .8rem;
}

.guide-faq {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-faq > div {
  background: #f7f9fc;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  padding: 1rem;
}

@media (max-width: 991.98px) {
  .guide-toolbar,
  .guide-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-grid,
  .guide-faq {
    grid-template-columns: 1fr;
  }

  .guide-actions {
    justify-content: flex-start;
  }
}

@media print {
  @page {
    margin: 12mm;
    size: A4;
  }

  body.dashboard-body {
    background: #ffffff !important;
  }

  .side-rail,
  .top-bar,
  .help-assistant,
  .guide-actions,
  .guide-tabs,
  .guide-print-note,
  .nav-scrim {
    display: none !important;
  }

  .app-frame {
    margin-left: 0 !important;
  }

  .app-content {
    padding: 0 !important;
  }

  .surface,
  .guide-screen,
  .screen-card,
  .screen-kpi,
  .guide-faq > div {
    box-shadow: none !important;
  }

  .guide-section {
    break-inside: avoid;
    margin-bottom: 10mm !important;
  }

  .guide-grid {
    grid-template-columns: 1.1fr .9fr;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }
}
