/* ==========================================================================
   NYOTA Project - Kenya National Youth Opportunities Towards Advancement
   Modern Vanilla CSS Design System
   ========================================================================== */

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

:root {
  /* Brand Palette */
  --primary-color: #0a540e;         /* Deep NYOTA Green */
  --primary-hover: #073d0a;
  --primary-light: #e8f5e9;
  --accent-gold: #f59e0b;           /* Warm Gold / Sun Yellow */
  --accent-gold-hover: #d97706;
  --dark-bg: #0d1f22;
  --surface-color: #ffffff;
  --body-bg: #f4f6f8;
  
  /* Text Colors */
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  /* System / Status */
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #ef4444;
  --border-color: #e2e8f0;
  
  /* Shadow & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 14px rgba(10, 84, 14, 0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --transition: all 0.25s ease;
}

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

body {
  font-family: 'Kumbh Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.top-bar {
  background-color: var(--primary-color);
  color: var(--text-white);
  padding: 8px 24px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--accent-gold);
}

.top-bar-info {
  display: flex;
  gap: 20px;
}

.top-bar-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-header {
  background: var(--surface-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-badge {
  background: var(--primary-color);
  color: var(--accent-gold);
  font-weight: 800;
  font-size: 1.25rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.nav-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.nav-btn.btn-primary {
  background: var(--primary-color);
  color: var(--text-white);
  border-color: var(--primary-color);
}

.nav-btn.btn-primary:hover {
  background: var(--primary-hover);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-light);
  padding: 4px 12px 4px 4px;
  border-radius: 30px;
}

.avatar {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ==========================================================================
   Main Layout & Container View Management
   ========================================================================== */

main.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 30px auto;
  padding: 0 24px;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease-in-out forwards;
}

.view-section.active {
  display: block;
}

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

/* ==========================================================================
   Card Layouts & Form Elements
   ========================================================================== */

.auth-card {
  max-width: 480px;
  margin: 40px auto;
  background: var(--surface-color);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h2 {
  color: var(--primary-color);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: #fafafa;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--surface-color);
  box-shadow: 0 0 0 3px rgba(10, 84, 14, 0.12);
}

.btn-full {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

.btn-full:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
}

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

/* ==========================================================================
   Multi-Step Application Portal
   ========================================================================== */

.app-portal-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
  border: 1px solid var(--border-color);
}

.portal-header {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.portal-header h2 {
  color: var(--primary-color);
  font-size: 1.75rem;
  font-weight: 700;
}

.portal-header p {
  color: var(--text-muted);
}

/* Step Wizard Progress Bar */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 36px;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-color);
  z-index: 1;
}

.wizard-step {
  position: relative;
  z-index: 2;
  background: var(--surface-color);
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: var(--transition);
}

.wizard-step.active .step-num {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.wizard-step.completed .step-num {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: white;
}

.step-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.wizard-step.active .step-title {
  color: var(--primary-color);
  font-weight: 700;
}

/* Pathway Cards Selection */
.pathway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.pathway-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  background: #fafafa;
}

.pathway-card:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.pathway-card.selected {
  border-color: var(--primary-color);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-color);
}

.pathway-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.pathway-card h4 {
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.pathway-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Wizard Navigation Controls */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text-main);
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

/* ==========================================================================
   Applicant Dashboard View
   ========================================================================== */

.dashboard-header {
  background: linear-gradient(135deg, var(--primary-color), #073d0a);
  color: white;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.dashboard-header p {
  opacity: 0.9;
  font-size: 0.9rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface-color);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-color);
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-badge.submitted {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.approved {
  background: var(--success-bg);
  color: #065f46;
}

.status-badge.review {
  background: var(--warning-bg);
  color: #92400e;
}

/* Application Summary Card */
.summary-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 15px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.9rem;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  color: var(--text-muted);
}

.summary-val {
  font-weight: 600;
  color: var(--text-main);
}

/* Alert Notification */
.alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.88rem;
  display: none;
}

.alert-box.show {
  display: block;
}

.alert-success {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: var(--text-light);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
  margin-top: auto;
}

footer a {
  color: var(--accent-gold);
  text-decoration: none;
}

/* Responsive adjust */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .nav-container { flex-direction: column; gap: 12px; }
  .wizard-steps { flex-direction: column; gap: 12px; }
  .wizard-steps::before { display: none; }
}
