/* ==========================================================================
   Tema: Nordic Frost (Clean Minimalist & Arctic Ice)
   Design ultra-clean, minimalista, fundo branco gelo puro, toques em azul ártico,
   sombras etéreas e tipografia nítida de alta legibilidade.
   ========================================================================== */

:root {
  /* Dynamic Palette Tokens */
  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-glow: rgba(2, 132, 199, 0.2);
  
  --accent-color: #0ea5e9;
  --accent-light: #f0f9ff;
  
  --success-color: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning-color: #f59e0b;
  --warning-bg: #fffbeb;
  
  --error-color: #ef4444;
  --error-bg: #fef2f2;
  --error-border: #fecaca;

  /* Nordic Frost Light Tokens */
  --bg-app: #f4f8fc;
  --bg-gradient: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 100%);
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-radius: 18px;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --input-bg: #f8fafc;
  --input-border: #cbd5e1;
  --input-focus-border: #0284c7;
  --input-text: #0f172a;
  --input-placeholder: #94a3b8;

  --timeline-line-bg: #e2e8f0;
  --timeline-node-bg: #ffffff;
  --timeline-node-text: #64748b;
  --timeline-active-glow: 0 4px 14px rgba(2, 132, 199, 0.3);

  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(2, 132, 199, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.06), 0 0 1px rgba(0, 0, 0, 0.04);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Body */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--bg-app);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Container Layout */
.app-wrapper {
  flex: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 8px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.app-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 6px;
}

.app-subtitle {
  color: #475569;
  font-size: 0.98rem;
  max-width: 580px;
  margin: 0 auto;
}

/* Main Wizard Card */
.wizard-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Stepper / Timeline */
.stepper-container {
  padding: 24px 32px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.stepper-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.stepper-step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.stepper-step-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0284c7;
}

.stepper-line {
  top: 18px;
  height: 2px;
  background: #e2e8f0;
}

.stepper-line-progress {
  background: #0284c7;
}

.node-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #64748b;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.step-node.active .node-circle {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: var(--timeline-active-glow);
  transform: scale(1.1);
}

.step-node.completed .node-circle {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.node-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
}

.step-node.active .node-label {
  color: #0284c7;
  font-weight: 700;
}

.step-node.completed .node-label {
  color: #334155;
}

/* Step Content Container */
.step-container {
  padding: 36px 36px 28px;
  background: #ffffff;
}

.step-counter {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0284c7;
  letter-spacing: 0.06em;
}

.step-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
}

.step-subtitle {
  color: #64748b;
  font-size: 0.92rem;
}

/* Forms & Inputs */
.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  outline: none;
  transition: all var(--transition-fast);
}

.form-select option {
  background: #ffffff;
  color: #0f172a;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-group.has-error .form-input,
.form-group.has-error .form-select {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.form-error {
  font-size: 0.78rem;
  color: #ef4444;
}

.form-helper {
  font-size: 0.78rem;
  color: #64748b;
}

/* Info Box / Tutorial Step */
.info-card-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 24px;
}

.info-headline {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0284c7;
}

.info-paragraph {
  color: #334155;
  font-size: 0.95rem;
}

.info-highlight-item {
  background: #ffffff;
  border: 1px solid #e0f2fe;
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  color: #0f172a;
}

/* Terms & Cards */
.terms-card-container,
.terms-summary-card,
.summary-card-group,
.category-summary-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-sm) !important;
}

.terms-accordion-item {
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  margin-bottom: 10px;
}

.terms-accordion-header {
  background: #f8fafc !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.custom-checkbox-box {
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
}

.custom-checkbox-input:checked + .custom-checkbox-box {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
  color: #0f172a;
}

/* Wizard Footer */
.wizard-footer {
  padding: 20px 36px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.draft-indicator {
  color: #64748b;
}

.draft-indicator.saved {
  color: #10b981;
}

/* Modal */
.modal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.modal-title {
  color: #0f172a;
  font-weight: 700;
}

.modal-footer {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* Completion Card */
.completion-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  color: #065f46;
}

.completion-title {
  color: #065f46 !important;
  font-weight: 700 !important;
}

/* Review Step Data Cards */
.review-field-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.review-field-label {
  color: #64748b;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.review-field-val {
  color: #0f172a;
  font-weight: 600;
}

/* Theme Switcher Bar Nordic Frost */
.theme-switcher-bar {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
}

.theme-switcher-label {
  color: #64748b !important;
}

.theme-btn-option {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}

.theme-btn-option:hover {
  background: #e0f2fe !important;
  color: #0284c7 !important;
}

.theme-btn-option.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3) !important;
}
