/* ==========================================================================
   LOGICHAIN AI — PROFESSIONAL TTN.AI GUIDED TOUR THEME
   Modern SaaS Aesthetics • Glassmorphism • TTN Interactive Overlays
   ========================================================================== */

:root {
  /* Brand & TTN Colors */
  --ttn-coral: #FF5C35;
  --ttn-coral-light: #FF7A59;
  --ttn-coral-dark: #E04823;
  --ttn-coral-glow: rgba(255, 92, 53, 0.38);
  --ttn-coral-subtle: rgba(255, 92, 53, 0.12);

  --indigo: #6366F1;
  --indigo-dark: #4F46E5;
  --indigo-glow: rgba(99, 102, 241, 0.35);
  --indigo-subtle: rgba(99, 102, 241, 0.12);

  --cyan: #06B6D4;
  --cyan-glow: rgba(6, 182, 212, 0.3);

  --emerald: #10B981;
  --emerald-subtle: rgba(16, 185, 129, 0.12);

  --amber: #F59E0B;
  --rose: #F43F5E;

  /* Neutrals & Surfaces */
  --bg: #F4F7FC;
  --bg-subtle: #EBF1FA;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-solid: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --panel: rgba(255, 255, 255, 0.92);

  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --line-glass: rgba(255, 255, 255, 0.6);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-white: #FFFFFF;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -6px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 25px 55px -10px rgba(15, 23, 42, 0.18), 0 12px 24px -6px rgba(15, 23, 42, 0.08);
  --shadow-coach: 0 25px 60px -8px rgba(15, 23, 42, 0.22), 0 12px 28px -4px rgba(99, 102, 241, 0.16);

  /* Radius & Curves */
  --radius-2xl: 24px;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;

  /* Typography */
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Easing */
  --ease-spring: cubic-bezier(0.18, 0.89, 0.32, 1.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* ==========================================================================
   GLOBAL BASE STYLES
   ========================================================================== */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text-primary);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.2s var(--ease-out);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--text-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  z-index: 1000;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* Ambient Floating Glow Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  animation: ambientFloat 18s ease-in-out infinite alternate;
}

.ambient-glow-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.24) 0%, rgba(99, 102, 241, 0) 70%);
  top: -100px;
  left: -100px;
}

.ambient-glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 92, 53, 0.18) 0%, rgba(255, 92, 53, 0) 70%);
  bottom: -150px;
  right: -100px;
  animation-duration: 22s;
  animation-delay: -5s;
}

.ambient-glow-3 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.16) 0%, rgba(6, 182, 212, 0) 70%);
  top: 40%;
  right: 25%;
  animation-duration: 26s;
  animation-delay: -10s;
}

@keyframes ambientFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.08); }
  100% { transform: translate(-40px, 60px) scale(0.95); }
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ==========================================================================
   LOGIN SCENE
   ========================================================================== */

.login-scene {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px 140px;
  position: relative;
}

.login-scene[hidden],
.shell[hidden] {
  display: none !important;
}

.login-card {
  width: min(450px, 100%);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line-glass);
  border-radius: var(--radius-2xl);
  padding: 38px 36px 32px;
  box-shadow:
    var(--shadow-xl),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  position: relative;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.lock-badge {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--indigo), #4338CA);
  color: #fff;
  box-shadow: 0 14px 28px rgba(99, 102, 241, 0.35);
  position: relative;
}

.lock-icon {
  width: 32px;
  height: 32px;
  z-index: 2;
}

.lock-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  border: 2px solid rgba(99, 102, 241, 0.4);
  animation: lockRadar 2.5s infinite var(--ease-out);
}

@keyframes lockRadar {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.eyebrow-wrapper {
  text-align: center;
  margin-bottom: 8px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--indigo-subtle);
  color: var(--indigo-dark);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.login-card h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1.2;
}

.login-sub {
  text-align: center;
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.demo-fill-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 92, 53, 0.08);
  border: 1px solid rgba(255, 92, 53, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--ttn-coral-dark);
}

.demo-fill-btn {
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  background: var(--ttn-coral);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px var(--ttn-coral-glow);
}

.demo-fill-btn:hover {
  background: var(--ttn-coral-dark);
}

.login-card label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 14px;
}

.field {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid rgba(203, 213, 225, 0.8);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  padding: 0 14px;
  min-height: 50px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: all 0.25s var(--ease-out);
  position: relative;
}

.field-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.field:focus-within {
  border-color: var(--indigo);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--indigo-subtle), 0 8px 20px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.field:focus-within .field-icon {
  color: var(--indigo);
}

.field input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.field input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.field-valid-check {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--emerald);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s var(--ease-spring);
}

.field.is-valid .field-valid-check {
  opacity: 1;
  transform: scale(1);
}

.eye {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.eye:hover {
  color: var(--indigo);
  background: var(--indigo-subtle);
}

.eye svg {
  width: 18px;
  height: 18px;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 20px;
  font-size: 0.82rem;
}

.remember-me {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  cursor: pointer;
}

.remember-me input {
  accent-color: var(--indigo);
  cursor: pointer;
}

.forgot {
  color: var(--indigo);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.forgot:hover {
  color: var(--indigo-dark);
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--ttn-coral) 0%, #FF7243 50%, var(--indigo) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 12px 28px var(--ttn-coral-glow), 0 4px 12px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.btn-shine {
  position: absolute;
  top: -50%;
  left: -60%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(30deg);
  animation: btnShineSweep 3.5s infinite;
}

@keyframes btnShineSweep {
  0% { left: -60%; }
  30%, 100% { left: 140%; }
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.login-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 20px 0 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.or::before, .or::after {
  content: "";
  height: 1px;
  background: var(--line-strong);
}

.sso-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.sso-btn:hover {
  background: var(--bg-subtle);
  border-color: rgba(99, 102, 241, 0.3);
}

.signup {
  text-align: center;
  margin: 20px 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.signup a {
  color: var(--indigo);
  font-weight: 700;
  text-decoration: none;
}

.signup a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   APP SHELL & TOPBAR
   ========================================================================== */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark-wrapper {
  position: relative;
  width: 36px;
  height: 36px;
}

.brand-mark {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ttn-coral) 0%, var(--indigo) 100%);
  box-shadow: 0 8px 18px var(--ttn-coral-glow);
}

.brand-glow {
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--ttn-coral), var(--indigo));
  opacity: 0.4;
  filter: blur(6px);
  z-index: -1;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.badge-v {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--indigo-subtle);
  color: var(--indigo-dark);
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.brand-tag {
  margin: 2px 0 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-center {
  flex: 1;
  max-width: 440px;
}

.search-bar-mock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-bar-mock:hover {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-sm);
}

.search-bar-mock span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-bar-mock kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 6px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 4px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.autoplay-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--ttn-coral-subtle);
  color: var(--ttn-coral-dark);
  border: 1px solid rgba(255, 92, 53, 0.25);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 92, 53, 0.15);
}

.autoplay-topbar-btn.is-playing {
  background: var(--ttn-coral);
  color: #fff;
  box-shadow: 0 4px 14px var(--ttn-coral-glow);
}

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.ghost:hover {
  background: var(--bg-subtle);
}

.step-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--indigo-subtle);
  color: var(--indigo-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.step-chip.pop {
  animation: chipPulse 0.35s var(--ease-spring);
}

@keyframes chipPulse {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   WORKSPACE STAGE & NAVIGATION RAIL
   ========================================================================== */

.stage {
  padding: 22px 28px 36px;
  flex: 1;
}

.workspace {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  min-height: calc(100vh - 120px);
}

.rail {
  background: linear-gradient(180deg, #0B132B 0%, #111C44 60%, #0D163A 100%);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  color: #fff;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cube-wrapper {
  position: relative;
  width: 30px;
  height: 30px;
}

.cube {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ttn-coral), var(--indigo));
  box-shadow: 0 6px 14px var(--ttn-coral-glow);
}

.cube-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 11px;
  border: 1px solid var(--ttn-coral);
  opacity: 0.6;
  animation: cubePulse 2s infinite;
}

@keyframes cubePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.rail-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.rail-env {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.rail-section-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  margin: 18px 8px 8px;
}

.rail-nav {
  display: grid;
  gap: 6px;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  position: relative;
  transition: all 0.18s ease;
}

.rail-item svg {
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity 0.18s ease;
}

.rail-item span {
  flex: 1;
}

.rail-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.rail-item:hover svg {
  opacity: 1;
}

.rail-item.is-active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.28) 0%, rgba(99, 102, 241, 0.08) 100%);
  color: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.2);
}

.rail-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--ttn-coral);
  box-shadow: 0 0 8px var(--ttn-coral);
}

.rail-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

.rail-badge.highlight {
  background: rgba(255, 92, 53, 0.25);
  color: var(--ttn-coral-light);
}

.rail-pill-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.25);
  color: #A5B4FC;
}

.rail-count {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.rail-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rail-agent-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
}

.agent-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--emerald), #059669);
  display: grid;
  place-items: center;
  position: relative;
}

.agent-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px #fff;
}

.agent-title {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
}

.agent-meta {
  display: block;
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   CANVAS & VIEWS
   ========================================================================== */

.canvas {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-glass);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  padding: 24px 28px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.canvas-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.breadcrumb-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.breadcrumb-sep {
  opacity: 0.5;
}

.breadcrumb-active {
  color: var(--indigo);
  font-weight: 700;
}

.canvas-head h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.head-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--emerald-subtle);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-dot-sm {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  display: inline-block;
  margin-right: 4px;
}

.reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.reset:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.view {
  display: none;
}

.view.is-on {
  display: block;
  animation: viewFadeIn 0.35s var(--ease-out);
}

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

/* ==========================================================================
   VIEW 1: KPIS & AGENT ACTIVITY
   ========================================================================== */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.3);
}

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

.kpi-top p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-icon-badge {
  font-size: 1.1rem;
}

.kpi strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 8px;
}

.kpi-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
}

.kpi-trend {
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.kpi-trend.up {
  background: var(--emerald-subtle);
  color: #059669;
}

.kpi-trend.zero {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
}

.kpi-meta small {
  color: var(--text-muted);
}

.kpi-sparkline {
  margin-top: 14px;
  height: 24px;
  opacity: 0.85;
}

.kpi-sparkline svg {
  width: 100%;
  height: 100%;
}

.panel {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-pulse-ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px var(--emerald-subtle);
  animation: pulseDot 2s infinite;
}

.panel h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.panel-subtitle {
  margin: 2px 0 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.74rem;
  border-radius: 999px;
  font-weight: 700;
}

.badge.success {
  background: var(--emerald-subtle);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge.neutral {
  background: var(--indigo-subtle);
  color: var(--indigo-dark);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.dot-beacon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #F8FAFC, #F1F5F9);
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}

.activity-item.is-new {
  border-color: rgba(99, 102, 241, 0.3);
  background: linear-gradient(180deg, #F5F7FF, #EEF2FF);
  animation: activitySlide 0.4s var(--ease-out);
}

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

.activity-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
}

.activity-content {
  flex: 1;
}

.activity-title {
  margin: 0 0 2px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.activity-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.activity-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--emerald-subtle);
  color: #047857;
}

/* ==========================================================================
   VIEW 2: DEMAND FORECASTING STUDIO
   ========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  margin-top: 14px;
}

.form-grid label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-grid select,
.form-grid input,
.panel select,
.panel input {
  width: 100%;
  margin-top: 6px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #ffffff;
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.form-grid select:focus,
.panel select:focus,
.panel input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-subtle);
}

.run {
  grid-column: span 2;
  margin-top: 6px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--ttn-coral), #FF7243);
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 24px var(--ttn-coral-glow);
  position: relative;
  overflow: hidden;
}

.run-shine {
  position: absolute;
  top: -50%;
  left: -60%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(30deg);
  animation: btnShineSweep 3s infinite;
}

.run.is-ready {
  background: linear-gradient(135deg, var(--indigo), #4338CA);
  box-shadow: 0 10px 24px var(--indigo-glow);
}

.forecast-result-wrap {
  margin-top: 24px;
  padding: 20px;
  background: #ffffff;
  border: 1.5px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  animation: viewFadeIn 0.4s var(--ease-out);
}

.forecast-result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.forecast-badge-success {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #047857;
  background: var(--emerald-subtle);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.forecast-result-meta h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.forecast-stats {
  display: flex;
  gap: 20px;
}

.f-stat {
  text-align: right;
}

.f-stat span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.f-stat strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.text-green {
  color: #059669 !important;
}

.forecast-svg-chart {
  width: 100%;
  height: 180px;
  background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.forecast-animated-line {
  animation: dashWalk 20s linear infinite;
}

@keyframes dashWalk {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -400; }
}

.result {
  margin: 14px 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--indigo-dark);
  background: var(--indigo-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   VIEW 3: ROUTES & INTERACTIVE MAP
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
}

.dest {
  margin: 14px 0 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.dest-highlight {
  font-weight: 700;
  color: var(--indigo);
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 12px 0 16px;
}

.route-quick-stats {
  display: flex;
  gap: 16px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 0.8rem;
}

.r-stat span {
  color: var(--text-muted);
}

.r-stat strong {
  margin-left: 4px;
}

.optimize {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--indigo) 0%, #4338CA 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 12px 26px var(--indigo-glow);
  position: relative;
  overflow: hidden;
}

.opt-shine {
  position: absolute;
  top: -50%;
  left: -60%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(30deg);
  animation: btnShineSweep 3s infinite;
}

.map-panel {
  min-height: 100%;
}

.map {
  position: relative;
  width: 100%;
  min-height: 310px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1.5px solid var(--line-strong);
  background: linear-gradient(180deg, #F0F4F8 0%, #E2E8F0 100%);
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.route-vector {
  animation: dashWalk 15s linear infinite;
  opacity: 0.9;
}

.map-pin-wrap {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  z-index: 5;
}

.pin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1E293B;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.4);
  transition: all 0.2s ease;
}

.pin-radar {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--ttn-coral);
  animation: radarPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.pin.is-hub {
  background: var(--ttn-coral);
  width: 15px;
  height: 15px;
  box-shadow: 0 0 12px var(--ttn-coral);
}

.map-pin-wrap.is-origin .pin-radar {
  border-color: var(--ttn-coral);
  border-width: 2px;
}

.map-label {
  position: absolute;
  z-index: 6;
  font-size: 9px;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  pointer-events: none;
}

.is-hub-label {
  background: var(--ttn-coral);
  color: #fff;
  box-shadow: 0 4px 10px var(--ttn-coral-glow);
}

.label-west { top: 58%; left: 24%; }
.label-mid { top: 35%; left: 47%; }
.label-east { top: 29%; left: 66%; }
.label-south { top: 65%; left: 51%; }
.label-north { top: 39%; left: 58%; }
.label-hub { top: 54%; left: 49%; }

.map-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 12px 0 0;
}

/* ==========================================================================
   TTN.AI SIGNATURE OVERLAYS & ANIMATIONS
   ========================================================================== */

/* Dynamic Glowing Spotlight Cutout */
.spotlight {
  position: fixed;
  z-index: 60;
  border-radius: var(--radius-xl);
  border: 2.5px solid var(--ttn-coral);
  background: rgba(255, 92, 53, 0.08);
  box-shadow:
    0 0 0 4px rgba(255, 92, 53, 0.3),
    0 0 35px var(--ttn-coral-glow),
    0 0 0 9999px rgba(10, 18, 36, 0.68);
  opacity: 0;
  pointer-events: none;
  transition:
    top 0.45s var(--ease-smooth),
    left 0.45s var(--ease-smooth),
    width 0.45s var(--ease-smooth),
    height 0.45s var(--ease-smooth),
    border-radius 0.3s ease,
    opacity 0.25s ease;
}

.spotlight.is-on {
  opacity: 1;
}

.spotlight-border-glow {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  pointer-events: none;
  animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% { opacity: 0.4; }
  100% { opacity: 0.9; }
}

/* Spotlight Corner Brackets */
.spotlight-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #fff;
  border-style: solid;
  pointer-events: none;
}

.spotlight-corner.tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-top-left-radius: 8px; }
.spotlight-corner.tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-top-right-radius: 8px; }
.spotlight-corner.bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-bottom-left-radius: 8px; }
.spotlight-corner.br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-bottom-right-radius: 8px; }

/* Target Lit Element */
.is-lit {
  position: relative;
  z-index: 62 !important;
  animation: litElementGlow 2.5s infinite alternate var(--ease-out);
}

@keyframes litElementGlow {
  0% { filter: drop-shadow(0 0 0px rgba(255, 92, 53, 0)); }
  100% { filter: drop-shadow(0 6px 16px rgba(255, 92, 53, 0.25)); }
}

/* TTN Signature Radar Beacon */
.ttn-beacon {
  position: fixed;
  z-index: 70;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition:
    top 0.45s var(--ease-smooth),
    left 0.45s var(--ease-smooth),
    opacity 0.2s ease;
}

.beacon-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--ttn-coral);
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 14px var(--ttn-coral);
}

.beacon-sonar-1,
.beacon-sonar-2 {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--ttn-coral);
  animation: ttnSonar 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.beacon-sonar-2 {
  animation-delay: 0.65s;
}

@keyframes ttnSonar {
  0% { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* TTN Floating Action Hint Badge */
.ttn-badge {
  position: fixed;
  z-index: 72;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--ttn-coral), #FF7243);
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 20px var(--ttn-coral-glow), 0 2px 6px rgba(15, 23, 42, 0.2);
  pointer-events: none;
  transform: translate(-50%, -100%);
  animation: ttnBadgeFloat 2s ease-in-out infinite alternate;
  transition:
    top 0.45s var(--ease-smooth),
    left 0.45s var(--ease-smooth),
    opacity 0.2s ease;
}

@keyframes ttnBadgeFloat {
  0% { transform: translate(-50%, -115%); }
  100% { transform: translate(-50%, -95%); }
}

/* TTN Animated Cursor */
.ttn-cursor {
  position: fixed;
  z-index: 75;
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.35));
  transition:
    top 0.45s var(--ease-smooth),
    left 0.45s var(--ease-smooth),
    transform 0.15s ease,
    opacity 0.2s ease;
}

.ttn-cursor.is-clicking {
  animation: ttnClickTap 0.35s var(--ease-spring);
}

@keyframes ttnClickTap {
  0% { transform: scale(1); }
  40% { transform: scale(0.8) translate(-2px, -2px); }
  100% { transform: scale(1); }
}

/* TTN Dynamic Click Ripple */
.ttn-ripple-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 76;
}

.ttn-ripple {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--ttn-coral);
  transform: translate(-50%, -50%);
  animation: ripplePop 0.6s var(--ease-out) forwards;
}

@keyframes ripplePop {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

/* ==========================================================================
   TTN-STYLE FLOATING COACH / GUIDE CARD
   ========================================================================== */

.coach {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-coach);
  padding: 0 0 16px;
  z-index: 80;
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  transform-origin: bottom right;
  transition: box-shadow 0.2s ease;
}

.coach.is-dragging {
  cursor: grabbing;
  box-shadow: 0 35px 75px rgba(15, 23, 42, 0.3), 0 15px 30px var(--indigo-glow);
  transform: scale(1.02);
}

.coach.is-nudge {
  animation: coachNudge 0.3s var(--ease-spring);
}

@keyframes coachNudge {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.coach-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.coach-handle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
}

.coach-grip {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  box-shadow: 0 4px 0 var(--text-muted), 0 -4px 0 var(--text-muted);
}

.coach-speed-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--ttn-coral-subtle);
  color: var(--ttn-coral-dark);
  border: 1px solid rgba(255, 92, 53, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.coach-speed-btn.is-active {
  background: var(--ttn-coral);
  color: #fff;
}

.coach-progress {
  height: 4px;
  background: rgba(99, 102, 241, 0.1);
  overflow: hidden;
  position: relative;
}

.coach-progress-bar {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--ttn-coral), var(--indigo), var(--cyan));
  border-radius: 999px;
  position: relative;
  transition: width 0.35s var(--ease-out);
}

.progress-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: shimmerMove 2s infinite;
}

@keyframes shimmerMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.coach-copy {
  padding: 16px 22px 14px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.coach-copy.is-out {
  opacity: 0;
  transform: translateY(-6px);
}

.coach-copy.is-in {
  opacity: 1;
  transform: translateY(0);
}

.kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.coach-kicker {
  margin: 0;
  color: var(--ttn-coral);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.coach-step-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  background: var(--indigo-subtle);
  color: var(--indigo-dark);
  border-radius: 999px;
}

.coach-copy h2 {
  margin: 0 0 8px;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.25;
}

.coach-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 500;
}

.coach-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
}

.coach-nav .ghost {
  padding: 8px 14px;
}

.coach-nav .ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.16);
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  position: relative;
}

.dot:hover {
  background: var(--indigo);
  transform: scale(1.3);
}

.dot.is-on {
  width: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ttn-coral), var(--indigo));
  box-shadow: 0 2px 6px var(--ttn-coral-glow);
}

.primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--ttn-coral), #FF7243);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 8px 20px var(--ttn-coral-glow);
}

.primary:hover {
  background: linear-gradient(135deg, var(--ttn-coral-dark), var(--ttn-coral));
}

.next-arrow {
  transition: transform 0.2s ease;
}

.primary:hover .next-arrow {
  transform: translateX(3px);
}

.hint-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 22px 0;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.hint-key {
  padding: 2px 5px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.hint-sep {
  opacity: 0.4;
}

/* ==========================================================================
   CONFETTI CELEBRATION CANVAS
   ========================================================================== */

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split, .form-grid {
    grid-template-columns: 1fr;
  }

  .run {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .topbar-center {
    width: 100%;
    max-width: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .stage {
    padding: 14px 16px 28px;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .coach {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 12px;
  }
}
