/* ==========================================================================
   COE MINNA APPLICANT PORTAL - MODERN UI/UX DESIGN SYSTEM
   ========================================================================== */

:root {
  --primary-color: #0d6e38;
  --primary-hover: #085228;
  --primary-light: #e8f5ed;
  --primary-glow: rgba(13, 110, 56, 0.2);
  --secondary-color: #f59e0b;
  --secondary-hover: #d97706;
  --secondary-light: #fef3c7;
  --dark-color: #0f172a;
  --dark-muted: #475569;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #10b981;
  --success-color: #10b981;
  --success-light: #d1fae5;
  --danger-color: #ef4444;
  --danger-light: #fee2e2;
  --info-color: #3b82f6;
  --info-light: #dbeafe;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--light-bg);
  color: var(--dark-color);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. AUTHENTICATION & LANDING PAGES (index, login, register)
   ========================================================================== */

.modern-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b4d27 0%, #0d6e38 50%, #15803d 100%);
  padding: 2.5rem 1rem;
  position: relative;
  overflow: hidden;
}

.modern-auth-wrapper::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.modern-auth-wrapper::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.modern-auth-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  max-width: 1050px;
  width: 100%;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-hero-banner {
  background: linear-gradient(160deg, #0a4f27 0%, #0d6e38 100%);
  color: white;
  padding: 3.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.auth-hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04' fill-rule='evenodd'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.8;
}

.auth-hero-content {
  position: relative;
  z-index: 2;
}

.auth-hero-banner .badge-pill-light {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fef3c7;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.auth-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fef08a;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.auth-form-side {
  padding: 3rem 2.5rem;
  background: #ffffff;
}

.auth-brand-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--primary-light);
  padding: 2px;
}

/* Modern Input Groups */
.modern-input-group {
  position: relative;
  margin-bottom: 1.35rem;
}

.modern-input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-muted);
  margin-bottom: 0.4rem;
  display: block;
}

.modern-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.modern-input-icon {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  font-size: 1.15rem;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 4;
}

.modern-form-control {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.95rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #f8fafc;
  color: var(--dark-color);
  transition: all 0.25s ease;
}

.modern-form-control:focus {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-glow);
  outline: none;
}

.modern-btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #15803d 100%);
  color: white !important;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: 0 4px 12px rgba(13, 110, 56, 0.25);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}

.modern-btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #166534 100%);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 110, 56, 0.35);
}

.modern-btn-secondary {
  background: #f1f5f9;
  color: var(--dark-muted) !important;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  width: 100%;
}

.modern-btn-secondary:hover {
  background: #e2e8f0;
  color: var(--dark-color) !important;
}

.modern-btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white !important;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  width: 100%;
}

.modern-btn-gold:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: white !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   2. MODERN PORTAL NAVBAR & HEADER
   ========================================================================== */

.modern-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.modern-topbar .navbar-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  text-decoration: none;
}

.modern-topbar .navbar-brand-wrapper img {
  height: 48px;
  width: 48px;
  object-fit: contain;
}

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

.modern-topbar .brand-text .title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-color);
  line-height: 1.2;
}

.modern-topbar .brand-text .subtitle {
  font-size: 0.75rem;
  color: var(--dark-muted);
  font-weight: 500;
}

.modern-user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--light-bg);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
}

.modern-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Modern Pill Navigation Menu */
.modern-subnav {
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

.modern-nav-pills {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.modern-nav-pills::-webkit-scrollbar {
  display: none;
}

.modern-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.modern-nav-link i {
  font-size: 1.1rem;
}

.modern-nav-link:hover {
  background: #e2e8f0;
  color: var(--dark-color);
}

.modern-nav-link.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ==========================================================================
   3. MODERN DASHBOARD COMPONENTS
   ========================================================================== */

.dashboard-hero-banner {
  background: linear-gradient(135deg, #0a4f27 0%, #0d6e38 70%, #15803d 100%);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  color: white;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.dashboard-hero-banner::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
}

.stat-card-modern {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card-modern:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.icon-emerald {
  background: var(--success-light);
  color: var(--success-color);
}

.icon-amber {
  background: var(--secondary-light);
  color: var(--secondary-hover);
}

.icon-rose {
  background: var(--danger-light);
  color: var(--danger-color);
}

.icon-blue {
  background: var(--info-light);
  color: var(--info-color);
}

.status-badge-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

.badge-unpaid {
  background: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-pending {
  background: var(--secondary-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Action Hub Card */
.action-hub-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}

.action-hub-header {
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.action-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s ease;
}

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

.action-item-row:hover {
  background-color: #f8fafc;
}

.action-item-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-item-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--light-bg);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 1px solid var(--border-color);
}

/* Data Tables Modern */
.modern-table-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.modern-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.modern-table thead th {
  background: #f8fafc;
  color: var(--dark-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.9rem 1.25rem;
  border-bottom: 1.5px solid var(--border-color);
}

.modern-table tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
}

.modern-table tbody tr:hover {
  background-color: #f8fafc;
}

/* ==========================================================================
   4. APPLICATION FORM STEP WIZARD
   ========================================================================== */

.form-wizard-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.wizard-steps-header {
  display: flex;
  background: #f8fafc;
  border-bottom: 1.5px solid var(--border-color);
  padding: 0;
  margin: 0;
  list-style: none;
  overflow-x: auto;
}

.wizard-step-item {
  flex: 1;
  min-width: 180px;
  padding: 1.15rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-right: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.wizard-step-item:last-child {
  border-right: none;
}

.wizard-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--dark-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.wizard-step-title {
  display: flex;
  flex-direction: column;
}

.wizard-step-title .step-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
}

.wizard-step-title .step-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-color);
}

.wizard-step-item.active {
  background: #ffffff;
}

.wizard-step-item.active .wizard-step-num {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.wizard-step-item.active .step-name {
  color: var(--primary-color);
}

.wizard-step-item.completed .wizard-step-num {
  background: var(--success-color);
  color: white;
}

.form-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-title i {
  color: var(--primary-color);
}

/* Modern Photo Upload Area */
.passport-upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  background: #f8fafc;
  transition: all 0.25s ease;
  cursor: pointer;
}

.passport-upload-box:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.passport-preview-img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 3px solid white;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   5. PRINT & INVOICE OPTIMIZATIONS
   ========================================================================== */

.modern-invoice-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 3rem;
  max-width: 850px;
  margin: 2rem auto;
}

@media print {
  body {
    background: #ffffff !important;
  }
  .modern-topbar,
  .modern-subnav,
  .no-print,
  footer {
    display: none !important;
  }
  .modern-invoice-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
}
