:root {
  --bg: #070a12;
  --bg-mid: #0c1220;
  --surface: #111a2b;
  --surface-2: #0f1727;
  --surface-elevated: #161f35;
  --text: #e7ecf5;
  --muted: #9aa8bf;
  --border: #243148;
  --accent: #4ca5ff;
  --accent-bright: #5ce1ff;
  --accent-dim: rgba(76, 165, 255, 0.14);
  --shadow-deep: 0 18px 48px rgba(0, 0, 0, 0.42);
  --radius-lg: 14px;
  --radius-xl: 18px;
  --font-display: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body.app-body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 0;
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  position: relative;
}

.app-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(28, 44, 72, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 90% 60% at -10% 40%, rgba(20, 30, 48, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(4, 8, 14, 1) 0%, var(--bg) 55%);
}

.app-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(55, 100, 160, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 100, 160, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.35) 100%);
  opacity: 0.55;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  margin-bottom: 1rem;
}

.app-navbar {
  background: rgba(8, 14, 26, 0.78) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(80, 120, 180, 0.22) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  color: #e8f0fc !important;
}

.app-brand:hover {
  color: #fff !important;
}

.app-brand-mark {
  display: inline-block;
  width: 11px;
  height: 28px;
  border-radius: 3px;
  background: linear-gradient(180deg, #5ce1ff 0%, #2b8cff 55%, #1e5fbb 100%);
  box-shadow: 0 0 20px rgba(44, 150, 255, 0.45);
}

.app-nav-link {
  border-radius: 8px;
  margin: 0 0.1rem;
  padding: 0.45rem 0.65rem !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-nav-link:hover {
  background: rgba(76, 165, 255, 0.1);
  color: #e8f4ff !important;
}

.app-nav-user {
  font-size: 0.88rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-nav-user-wrap {
  line-height: 1.25;
  max-width: min(280px, 42vw);
}

.app-nav-user-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.app-nav-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f4f8ff;
}

.app-nav-user-upn {
  font-size: 0.78rem;
  color: #a8c6ec;
  word-break: break-all;
}

.app-nav-cta {
  background: linear-gradient(135deg, rgba(43, 140, 255, 0.32), rgba(30, 95, 187, 0.52));
  border: 1px solid rgba(125, 190, 255, 0.5);
  border-radius: 12px;
  padding: 0.45rem 0.9rem !important;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(15, 60, 130, 0.35);
}

.app-nav-cta:hover {
  background: linear-gradient(135deg, rgba(53, 156, 255, 0.5), rgba(36, 108, 210, 0.62));
  border-color: rgba(160, 214, 255, 0.75);
  transform: translateY(-1px);
}

.btn-modern-ghost {
  border: 1px solid rgba(128, 185, 255, 0.5);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(32, 76, 148, 0.25), rgba(14, 38, 78, 0.28));
  color: #e8f4ff;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
}

.btn-modern-ghost:hover {
  color: #fff;
  border-color: rgba(164, 214, 255, 0.85);
  background: linear-gradient(135deg, rgba(44, 106, 195, 0.45), rgba(22, 58, 116, 0.45));
}

.app-container {
  max-width: min(1920px, 98vw);
}

.app-main {
  padding-top: 1.5rem;
  animation: n4a-fade-up 0.45s ease;
}

@keyframes n4a-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(60, 90, 140, 0.35);
  background: linear-gradient(180deg, transparent, rgba(5, 10, 20, 0.65));
}

/* Hide site footer on data-heavy report pages only (not Overview) */
body:has(#report-privileged) .app-footer,
body:has(#report-applications) .app-footer,
body:has(#report-agents) .app-footer {
  display: none !important;
}

.app-footer--author .app-footer-center {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.app-footer-author-line {
  margin: 0;
  font-size: 0.95rem;
  color: #a8b8d8;
  letter-spacing: 0.02em;
}

.app-footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.app-footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(100, 150, 220, 0.28);
  color: #b8d4f5;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.app-footer-social-link:hover {
  color: #fff;
  border-color: rgba(120, 200, 255, 0.45);
  background: rgba(76, 165, 255, 0.12);
}

.app-footer-social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}

.app-footer-inner {
  min-width: 0;
  max-width: 100%;
}

.app-footer-copy,
.app-footer-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-main:has(.report-page) {
  padding-bottom: 3rem;
}

.min-w-0 {
  min-width: 0;
}

.app-footer-brand {
  display: block;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  color: #b8d4f5;
}

.app-footer-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.app-footer-meta a {
  color: #8bc6ff;
}

.container {
  max-width: 1720px;
}

a {
  color: #8bc6ff;
}

a:hover {
  color: #b8dcff;
}

.alert-danger {
  background: linear-gradient(180deg, rgba(60, 22, 28, 0.65), rgba(40, 14, 20, 0.75));
  border: 1px solid rgba(220, 90, 110, 0.45);
  color: #fecdd3;
}

.alert-warning {
  background: linear-gradient(180deg, rgba(55, 45, 18, 0.65), rgba(38, 32, 12, 0.75));
  border: 1px solid rgba(220, 170, 70, 0.4);
  color: #fde8b0;
}

.panel {
  background: linear-gradient(165deg, rgba(20, 30, 50, 0.92), rgba(12, 20, 36, 0.88));
  border: 1px solid rgba(80, 115, 170, 0.22);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-deep);
}

.page-shell {
  max-width: 1720px;
  margin-left: auto;
  margin-right: auto;
}

.page-shell--wide {
  max-width: min(1920px, 99vw);
  width: 100%;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.report-page {
  animation: n4a-fade-up 0.4s ease;
}

.pri-col-hidden {
  display: none !important;
}

.app-col-hidden {
  display: none !important;
}

.report-rec-panel .rec-list-visible,
.report-rec-panel .rec-list-visible li {
  color: #e8f0fc !important;
}

.report-rec-panel .text-muted {
  color: #b0c4e0 !important;
}

.azure-scope-modal-lead {
  color: #c5d4f0 !important;
}

#pimGroupsModalList {
  padding-left: 1.2rem;
  color: #e8f0fc;
}

.priv-col-menu {
  max-height: 70vh;
  overflow-y: auto;
}

.overview-card-word {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.overview-wait-text {
  color: #c6d6ea !important;
}

.report-page .report-header {
  background: linear-gradient(135deg, rgba(18, 32, 58, 0.95) 0%, rgba(12, 24, 44, 0.88) 100%);
  border: 1px solid rgba(80, 130, 200, 0.28);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
}

.report-page .report-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #5ce1ff, #2b8cff);
  border-radius: 4px 0 0 4px;
}

.report-page .report-header > div:first-child {
  padding-left: 0.75rem;
}

.report-page .report-header h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f0f5fc;
}

.btn-primary {
  background: linear-gradient(135deg, #2f93ff 0%, #1a6edb 55%, #155fc4 100%);
  border: 1px solid rgba(120, 185, 255, 0.45);
  box-shadow: 0 6px 20px rgba(30, 110, 220, 0.35);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4aa3ff 0%, #2380f0 55%, #1a6edb 100%);
  border-color: rgba(160, 205, 255, 0.55);
  box-shadow: 0 8px 28px rgba(30, 120, 230, 0.45);
}

.btn-outline-light {
  border-color: rgba(200, 215, 240, 0.35);
  color: #e4eaf5;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(220, 230, 250, 0.5);
  color: #fff;
}

.report-export-btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.42rem 0.95rem;
}

.n4a-signout.app-nav-link {
  border: 1px solid rgba(128, 185, 255, 0.42);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(28, 64, 128, 0.28), rgba(14, 36, 72, 0.32));
  font-weight: 600;
  padding: 0.45rem 0.85rem !important;
  margin-left: 0.15rem;
}

.n4a-signout.app-nav-link:hover {
  background: linear-gradient(135deg, rgba(44, 96, 178, 0.42), rgba(22, 58, 116, 0.45));
  border-color: rgba(170, 210, 255, 0.55);
  color: #fff !important;
}

.btn-outline-info {
  border-color: rgba(80, 190, 220, 0.45);
  color: #7dd3fc;
}

.btn-outline-info:hover {
  background: rgba(80, 190, 220, 0.12);
  border-color: rgba(120, 210, 240, 0.6);
  color: #b8efff;
}

.btn-outline-primary {
  border-color: rgba(100, 160, 255, 0.45);
  color: #8bc6ff;
}

.btn-outline-primary:hover {
  background: rgba(60, 130, 230, 0.15);
  border-color: rgba(130, 180, 255, 0.6);
  color: #d4e8ff;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 1rem;
}

.eyebrow {
  color: #32d4ff;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-panel {
  background: linear-gradient(145deg, rgba(10, 14, 24, 0.98) 0%, rgba(8, 12, 22, 0.94) 45%, rgba(6, 10, 18, 0.92) 100%);
  border: 1px solid rgba(80, 130, 210, 0.35);
  border-radius: var(--radius-xl);
  padding: 0;
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-hero {
  position: relative;
  overflow: hidden;
}

.home-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(80, 140, 220, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 140, 220, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 20%, transparent 75%);
  opacity: 0.65;
  pointer-events: none;
}

.home-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.55;
}

.home-hero-glow--1 {
  width: 320px;
  height: 320px;
  right: -100px;
  top: -120px;
  background: radial-gradient(circle, rgba(60, 160, 255, 0.5) 0%, transparent 70%);
}

.home-hero-glow--2 {
  width: 240px;
  height: 240px;
  left: -80px;
  bottom: -80px;
  background: radial-gradient(circle, rgba(100, 80, 200, 0.25) 0%, transparent 70%);
}

.home-hero-content {
  position: relative;
  z-index: 1;
  padding: 2.25rem 2rem 2rem;
}

.home-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: 20%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 162, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: #8fdfff;
  border: 1px solid #2a4f78;
  background: rgba(15, 59, 109, 0.35);
  margin-bottom: 0.7rem;
}

.hero-title {
  font-size: 2.4rem;
  line-height: 1.1;
  max-width: 760px;
  font-weight: 700;
}

.hero-subtitle {
  color: var(--muted);
  max-width: 760px;
  margin-top: 0.85rem;
}

.hero-meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.hero-meta-label {
  color: #b8c9df;
  font-size: 0.9rem;
}

.hero-meta-link {
  color: #8fb3e0;
  font-size: 0.85rem;
}

.hero-actions .btn {
  min-width: 170px;
}

.page-home {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 7rem;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: content-box;
}

/* Framed marketing sections — double border + corner accents */
.home-frame {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 2px;
  background: linear-gradient(145deg, rgba(120, 175, 255, 0.55), rgba(45, 85, 150, 0.22) 38%, rgba(70, 120, 200, 0.35));
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-frame--speed {
  background: linear-gradient(145deg, rgba(94, 225, 255, 0.35), rgba(40, 100, 200, 0.2) 45%, rgba(60, 130, 220, 0.3));
}

.home-frame--speed .home-frame-inner {
  border-color: rgba(100, 180, 255, 0.32);
}

.home-frame--coverage {
  background: linear-gradient(155deg, rgba(100, 160, 255, 0.4), rgba(30, 70, 140, 0.18) 50%, rgba(80, 140, 210, 0.28));
}

.home-frame--trust {
  background: linear-gradient(155deg, rgba(130, 100, 220, 0.28), rgba(40, 80, 160, 0.2) 40%, rgba(90, 140, 220, 0.32));
}

.home-frame-inner {
  position: relative;
  background: linear-gradient(188deg, rgba(10, 16, 28, 0.98), rgba(6, 10, 18, 0.96));
  border-radius: calc(var(--radius-xl) - 2px);
  padding: 1.65rem 1.6rem 1.55rem 1.75rem;
  border: 1px solid rgba(80, 120, 190, 0.28);
}

.home-frame--speed .home-frame-corner {
  border-color: rgba(120, 210, 255, 0.55);
}

.home-frame-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(140, 190, 255, 0.4);
  pointer-events: none;
  z-index: 2;
}

.home-frame-corner--tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 2px;
}

.home-frame-corner--tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 2px;
}

.home-frame-corner--bl {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 2px;
}

.home-frame-corner--br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 2px;
}

.home-frame--report {
  padding: 2px;
  background: linear-gradient(150deg, rgba(100, 165, 255, 0.45), rgba(35, 75, 150, 0.25));
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

.home-frame--report .home-frame-inner {
  padding: 1.35rem 1.25rem 1.4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-overview .home-frame--report .home-frame-inner {
  min-height: 260px;
}

.home-marketing-hero {
  padding: 0;
}

.home-brand {
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #7dd3fc;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.home-hero-title {
  max-width: none;
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  color: #f0f6ff;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .home-hero-title {
    background: linear-gradient(120deg, #ffffff 0%, #d4e5ff 40%, #7eb0f0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.home-lede {
  font-size: 1.15rem;
  line-height: 1.45;
  color: #dce6f5;
  margin-top: 1rem;
  margin-bottom: 0;
  max-width: 52rem;
}

.home-prose {
  color: var(--muted);
  line-height: 1.65;
  max-width: 52rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

.home-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #eef3fb;
  margin-bottom: 0.75rem;
}

.home-section-sub {
  margin-bottom: 0 !important;
}

.home-section {
  padding-left: 0.1rem;
}

.home-pillar {
  border-color: rgba(90, 130, 200, 0.28);
  background: linear-gradient(165deg, rgba(18, 30, 52, 0.95), rgba(10, 20, 38, 0.9));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.home-pillar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(100, 180, 255, 0.5), transparent);
  opacity: 0.7;
}

.home-pillar:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 170, 240, 0.45);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.home-pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.home-pillar-icon--app {
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  color: #e8f0ff;
}

.home-pillar-icon--users {
  background: linear-gradient(145deg, #0891b2, #0e7490);
  color: #e8fdff;
}

.home-pillar-icon--agents {
  background: linear-gradient(145deg, #7c3aed, #5b21b6);
  color: #f5f0ff;
}

.home-pillar-glyph {
  line-height: 1;
}

.home-pillar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #8fd4ff;
  margin-bottom: 0.5rem;
}

.home-pillar-text {
  color: #b8c9df;
  font-size: 0.95rem;
  line-height: 1.5;
}

.home-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.home-trust-card {
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid rgba(70, 110, 170, 0.28);
  background: rgba(8, 16, 32, 0.45);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.home-trust-card:hover {
  border-color: rgba(100, 160, 230, 0.4);
  background: rgba(12, 24, 48, 0.55);
}

.home-trust-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #d4e4fb;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.home-trust-card-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #a8b8d4;
}

.home-closing {
  text-align: center;
  padding: 2rem 1.75rem;
  margin-bottom: 3.5rem;
  border-color: rgba(90, 140, 210, 0.4);
  background:
    radial-gradient(ellipse 80% 120% at 50% -20%, rgba(42, 88, 148, 0.16) 0%, transparent 55%),
    linear-gradient(180deg, rgba(10, 16, 28, 0.92), rgba(6, 10, 18, 0.95));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.home-closing-line {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e2ebf8;
  margin: 0;
}

.home-cta-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.home-cta-btn {
  letter-spacing: 0.02em;
}

.home-author {
  border-top: 1px solid rgba(47, 79, 130, 0.55);
}

.home-actions-bar {
  border-style: dashed;
  border-color: rgba(80, 120, 180, 0.35);
  background: linear-gradient(180deg, rgba(16, 28, 48, 0.5), rgba(10, 18, 34, 0.65));
}

.home-actions-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.home-actions-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.home-cards .panel {
  backdrop-filter: blur(2px);
}

.home-panel {
  border-color: #2b3f62;
}

.home-list {
  color: #c6d6ea;
  padding-left: 1.2rem;
}

.home-list li {
  margin-bottom: 0.35rem;
}

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

.kpi-card {
  background: linear-gradient(165deg, rgba(22, 34, 58, 0.95), rgba(14, 24, 44, 0.9));
  border: 1px solid rgba(80, 120, 180, 0.28);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(100, 150, 220, 0.4);
}

.kpi-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.4;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: #293a5a;
}

.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: #172640;
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.author-line {
  font-size: 0.95rem;
}

.author-link {
  color: #5ce1ff;
  font-weight: 600;
  margin: 0 0.35rem;
}

.scan-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 10, 20, 0.82);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.scan-overlay.active {
  display: flex;
}

.scan-card {
  max-width: 420px;
  background: linear-gradient(180deg, #121c30, #0d1526);
  border: 1px solid #2a3f63;
  border-radius: 14px;
  padding: 1.75rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.scan-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px solid #2a3f63;
  border-top-color: #32d4ff;
  animation: n4a-spin 0.9s linear infinite;
}

@keyframes n4a-spin {
  to { transform: rotate(360deg); }
}

.scan-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.scan-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.scan-text-sub {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.report-header .subtitle {
  margin-bottom: 0;
}

.score-ring {
  background: radial-gradient(circle at 30% 20%, rgba(50, 212, 255, 0.12), transparent 55%), #121c30;
  border: 1px solid #2a456e;
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
}

.score-value {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: #5ce1ff;
}

.score-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.score-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.rec-list {
  padding-left: 1.1rem;
  color: #c8d4e8;
}

.rec-list li {
  margin-bottom: 0.35rem;
}

.kpi-card-alert {
  border-color: #5c2a2a;
  background: linear-gradient(180deg, #2a1518, #1a1014);
}

.perm-danger {
  color: #ff6b6b !important;
  font-weight: 600;
}

.table-row-high-risk {
  box-shadow: inset 4px 0 0 #dc3545;
  background-color: rgba(220, 53, 69, 0.06) !important;
}

/* Readable text on dark tables (Bootstrap .text-muted is too dark here) */
.report-table-wrap .table td,
.report-table-wrap .table th {
  color: #e8eef8;
}

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

.report-table-wrap .report-cell-text {
  color: #e8eef8 !important;
}

.report-table-wrap .report-role-cell {
  color: #e8eef8;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
}

.report-table-wrap .report-placeholder {
  color: #b8c9df !important;
  font-style: italic;
}

.table-row-high-risk .report-cell-text,
.table-row-high-risk .report-placeholder {
  color: #f2f6fc !important;
}

/* Semantic yes/no / empty — keep visible on high-risk rows */
.text-yes {
  color: #42d392 !important;
}

.text-no {
  color: #f05b6a !important;
}

.report-empty {
  color: #e87888 !important;
  font-style: italic;
}

.priv-users-table .table-row-high-risk td .text-yes,
.priv-users-table .table-row-high-risk td.text-yes {
  color: #42d392 !important;
}

.priv-users-table .table-row-high-risk td .text-no,
.priv-users-table .table-row-high-risk td.text-no {
  color: #f05b6a !important;
}

.priv-users-table .table-row-high-risk td .report-empty {
  color: #e87888 !important;
}

.app-meta-id {
  color: #9eb4d4 !important;
  margin-top: 0.2rem;
}

.perm-list {
  list-style: disc;
  padding-left: 1.1rem;
  margin: 0;
  font-size: 0.82rem;
  color: #dce6f5;
}

.role-list {
  list-style: disc;
  padding-left: 1.05rem;
  margin: 0;
  color: #dfe8f7;
}

.role-list li {
  margin-bottom: 0.18rem;
}

.perm-cell {
  vertical-align: top;
  max-width: none;
  width: 24rem;
}

.perm-resource {
  color: #97adca;
  font-size: 0.75rem;
  margin-left: 0.35rem;
}

.priv-users-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.82rem;
}

.priv-users-table th,
.priv-users-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 0.35rem 0.36rem;
}

.priv-users-table {
  table-layout: auto;
  min-width: 1400px;
}

#tbl-applications {
  min-width: 0;
  width: 100%;
  table-layout: auto;
}

#tbl-applications th,
#tbl-applications td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

#tbl-applications .app-col--dall,
#tbl-applications .app-col--aall {
  width: auto;
  max-width: none;
}

.priv-users-table th,
.priv-users-table td {
  vertical-align: top;
}

.priv-users-table th:first-child,
.priv-users-table td:first-child {
  white-space: nowrap;
}

.priv-users-table th.pri-col--act,
.priv-users-table th.pri-col--ut,
.priv-users-table th.pri-col--mfa {
  min-width: 4.75rem;
}

.sortable-col {
  cursor: pointer;
  user-select: none;
}

.sortable-col:hover {
  color: var(--accent, #7dd3fc);
}

.report-row-hidden {
  display: none !important;
}

.report-toolbar,
.panel.report-toolbar {
  border: 1px solid rgba(80, 120, 180, 0.28) !important;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(14, 24, 44, 0.88), rgba(10, 18, 34, 0.92)) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.report-toolbar .form-control {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e8eaef;
}

.report-toolbar .form-control:focus {
  border-color: rgba(100, 170, 255, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(44, 120, 220, 0.2);
}

.report-toolbar-label {
  color: #c8d8f0 !important;
  font-weight: 500;
}

.report-toolbar-hint {
  color: #a8b8d8 !important;
  line-height: 1.45;
  max-width: 70ch;
}

.report-toolbar .form-select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e8eaef;
  font-size: 0.875rem;
  color-scheme: dark;
}

.report-toolbar .form-select option {
  background-color: #141c2e;
  color: #e8eaef;
}

.report-toolbar .form-control::placeholder {
  color: #a8b8d8;
}

.report-rec-panel h3 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.n4a-azure-scope-btn {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  vertical-align: middle;
}

.azure-scope-modal-content {
  background: linear-gradient(180deg, #141e36, #0c1528) !important;
  border: 1px solid rgba(120, 160, 220, 0.35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.azure-scope-modal-dl dt {
  color: #8eb0d8;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.azure-scope-modal-dl dd {
  color: #f0f5fc;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.azure-scope-modal-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.88rem;
  color: #dce8fb !important;
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(100, 140, 200, 0.35);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}

.report-cell-nowrap,
.report-th-nowrap {
  white-space: nowrap;
}

.priv-users-table .report-cell-nowrap {
  max-width: 1%;
}

#tbl-privileged th.pri-col--li,
#tbl-privileged th.pri-col--ln,
#tbl-agents th[data-sort="li"],
#tbl-agents th[data-sort="ln"] {
  min-width: 11.5rem;
}

.app-footer--author {
  margin-top: 5rem;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(80, 120, 180, 0.28);
}

/* Home page keeps a clean CTA area with no divider crossing it. */
body:has(.page-home) .app-footer--author {
  border-top: none;
  margin-top: 2.5rem;
}

.app-footer--author .app-footer-inner {
  padding-top: 2rem !important;
  padding-bottom: 2.25rem !important;
}

@media (max-width: 992px) {
  .home-hero-content {
    padding: 1.6rem 1.25rem 1.35rem;
  }

  .home-frame-inner {
    padding: 1.2rem 1.05rem 1.1rem;
  }

  .home-section-title {
    font-size: 1.18rem;
  }

  .report-page .report-header {
    padding: 1rem 1rem 0.95rem;
  }
}

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

  .no-print,
  header,
  .scan-overlay,
  footer,
  .app-background {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
    margin: 0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-report-banner {
    color: #111 !important;
    border-color: #bbb !important;
  }

  .print-report-banner .text-muted {
    color: #444 !important;
  }

  .report-page,
  .panel,
  .score-ring,
  .kpi-card {
    background: #fff !important;
    border-color: #ccc !important;
    color: #111 !important;
    box-shadow: none !important;
  }

  .app-main,
  .app-container,
  .report-page {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .table {
    --bs-table-color: #111;
    --bs-table-border-color: #999;
    --bs-table-bg: #fff;
    width: 100% !important;
    table-layout: auto !important;
    font-size: 8.25pt !important;
    line-height: 1.3 !important;
    border-collapse: collapse !important;
  }

  .table-dark {
    --bs-table-bg: #fff;
    --bs-table-color: #111;
  }

  .text-muted {
    color: #555 !important;
  }

  .perm-danger {
    color: #b00020 !important;
  }

  .report-table-wrap {
    overflow: visible !important;
    max-width: none !important;
  }

  .priv-users-table {
    min-width: 0 !important;
  }

  #tbl-applications .perm-cell {
    width: auto !important;
    max-width: none !important;
  }

  thead {
    display: table-header-group !important;
  }

  tfoot {
    display: table-footer-group !important;
  }

  #tbl-privileged th,
  #tbl-privileged td,
  #tbl-applications th,
  #tbl-applications td,
  #tbl-agents th,
  #tbl-agents td {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    padding: 0.14rem 0.2rem !important;
    vertical-align: top !important;
    border-color: #999 !important;
  }

  #tbl-privileged .text-nowrap,
  #tbl-privileged .report-cell-nowrap,
  #tbl-applications .text-nowrap,
  #tbl-applications .report-cell-nowrap,
  #tbl-agents .text-nowrap,
  #tbl-agents .report-cell-nowrap {
    white-space: normal !important;
  }

  #tbl-privileged th:first-child,
  #tbl-privileged td:first-child {
    white-space: normal !important;
  }

  #tbl-privileged tbody tr,
  #tbl-applications tbody tr,
  #tbl-agents tbody tr {
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  #tbl-privileged thead tr,
  #tbl-applications thead tr,
  #tbl-agents thead tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .n4a-azure-scope-btn,
  .n4a-pim-groups-btn {
    display: none !important;
  }

  .role-list {
    color: #111 !important;
  }

  a {
    color: #0a58ca !important;
    text-decoration: none;
  }

  .report-row-hidden {
    display: none !important;
  }

  .modal {
    display: none !important;
  }

  .pri-col-hidden {
    display: table-cell !important;
  }

  .app-col-hidden {
    display: table-cell !important;
  }

  .text-yes {
    color: #0d6a3d !important;
  }

  .text-no {
    color: #b00020 !important;
  }

  .text-warning {
    color: #8a5a00 !important;
  }

  .text-info {
    color: #0b5c7a !important;
  }

  .text-success {
    color: #0d6a3d !important;
  }

  .text-danger {
    color: #b00020 !important;
  }

  .report-empty {
    color: #a02828 !important;
  }
}