
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300;12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #05090C;
  --ink-2: #0B131A;
  --plum: #102230;
  --mauve: #1F526E;
  --rose: #2E819C;
  --blush: #42F5CE;
  --blush-soft: #8EFAEB;
  --text: #F6EEF1;
  --text-dim: rgba(246,238,241,.62);
  --text-faint: rgba(246,238,241,.38);
  --glass: rgba(255,255,255,.03);
  --glass-strong: rgba(255,255,255,.06);
  --glass-border: rgba(66,245,206,.12);
  --glass-border-hi: rgba(66,245,206,.3);

  /* Mapped to existing app variables */
  --bg-main: var(--ink-2);
  --bg-body: var(--ink);
  --bg-sidebar: var(--glass);
  --bg-card: var(--glass);
  --bg-card-hover: var(--glass-strong);
  
  --border-color: var(--glass-border);
  --border-color-high: var(--glass-border-hi);
  --border-active: var(--blush);
  
  --primary: var(--blush);
  --primary-glow: rgba(66,245,206,.15);
  --secondary: var(--mauve);
  
  --success: #86E3CE;
  --success-bg: rgba(134, 227, 206, 0.15);
  --success-text: #E0FFFA;
  
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --warning-text: #FDE68A;
  
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --danger-text: #FCA5A5;
  
  --text-primary: var(--text);
  --text-secondary: var(--text-dim);
  --text-muted: var(--text-faint);
  
  --sidebar-width: 260px;
  --transition-speed: 0.3s;
  
  /* Make things a bit more rounded to match landing */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  /* No-op, we force dark mode via root now */
}


/* Base Styles specific to Dark Mode Overrides */
[data-theme="dark"] .sidebar-link:hover, [data-theme="dark"] .sidebar-link.active {
  background: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .plugin-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .plugin-card:hover {
  background: #1E293B;
}
[data-theme="dark"] .score-circle-bg {
  stroke: #334155;
}
[data-theme="dark"] .glass-panel {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255,255,255,0.05);
}
[data-theme="dark"] .accordion-header {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
[data-theme="dark"] .accordion-header:hover {
  background: var(--bg-card-hover);
}
/* Grain & Aurora */
.grain{position:fixed;inset:0;z-index:1;pointer-events:none;opacity:.06;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");}
.aurora{position:fixed;top:-20vh;left:-10vw;width:120vw;height:120vh;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse at 50% 0%, rgba(31,82,110,.15) 0%, rgba(16,34,48,.1) 40%, transparent 70%);
  filter:blur(80px);
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* Scroll timeline progress indicator at top */
.scroll-indicator-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  width: 0;
  z-index: 200;
  transition: width 0.1s;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Navigation bar */
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 8%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.logo-container svg {
  width: 24px;
  height: 24px;
}

.logo-s {
  color: var(--text-primary);
}

.logo-sub {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Corporate Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-speed);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-high);
}

.btn-secondary:hover {
  background: var(--bg-body);
  color: var(--text-primary);
}

.btn-primary {
  background: var(--primary);
  color: var(--ink);
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background: var(--blush-soft);
  border-color: var(--blush-soft);
}

/* Hero Section */
.hero-section {
  padding: 160px 8% 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at top, #E0F2FE 0%, var(--bg-main) 70%);
}

.badge-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(66,245,206,0.08);
  border: 1px solid var(--glass-border-hi);
  color: var(--blush);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 24px;
}

.badge-new span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  max-width: 850px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-title span {
  color: var(--primary);
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 36px;
}

/* ==========================================================================
   INTERACTIVE CORPORATE LAPTOP (PREVIEW CLONE FOR VANTA WORKSPACE)
   ========================================================================== */
.macbook-container {
  width: 100%;
  max-width: 880px;
  perspective: 1200px;
  margin: 10px auto 80px;
  padding: 0 20px;
}

.macbook-lid {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #334155; /* Slate gray metallic MacBook shell */
  border: 4px solid #475569;
  border-radius: 12px 12px 0 0;
  transform-origin: bottom center;
  transform: rotateX(80deg);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

.macbook-lid.open {
  transform: rotateX(0deg);
}

.macbook-screen {
  width: 100%;
  height: 100%;
  background: #1E293B;
  padding: 16px 16px 20px; /* Bezel space */
  display: flex;
  flex-direction: column;
  position: relative;
}

.macbook-camera {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: #0284C7;
  border-radius: 50%;
}

/* Vanta-Style Light Dashboard Preview Screen */
.macbook-display-content {
  width: 100%;
  height: 100%;
  background: var(--bg-main); /* Clean off-white app screen */
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 11px;
}

.macbook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.macbook-dots {
  display: flex;
  gap: 6px;
}
.macbook-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.macbook-dots span:nth-child(1) { background: #EF4444; }
.macbook-dots span:nth-child(2) { background: #F59E0B; }
.macbook-dots span:nth-child(3) { background: #10B981; }

.macbook-video-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-mode-btn {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.video-mode-btn.active {
  color: var(--ink);
  border-color: var(--primary);
  background: var(--primary);
}

.macbook-body {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
  flex-grow: 1;
}

/* Dynamic container templates to swap during MacBook walkthrough */
.macbook-demo-panel {
  display: none;
  width: 100%;
  height: 100%;
}

.macbook-demo-panel.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.macbook-gauge-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.macbook-remediations {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.macbook-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

/* Video Alerts */
.video-overlay-toast {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color-high);
  border-left: 4px solid var(--primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(15,23,42,0.08);
}

.video-overlay-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.video-progress-timeline {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s linear;
  z-index: 12;
}

/* MacBook Base details */
.macbook-base {
  width: 104%;
  height: 14px;
  background: #94A3B8;
  margin-left: -2%;
  position: relative;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.15);
  border-top: 1px solid #CBD5E1;
  border-radius: 0 0 12px 12px;
}

.macbook-keyboard-bezel {
  width: 80%;
  height: 2px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.macbook-notch {
  width: 90px;
  height: 3px;
  background: #64748B;
  margin: 0 auto;
  border-radius: 0 0 4px 4px;
}

/* Vanta-style clean topology blueprint mesh */
.blueprint-mesh-section {
  padding: 80px 8%;
  text-align: center;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.mesh-container {
  max-width: 800px;
  margin: 40px auto 0;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.mesh-svg-wrapper {
  width: 100%;
  height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.mesh-svg {
  width: 100%;
  height: 100%;
  stroke: var(--primary);
  opacity: 0.6;
}

.mesh-pulse-circle {
  animation: pulse-ring 3s infinite linear;
  transform-origin: center;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.1; }
  50% { opacity: 0.4; }
  100% { transform: scale(1.2); opacity: 0; }
}

.mesh-details-overlay {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.mesh-stat {
  text-align: left;
}

.mesh-stat-lbl {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.mesh-stat-val {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
  margin-top: 4px;
}

/* Capabilities Grid */
.features-section {
  padding: 100px 8%;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: left;
  transition: all var(--transition-speed);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-color-high);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.feature-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 13.5px;
}

/* Trusted Logos */
.logos-section {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 40px 8%;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}

.logo-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
}

.logo-item {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* Pricing Grid */
.pricing-section {
  padding: 100px 8%;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: left;
  transition: all var(--transition-speed);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.pricing-card:hover {
  border-color: var(--border-color-high);
}

.pricing-card.premium {
  border-color: var(--primary);
  box-shadow: 0 10px 40px rgba(2, 132, 199, 0.08);
}

.pricing-card h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 36px;
  font-weight: 700;
  margin: 16px 0 24px;
  color: var(--text-primary);
}

.pricing-price span {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features svg {
  color: var(--success);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

/* Scroll reveals */
.scroll-reveal {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.landing-footer {
  border-top: 1px solid var(--border-color);
  padding: 48px 8%;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}

/* ==========================================================================
   AUTHENTICATION & ONBOARDING FULL VIEW (Split Screen Testimonials)
   ========================================================================== */
.auth-container {
  display: none;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 100vh;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}

.auth-hero-side {
  background: var(--bg-sidebar); /* Dark Navy */
  padding: 48px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-hero-side::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, rgba(2, 132, 199, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.auth-hero-header svg {
  width: 32px;
  height: 32px;
}

.auth-hero-header span {
  color: white !important;
}

.auth-hero-quote {
  max-width: 440px;
  margin-bottom: 80px;
}

.quote-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: white;
  line-height: 1.4;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.quote-author {
  font-size: 13.5px;
  color: var(--text-muted);
}

.quote-author strong {
  color: white;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bg-main);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.04);
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 8px;
}

.auth-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Onboarding Step flows */
.onboarding-step {
  display: none;
}

.onboarding-step.active {
  display: block;
}

.onboarding-checkbox-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.onboarding-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.onboarding-checkbox-item:hover {
  background: var(--bg-main);
}

.onboarding-checkbox-item.checked {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.02);
}

.onboarding-checkbox-item input {
  margin-top: 3px;
}

.onboarding-checkbox-label h4 {
  font-size: 13px;
  color: var(--text-primary);
}

.onboarding-checkbox-label p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ==========================================================================
   APP DASHBOARD SECTION (High-Contrast Drata/Secureframe Enterprise layout)
   ========================================================================== */
.app-container {
  display: none;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  background: transparent;
}

/* Sidebar Styling */
.app-sidebar {
  background: var(--bg-sidebar); /* Dark Slate Navy */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  margin-bottom: 32px;
  padding-left: 8px;
}

.sidebar-logo svg {
  color: var(--primary) !important;
}

.sidebar-logo span {
  color: white !important;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  flex-grow: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: #94A3B8; /* White-slate link color */
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-link svg {
  width: 16px;
  height: 16px;
  color: #64748B;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.05);
  color: white;
}

.sidebar-link:hover svg {
  color: white;
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 600;
}

.sidebar-link.active svg {
  color: var(--primary);
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #334155;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
}

.user-details h4 {
  font-size: 11.5px;
  color: white;
}

.user-details p {
  font-size: 9.5px;
  color: #64748B;
}

.logout-btn {
  background: transparent;
  border: none;
  color: #64748B;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.logout-btn:hover {
  color: var(--danger);
}

/* App Main Content Area */
.app-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.app-header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-title-block h1 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-primary);
}

.header-title-block p {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.scan-status-block {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.scan-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.scan-indicator.scanning {
  background: var(--primary);
  animation: pulse 1s infinite;
}

/* Panels */
.panel {
  display: none;
  padding: 32px 40px;
}

.panel.active {
  display: block;
}

/* Overview Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
  margin-bottom: 32px;
}

.welcome-banner {
  grid-column: span 2;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.welcome-text h2 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.welcome-text p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.welcome-banner svg {
  color: var(--primary);
  width: 24px;
  height: 24px;
  opacity: 0.8;
}

/* Stats Cards */
.stats-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  grid-column: span 2;
}

.stat-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.stat-info h3 {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card:nth-child(1) .stat-icon { background: var(--glass-strong); color: var(--text-secondary); }
.stat-card:nth-child(2) .stat-icon { background: var(--success-bg); color: var(--success-text); }
.stat-card:nth-child(3) .stat-icon { background: var(--danger-bg); color: var(--danger-text); }

/* Checklist card */
.dashboard-actions-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.card-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.card-title-bar h3 {
  font-size: 14px;
  color: var(--text-primary);
}

.checklist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.checklist-chk {
  margin-top: 3px;
}

.checklist-details {
  flex-grow: 1;
}

.checklist-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.checklist-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.checklist-btn {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color-high);
  color: var(--primary);
  padding: 2px 10px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 6px;
  font-weight: 500;
  transition: all 0.2s;
}

.checklist-btn:hover {
  background: var(--primary);
  color: var(--ink);
  border-color: var(--primary);
}

/* Gauge compliance summary card */
.compliance-summary-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.framework-selectors {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  width: 100%;
}

.framework-btn {
  flex: 1;
  padding: 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.framework-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--ink);
}

.gauge-svg {
  width: 130px;
  height: 130px;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--bg-body);
  stroke-width: 10px;
}

.gauge-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 10px;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.gauge-text {
  text-align: center;
}

.gauge-number {
  color: var(--text-primary);
}

/* Control Checklist Rows */
.tests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.test-item-row {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 90px 1.5fr 3.5fr 100px 120px;
  align-items: center;
  gap: 16px;
  transition: background 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.01);
}

.test-item-row:hover {
  background: var(--bg-card-hover);
}

.test-status-col {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  width: max-content;
}

.test-status-col.status-pass-col { background: var(--success-bg); color: var(--success-text); }
.test-status-col.status-fail-col { background: var(--danger-bg); color: var(--danger-text); }
.test-status-col.status-warn-col { background: var(--warning-bg); color: var(--warning-text); }

.test-status-col .status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.test-status-col.status-pass-col .status-indicator { background: var(--success); }
.test-status-col.status-fail-col .status-indicator { background: var(--danger); }
.test-status-col.status-warn-col .status-indicator { background: var(--warning); }

.test-name-col {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.test-desc-col {
  font-size: 12px;
  color: var(--text-secondary);
}

.test-category-col {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
}

/* Plugin integrations */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.plugin-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.plugin-card:hover {
  border-color: var(--border-color-high);
}

.plugin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.plugin-header svg {
  width: 26px;
  height: 26px;
  color: var(--text-secondary);
}

.plugin-status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.plugin-status-badge.connected {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.plugin-status-badge.disconnected {
  background: var(--glass-strong);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.plugin-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.plugin-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
  flex-grow: 1;
}

/* Modals (Vanta style enterprise dialogs) */
dialog {
  margin: auto;
  border: 1px solid var(--border-color-high);
  border-radius: var(--radius-lg);
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  color: var(--text-primary);
  width: 90%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.15);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.2s, transform 0.2s;
}

dialog[open] {
  opacity: 1;
  transform: scale(1);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s;
}

dialog[open]::backdrop {
  opacity: 1;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.dialog-header h3 {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-primary);
}

.dialog-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color-high);
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 12px;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Reports */
.reports-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.report-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.report-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.report-details-header h4 {
  font-size: 14px;
  color: var(--text-primary);
}

.report-grade-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.report-metric-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* People Table */
.data-table-container {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-main);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 12px 16px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border-color);
}

.employee-row-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--glass-strong);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 10.5px;
}

/* Policies */
.policy-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.policy-item-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.policy-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

.policy-title {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.policy-excerpt {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.policy-progress-bar-bg {
  height: 4px;
  background: var(--bg-body);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.policy-progress-bar-fill {
  height: 100%;
  background: var(--primary);
  width: 0;
  transition: width 0.5s;
}

/* Evidence upload */
.upload-zone {
  border: 2px dashed var(--border-color-high);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  cursor: pointer;
  transition: border-color 0.2s;
  margin-bottom: 24px;
}

.upload-zone:hover {
  border-color: var(--primary);
}

.upload-icon {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 8px;
}

.uploaded-docs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.doc-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}

.doc-icon {
  font-size: 18px;
  color: var(--primary);
}

.doc-info {
  flex-grow: 1;
}

.doc-title {
  font-size: 12.5px;
  color: var(--text-primary);
}

.doc-meta {
  font-size: 10.5px;
  color: var(--text-secondary);
}

.doc-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s;
}

.doc-delete-btn:hover {
  color: var(--danger);
}

/* Keyframes spinning scan icon */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .hero-title {
    font-size: 40px;
  }
  .macbook-container {
    perspective: none;
  }
  .macbook-lid {
    transform: none !important;
  }
  .macbook-body {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .welcome-banner, .stats-cards-row {
    grid-column: span 1;
  }
  .reports-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    grid-template-columns: 1fr;
  }
  .app-sidebar {
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .sidebar-link {
    white-space: nowrap;
  }
  .sidebar-footer {
    display: none;
  }
  .test-item-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* Integration Guide Banner */
.integration-guide-banner {
  background: linear-gradient(135deg, rgba(66,245,206,0.06), rgba(31,82,110,0.15));
  border: 1px solid var(--glass-border-hi);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
}

.guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}

.guide-header:hover {
  background: rgba(2, 132, 199, 0.04);
}

.guide-chevron {
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.integration-guide-banner.collapsed .guide-chevron {
  transform: rotate(-90deg);
}

.guide-body {
  padding: 0 20px 20px;
  max-height: 600px;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.integration-guide-banner.collapsed .guide-body {
  max-height: 0;
  padding: 0 20px;
}

.guide-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .guide-steps {
    grid-template-columns: 1fr;
  }
}

.guide-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.guide-step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--ink);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.guide-step h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.guide-step p {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Plugin Detail Sections (collapsible) */
.plugin-detail-section {
  margin-top: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.plugin-detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-main);
  user-select: none;
  transition: background 0.2s;
}

.plugin-detail-heading:hover {
  background: var(--glass-strong);
}

.plugin-detail-chevron {
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.plugin-detail-heading.open .plugin-detail-chevron {
  transform: rotate(180deg);
}

/* Kept in the DOM as the content source for the setup-instructions modal;
   never rendered inline (inline expansion reflowed the plugin grid). */
.plugin-detail-body {
  display: none;
}

/* Setup Instructions modal */
#dialog-plugin-details {
  max-width: 520px;
}

.plugin-details-modal-body {
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 4px;
}

.plugin-detail-group {
  margin-bottom: 14px;
}

.plugin-detail-group:last-child {
  margin-bottom: 0;
}

.plugin-detail-group h5 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.plugin-detail-group ul,
.plugin-detail-group ol {
  margin: 0;
  padding-left: 18px;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.plugin-detail-group li {
  margin-bottom: 2px;
}

.plugin-detail-group code {
  background: var(--glass-strong);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.plugin-checks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plugin-check-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 10px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Connect Wizard Enhanced Steps */
.wizard-steps-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: wizard-step;
}

.wizard-steps-list li {
  counter-increment: wizard-step;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  border-bottom: 1px solid var(--border-color);
}

.wizard-steps-list li:last-child {
  border-bottom: none;
}

.wizard-steps-list li::before {
  content: counter(wizard-step);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--ink);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-top: 1px;
}

.wizard-info-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 12px;
  margin-bottom: 6px;
}

.wizard-info-box p {
  font-size: 11px;
  color: var(--warning-text);
  margin: 0;
  line-height: 1.5;
}

.wizard-info-box strong {
  color: var(--warning);
}

/* ====== Settings Panel ====== */
.settings-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
}

@media (max-width: 900px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  font-family: var(--font-display);
  transition: background 0.15s, color 0.15s;
  width: 100%;
}

.settings-nav-item:hover {
  background: var(--glass-strong);
  color: var(--text-primary);
}

.settings-nav-item.active {
  background: rgba(66,245,206,0.1);
  color: var(--primary);
  font-weight: 600;
}

.settings-nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.settings-content {
  min-height: 400px;
}

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}

.settings-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.settings-section-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.settings-card {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.settings-card h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.settings-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.settings-field:last-child {
  border-bottom: none;
}

.settings-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.settings-field-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

/* Plan-gated feature badge - shown next to a panel/section title */
.plan-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--primary);
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Plan Cards */
.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .plan-cards-grid {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}

.plan-card:hover {
  border-color: var(--primary);
}

.plan-card.active-plan {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  background: rgba(66,245,206,0.08);
}

.plan-card .plan-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.plan-card .plan-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 10px 0 4px;
  font-family: var(--font-display);
}

.plan-card .plan-price span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.plan-card .plan-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.plan-card .plan-features {
  text-align: left;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.8;
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan-card .plan-features li::before {
  content: '✓ ';
  color: var(--success);
  font-weight: 700;
}

.plan-card .current-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 12px;
  margin-bottom: 8px;
}

/* Sub-accounts Table */
.subaccounts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.subaccounts-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-bottom: 2px solid var(--border-color);
}

.subaccounts-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.role-badge.admin { background: rgba(66,245,206,0.12); color: var(--blush); }
.role-badge.auditor { background: rgba(245,158,11,0.12); color: var(--warning-text); }
.role-badge.viewer { background: var(--glass-strong); color: var(--text-secondary); }

.invite-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.invite-row .form-input {
  flex: 1;
}

/* Framework Chips */
.framework-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.framework-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-display);
}

.framework-chip:hover {
  border-color: var(--primary);
}

.framework-chip.active {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success-text);
}

.framework-chip .chip-remove {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  font-size: 10px;
  cursor: pointer;
  border: none;
  color: var(--text-secondary);
  line-height: 1;
}

/* Danger Zone */
.danger-zone {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.danger-zone h4 {
  color: var(--danger-text);
}

.danger-zone p {
  font-size: 12px;
  color: rgba(252,165,165,0.8);
  line-height: 1.5;
  margin-bottom: 16px;
}

.btn-danger {
  background: #DC2626;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-display);
  transition: background 0.2s;
}

.btn-danger:hover {
  background: #B91C1C;
}

/* ====== DARK MODE TOGGLE ====== */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle-btn:hover {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  color: var(--primary);
  border-color: var(--primary);
}

/* ====== OAUTH MODAL SIMULATION ====== */
.oauth-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.oauth-modal.active {
  opacity: 1;
  pointer-events: all;
}

.oauth-modal-content {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  width: 400px;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(20px);
  transition: transform 0.3s;
}

.oauth-modal.active .oauth-modal-content {
  transform: translateY(0);
}

.oauth-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: oauth-spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.oauth-status {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.oauth-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ====== COMPLIANCE COPILOT (CHATBOT) ====== */
.chatbot-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: #05141b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(2, 132, 199, 0.3);
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -3px rgba(2, 132, 199, 0.4);
}

.chatbot-trigger svg {
  width: 24px;
  height: 24px;
}

.chatbot-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 360px;
  height: 500px;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.chatbot-window.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.chatbot-header {
  background: var(--primary);
  color: var(--ink);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-avatar {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}

.chatbot-status {
  font-size: 11px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chatbot-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #34D399;
  border-radius: 50%;
}

.chatbot-close {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0.8;
}

.chatbot-close:hover {
  opacity: 1;
}

.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-body);
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
}

.chat-bubble.bot {
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  background: var(--primary);
  color: var(--ink);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
}

.chat-typing .dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.chat-typing .dot:nth-child(1) { animation-delay: -0.32s; }
.chat-typing .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.chatbot-input-area {
  padding: 16px;
  background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

.chatbot-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
}

.chatbot-input:focus {
  border-color: var(--primary);
}

.chatbot-send {
  background: var(--primary);
  color: var(--ink);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.chatbot-send:hover {
  background: #0369A1;
}

/* ---- Animated password reveal (adapted from Animated Password Field) ---- */
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap .form-input { padding-right: 44px; width: 100%; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; padding: 6px; line-height: 0;
  color: var(--text-secondary, #8a97a3); transition: color .2s;
}
.pw-toggle:hover { color: var(--primary, #42F5CE); }
.pw-toggle.revealed { color: var(--primary, #42F5CE); }
.form-input.pw-scanning {
  animation: pwScan .7s ease 1;
  background-image: linear-gradient(90deg, rgba(66,245,206,.35) 0%, transparent 60%);
  background-repeat: no-repeat;
}
@keyframes pwScan { 0% { background-position: -320px; } 100% { background-position: 320px; } }

/* ---- Interactive logout button (adapted from Interactive Logout Button) ---- */
.logoutButton {
  position: relative; width: 40px; height: 40px; border: 0; cursor: pointer;
  border-radius: 10px; background: var(--glass-strong, rgba(255,255,255,.06));
  border: 1px solid var(--border-color, rgba(255,255,255,.1));
  overflow: hidden; transition: width .35s ease, background .2s;
  display: inline-flex; align-items: center; padding: 0 10px;
}
.logoutButton:hover { width: 118px; background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); }
.logoutButton svg { position: absolute; width: 20px; height: 20px; left: 10px; }
.logoutButton .doorway, .logoutButton .door { fill: var(--text-secondary, #8a97a3); }
.logoutButton .figure { fill: #EF4444; }
.logoutButton .door { transform-origin: 96% 50%; transition: transform .4s ease; }
.logoutButton .bang { opacity: 0; }
.logoutButton .button-text {
  position: absolute; left: 34px; font-size: 12px; font-weight: 600;
  color: #EF4444; opacity: 0; transition: opacity .25s ease .1s; white-space: nowrap;
}
.logoutButton:hover .button-text { opacity: 1; }
.logoutButton:hover .figure { animation: figWalk .5s ease; }
.logoutButton--loggingOut .door { transform: rotateY(-110deg); }
.logoutButton--loggingOut .bang { opacity: 1; animation: bang .4s ease; }
@keyframes figWalk { 0% { transform: translateX(0); } 100% { transform: translateX(2px); } }
@keyframes bang { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
