@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Work+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  /* Stitch Surface Architecture */
  --surface: #EEEEEE;
  --surface-dim: #D8DADC;
  --surface-bright: #FFFFFF;
  --surface-container-lowest: #FFFFFF;
  --surface-container-low: #F2F4F6;
  --surface-container: #ECEEF0;
  --surface-container-high: #E6E8EA;
  --surface-container-highest: #E0E3E5;

  /* Text & On-Surface Tiers */
  --on-surface: #191C1E;
  --on-surface-variant: #45464D;
  --inverse-surface: #2D3133;
  --inverse-on-surface: #EFF1F3;
  --outline: #76777D;
  --outline-variant: #C6C6CD;
  --ghost-border: 1px solid rgba(226, 232, 240, 0.9);

  /* Primary Tonal Tier (Deep Slate & Navy) */
  --primary: #0F172A;
  --on-primary: #FFFFFF;
  --primary-container: #131B2E;
  --on-primary-container: #7C839B;
  --inverse-primary: #BEC6E0;
  --primary-fixed: #DAE2FD;
  --primary-fixed-dim: #BEC6E0;
  --on-primary-fixed: #131B2E;

  /* Secondary Brand Tier (Electric Indigo Accent) */
  --secondary: #4B41E1;
  --secondary-hover: #3E35D0;
  --on-secondary: #FFFFFF;
  --secondary-container: #645EFB;
  --on-secondary-container: #FFFBFF;
  --secondary-fixed: #E2DFFF;
  --secondary-fixed-dim: #C3C0FF;
  --on-secondary-fixed: #0F0069;

  /* Tertiary Accent Tier (Sky Blue & Cyan) */
  --tertiary: #000000;
  --on-tertiary: #FFFFFF;
  --tertiary-container: #001E2C;
  --on-tertiary-container: #008EBF;
  --tertiary-fixed: #C4E7FF;
  --tertiary-fixed-dim: #7BD0FF;
  --on-tertiary-fixed: #001E2C;

  /* Semantic Alerts & Errors */
  --error: #BA1A1A;
  --on-error: #FFFFFF;
  --error-container: #FFDAD6;
  --on-error-container: #93000A;

  --status-ready-green: #10B981;
  --status-ready-green-bg: #ECFDF5;
  --status-near-amber: #F59E0B;
  --status-near-amber-bg: #FFFBEB;
  --status-dev-orange: #EA580C;
  --status-dev-orange-bg: #FFF7ED;
  --status-critical-red: #BA1A1A;
  --status-critical-red-bg: #FFDAD6;

  /* Backward Compatibility Aliases */
  --navy-950: #0B111E;
  --navy-900: #0F172A;
  --navy-800: #1E293B;
  --navy-700: #334155;
  --navy-600: #45464D;
  --ice-blue-50: #F7F9FB;
  --ice-blue-100: #F2F4F6;
  --ice-blue-200: #E0E3E5;
  --ice-blue-300: #C6C6CD;
  --ai-blue: #4B41E1;
  --ai-blue-bg: #EEF2FF;
  --ai-blue-border: #C7D2FE;

  /* Typography Stacks */
  --font-headline: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family: var(--font-body);

  /* Elevation Shadows & Radius */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 25px rgba(75, 65, 225, 0.15);

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 4px;
  --radius-lg: 4px;
  --radius-xl: 4px;
  --radius-2xl: 4px;
  --radius-full: 9999px;
  --border-radius: 4px;

  /* Layout Shell */
  --sidebar-width: 135px;
  --header-height: 64px;
  --max-content-width: 1536px;
}

/* ==========================================================================
   Sage Mist Theme Tier — Exact Match for #DDE9E3 Palette
   ========================================================================== */
[data-theme="sage"] {
  /* Sage Mist Surface Architecture (Base #DDE9E3) */
  --surface: #DDE9E3;
  --surface-dim: #CADAD2;
  --surface-bright: #FFFFFF;
  --surface-container-lowest: #FFFFFF;
  --surface-container-low: #EEF4F1;
  --surface-container: #E4ECE8;
  --surface-container-high: #D8E3DE;
  --surface-container-highest: #CCD9D3;

  /* Text & On-Surface Tiers */
  --on-surface: #12241D;
  --on-surface-variant: #3D4F46;
  --inverse-surface: #1C2D26;
  --inverse-on-surface: #EAF2EE;
  --outline: #6E8278;
  --outline-variant: #CAD8D1;
  --ghost-border: 1px solid rgba(180, 200, 190, 0.6);

  /* Primary Tonal Tier (Deep Botanical Forest Slate) */
  --primary: #12261E;
  --on-primary: #FFFFFF;
  --primary-container: #1B352B;
  --on-primary-container: #8BA89B;
  --inverse-primary: #B2D1C4;
  --primary-fixed: #D3E8DE;
  --primary-fixed-dim: #B2D1C4;
  --on-primary-fixed: #10211A;

  /* Secondary Brand Tier (Olive Green Accent #748636) */
  --secondary: #748636;
  --secondary-hover: #63732D;
  --on-secondary: #FFFFFF;
  --secondary-container: #859842;
  --on-secondary-container: #F4F7EC;
  --secondary-fixed: #EBF1DF;
  --secondary-fixed-dim: #C6D49E;
  --on-secondary-fixed: #2E3812;

  /* Backward Compatibility Aliases */
  --navy-950: #0B1713;
  --navy-900: #12261E;
  --navy-800: #1A352B;
  --navy-700: #29493C;
  --navy-600: #3E5F52;
  --ice-blue-50: #F3F8F5;
  --ice-blue-100: #EEF4F1;
  --ice-blue-200: #DCE8E2;
  --ice-blue-300: #CAD8D1;
  --ai-blue: #1F6B4F;
  --ai-blue-bg: #E8F5EE;
  --ai-blue-border: #B7DDCB;
}

/* Sage Theme Component Adaptations */
[data-theme="sage"] .sidebar,
.sidebar,
aside.sidebar {
  background-color: #F0F5F2 !important;
  background: #F0F5F2 !important;
  color: #000000 !important;
  border-right: 1px solid #CBD5E1 !important;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.05);
}

[data-theme="sage"] .sidebar-header {
  border-bottom: 1px solid #CBD5E1 !important;
  background: rgba(0, 0, 0, 0.03) !important;
}

[data-theme="sage"] .sidebar .nav-section-title {
  color: #000000 !important;
  border-top: 1px solid #CBD5E1 !important;
}

[data-theme="sage"] .sidebar-footer {
  display: none !important;
}

[data-theme="sage"] .top-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #CAD8D1;
  box-shadow: 0 1px 4px rgba(18, 38, 30, 0.04);
}

[data-theme="sage"] .login-view {
  background: radial-gradient(circle at 10% 20%, rgba(200, 222, 212, 0.55) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(188, 214, 202, 0.45) 0%, transparent 45%),
    linear-gradient(135deg, #EEF5F1 0%, #E3EEE8 50%, #DDE9E3 100%) !important;
}

[data-theme="sage"] .login-hero-highlight {
  background: linear-gradient(135deg, #1F6B4F 0%, #2E8B65 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

[data-theme="sage"] .auth-submit-action {
  background: linear-gradient(135deg, #163D2D 0%, #1F6B4F 100%) !important;
}

[data-theme="sage"] .auth-submit-action:hover {
  background: linear-gradient(135deg, #102F23 0%, #18553E 100%) !important;
}

[data-theme="sage"] .feature-icon-box {
  background: #E4F1EB !important;
  color: #1F6B4F !important;
}


/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--on-surface);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Material Symbols Icon Helper */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}
.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1;
}

/* Typography Hierarchy (Work Sans for Headings, Inter for Body) */
h1, .font-headline-xl {
  font-family: var(--font-headline);
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--on-surface);
}
@media (min-width: 1024px) {
  h1, .font-headline-xl {
    font-size: 36px;
    line-height: 44px;
  }
}

h2, .font-headline-lg {
  font-family: var(--font-headline);
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--on-surface);
}

h3, .font-headline-md {
  font-family: var(--font-headline);
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  color: var(--on-surface);
}

h4, .font-headline-sm {
  font-family: var(--font-headline);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--on-surface);
}

.font-title-md {
  font-family: var(--font-headline);
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: var(--on-surface);
}

p, .font-body-md {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--on-surface-variant);
}

.font-body-lg {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--on-surface);
}

.font-body-sm {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  color: var(--on-surface-variant);
}

.text-meta {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 18px;
  color: var(--on-surface-variant);
}

.font-label-lg {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.font-label-md {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.font-label-sm {
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: #748636;
  color: #FFFFFF;
  border-color: #748636;
  box-shadow: 0 1px 2px rgba(116, 134, 54, 0.25);
}
.btn-primary:hover {
  background-color: #63732D;
  border-color: #63732D;
  box-shadow: 0 2px 5px rgba(116, 134, 54, 0.35);
}

.btn-secondary, .btn-outline {
  background-color: var(--surface-container-lowest);
  color: var(--on-surface);
  border: var(--ghost-border);
}
.btn-secondary:hover, .btn-outline:hover {
  background-color: var(--surface-container-low);
  border-color: var(--outline-variant);
}

.btn-ghost {
  background-color: transparent;
  color: var(--on-surface-variant);
}
.btn-ghost:hover {
  background-color: var(--surface-container);
  color: var(--on-surface);
}

.btn-dark {
  background-color: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.btn-dark:hover {
  background-color: #1E293B;
}

/* Status Pills & Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  width: fit-content;
  flex-shrink: 0;
}

.status-pill:empty,
.status-critical:empty,
.status-ready:empty,
.status-near:empty,
.status-dev:empty,
.status-info:empty,
#login-error:empty,
#forgot-modal-alert:empty,
.login-error-alert:empty {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.status-ready {
  background-color: var(--status-ready-green-bg);
  color: var(--status-ready-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-near {
  background-color: var(--tertiary-fixed);
  color: var(--on-tertiary-container);
  border: 1px solid rgba(0, 142, 191, 0.2);
}
.status-dev {
  background-color: var(--surface-container);
  color: var(--on-surface-variant);
  border: 1px solid var(--outline-variant);
}
.status-critical {
  background-color: var(--error-container);
  color: var(--on-error-container);
  border: 1px solid rgba(186, 26, 26, 0.2);
}

.gap-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.gap-dot.critical { background-color: var(--error); }
.gap-dot.medium { background-color: var(--status-near-amber); }
.gap-dot.none { background-color: var(--status-ready-green); }

/* AI Badges & Banners */
.ai-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #EEF2FF;
  border: 1px solid #C7D2FE;
  color: var(--secondary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
}

.ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--tertiary-fixed);
  color: var(--on-tertiary-fixed);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.ai-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--secondary);
  display: inline-block;
  animation: pulseDot 1.8s infinite ease-in-out;
}
@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px var(--secondary); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Deep Navy AI Insight Banner from Stitch */
.ai-insight-banner {
  background-color: var(--primary-container);
  color: var(--inverse-on-surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 4px solid var(--secondary);
}
@media (min-width: 1024px) {
  .ai-insight-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.ai-insight-banner::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(75, 65, 225, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* App Shell Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  max-width: 100vw;
  background-color: var(--surface);
}

/* Stitch Sidebar — Clean Enterprise White */
.sidebar {
  width: var(--sidebar-width);
  background-color: #F0F5F2;
  background: #F0F5F2;
  color: #000000;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #CBD5E1;
  position: fixed;
  left: 0;
  top: var(--header-height);
  bottom: 0;
  height: calc(100vh - var(--header-height));
  z-index: 50;
  box-shadow: 2px 0 14px rgba(15, 23, 42, 0.04);
}

.sidebar-header {
  min-height: 64px;
  padding: 12px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.gaplow-brand-img {
  height: auto;
  width: auto;
  max-width: 88px;
  max-height: 48px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.brand-badge {
  background: linear-gradient(135deg, #4B41E1 0%, #3730A3 100%);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 15px;
  color: white;
  box-shadow: 0 2px 6px rgba(75, 65, 225, 0.3);
  letter-spacing: -0.02em;
}

.brand-title {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.brand-subtitle {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 500;
}

.sidebar-nav {
  padding: 10px 4px 18px 4px;
  flex: 1;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  perspective: 1200px;
  -webkit-perspective: 1200px;
}

.top-header-brand-box {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 8px;
  box-sizing: border-box;
  border-right: none !important;
  border: none !important;
  background: transparent !important;
}

.top-header-gaplow-logo {
  height: 42px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

.nav-section-title {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #000000 !important;
  padding: 8px 4px 2px;
  text-align: center;
  border-top: 1px solid #CBD5E1;
  margin-top: 4px;
  margin-bottom: 2px;
  width: 100%;
  flex-shrink: 0 !important;
  box-sizing: border-box;
}

/* ══════════════════════════════════════════════════════════════════════════
   3D Flip Cards for Sidebar Modules
   ══════════════════════════════════════════════════════════════════════════ */
.nav-item {
  display: block !important;
  width: 114px !important;
  min-width: 114px !important;
  max-width: 114px !important;
  height: 68px !important;
  min-height: 68px !important;
  max-height: 68px !important;
  flex-shrink: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  perspective: 900px;
  -webkit-perspective: 900px;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

.nav-card-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.52s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  border-radius: var(--radius-md);
  will-change: transform;
}

/* 3D Flip Trigger on Hover */
.nav-item:hover .nav-card-flipper {
  transform: rotateY(180deg);
}

/* Front & Back Faces */
.nav-card-front,
.nav-card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  box-sizing: border-box;
}

/* FRONT FACE: Crisp White Card, #000000 Dark Black Icon, #000000 Black Text */
.nav-card-front {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #000000 !important;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.08);
  transform: rotateY(0deg);
  z-index: 2;
}

.nav-card-front .material-symbols-outlined {
  font-size: 21px !important;
  color: #000000 !important;
  line-height: 1;
  transition: transform 0.2s ease;
  margin-top: 1px;
}

.nav-card-front span:not(.material-symbols-outlined) {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #000000 !important;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-align: center;
  display: block;
  word-break: normal;
  white-space: normal;
  width: 100%;
  max-width: 106px;
}

/* BACK FACE: Deep Emerald Gradient #1F6B4F, White Icon & Text, 3D Elevation */
.nav-card-back {
  background: linear-gradient(135deg, #1F6B4F 0%, #16533D 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  transform: rotateY(180deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.nav-card-back .material-symbols-outlined {
  font-size: 20px !important;
  color: #FFFFFF !important;
  line-height: 1;
  margin-bottom: 1px;
}

.nav-card-back span:not(.material-symbols-outlined) {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-align: center;
  display: block;
  word-break: normal;
  white-space: normal;
  width: 100%;
  max-width: 106px;
}

/* Micro-shine reflection on back card */
.nav-card-back::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -40%;
  width: 180%;
  height: 180%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
  border-radius: var(--radius-md);
}

/* ACTIVE STATE */
.nav-item.active .nav-card-front {
  background: #DDE9E2 !important;
  border: 1.5px solid #748636 !important;
  color: #000000 !important;
  box-shadow: 0 4px 14px rgba(10, 36, 26, 0.15) !important;
}

.nav-item.active .nav-card-front .material-symbols-outlined {
  color: #000000 !important;
}

.nav-item.active .nav-card-front span:not(.material-symbols-outlined) {
  color: #000000 !important;
}

.nav-item.active .nav-card-back {
  background: linear-gradient(135deg, #154E38 0%, #0D3626 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 6px 18px rgba(10, 36, 26, 0.45) !important;
}

.nav-item.active .nav-card-back .material-symbols-outlined {
  color: #FFFFFF !important;
}

.nav-item.active .nav-card-back span:not(.material-symbols-outlined) {
  color: #FFFFFF !important;
}

.nav-badge {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   Executive Icon Dock Mode — Exclusively for HR Admin & Reviewer Roles
   Compact, Zero-Scroll, Hover Floating Tooltip Navigation
   ══════════════════════════════════════════════════════════════════════════ */
.sidebar.icon-dock-mode {
  overflow: visible !important;
}

.sidebar.icon-dock-mode .sidebar-nav {
  padding: 8px 4px 14px 4px !important;
  gap: 4px !important;
  perspective: none !important;
  -webkit-perspective: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Dock Item Button */
.sidebar.icon-dock-mode .nav-item.dock-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: #FFFFFF !important;
  color: #000000 !important;
  border-radius: 4px !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07) !important;
  cursor: pointer !important;
  position: relative !important;
  text-decoration: none !important;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.18s ease, 
              background-color 0.18s ease, 
              color 0.18s ease !important;
  flex-shrink: 0 !important;
  perspective: none !important;
  -webkit-perspective: none !important;
}

.sidebar.icon-dock-mode .nav-item.dock-item .material-symbols-outlined,
.sidebar.icon-dock-mode .nav-item.dock-item .dock-icon {
  font-size: 26px !important;
  color: #000000 !important;
  line-height: 1 !important;
  transition: transform 0.18s ease, color 0.18s ease !important;
}

/* Hover State */
.sidebar.icon-dock-mode .nav-item.dock-item:hover {
  transform: translateY(-1px) scale(1.06) !important;
  background: #E2ECE5 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 0 0 1.5px rgba(255, 255, 255, 0.8) !important;
  z-index: 20 !important;
}

.sidebar.icon-dock-mode .nav-item.dock-item:hover .material-symbols-outlined,
.sidebar.icon-dock-mode .nav-item.dock-item:hover .dock-icon {
  color: #000000 !important;
  transform: scale(1.08) !important;
}

/* Active State */
.sidebar.icon-dock-mode .nav-item.dock-item.active {
  background: #DDE9E2 !important;
  color: #000000 !important;
  border: 1.5px solid #748636 !important;
  box-shadow: 0 4px 14px rgba(10, 36, 26, 0.15) !important;
  z-index: 10 !important;
}

.sidebar.icon-dock-mode .nav-item.dock-item.active .material-symbols-outlined,
.sidebar.icon-dock-mode .nav-item.dock-item.active .dock-icon {
  color: #000000 !important;
}

/* Active Indicator Notch on the left */
.sidebar.icon-dock-mode .nav-item.dock-item.active::before {
  content: '' !important;
  position: absolute !important;
  left: -9px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 4px !important;
  height: 22px !important;
  background: #748636 !important;
  border-radius: 0 3px 3px 0 !important;
  box-shadow: 0 0 8px rgba(116, 134, 54, 0.4) !important;
}

/* Minimalist Section Divider */
.sidebar.icon-dock-mode .dock-divider {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px 0 !important;
  margin: 1px 0 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.sidebar.icon-dock-mode .dock-divider-line {
  display: block !important;
  width: 32px !important;
  height: 1.5px !important;
  background: #CBD5E1 !important;
  border-radius: 2px !important;
}

/* Global Floating Tooltip for Icon Dock — Clean Module Name Only */
.dock-floating-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background: #14382A; /* Deep Pine obsidian */
  color: #FFFFFF;
  padding: 7px 14px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(6px);
  transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.16s ease;
}

.dock-floating-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.dock-floating-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent #14382A transparent transparent;
}

.dock-floating-tooltip .dock-tooltip-section {
  display: none !important;
}

.dock-floating-tooltip .dock-tooltip-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  letter-spacing: 0.01em !important;
  line-height: 1.3 !important;
}

/* ─── Sidebar Nested Submenu / Dropdown for Career Profile ─── */
.nav-item-dropdown {
  position: relative;
  display: flex;
  flex-direction: column;
}

.nav-dropdown-arrow {
  margin-left: auto;
  font-size: 18px !important;
  color: #94A3B8;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s ease, opacity 0.15s ease;
  opacity: 0.85;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm, 6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.nav-dropdown-arrow:hover {
  opacity: 1;
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.12);
}

.nav-item.active .nav-dropdown-arrow {
  color: #FFFFFF;
}

.nav-item-dropdown:hover .nav-dropdown-arrow,
.nav-item-dropdown.is-open:not(.is-collapsed) .nav-dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-item-dropdown.is-collapsed:not(:hover) .nav-dropdown-arrow,
.nav-item-dropdown:not(.is-open):not(:hover) .nav-dropdown-arrow {
  transform: rotate(0deg) !important;
}

.nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 14px;
  margin-top: 2px;
  margin-bottom: 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 18px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin 0.2s ease;
}

/* Open State (Expands on hover or when open) */
.nav-item-dropdown:hover .nav-submenu,
.nav-item-dropdown.is-open:not(.is-collapsed) .nav-submenu {
  max-height: 280px;
  opacity: 1;
  pointer-events: auto;
}

.nav-item-dropdown.is-collapsed:not(:hover) .nav-submenu {
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #94A3B8;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  position: relative;
  background: transparent;
}

.nav-subitem:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.nav-subitem.active {
  background-color: rgba(99, 102, 241, 0.22);
  color: #A5B4FC;
  font-weight: 600;
}

.nav-subitem .material-symbols-outlined {
  font-size: 16px !important;
  color: inherit;
}

.nav-badge,
.nav-sub-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  line-height: 1.4;
}

.nav-item.active .nav-badge,
.nav-subitem.active .nav-sub-badge {
  background: #6366F1;
  color: #FFFFFF;
}

.sidebar-footer {
  display: none !important;
}

.user-snippet {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
  border: 1.5px solid rgba(79, 70, 229, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.sidebar-footer #user-name-display,
.sidebar-footer .user-name {
  color: #0F172A !important;
}

.sidebar-footer #user-role-badge,
.sidebar-footer .user-role {
  color: #64748B !important;
}

.sidebar-footer .logout-btn,
.sidebar-footer button[onclick*="handleLogout"] {
  color: #64748B !important;
  transition: color 0.15s ease, transform 0.15s ease;
}

.sidebar-footer .logout-btn:hover,
.sidebar-footer button[onclick*="handleLogout"]:hover {
  color: #DC2626 !important;
  transform: scale(1.08);
}

.sidebar-footer .version-tag,
.sidebar-footer div:last-child {
  color: #94A3B8 !important;
}

/* Main Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  background-color: var(--surface);
  min-height: calc(100vh - var(--header-height));
}

/* Top Fixed Header (Full Screen Width spanning left: 0 to 100%) */
.top-header {
  height: var(--header-height);
  background-color: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 60;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.tenant-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface);
  background-color: var(--surface-container);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.tenant-selector:hover {
  background-color: var(--surface-container-high);
}

.content-canvas {
  padding: 32px;
  flex: 1;
  background-color: var(--surface);
}

/* Cards & Bento Primitives */
.card, .section-card {
  background-color: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: var(--ghost-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.card:hover, .section-card:hover {
  box-shadow: var(--shadow-md);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--on-surface);
  background-color: var(--surface-container-lowest);
  border: var(--ghost-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(75, 65, 225, 0.12);
}

/* Clean Tables */
.table-simple, table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--on-surface-variant);
  background-color: var(--surface-container-low);
  border-bottom: var(--ghost-border);
}
table th:first-child { border-top-left-radius: var(--radius-md); }
table th:last-child { border-top-right-radius: var(--radius-md); }

table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--on-surface);
  border-bottom: 1px solid var(--surface-container);
  vertical-align: middle;
}
table tr:hover td {
  background-color: rgba(242, 244, 246, 0.5);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--outline-variant);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--outline);
}

/* ─── Top Header User Profile & Dropdown ─── */
.profile-dropdown-wrapper {
  position: relative;
}

.profile-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 8px 4px 4px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  color: inherit;
  font-family: inherit;
}

.profile-trigger-btn:hover {
  background-color: var(--surface-container);
  border-color: var(--ghost-border);
}

.header-avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 50%;
  background: #0F172A;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.header-user-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
}

.header-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-role {
  font-size: 11px;
  color: var(--on-surface-variant);
  font-weight: 400;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-caret {
  font-size: 18px;
  color: var(--outline);
  transition: transform 0.2s ease;
}

.profile-dropdown-wrapper.is-open .header-user-caret {
  transform: rotate(180deg);
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  padding: 6px;
  z-index: 1000;
  display: none;
  animation: profileDropdownFadeIn 0.15s ease-out;
}

.profile-dropdown-wrapper.is-open .profile-dropdown-menu {
  display: block;
}

@keyframes profileDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.profile-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #1E293B;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.profile-dropdown-item:hover {
  background-color: #F8FAFC;
  color: #0F172A;
}

.profile-dropdown-icon {
  font-size: 20px;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.profile-dropdown-item:hover .profile-dropdown-icon {
  color: var(--primary);
}

.profile-dropdown-item.logout-item:hover {
  background-color: #FEF2F2;
  color: #DC2626;
}

.profile-dropdown-item.logout-item:hover .profile-dropdown-icon {
  color: #DC2626;
}

/* Star rating for Review Us */
.star-rating-row {
  display: flex;
  gap: 8px;
  margin: 10px 0 16px;
  justify-content: center;
}
.star-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #CBD5E1;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  padding: 0;
  display: flex;
  align-items: center;
}
.star-btn.active, .star-btn:hover {
  color: #F59E0B;
  transform: scale(1.15);
}

.help-quick-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.help-quick-card:hover {
  border-color: var(--primary);
  background: #F1F5F9;
}
.help-quick-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-container-high);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

/* ==========================================================================
   Platform-Wide Aesthetic Overrides:
   - Curved Edges: 4px crisp modern radius (Attachment 3)
   - Button Color: Green #748636 (Attachment 4)
   - Data Windows: Unblurred background and draggable headers (Attachment 2)
   ========================================================================== */

/* 1. Curved Edges across the platform (Attachment 3) */
button:not(.avatar):not([class*="avatar"]):not([class*="circle"]):not(.ep-avatar-upload-btn),
.btn,
[class*="btn-"],
[class*="-btn"]:not(.star-btn):not(.survey-star-btn):not(.ep-avatar-upload-btn),
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.card,
[class*="-card"],
[class*="card-"],
.modal-card,
.modal-content,
.admin-modal-card,
.ou-modal-card,
.org-modal-card,
.settings-modal-card,
.ija-modal-card,
.table-container,
.ija-table-card,
.admin-table-card,
.ou-table-card,
.section-card,
.login-card,
.auth-modal-card,
.status-pill {
  border-radius: 4px !important;
}

/* 2. Button Colors across the platform (Attachment 4: #748636) */
.btn-primary,
.btn-dark,
.btn-approve,
.ija-btn-primary,
.ou-btn-primary,
.admin-btn-primary,
.ep-action-launch-btn,
.home-search-submit-btn,
#ija-modal-save-btn,
button.btn-primary,
button[type="submit"]:not(.btn-danger):not(.btn-secondary):not(.btn-subtle) {
  background-color: #748636 !important;
  background: #748636 !important;
  border-color: #748636 !important;
  color: #FFFFFF !important;
  box-shadow: 0 1px 2px rgba(116, 134, 54, 0.25) !important;
}

.btn-primary:hover,
.btn-dark:hover,
.btn-approve:hover,
.ija-btn-primary:hover,
.ou-btn-primary:hover,
.admin-btn-primary:hover,
.ep-action-launch-btn:hover,
.home-search-submit-btn:hover,
#ija-modal-save-btn:hover,
button.btn-primary:hover,
button[type="submit"]:not(.btn-danger):not(.btn-secondary):not(.btn-subtle):hover {
  background-color: #63732D !important;
  background: #63732D !important;
  border-color: #63732D !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 5px rgba(116, 134, 54, 0.35) !important;
}

.btn-secondary,
.ija-btn-secondary,
.ou-btn-outline {
  color: #748636 !important;
  border-color: #B8C882 !important;
}

.btn-secondary:hover,
.ija-btn-secondary:hover,
.ou-btn-outline:hover {
  background-color: #F4F7EC !important;
  border-color: #748636 !important;
  color: #5F6F2A !important;
}

/* 3. Modal Overlays & Data Windows: Background page MUST NOT be blurred */
.ija-modal-overlay,
.admin-modal-overlay,
.ou-modal-overlay,
.org-modal-overlay,
.settings-modal-overlay,
.modal-overlay,
.ep-modal-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(15, 23, 42, 0.45) !important;
}

/* 4. Draggable Data Window Header */
.ija-modal-header,
.modal-header,
.admin-modal-header,
.settings-modal-header,
.ou-modal-header,
.org-modal-header,
.ep-modal-header {
  cursor: grab !important;
  user-select: none !important;
}

.ija-modal-header:active,
.modal-header:active,
.admin-modal-header:active,
.settings-modal-header:active,
.ou-modal-header:active,
.org-modal-header:active,
.ep-modal-header:active {
  cursor: grabbing !important;
}

/* 5. All Sidebars across platform unified to #F0F5F2 and module text in dark black #000000 */
aside.sidebar,
.sidebar,
.admin-sidebar-mode,
.ija-sidebar {
  background: #F0F5F2 !important;
  background-color: #F0F5F2 !important;
  border-color: #CBD5E1 !important;
}

/* Ensure all sidebar links, labels, and module texts are in dark black */
aside.sidebar,
aside.sidebar a,
aside.sidebar .nav-item,
aside.sidebar .nav-item span,
aside.sidebar .admin-sidebar-link,
aside.sidebar .admin-sidebar-sublink,
aside.sidebar .material-symbols-outlined,
aside.sidebar .nav-section-title,
.ija-sidebar,
.ija-sidebar .ija-nav-item,
.ija-sidebar .ija-nav-item span,
.ija-sidebar .material-symbols-outlined,
.ija-sidebar .ija-logo-text,
.ija-sidebar .ija-role-badge,
.ija-sidebar .ija-category-link,
.ija-sidebar .ija-related-header,
.ija-sidebar .ija-related-card,
.ija-sidebar .ija-related-card span {
  color: #000000 !important;
}

/* 6. Skills & Role Master: Uniform seamless background without outer lining (Attachment 3) */
.ija-workspace,
.ija-content-canvas,
#admin-industry-jobs-tab-panel {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 7. Remove lining after logo on top banner across platform */
.top-header-brand-box,
.top-header .top-header-brand-box {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  box-shadow: none !important;
}

