/* ==========================================================================
   PulseHR - Complete Design System & Stylesheet
   Modern, Sleek, Enterprise HR Platform & Logo Studio
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Color Palette - Deep Dark Tech & Sleek Glass */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-tertiary: #182234;
  --bg-card: rgba(18, 26, 43, 0.75);
  --bg-card-hover: rgba(26, 38, 62, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-strong: rgba(255, 255, 255, 0.07);

  /* Accents */
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --gradient-amber: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-dark: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(9, 13, 22, 0.98) 100%);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-glow: rgba(99, 102, 241, 0.35);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d16;

  /* Shadows & Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.25);

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --header-height: 72px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Subtle Animated Ambient Glows */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: 20%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: pulseAmbient 12s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -150px;
  right: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(6, 182, 212, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: pulseAmbient 16s ease-in-out infinite alternate-reverse;
}

@keyframes pulseAmbient {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.1); }
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #818cf8;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 100;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  color: #fff;
  transition: var(--transition);
}

.brand-container:hover .brand-logo-badge {
  transform: scale(1.05) rotate(-3deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-pill {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  border-bottom: 2px solid var(--accent-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.btn-success {
  background: var(--gradient-emerald);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.725rem;
  font-weight: 700;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* ==========================================================================
   Page Layout & Containers
   ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ==========================================================================
   Hero & Hub Dashboard (index.html)
   ========================================================================== */
.hero-section {
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s ease;
}

.hero-pill-icon {
  color: var(--accent-cyan);
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-title span.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.25rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Three Module Preview Grid */
.portal-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: var(--transition);
}

.module-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-glow);
}

.module-card:hover::before {
  background: var(--gradient-primary);
}

.module-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.module-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: #fff;
}

.module-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.module-feature-list {
  list-style: none;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.module-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.module-feature-item svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

/* Feature Spotlight / Platform Stats */
.platform-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 4rem;
  backdrop-filter: blur(10px);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ==========================================================================
   Auth Pages (Login & Register Split Layouts)
   ========================================================================== */
.auth-page-container {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.auth-card-split {
  width: 100%;
  max-width: 1100px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

/* Left Brand Showcase Banner */
.auth-showcase-panel {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%);
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border-subtle);
}

.auth-showcase-panel::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

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

.showcase-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.showcase-heading {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 1.2rem;
}

.showcase-text {
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* Floating Testimonial / Perks Card */
.showcase-perk-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(8px);
}

.perk-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  flex-shrink: 0;
}

.perk-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.perk-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.showcase-footer-trust {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.avatar-stack {
  display: flex;
}

.avatar-stack img, .avatar-stack .avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  margin-left: -8px;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
}

.avatar-stack .avatar-circle:first-child {
  margin-left: 0;
}

/* Right Form Panel */
.auth-form-panel {
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form-header {
  margin-bottom: 2rem;
}

.auth-form-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.auth-form-subtitle {
  font-size: 0.925rem;
  color: var(--text-secondary);
}

/* Form Groups & Inputs */
.form-group {
  margin-bottom: 1.35rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.form-control-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.925rem;
  transition: var(--transition);
  outline: none;
}

.form-input.no-icon {
  padding-left: 1rem;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.form-input::placeholder {
  color: #475569;
}

.form-select option {
  background: var(--bg-secondary);
  color: #fff;
}

.password-toggle-btn {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.password-toggle-btn:hover {
  color: #fff;
}

/* Password Strength Indicator */
.password-strength-container {
  margin-top: 0.5rem;
}

.strength-bar-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  gap: 3px;
}

.strength-segment {
  flex: 1;
  height: 100%;
  background: transparent;
  transition: var(--transition);
}

.strength-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
}

/* Form Helpers: Checkbox & Links */
.form-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: var(--transition);
}

.custom-checkbox-label input[type="checkbox"]:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.custom-checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* Quick Fill Demo Credentials */
.demo-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: #c7d2fe;
}

.demo-fill-btn {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: auto;
  transition: var(--transition);
}

.demo-fill-btn:hover {
  background: #4f46e5;
}

.auth-footer-nav {
  text-align: center;
  margin-top: 1.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer-nav a {
  font-weight: 700;
}

/* Two Column Grid for Registration Fields */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ==========================================================================
   Interactive Company Logo Creator Studio (Hero Tool)
   ========================================================================== */
.studio-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 2rem;
  min-height: calc(100vh - var(--header-height) - 4rem);
  margin-bottom: 2rem;
}

/* Controls Sidebar */
.studio-controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  backdrop-filter: blur(16px);
  max-height: calc(100vh - var(--header-height) - 4rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.studio-controls-panel::-webkit-scrollbar {
  width: 6px;
}

.studio-controls-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.control-section {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.35rem;
}

.control-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header-title svg {
  color: var(--accent-primary);
}

/* Icon Category Tabs & Grid */
.icon-cat-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 0.85rem;
  padding-bottom: 0.25rem;
}

.icon-cat-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.icon-cat-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-cat-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.icon-selection-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.35rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.icon-choice-btn {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0.4rem;
}

.icon-choice-btn svg {
  width: 22px;
  height: 22px;
  transition: var(--transition);
}

.icon-choice-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
  color: #fff;
}

.icon-choice-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent-primary);
  color: #a5b4fc;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* Layout Mode Buttons */
.layout-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.layout-choice-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.4rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.725rem;
  font-weight: 600;
  transition: var(--transition);
}

.layout-choice-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.layout-choice-btn.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--accent-primary);
  color: #c7d2fe;
}

/* Color Presets & Pickers */
.color-swatches-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.color-swatch-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.color-swatch-btn:hover {
  transform: scale(1.15);
}

.color-swatch-btn.active {
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.color-inputs-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.color-input-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
}

.color-input-item input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  background: none;
}

.color-input-item input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input-item input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.color-hex-val {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Container Shape Styles */
.shape-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.shape-choice-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 0.25rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  transition: var(--transition);
}

.shape-choice-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.shape-choice-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: #c7d2fe;
}

/* Custom Range Sliders */
.slider-control-group {
  margin-bottom: 0.85rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.slider-val-tag {
  font-family: monospace;
  color: #a5b4fc;
}

.custom-range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
  transition: var(--transition);
}

.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #818cf8;
}

/* Right Interactive Studio Canvas & Mockup Deck */
.studio-canvas-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Top Action Toolbar */
.studio-canvas-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
}

.mockup-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mockup-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.mockup-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.mockup-tab-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}

.toolbar-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Main Live Canvas Box */
.live-canvas-stage {
  background: radial-gradient(circle at center, #172033 0%, #0d1322 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
}

.canvas-background-grid {
  position: absolute;
  inset: 0;
  background-size: 24px 24px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  pointer-events: none;
}

/* Real-time Rendered SVG Container */
#logoPreviewWrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
  user-select: none;
}

#logoPreviewWrapper:hover {
  transform: scale(1.02);
}

/* Background Canvas Theme Toggle (Light / Dark / Transparent) */
.canvas-backdrop-picker {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  display: flex;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.25rem;
  z-index: 10;
}

.backdrop-opt-btn {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.backdrop-opt-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ==========================================================================
   Contextual Mockup Views (Real-world HR Previews)
   ========================================================================== */
.mockup-display-area {
  display: none;
  width: 100%;
  animation: fadeIn 0.3s ease;
}

.mockup-display-area.active {
  display: block;
}

/* 1. Employee Digital ID Badge Mockup */
.id-badge-mockup-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
}

.id-badge-lanyard {
  width: 24px;
  height: 48px;
  background: linear-gradient(180deg, #4f46e5 0%, #312e81 100%);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  position: relative;
  display: flex;
  justify-content: center;
}

.id-badge-lanyard::after {
  content: '';
  position: absolute;
  bottom: -8px;
  width: 14px;
  height: 12px;
  background: #94a3b8;
  border-radius: 2px;
}

.id-badge-card {
  width: 320px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 8px;
  position: relative;
  text-align: center;
}

.id-badge-top-band {
  height: 70px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.id-badge-logo-holder {
  transform: scale(0.65);
  transform-origin: center;
}

.id-badge-avatar-wrap {
  position: relative;
  margin-top: -36px;
  margin-bottom: 0.75rem;
}

.id-badge-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  background: #e2e8f0;
}

.id-badge-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.id-badge-role {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.id-badge-meta-row {
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
}

.id-meta-col span {
  display: block;
}

.id-meta-label {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.65rem;
}

.id-meta-val {
  color: #1e293b;
  font-weight: 700;
}

.id-badge-barcode {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.barcode-lines {
  height: 28px;
  width: 180px;
  background: repeating-linear-gradient(
    90deg,
    #0f172a 0px,
    #0f172a 2px,
    transparent 2px,
    transparent 4px,
    #0f172a 4px,
    #0f172a 7px,
    transparent 7px,
    transparent 9px
  );
}

.barcode-digits {
  font-family: monospace;
  font-size: 0.7rem;
  color: #64748b;
  letter-spacing: 0.15em;
  margin-top: 0.25rem;
}

/* 2. HR Portal Top Navigation Mockup */
.portal-bar-mockup {
  width: 100%;
  max-width: 780px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: 1.5rem auto;
}

.portal-bar-browser-dots {
  background: #1e293b;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.portal-mockup-inner-nav {
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-mockup-logo-container {
  transform: scale(0.7);
  transform-origin: left center;
}

.portal-mockup-nav-items {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.825rem;
  color: #94a3b8;
}

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

.portal-mockup-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.portal-mockup-body {
  padding: 1.75rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: #090d16;
}

.portal-widget-box {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.portal-widget-title {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.portal-widget-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

/* 3. Official Letterhead / Offer Letter Mockup */
.letterhead-mockup {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  color: #1e293b;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  margin: 1.5rem auto;
  font-family: 'Inter', sans-serif;
}

.letterhead-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.letterhead-logo-holder {
  transform: scale(0.65);
  transform-origin: left top;
}

.letterhead-company-info {
  text-align: right;
  font-size: 0.725rem;
  color: #64748b;
  line-height: 1.4;
}

.letterhead-doc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.letterhead-body-text {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 1.5rem;
}

.letterhead-sig-row {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  border-top: 1px dashed #cbd5e1;
  padding-top: 1rem;
  font-size: 0.75rem;
  color: #64748b;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 420px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success {
  border-left: 4px solid var(--accent-emerald);
}

.toast-info {
  border-left: 4px solid var(--accent-primary);
}

.toast-warning {
  border-left: 4px solid var(--accent-amber);
}

.toast-error {
  border-left: 4px solid var(--accent-rose);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #090d16;
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .studio-controls-panel {
    max-height: none;
  }
  .auth-card-split {
    grid-template-columns: 1fr;
  }
  .auth-showcase-panel {
    display: none;
  }
  .platform-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-nav {
    padding: 0 1.25rem;
  }
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .portal-modules-grid {
    grid-template-columns: 1fr;
  }
  .form-row-2col {
    grid-template-columns: 1fr;
  }
  .platform-stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   PulseStudio - 3-in-1 UI Customizer & Code Generator Extensions
   ========================================================================== */

/* Component Mode Switcher in Header */
.mode-switcher-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.3rem;
}

.mode-switch-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  font-size: 0.825rem;
  font-weight: 700;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.mode-switch-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.mode-switch-btn.active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

/* Studio Canvas Stage Layout & Viewport Simulation */
.studio-canvas-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - var(--header-height) - 4rem);
  transition: var(--transition);
}

.device-frame-container {
  width: 100%;
  transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  margin: 0 auto;
}

.device-frame-container.viewport-desktop {
  max-width: 100%;
}

.device-frame-container.viewport-tablet {
  max-width: 768px;
  border: 8px solid #1e293b;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.device-frame-container.viewport-mobile {
  max-width: 390px;
  border: 10px solid #1e293b;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
  position: relative;
}

.device-frame-container.viewport-mobile::before {
  content: '';
  display: block;
  width: 110px;
  height: 20px;
  background: #1e293b;
  margin: 0 auto 10px;
  border-radius: 0 0 14px 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Viewport Switcher Buttons */
.viewport-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.2rem;
}

.viewport-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.viewport-btn:hover {
  color: #fff;
}

.viewport-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

/* Toggle Switches */
.toggle-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-switch-row:last-child {
  border-bottom: none;
}

.toggle-info {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
}

.toggle-desc {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  transition: var(--transition);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: var(--transition);
}

.switch-label input:checked + .switch-slider {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.switch-label input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* Theme Selection Pills */
.theme-pill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.theme-pill-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
}

.theme-pill-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.theme-pill-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: #c7d2fe;
}

/* Code Viewer & Download Modal */
.code-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.code-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.code-modal-card {
  width: 100%;
  max-width: 960px;
  height: 85vh;
  background: #0d1322;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { transform: scale(0.95) translateY(10px); }
  to { transform: scale(1) translateY(0); }
}

.code-modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
}

.code-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.code-tabs-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: #090d16;
  border-bottom: 1px solid var(--border-subtle);
}

.code-tab-btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.code-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.code-tab-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

.code-editor-viewport {
  flex: 1;
  padding: 1.5rem 1.75rem;
  overflow: auto;
  background: #080c14;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre;
  tab-size: 2;
  user-select: text;
}

.code-modal-footer {
  padding: 1.25rem 1.75rem;
  background: rgba(15, 23, 42, 0.75);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

