/* =========================================================
   AUTH / LOGIN & ONBOARDING WIZARD STYLES
   Supports Sign In and Universal Industry Selection Wizard.
   ========================================================= */

.ts-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ts-space-6);
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124,58,237,0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.12) 0%, transparent 50%),
    var(--ts-bg-base);
}

.ts-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--ts-bg-card);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius-xl);
  padding: var(--ts-space-8);
  box-shadow: var(--ts-shadow-md);
  transition: max-width var(--ts-transition-base);
}

.ts-auth-card.ts-auth-card-wide {
  max-width: 860px;
}

.ts-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--ts-space-6);
}

.ts-auth-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--ts-radius-md);
  background: var(--ts-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--ts-weight-bold);
  font-size: 24px;
  margin-bottom: var(--ts-space-3);
  box-shadow: var(--ts-shadow-glow);
}

.ts-auth-title { font-size: var(--ts-text-xl); font-weight: var(--ts-weight-bold); margin-bottom: var(--ts-space-1); }
.ts-auth-subtitle { font-size: var(--ts-text-sm); color: var(--ts-text-secondary); }

.ts-auth-form { display: flex; flex-direction: column; gap: var(--ts-space-5); }

.ts-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--ts-text-sm);
}

.ts-auth-checkbox { display: flex; align-items: center; gap: var(--ts-space-2); color: var(--ts-text-secondary); cursor: pointer; }
.ts-auth-link { color: var(--ts-purple); font-weight: var(--ts-weight-medium); cursor: pointer; text-decoration: none; }
.ts-auth-link:hover { text-decoration: underline; }

.ts-auth-divider {
  display: flex;
  align-items: center;
  gap: var(--ts-space-3);
  margin: var(--ts-space-6) 0;
  color: var(--ts-text-muted);
  font-size: var(--ts-text-xs);
}
.ts-auth-divider::before, .ts-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ts-border);
}

.ts-auth-footer {
  text-align: center;
  margin-top: var(--ts-space-6);
  font-size: var(--ts-text-sm);
  color: var(--ts-text-secondary);
}

.ts-auth-error {
  display: none;
  margin-bottom: var(--ts-space-5);
}
.ts-auth-error.ts-visible { display: flex; }

/* ---------------------------------------------------------
   WIZARD STEPPER & INDUSTRY CARDS GRID
   --------------------------------------------------------- */
.ts-wizard-steps {
  display: flex;
  justify-content: center;
  gap: var(--ts-space-4);
  margin-bottom: var(--ts-space-6);
}

.ts-wizard-step-dot {
  display: flex;
  align-items: center;
  gap: var(--ts-space-2);
  font-size: var(--ts-text-xs);
  color: var(--ts-text-muted);
  font-weight: var(--ts-weight-medium);
}
.ts-wizard-step-dot.active {
  color: var(--ts-primary);
  font-weight: var(--ts-weight-bold);
}
.ts-wizard-step-dot.completed {
  color: var(--ts-success);
}
.ts-wizard-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ts-bg-elevated);
  border: 1px solid var(--ts-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ts-wizard-step-dot.active .ts-wizard-step-num {
  background: var(--ts-gradient);
  color: white;
  border: none;
}
.ts-wizard-step-dot.completed .ts-wizard-step-num {
  background: var(--ts-success);
  color: white;
  border: none;
}

/* Industry Selection Grid */
.ts-industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--ts-space-4);
  margin: var(--ts-space-4) 0;
  max-height: 440px;
  overflow-y: auto;
  padding: 2px;
}

.ts-industry-card {
  position: relative;
  background: var(--ts-bg-elevated);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius-lg);
  padding: var(--ts-space-5);
  cursor: pointer;
  transition: all var(--ts-transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--ts-space-2);
}

.ts-industry-card:hover {
  border-color: var(--ts-border-strong);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.ts-industry-card.selected {
  border-color: var(--ts-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4), var(--ts-shadow-glow);
  background: rgba(99, 102, 241, 0.08);
}

.ts-ind-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ts-ind-card-icon {
  font-size: 28px;
}

.ts-ind-card-title {
  font-size: var(--ts-text-base);
  font-weight: var(--ts-weight-bold);
  color: var(--ts-text-primary);
}

.ts-ind-card-desc {
  font-size: var(--ts-text-xs);
  color: var(--ts-text-secondary);
  line-height: 1.4;
}

.ts-ind-card-badge {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: var(--ts-radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ts-text-muted);
  width: fit-content;
  margin-top: auto;
}

/* AI Setup Loading Animation */
.ts-setup-anim-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--ts-space-8) 0;
}

.ts-setup-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid var(--ts-border);
  border-top-color: var(--ts-primary);
  border-radius: 50%;
  animation: ts-spin 1s linear infinite;
  margin-bottom: var(--ts-space-6);
}

@keyframes ts-spin {
  to { transform: rotate(360deg); }
}

.ts-setup-progress-bar {
  width: 100%;
  max-width: 380px;
  height: 8px;
  background: var(--ts-bg-elevated);
  border-radius: var(--ts-radius-full);
  overflow: hidden;
  margin: var(--ts-space-4) 0;
  border: 1px solid var(--ts-border);
}

.ts-setup-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--ts-gradient);
  transition: width 0.4s ease;
}

.ts-setup-status-text {
  font-size: var(--ts-text-sm);
  color: var(--ts-text-secondary);
  min-height: 24px;
}