:root {
  --brand-primary: #4f46e5;
  --brand-secondary: #0ea5e9;
  --brand-dark: #1e1b4b;
  --brand-light: #f5f7ff;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--brand-light);
  color: #1f2333;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: 'Poppins', sans-serif;
}

/* Navbar */
.app-navbar {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary));
}

.app-navbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
  color: #fff;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 55%, var(--brand-secondary) 100%);
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
}

.hero-sub {
  max-width: 640px;
  opacity: 0.92;
  font-size: 1.05rem;
}

/* Main */
.app-main {
  padding-top: 2rem;
  padding-bottom: 3rem;
  min-height: 55vh;
}

.search-card {
  max-width: 900px;
  border: none;
  border-radius: 1rem;
  margin-top: -3.5rem;
  position: relative;
  z-index: 2;
}

.search-card .btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.search-card .btn-primary:hover {
  background-color: #4338ca;
  border-color: #4338ca;
}

.result-card {
  border: none;
  border-radius: 0.9rem;
}

.rank-card .rank-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  color: var(--brand-primary);
  line-height: 1;
}

.reasons-list .reason-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eef0f5;
}

.reasons-list .reason-item:last-child {
  border-bottom: none;
}

.reasons-list .reason-factor {
  font-weight: 600;
  color: var(--brand-dark);
}

#checklist .list-group-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border-left: none;
  border-right: none;
}

.priority-badge {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.priority-high { background-color: #fee2e2; color: #b91c1c; }
.priority-medium { background-color: #fef3c7; color: #92400e; }
.priority-low { background-color: #dcfce7; color: #15803d; }

#resultsTable thead {
  background-color: #f8f9fc;
}

#resultsTable tbody tr.is-me {
  background-color: #eef2ff;
  font-weight: 600;
}

.history-item-title {
  font-weight: 600;
  color: var(--brand-dark);
}

.app-view {
  animation: fadeIn 0.25s ease-in-out;
}

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

@media (max-width: 576px) {
  .search-card {
    margin-top: -2rem;
  }
  .rank-card .rank-number {
    font-size: 2.25rem;
  }
}
