/* Loan Default Predictor */

:root {
  --primary: #dc2626;
  --primary-light: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --surface: #ffffff;
  --surface-alt: #fef2f2;
  --on-surface: #1f2937;
  --on-surface-secondary: #6b7280;
  --radius-lg: 12px;
  --radius-md: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  min-height: 100vh;
  color: var(--on-surface);
}

.app-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 32px;
}

header h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 4px;
}

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

main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Form */
.form-section, .feature-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.form-section h2, .feature-section h2 {
  margin-bottom: 20px;
  color: var(--primary);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.input-group label {
  font-weight: 500;
  font-size: 0.9rem;
}

.input-group input[type="range"] {
  width: 100%;
}

/* Prediction Card */
.prediction-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid #e5e7eb;
}

.prediction-header {
  margin-bottom: 16px;
}

.prediction-header h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.probability {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary);
}

.recommendation {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.risk-bar {
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.risk-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  border-radius: 6px;
  transition: width 0.5s ease;
}

/* Feature Importance */
.feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.feature-name {
  font-weight: 500;
}

.feature-value {
  font-weight: 600;
  color: var(--primary);
}