/* ── CSS Variables ── */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --navbar-bg: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Navbar ── */
.navbar {
  background: var(--navbar-bg) !important;
  box-shadow: 0 2px 12px rgba(79, 70, 229, 0.25);
  padding: 0.6rem 0;
}
.navbar-brand { font-size: 1.15rem; letter-spacing: -0.3px; }

/* ── Main Content ── */
.main-content { min-height: calc(100vh - 64px); padding-bottom: 2rem; }

/* ── Stat Cards ── */
.stat-card { border-radius: 12px; transition: transform 0.15s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.bg-primary-soft { background: rgba(99, 102, 241, 0.12); }
.bg-success-soft { background: rgba(16, 185, 129, 0.12); }
.bg-warning-soft { background: rgba(245, 158, 11, 0.12); }
.bg-info-soft    { background: rgba(59, 130, 246, 0.12); }

/* ── KRA Cards ── */
.kra-header {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 8px 8px 0 0 !important;
}
.kra-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.25); font-size: 0.75rem; font-weight: 700;
}

/* ── Rating Badge ── */
.rating-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; border-radius: 8px;
  font-weight: 700; font-size: 0.95rem; border: 2px solid transparent;
}
.rating-0        { background: #f8fafc; color: #94a3b8; border-color: #e2e8f0; }
.rating-low      { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
.rating-below    { background: #fff7ed; color: #d97706; border-color: #fcd34d; }
.rating-meets    { background: #eff6ff; color: #2563eb; border-color: #93c5fd; }
.rating-exceeds  { background: #f5f3ff; color: #7c3aed; border-color: #c4b5fd; }
.rating-outstanding { background: #f0fdf4; color: #16a34a; border-color: #86efac; }

/* ── Range Slider ── */
.form-range {
  max-width: 160px;
  accent-color: var(--primary);
}

/* ── Login ── */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-wrapper { width: 100%; max-width: 440px; padding: 1rem; }
.login-card { border-radius: 16px; }
.login-icon {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: white;
}

/* ── Avatar ── */
.avatar-circle {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; flex-shrink: 0;
}

/* ── General Cards ── */
.card { border-radius: 12px; }
.card-header { border-radius: 12px 12px 0 0 !important; }

/* ── Tables ── */
.table th { font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }
.table td { font-size: 0.9rem; }

/* ── Responsive ── */
@media (max-width: 576px) {
  .form-range { max-width: 110px; }
}
