/* ===================================================================
   SCREEN 0: WELCOME & DEPARTMENT GATEWAY SCREEN STYLES
   =================================================================== */

.welcome-view {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  animation: fadeIn 0.3s ease-out;
}

.welcome-hero-banner {
  text-align: center;
  margin-bottom: 2rem;
}

.welcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-500);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.welcome-main-title {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.welcome-main-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.5;
}

.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.75rem;
  align-items: start;
}

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

.welcome-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  position: relative;
}

[data-theme="dark"] .welcome-box {
  box-shadow: 0 6px 25px -4px rgba(0, 0, 0, 0.4);
}

.box-step-badge {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary-600);
  border: 1px solid var(--primary-100);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .box-step-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.box-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.box-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.welcome-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.welcome-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.welcome-select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-medium);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.welcome-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.dept-preview-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.dept-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.dept-preview-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dept-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.dept-status-ready {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .dept-status-ready {
  color: #4ade80;
}

.dept-status-partial {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.dept-courses-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.dept-course-chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-secondary);
}

.dept-course-chip.active {
  background: var(--primary-50);
  border-color: var(--primary-100);
  color: var(--primary-700);
}

[data-theme="dark"] .dept-course-chip.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.dept-help-callout {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(59, 130, 246, 0.06);
  border: 1px dashed rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.dept-help-callout svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.dept-help-callout strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 2px;
}

/* Right Column: Mode Cards */
.mode-card {
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.mode-pro {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 1rem;
}

[data-theme="dark"] .mode-pro {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.12) 100%);
  border-color: rgba(245, 158, 11, 0.4);
}

.mode-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.pro-tag-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.mode-badge-wrap h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.mode-price-badge {
  background: var(--bg-secondary);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #d97706;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .mode-price-badge {
  color: #fbbf24;
}

.pro-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.15rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pro-features-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.pro-features-list li svg {
  width: 14px;
  height: 14px;
  stroke: #16a34a;
  stroke-width: 2.5;
  flex-shrink: 0;
}

.welcome-input-row {
  margin-bottom: 0.6rem;
}

.welcome-input-row-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.welcome-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  border: 1.5px solid var(--border-medium);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.welcome-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.btn-pro-submit {
  width: 100%;
  padding: 0.8rem 1.25rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
  transition: all 0.2s ease;
}

.btn-pro-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.4);
}

.welcome-mode-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1rem 0;
  color: var(--text-muted);
}

.welcome-mode-divider::before,
.welcome-mode-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.welcome-mode-divider span {
  padding: 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.mode-free {
  background: var(--bg-tertiary);
  border: 1.5px dashed var(--border-medium);
}

.mode-free-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 540px) {
  .mode-free-inner {
    flex-direction: column;
    align-items: stretch;
  }
}

.free-tag-badge {
  display: inline-block;
  background: var(--primary-100);
  color: var(--primary-700);
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

[data-theme="dark"] .free-tag-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.mode-free h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.mode-free p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.btn-free-submit {
  padding: 0.75rem 1.15rem;
  background: var(--bg-secondary);
  color: var(--primary-600);
  border: 1.5px solid var(--primary-500);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-free-submit:hover {
  background: var(--primary-500);
  color: #ffffff;
}

.welcome-alert {
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.welcome-alert.error {
  background: var(--danger-50);
  color: var(--danger-700);
  border: 1px solid var(--danger-100);
}

.welcome-alert.success {
  background: var(--success-50);
  color: var(--success-700);
  border: 1px solid var(--success-100);
}

[data-theme="dark"] .welcome-alert.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .welcome-alert.success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}


.welcome-select optgroup {
  background: var(--bg-secondary);
  color: #3b82f6;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.5rem 0.25rem 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-theme="dark"] .welcome-select optgroup {
  color: #60a5fa;
  background: #1e293b;
}

.welcome-select option {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
}

[data-theme="dark"] .welcome-select option {
  background: #0f172a;
  color: #f1f5f9;
}

/* Standalone AI flashcards card under the two welcome steps */
.welcome-fc-card {
  margin-top: 1.25rem;
}

.welcome-fc-text {
  text-align: left;
}

.welcome-fc-card h4 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 0.45rem;
}

.welcome-fc-card h4 .icon-svg-stroke {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--primary-600);
}
