* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}
html {
  overflow-x: hidden;
  max-width: 100vw;
}
#root {
  overflow-x: hidden;
  max-width: 100vw;
}

:root {
  --bg: #030712;
  --bg2: #0f0a1e;
  --surface: rgba(255,255,255,0.04);
  --surface-border: rgba(255,255,255,0.10);
  --surface2: rgba(255,255,255,0.06);
  --text: #f9fafb;
  --text2: #9ca3af;
  --text3: #6b7280;
  --accent: #a78bfa;
  --accent-hover: #c4b5fd;
  --accent-glow: rgba(167, 139, 250, 0.35);
  --gold: #C9A84C;
  --gold-glow: rgba(201, 168, 76, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-blur: blur(24px);
  --cyan: #06b6d4;
  --green: #10b981;
  --red: #ef4444;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);

  /* Liquid Glass System */
  --lg-bg: rgba(12, 8, 28, 0.45);
  --lg-blur: blur(44px) saturate(1.9) brightness(1.1);
  --lg-border-light: rgba(255,255,255,0.35);
  --lg-border-dark: rgba(255,255,255,0.05);
  --lg-specular-size: 240px;
  --lg-tilt-max: 5deg;
  --lg-radius: 20px;
}

/* ═══════════════════════════════════════
   Liquid Glass Design System
   ═══════════════════════════════════════ */
.lg-surface {
  background: var(--lg-bg);
  backdrop-filter: var(--lg-blur);
  -webkit-backdrop-filter: var(--lg-blur);
  border-radius: var(--lg-radius);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  isolation: isolate;

  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.10),
    0 1px 2px rgba(0,0,0,0.5),
    0 4px 16px rgba(0,0,0,0.4),
    0 16px 48px rgba(0,0,0,0.3),
    0 48px 80px rgba(0,0,0,0.2),
    inset 0 2px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    inset 1px 0 0 rgba(255,255,255,0.06),
    inset -1px 0 0 rgba(0,0,0,0.08),
    inset 0 0 100px rgba(167,139,250,0.04);

  transition: transform 0.4s cubic-bezier(0.23,1,0.32,1),
              box-shadow 0.4s cubic-bezier(0.23,1,0.32,1);
  will-change: transform;
}

.lg-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--lg-border-angle, 135deg),
    rgba(255,255,255,0.55) 0%,
    rgba(167,139,250,0.25) 25%,
    var(--lg-border-dark) 50%,
    rgba(201,168,76,0.2) 75%,
    var(--lg-border-light) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
  transition: --lg-border-angle 0.1s linear;
}

.lg-surface::after {
  content: '';
  position: absolute;
  top: 0; left: 8%; width: 84%; height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.5) 15%,
    rgba(255,255,255,0.95) 50%,
    rgba(255,255,255,0.5) 85%,
    transparent 100%
  );
  filter: blur(0.5px);
  pointer-events: none;
  z-index: 1;
}

.lg-specular {
  position: absolute;
  width: var(--lg-specular-size);
  height: var(--lg-specular-size);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255,255,255,0.14) 0%,
    rgba(255,255,255,0.06) 35%,
    rgba(167,139,250,0.03) 60%,
    transparent 75%
  );
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  mix-blend-mode: screen;
}
.lg-surface:hover .lg-specular { opacity: 1; }

.lg-caustic {
  position: absolute;
  inset: -20%;
  background-image:
    radial-gradient(ellipse 60% 40% at 30% 40%, rgba(255,255,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 70% 60%, rgba(167,139,250,0.03) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 50% 20%, rgba(255,255,255,0.03) 0%, transparent 50%);
  animation: causticShift 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes causticShift {
  0%   { transform: translate(0%, 0%) scale(1); opacity: 1; }
  33%  { transform: translate(3%, -2%) scale(1.05); opacity: 0.7; }
  66%  { transform: translate(-2%, 3%) scale(0.97); opacity: 0.9; }
  100% { transform: translate(1%, -1%) scale(1.02); opacity: 0.8; }
}

.lg-content {
  position: relative;
  z-index: 2;
}

body {
  background:
    radial-gradient(ellipse 80% 60% at 10% 5%, rgba(16,185,129,0.15) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 15%, rgba(201,168,76,0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 90%, rgba(239,68,68,0.06) 0%, transparent 50%),
    #030712;
  color: var(--text);
  font-family: 'Inter', 'Prompt', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: -100px;
  left: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}

body::after {
  content: '';
  position: fixed;
  bottom: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}

h1 { font-family: 'Cormorant Garamond', 'Inter', serif; letter-spacing: -0.3px; }
h2 { font-family: 'Inter', 'Prompt', sans-serif; letter-spacing: -0.3px; }

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input, select, textarea {
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.input-wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.input-field::placeholder { color: var(--text3); }

.input-field:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.3);
}

*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(167,139,250,0.3);
  border-color: var(--accent);
}

.card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
}

.card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
  border-color: rgba(167,139,250,0.2);
  backdrop-filter: blur(24px) brightness(1.08);
  -webkit-backdrop-filter: blur(24px) brightness(1.08);
}

.card:hover::after {
  animation: shimmerSweep 0.6s ease forwards;
}

.card--visible::after {
  animation: shimmerSweep 0.6s ease forwards;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out forwards;
}

.modal-content {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  color: #fff;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

/* Skeleton Loaders */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 120px; }

/* Tooltips */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
}
.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 10, 30, 0.95);
  border: 1px solid rgba(167,139,250,0.25);
  color: #e2e8f0;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 100;
}
.tooltip-wrapper:hover .tooltip { opacity: 1; }

/* Buttons */
.btn {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: 1px solid transparent;
  outline: none;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #C9A84C 100%);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(167,139,250,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255,255,255,0.3), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.btn-primary:active::after {
  opacity: 1;
  transition: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(167,139,250,0.55), inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(167,139,250,0.3);
}

.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; filter: grayscale(50%); animation: none; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-google {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--surface-border);
  font-weight: 500;
  transition: all 0.2s;
}
.btn-google:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #4b5563;
}

/* Floating Particles */
.particle { position:absolute; background:var(--accent-glow); border-radius:50%; filter:blur(8px); animation:floatAnim 20s infinite linear; opacity:0.6; pointer-events:none; }
@keyframes floatAnim {
  0% { transform:translateY(0) translateX(0) rotate(0deg); }
  33% { transform:translateY(-100px) translateX(50px) rotate(120deg); }
  66% { transform:translateY(50px) translateX(-50px) rotate(240deg); }
  100% { transform:translateY(0) translateX(0) rotate(360deg); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmerSweep {
  0% { left: -100%; }
  100% { left: 150%; }
}

@keyframes glowPulse {
  0%, 100% { 
    box-shadow: 0 0 0 1px rgba(167,139,250,0.35), 0 0 6px rgba(167,139,250,0.2); 
  }
  50% { 
    box-shadow: 0 0 0 1px rgba(167,139,250,0.5), 0 0 10px rgba(167,139,250,0.35); 
  }
}

@keyframes cardEntrance {
  from { 
    opacity: 0; 
    transform: translateY(20px) scale(0.98); 
    filter: blur(4px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
    filter: blur(0);
  }
}

.stagger-1 { animation: cardEntrance 0.5s cubic-bezier(0.23,1,0.32,1) 0.05s both; }
.stagger-2 { animation: cardEntrance 0.5s cubic-bezier(0.23,1,0.32,1) 0.10s both; }
.stagger-3 { animation: cardEntrance 0.5s cubic-bezier(0.23,1,0.32,1) 0.15s both; }
.stagger-4 { animation: cardEntrance 0.5s cubic-bezier(0.23,1,0.32,1) 0.20s both; }
.stagger-5 { animation: cardEntrance 0.5s cubic-bezier(0.23,1,0.32,1) 0.25s both; }
.stagger-6 { animation: cardEntrance 0.5s cubic-bezier(0.23,1,0.32,1) 0.30s both; }
.stagger-7 { animation: cardEntrance 0.5s cubic-bezier(0.23,1,0.32,1) 0.35s both; }
.stagger-8 { animation: cardEntrance 0.5s cubic-bezier(0.23,1,0.32,1) 0.40s both; }

.tab-content-anim {
  animation: fadeSlideUp 0.5s cubic-bezier(0.23,1,0.32,1) forwards;
}

/* Results */
.result-positive {
  color: var(--green);
  font-weight: 700
}

.result-negative {
  color: var(--red);
  font-weight: 700
}

/* ═══ PREMIUM UI OVERHAUL ═══ */

/* Navigation */
.nav-bar {
  display: flex;
  align-items: center;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-top: 2px solid;
  border-image: linear-gradient(90deg, #7c3aed, #C9A84C, #06b6d4) 1;
  border-bottom: 1px solid rgba(201,168,76,0.15);
  box-shadow: 0 1px 0 rgba(201,168,76,0.08), 0 4px 24px rgba(0,0,0,0.4);
  padding: 0 16px;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-bar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #c4b5fd, #C9A84C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 24px rgba(167,139,250,0.35);
}
.nav-bar .brand .emoji { font-size: 22px; -webkit-text-fill-color: initial; }
.nav-label-short { display: none; }
.nav-label-full { display: inline; }
.nav-bar .brand .emoji { font-size: 22px; -webkit-text-fill-color: initial; }
.nav-tab {
  position: relative;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-radius: 100px;
  margin: 2px;
}
.nav-tab:hover { color: #e2e8f0; background: rgba(255,255,255,0.05); }
.nav-tab.active-tab {
  color: #c4b5fd;
  font-weight: 600;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.35);
  border-radius: 100px;
  animation: glowPulse 3s ease-in-out infinite;
  padding: 4px 12px;
}

.nav-tab.active-tab::after {
  display: none;
}
.nav-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #C9A84C);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.4);
}
.nav-signout {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-signout:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Page Headers */
.page-header {
  padding: 28px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.page-header h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 4px;
  font-family: 'Cormorant Garamond', serif;
}
.page-header p {
  font-size: 13px;
  color: #64748b;
}

.glass-header {
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(201,168,76,0.04));
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.glass-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(167,139,250,0.06), transparent 60%);
  pointer-events: none;
}

/* Workflow Step Cards */
.wf-test-card {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%),
    rgba(12, 8, 28, 0.35);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.4),
    0 8px 24px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 0.25s cubic-bezier(0.23,1,0.32,1),
              border-color 0.25s ease,
              box-shadow 0.25s ease,
              background 0.25s ease;
}
.wf-test-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
  background:
    linear-gradient(135deg, rgba(167,139,250,0.08) 0%, rgba(255,255,255,0.02) 100%),
    rgba(12, 8, 28, 0.4);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.4),
    0 12px 32px rgba(167,139,250,0.12),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transform: translateY(-1px);
}
.wf-test-card.answered {
  border-color: rgba(167, 139, 250, 0.4);
  background:
    linear-gradient(135deg, rgba(167,139,250,0.12) 0%, rgba(201,168,76,0.05) 100%),
    rgba(12, 8, 28, 0.4);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.4),
    0 8px 24px rgba(167,139,250,0.18),
    inset 0 1px 0 rgba(255,255,255,0.14);
}
.wf-test-label {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wf-test-label .idx {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.extra-badge {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.wf-test-card.extra-card {
  border-color: rgba(251, 146, 60, 0.12);
  background: rgba(251, 146, 60, 0.03);
  opacity: 0.85;
}
.wf-test-card.extra-card:hover {
  border-color: rgba(251, 146, 60, 0.25);
  background: rgba(251, 146, 60, 0.06);
  opacity: 1;
}
.wf-opt-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.wf-opt-btn:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.4);
  color: #e9d5ff;
}
.wf-opt-btn.selected {
  background: rgba(167, 139, 250, 0.2);
  border-color: #a78bfa;
  color: #c4b5fd;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.2);
}
.wf-opt-btn.skip {
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
  color: #475569;
  font-size: 11px;
}
.wf-opt-btn.skip:hover, .wf-opt-btn.skip.selected {
  background: rgba(100, 116, 139, 0.1);
  border-color: #475569;
  color: #64748b;
}

/* Progress Stepper */
.progress-bar {
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 14px 24px;
}
.step-indicator {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.3s;
}
.step-indicator.done {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.4);
}
.step-indicator.pending {
  background: rgba(30, 41, 59, 0.8);
  color: #475569;
  border: 2px solid #1e293b;
}

/* Action buttons */
.btn-action {
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-action.primary {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 60%, #C9A84C 100%);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  color: #fff;
  box-shadow: 0 4px 14px rgba(167, 139, 250, 0.4);
}
.btn-action.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(167, 139, 250, 0.55);
}
.btn-action.secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}
.btn-action.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
.btn-action.save {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}
.btn-action.save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.5);
}

/* Result Cards */
.result-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 18px;
  transition: all 0.25s;
}
.result-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.result-card.top {
  background: rgba(167, 139, 250, 0.06);
  border-color: rgba(167, 139, 250, 0.25);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.15);
}

/* Fade animation */
.fade-in {
  animation: fadeSlideIn 0.35s ease-out forwards;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mobileSheetIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #7c3aed 0%, #C9A84C 100%); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #a78bfa, #e0b96a); }

/* Gram select cards */
.gram-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}
.gram-card:hover {
  border-color: rgba(167,139,250,0.3);
  background: rgba(167,139,250,0.06);
}
.gram-card.selected {
  font-weight: 700;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}
.gram-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.gram-card.selected .gram-indicator {
  border-width: 0;
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 📱 Responsive Design / Mobile Optimization */
@media (max-width: 768px) {
  /* iPad Portrait - Login Page */
  .login-container {
    padding: 20px !important;
  }
  .login-card {
    padding: 32px 24px !important;
    max-width: 100% !important;
  }
  .input-field {
    height: 52px !important;
    font-size: 16px !important;
  }
  .btn-primary, .btn-google, .btn-ghost {
    height: 52px !important;
    font-size: 16px !important;
  }
  .nav-bar {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px 0;
    justify-content: space-between;
    gap: 8px;
  }
  .nav-bar .brand {
    margin-right: 0;
    flex-shrink: 0;
  }
  .nav-bar .brand > div > div:nth-child(2) {
    display: none; /* hide DIAGNOSTIC ENGINE subtitle on mobile */
  }
  .nav-user {
    flex: 0 0 auto;
    gap: 8px;
  }
  .nav-username { display: none; } /* hide username on mobile to save space */
  .nav-bar nav {
    width: calc(100% + 28px);
    margin: 6px -14px 0;
    padding: 8px 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
    border-top: 1px solid rgba(255,255,255,0.06);
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    gap: 6px !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    order: 3;
  }
  .nav-bar nav::-webkit-scrollbar {
    display: none;
  }
  .nav-tab {
    flex: 0 0 auto;
    text-align: center;
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
    scroll-snap-align: start;
    border-radius: 999px;
  }

  /* Base Layout Adjustment */
  .layout-split {
    flex-direction: column !important;
    height: auto !important;
    min-height: calc(100vh - 140px);
    overflow-y: auto !important;
  }
  .layout-sidebar {
    width: 100% !important;
    max-height: 280px;
    border-right: none !important;
    border-bottom: 1px solid var(--surface-border) !important;
    flex-shrink: 0;
  }
  .layout-main {
    padding: 16px !important;
    flex: none !important;
    height: auto !important;
    overflow-y: visible !important;
  }

  .cases-container {
    padding: 20px 16px !important;
  }
  .cases-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Result Cards Responsive */
  .result-card {
    padding: 14px;
  }
  .result-card > div:first-child {
    flex-wrap: wrap;
  }
  .result-card > div:first-child > div:last-child {
    text-align: left;
    margin-top: 4px;
    width: 100%;
  }

  /* Nav label switching */
  .nav-label-full { display: none !important; }
  .nav-label-short { display: inline !important; }
  .nav-username { display: none !important; }
  .nav-signout { font-size: 11px; padding: 5px 10px; }

  /* Workflow test cards mobile */
  .wf-test-card {
    padding: 12px 14px;
  }
  .wf-opt-btn {
    padding: 7px 10px;
    font-size: 11px;
  }
  .wf-test-label {
    font-size: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
  }

  /* Page content padding mobile */
  .page-content-pad {
    padding: 16px !important;
  }

  /* Test Suite Reference grid mobile */
  .suite-test-row {
    grid-template-columns: 40px 1fr !important;
  }
  .suite-test-options {
    grid-column: 1 / -1;
    padding-left: 48px;
  }
  .suite-header-row {
    display: none !important;
  }

  /* Mobile Bottom Navigation */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(3, 7, 18, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    z-index: 999;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
  }
  .mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    color: #64748b;
    font-size: 10px;
    border-radius: 10px;
    transition: all 0.2s;
  }
  .mobile-bottom-nav-item.active {
    color: #c4b5fd;
    background: rgba(167,139,250,0.12);
  }
}

@media (max-width: 400px) {
  .nav-tab {
    padding: 5px 8px;
    font-size: 11px;
  }
  .wf-opt-btn {
    padding: 6px 8px;
    font-size: 10px;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
  background: var(--accent-glow); 
  border-radius: 2px; 
}

/* Smooth scroll */
html { scroll-behavior: smooth; }
