/* ============================================
   DESIGN SYSTEM - ProAccount Simulator
   Professional Finance / Light Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Core palette — clean finance */
  --bg-body: #f7f8fb;
  --bg-white: #ffffff;
  --bg-surface: #f1f3f8;
  --bg-elevated: #ffffff;
  --bg-hover: #f4f6fa;
  --bg-input: #f7f8fb;
  --bg-accent-soft: #eef0ff;

  --border-default: #e2e5ef;
  --border-light: #eef0f6;
  --border-focus: #4f56f1;
  --border-hover: #cdd1e0;

  --text-primary: #1a1d2e;
  --text-secondary: #5a6178;
  --text-muted: #8c93a8;
  --text-inverse: #ffffff;

  /* Accent colors */
  --accent-primary: #4f56f1;
  --accent-primary-hover: #3b42d4;
  --accent-primary-soft: #eef0ff;
  --accent-primary-glow: rgba(79, 86, 241, 0.12);

  --accent-success: #0d9668;
  --accent-success-soft: #e8f8f2;
  --accent-success-border: #b4e6d4;

  --accent-warning: #d4850a;
  --accent-warning-soft: #fef6e8;

  --accent-danger: #d64040;
  --accent-danger-soft: #fdeaea;

  --accent-cyan: #0891b2;
  --accent-cyan-soft: #e6f7fb;

  --accent-purple: #7c3aed;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.06), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(16, 24, 40, 0.08), 0 4px 8px -2px rgba(16, 24, 40, 0.04);
  --shadow-xl: 0 20px 40px -8px rgba(16, 24, 40, 0.12);
  --shadow-focus: 0 0 0 3px var(--accent-primary-glow);

  /* Transitions */
  --t-fast: 0.12s ease;
  --t-base: 0.2s ease;
  --t-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== CANVAS & BACKGROUND ===== */
#particles-canvas {
  display: none; /* Disabled for clean professional look */
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 280px;
  background: linear-gradient(180deg, var(--accent-primary-soft) 0%, var(--bg-body) 100%);
  z-index: 0;
  pointer-events: none;
}

/* ===== LAYOUT ===== */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  min-height: 100vh;
}

/* ===== HEADER ===== */
.app-header {
  text-align: center;
  padding: var(--sp-16) 0 var(--sp-10);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow-xs);
  animation: fadeInDown 0.5s ease;
  letter-spacing: 0.01em;
}

.header-badge .badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-success);
  border-radius: 50%;
  flex-shrink: 0;
}

.app-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--sp-3);
  color: var(--text-primary);
  animation: fadeInUp 0.5s ease 0.05s both;
}

.title-gradient {
  color: var(--accent-primary);
}

.app-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.65;
  animation: fadeInUp 0.5s ease 0.1s both;
}

.header-stats {
  display: flex;
  justify-content: center;
  gap: var(--sp-12);
  margin-top: var(--sp-8);
  animation: fadeInUp 0.5s ease 0.15s both;
}

.header-stat {
  text-align: center;
}

.header-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.header-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ===== STEPPER ===== */
.stepper {
  margin-bottom: var(--sp-8);
  animation: fadeInUp 0.5s ease 0.2s both;
}

.stepper-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  min-width: 100px;
}

.stepper-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--t-base);
  box-shadow: var(--shadow-xs);
}

.stepper-check {
  display: none;
}

.stepper-step.active .stepper-dot {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: white;
  box-shadow: var(--shadow-focus);
}

.stepper-step.completed .stepper-dot {
  border-color: var(--accent-success);
  background: var(--accent-success);
  color: white;
}

.stepper-step.completed .stepper-icon {
  display: none;
}

.stepper-step.completed .stepper-check {
  display: block;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.stepper-label {
  text-align: center;
}

.stepper-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--t-base);
}

.stepper-step.active .stepper-title {
  color: var(--text-primary);
}

.stepper-step.completed .stepper-title {
  color: var(--accent-success);
}

.stepper-subtitle {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.stepper-connector {
  width: 72px;
  height: 2px;
  background: var(--border-default);
  margin-top: 20px;
  border-radius: 1px;
  overflow: hidden;
  flex-shrink: 0;
}

.stepper-connector-fill {
  height: 100%;
  width: 0;
  background: var(--accent-success);
  transition: width var(--t-slow);
  border-radius: 1px;
}

/* ===== FORM PANELS ===== */
.form-panels {
  position: relative;
  min-height: 380px;
}

.form-panel {
  display: none;
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: var(--sp-10);
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.35s ease;
}

.form-panel.active {
  display: block;
}

.panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-primary);
}

.panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--accent-primary-soft);
  flex-shrink: 0;
}

.panel-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
}

.panel-desc {
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== FORM GRID ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  font-size: 0.6rem;
  color: var(--text-muted);
  cursor: help;
  position: relative;
  flex-shrink: 0;
  font-weight: 600;
}

.tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 400;
  white-space: normal;
  max-width: 260px;
  min-width: 180px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  line-height: 1.45;
}

/* ===== FORM INPUTS ===== */
.form-select,
.form-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  transition: all var(--t-fast);
  outline: none;
  appearance: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6178' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-select:focus,
.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
  background: var(--bg-white);
}

.form-select option {
  background: var(--bg-white);
  color: var(--text-primary);
}

.input-with-unit {
  display: flex;
  align-items: stretch;
}

.input-with-unit .form-input {
  border-radius: var(--r-md) 0 0 var(--r-md);
  border-right: none;
}

.input-unit {
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-left: none;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

/* ===== SLIDERS ===== */
.slider-group {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.form-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--accent-primary) 0%,
    var(--accent-primary) var(--range-progress, 0%),
    var(--border-default) var(--range-progress, 0%),
    var(--border-default) 100%
  );
  outline: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--accent-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: var(--shadow-focus);
}

.form-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--accent-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.slider-value {
  min-width: 44px;
  padding: var(--sp-1) var(--sp-2);
  background: var(--accent-primary-soft);
  border: 1px solid rgba(79, 86, 241, 0.15);
  border-radius: var(--r-sm);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-primary);
}

/* ===== TOGGLE CARDS ===== */
.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.toggle-group.triple {
  grid-template-columns: repeat(4, 1fr);
}

.toggle-card {
  cursor: pointer;
}

.toggle-card input {
  display: none;
}

.toggle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-3);
  background: var(--bg-white);
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-lg);
  text-align: center;
  transition: all var(--t-base);
}

.toggle-card input:checked + .toggle-content {
  border-color: var(--accent-primary);
  background: var(--accent-primary-soft);
  box-shadow: var(--shadow-focus);
}

.toggle-content:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.toggle-icon {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--bg-surface);
  margin-bottom: var(--sp-1);
}

.toggle-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.toggle-card input:checked + .toggle-content .toggle-icon {
  background: var(--accent-primary);
}

.toggle-card input:checked + .toggle-content .toggle-icon svg {
  color: white;
}

.toggle-label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.toggle-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ===== CHECKBOX CARDS ===== */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}

.checkbox-card {
  cursor: pointer;
}

.checkbox-card input {
  display: none;
}

.checkbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--bg-white);
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-lg);
  text-align: center;
  transition: all var(--t-base);
}

.checkbox-card input:checked + .checkbox-content {
  border-color: var(--accent-success);
  background: var(--accent-success-soft);
}

.checkbox-content:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.checkbox-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg-surface);
}

.checkbox-icon svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.checkbox-card input:checked + .checkbox-content .checkbox-icon {
  background: var(--accent-success);
}

.checkbox-card input:checked + .checkbox-content .checkbox-icon svg {
  color: white;
}

.checkbox-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== NAVIGATION BUTTONS ===== */
.form-navigation {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
  outline: none;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-secondary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-secondary:disabled:hover {
  background: var(--bg-white);
  color: var(--text-secondary);
}

.btn-accent {
  background: var(--accent-success);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
  background: #0b845c;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  padding: var(--sp-2) var(--sp-4);
  font-size: 0.82rem;
  border-radius: var(--r-sm);
}

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  gap: var(--sp-5);
  animation: fadeIn 0.3s ease;
}

.loading-spinner {
  width: 56px;
  height: 56px;
  position: relative;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2.5px solid transparent;
  border-radius: 50%;
}

.spinner-ring:nth-child(1) {
  border-top-color: var(--accent-primary);
  animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
  border-right-color: var(--accent-cyan);
  animation: spin 1.5s linear infinite reverse;
  width: 40px; height: 40px; top: 8px; left: 8px;
}

.spinner-ring:nth-child(3) {
  border-bottom-color: var(--accent-primary);
  animation: spin 2s linear infinite;
  width: 24px; height: 24px; top: 16px; left: 16px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.loading-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.loading-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.loading-progress {
  width: 200px;
  height: 3px;
  background: var(--border-default);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 2px;
  animation: loadingProgress 1.6s ease forwards;
}

@keyframes loadingProgress {
  0% { width: 0; }
  50% { width: 70%; }
  100% { width: 100%; }
}

/* ===== RESULTS SECTION ===== */
.results-section {
  animation: fadeInUp 0.4s ease;
}

.results-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.results-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  color: var(--text-primary);
}

.results-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--accent-primary-soft);
}

.results-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
}

.results-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.results-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

.summary-card.best {
  border-color: rgba(79, 86, 241, 0.25);
  background: linear-gradient(135deg, var(--accent-primary-soft), var(--bg-white));
}

.summary-card.cheapest {
  border-color: var(--accent-success-border);
  background: linear-gradient(135deg, var(--accent-success-soft), var(--bg-white));
}

.summary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  flex-shrink: 0;
}

.summary-card.best .summary-icon {
  background: var(--accent-primary);
  color: white;
}

.summary-card.cheapest .summary-icon {
  background: var(--accent-success);
  color: white;
}

.summary-icon svg {
  width: 20px;
  height: 20px;
}

.summary-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.summary-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.summary-value {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ===== RESULTS FILTERS ===== */
.results-filters {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}

.filter-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.sort-group {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sort-group select {
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  padding: var(--sp-1) var(--sp-3);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
}

/* ===== RESULT CARDS ===== */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

.result-card {
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  transition: all var(--t-base);
  position: relative;
  box-shadow: var(--shadow-xs);
  animation: fadeInUp 0.4s ease both;
}

.result-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.result-card-top:first-child {
  border-color: rgba(79, 86, 241, 0.2);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(79, 86, 241, 0.08);
}

.result-badge {
  position: absolute;
  top: -10px;
  right: var(--sp-6);
  padding: var(--sp-1) var(--sp-3);
  background: var(--accent-primary);
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.02em;
}

.result-badge.silver {
  background: #64748b;
}

.result-badge.bronze {
  background: #b45309;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}

.result-provider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.provider-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.provider-info {
  display: flex;
  flex-direction: column;
}

.provider-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.offer-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.type-badge {
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  letter-spacing: 0.02em;
}

.type-bank {
  background: var(--accent-success-soft);
  color: var(--accent-success);
  border: 1px solid var(--accent-success-border);
}

.type-neobank {
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  border: 1px solid rgba(79, 86, 241, 0.2);
}

.type-baas {
  background: #f3eeff;
  color: var(--accent-purple);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.result-type {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-1);
}

.type-baas-provider {
  background: #fef3e2;
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.2);
  font-size: 0.65rem;
  font-weight: 500;
  font-style: italic;
}

/* ===== SCORE & COST SECTION ===== */
.result-scores {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin-bottom: var(--sp-5);
  padding: var(--sp-5);
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
}

.score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.score-ring {
  width: 68px;
  height: 68px;
  position: relative;
}

.score-ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.score-ring-bg {
  fill: none;
  stroke: var(--border-default);
  stroke-width: 3;
}

.score-ring-fill {
  fill: none;
  stroke: var(--score-color, var(--accent-primary));
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 0, 100;
  transition: stroke-dasharray 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-ring.animated .score-ring-fill {
  stroke-dasharray: attr(stroke-dasharray);
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.score-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.score-grade {
  font-size: 0.75rem;
  font-weight: 600;
}

.cost-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cost-amount {
  font-size: 1.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.cost-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.cost-rank {
  font-size: 0.7rem;
  color: var(--accent-primary);
  font-weight: 600;
}

/* ===== FEATURES ===== */
.result-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.feature-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-surface);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.feature-icon svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.feature-icon.yes svg { color: var(--accent-success); }
.feature-icon.no svg { color: var(--accent-danger); }

/* ===== TAGS ===== */
.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.tag {
  padding: 2px var(--sp-2);
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tag-yes {
  background: var(--accent-success-soft);
  color: var(--accent-success);
  border: 1px solid var(--accent-success-border);
}

.tag-no {
  background: var(--accent-danger-soft);
  color: var(--accent-danger);
  border: 1px solid rgba(214, 64, 64, 0.15);
}

/* ===== EXPANDABLE DETAILS ===== */
.btn-expand {
  width: 100%;
  justify-content: center;
}

.expand-icon {
  font-size: 0.65rem;
  transition: transform var(--t-fast);
  margin-left: var(--sp-1);
}

.result-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  padding: 0;
}

.result-details.open {
  max-height: 600px;
  padding: var(--sp-5) 0 0;
}

.result-details h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: var(--sp-3);
  margin-top: var(--sp-4);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-details h4:first-child {
  margin-top: 0;
}

.cost-breakdown {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: var(--sp-4);
}

.cost-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-2) 0;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border-light);
}

.cost-line:last-child {
  border-bottom: none;
}

.cost-line-label {
  color: var(--text-secondary);
}

.cost-line-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.82rem;
}

.cost-line-amount.fixed { color: var(--accent-warning); }
.cost-line-amount.variable { color: var(--accent-cyan); }

.cost-total {
  border-top: 2px solid var(--border-default);
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
}

.cost-total .cost-line-label {
  color: var(--text-primary);
  font-weight: 700;
}

.cost-total .cost-line-amount {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.score-details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.score-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
}

.score-detail.penalty {
  background: var(--accent-danger-soft);
  color: var(--accent-danger);
}

.score-detail.bonus {
  background: var(--accent-success-soft);
  color: var(--accent-success);
}

.score-points {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
}

/* ===== RESULTS ACTIONS ===== */
.results-actions {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-10);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--border-default);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform var(--t-base);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-success { border-color: var(--accent-success-border); }
.toast-error { border-color: rgba(214, 64, 64, 0.3); }
.toast-info { border-color: rgba(79, 86, 241, 0.3); }

.toast-icon {
  display: flex;
  align-items: center;
}

.toast-icon svg {
  width: 18px;
  height: 18px;
}

.toast-success .toast-icon svg { color: var(--accent-success); }
.toast-error .toast-icon svg { color: var(--accent-danger); }
.toast-info .toast-icon svg { color: var(--accent-primary); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

.slide-out-left {
  animation: slideOutL 0.25s ease forwards;
}

.slide-in-right {
  animation: slideInR 0.25s ease forwards;
}

.slide-out-right {
  animation: slideOutR 0.25s ease forwards;
}

.slide-in-left {
  animation: slideInL 0.25s ease forwards;
}

@keyframes slideOutL { to { opacity: 0; transform: translateX(-30px); } }
@keyframes slideInR { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutR { to { opacity: 0; transform: translateX(30px); } }
@keyframes slideInL { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }

.animate-on-scroll { opacity: 0; transform: translateY(12px); transition: all 0.4s ease; }
.animate-on-scroll.animate-in { opacity: 1; transform: translateY(0); }

.filter-in { animation: filterIn 0.25s ease forwards; }
.filter-out { animation: filterOut 0.25s ease forwards; }

@keyframes filterIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
@keyframes filterOut { to { opacity: 0; transform: scale(0.97); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .app-container { padding: 0 var(--sp-4); }
  .app-header { padding: var(--sp-10) 0 var(--sp-6); }
  .header-stats { gap: var(--sp-6); }
  .stepper-track { overflow-x: auto; justify-content: flex-start; }
  .stepper-connector { width: 36px; }
  .stepper-title, .stepper-subtitle { display: none; }
  .form-panel { padding: var(--sp-5); }
  .form-grid { grid-template-columns: 1fr; }
  .toggle-group, .toggle-group.triple { grid-template-columns: 1fr 1fr; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .results-summary { grid-template-columns: 1fr; }
  .result-scores { flex-direction: column; gap: var(--sp-4); }
  .result-features { grid-template-columns: 1fr; }
  .result-header { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
  .results-actions { flex-direction: column; align-items: center; }
  .sort-group { margin-left: 0; width: 100%; }
}

@media (max-width: 480px) {
  .toggle-group.triple { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
}

/* ===== PRINT ===== */
@media print {
  .bg-gradient { display: none; }
  .app-container { max-width: 100%; }
  .result-card { break-inside: avoid; border: 1px solid #ddd; box-shadow: none; }
  .btn, .results-filters, .results-actions, .form-navigation { display: none; }
  .result-details { max-height: none !important; padding: 16px 0 !important; }
}

/* ===== SEO CONTENT SECTION ===== */
.seo-section {
  max-width: 720px;
  margin: 0 auto var(--sp-8);
  padding: var(--sp-6) var(--sp-8);
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
}

.seo-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
  text-align: center;
}

.seo-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-3);
}

.seo-text:last-child {
  margin-bottom: 0;
}

.seo-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .seo-section {
    padding: var(--sp-4) var(--sp-5);
  }
}

/* ===== FOOTER ===== */
.app-footer {
  text-align: center;
  padding: var(--sp-12) 0 var(--sp-8);
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.7;
}

.app-footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.app-footer a:hover {
  text-decoration: underline;
}
