/* TCA Membership Application - Modern Gen Z Design */

:root {
  /* Modern Ethiopian-inspired color palette */
  --tca-primary: #16a34a;
  --tca-primary-dark: #15803d;
  --tca-secondary: #eab308;
  --tca-accent: #dc2626;
  --tca-dark: #0f172a;
  --tca-light: #f8fafc;
  --tca-success: #22c55e;
  --tca-gradient-1: linear-gradient(135deg, #16a34a 0%, #059669 100%);
  --tca-gradient-2: linear-gradient(135deg, #eab308 0%, #f59e0b 100%);
  --tca-gradient-3: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --tca-gradient-hero: linear-gradient(135deg, #0f172a 0%, #16a34a 50%, #0f172a 100%);

  /* Modern spacing and effects */
  --border-radius-sm: 12px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.2);
}

/* Dark mode variables */
[data-theme="dark"] {
  --tca-dark: #f8fafc;
  --tca-light: #0f172a;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --glass-bg: rgba(30, 41, 59, 0.8);
  --glass-border: rgba(71, 85, 105, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Light mode variables (default) */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
}

* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  background: var(--bg-secondary);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="light"] body {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Modern primary button with gradient and hover effects */
.btn-primary {
  background: var(--tca-gradient-1);
  border: none;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
  background: var(--tca-gradient-1);
}

.btn-outline-primary {
  border: 2px solid var(--tca-primary);
  color: var(--tca-primary);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius-sm);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--tca-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
}

/* Modern hero section with animated gradient background */
.hero-section {
  background: var(--tca-gradient-hero);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.15) 0%, transparent 70%);
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(5deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(-5deg);
  }
}

/* Glassmorphism card design */
.hero-card,
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 10;
  color: var(--text-primary);
}

[data-theme="dark"] .glass-card {
  border: 1px solid rgba(71, 85, 105, 0.4);
}

/* Enhanced cards with modern shadows and hover effects */
.card {
  border: none;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Modern form styling with better focus states */
.form-control,
.form-select {
  border: 2px solid black;
  border-radius: var(--border-radius-sm);
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: var(--bg-card);
  color: var(--text-primary);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .form-control::placeholder {
  color: #64748b;
}

.form-label,
.modern-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group-text {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-right: none;
  color: #64748b;
}

.input-group > .form-control {
  border-left: none;
}

.input-group:focus-within .input-group-text {
  border-color: var(--tca-primary);
  background: rgba(22, 163, 74, 0.05);
  color: var(--tca-primary);
}

/* Modern multi-step progress indicator */
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  border: 3px solid #e2e8f0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.step-item.active .step-number {
  background: var(--tca-gradient-1);
  border-color: var(--tca-primary);
  color: white;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
  transform: scale(1.1);
}

.step-item.completed .step-number {
  background: var(--tca-success);
  border-color: var(--tca-success);
  color: white;
}

.step-item.completed .step-number::after {
  content: "✓";
  position: absolute;
  font-size: 1.5rem;
}

.step-label {
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
  font-weight: 600;
}

.step-item.active .step-label {
  color: var(--tca-primary);
}

.step-line {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  position: relative;
  top: -42px;
  margin: 0 -15px;
  z-index: 1;
  border-radius: 4px;
}

.step-line.active,
.step-line.completed {
  background: var(--tca-gradient-1);
}

/* Modern navbar with glass effect */
.navbar-dark {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Modern sidebar with better spacing */
.sidebar {
  min-height: calc(100vh - 64px);
  background: white;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 0;
}

.sidebar .nav-link {
  color: #64748b;
  padding: 0.875rem 1.5rem;
  margin: 0.25rem 1rem;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
}

.sidebar .nav-link:hover {
  background: #f8fafc;
  color: var(--tca-primary);
  transform: translateX(4px);
}

.sidebar .nav-link.active {
  background: var(--tca-gradient-1);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.sidebar .nav-link i {
  width: 24px;
  font-size: 1.1rem;
}

/* Modern gradient icon boxes */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Modern notification design */
.notification-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.notification-item {
  padding: 1rem;
  border-radius: var(--border-radius-sm);
}

.notification-item:hover {
  background: #f8fafc;
}

/* Modern badge design */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

.badge.bg-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}

.badge.bg-warning {
  background: linear-gradient(135deg, #eab308 0%, #f59e0b 100%) !important;
  color: white !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.badge.bg-primary {
  background: var(--tca-gradient-1) !important;
}

/* Modern table styling */
.table {
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.table thead th {
  border: none;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 1rem;
}

.table tbody tr {
  background: white;
  box-shadow: var(--shadow-sm);
  border-radius: var(--border-radius-sm);
}

.table tbody td {
  border: none;
  padding: 1rem;
  vertical-align: middle;
}

.table tbody tr:first-child td:first-child {
  border-top-left-radius: var(--border-radius-sm);
}

.table tbody tr:first-child td:last-child {
  border-top-right-radius: var(--border-radius-sm);
}

.table-hover tbody tr:hover {
  background: #f8fafc;
  transform: scale(1.01);
  box-shadow: var(--shadow-md);
}

/* Modern alert styling */
.alert {
  border: none;
  border-radius: var(--border-radius-md);
  padding: 1rem 1.25rem;
  border-left: 4px solid;
  background-color: white;
}

.alert-success {
  background: white;
  border-left-color: var(--tca-success);
  color: #15803d;
}

.alert-warning {
  background: white;
  border-left-color: #eab308;
  color: #a16207;
}

.alert-danger {
  background: white;
  border-left-color: #ef4444;
  color: #991b1b;
}

.alert-info {
  background: white;
  border-left-color: #3b82f6;
  color: #1e40af;
}

.alert button {
  display: none;
}

/* Modern gradient backgrounds for stats cards */
.bg-gradient-primary {
  background: var(--tca-gradient-1) !important;
}

.bg-gradient-secondary {
  background: var(--tca-gradient-2) !important;
}

.bg-gradient-purple {
  background: var(--tca-gradient-3) !important;
}

/* Modern document upload area */
.document-item {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.document-item:hover {
  background: #f8fafc;
  border-color: var(--tca-primary);
  box-shadow: var(--shadow-sm);
}

/* Modern profile avatar */
.profile-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  background: var(--tca-gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  font-weight: 700;
  margin: 0 auto;
}

/* Modern text colors and utilities */
.text-warning {
  color: #eab308 !important;
}

.text-gradient {
  background: var(--tca-gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Modern scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--tca-primary) 0%, var(--tca-primary-dark) 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tca-primary-dark);
}

/* Modern loading spinner */
.spinner-border {
  border-width: 3px;
}

/* Modern responsive utilities */
@media (max-width: 768px) {
  .step-label {
    font-size: 0.75rem;
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  .step-line {
    top: -35px;
  }

  .sidebar {
    position: fixed;
    top: 64px;
    left: -100%;
    z-index: 1000;
    width: 280px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.show {
    left: 0;
  }
}

/* Print styles */
@media print {
  nav,
  .sidebar,
  .btn,
  .alert {
    display: none !important;
  }

  .card {
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
  }
}

/* Utility animations */
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slideInUp 0.5s ease-out;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Modern Background Gradient */
.modern-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.modern-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(circle at 20% 20%, rgba(22, 163, 74, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(234, 179, 8, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

/* Glass Navigation Bar */
.glass-nav {
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Modern Glass Card */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.glass-card-light {
  background: rgba(248, 250, 252, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.5);
  border-radius: var(--border-radius-md);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

/* Modern Step Progress */
.step-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.step-progress .step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  z-index: 2;
}

.step-progress .step-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: white;
  border: 3px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-progress .step-number {
  font-weight: 700;
  font-size: 1.25rem;
  color: #94a3b8;
  transition: all 0.3s ease;
}

.step-progress .step-check {
  display: none;
  font-size: 1.5rem;
  color: white;
}

.step-progress .step-item.active .step-circle {
  background: var(--tca-gradient-1);
  border-color: var(--tca-primary);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
  transform: scale(1.1);
}

.step-progress .step-item.active .step-number {
  color: white;
}

.step-progress .step-item.completed .step-circle {
  background: var(--tca-success);
  border-color: var(--tca-success);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.step-progress .step-item.completed .step-number {
  display: none;
}

.step-progress .step-item.completed .step-check {
  display: block;
}

.step-progress .step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
}

.step-progress .step-item.active .step-label {
  color: var(--tca-primary);
}

.step-progress .step-line {
  flex: 1;
  height: 3px;
  background: #e2e8f0;
  position: relative;
  margin: 0 12px;
  margin-top: -35px;
  border-radius: 3px;
  z-index: 1;
  transition: all 0.4s ease;
}

.step-progress .step-line.active,
.step-progress .step-line.completed {
  background: var(--tca-gradient-1);
}

/* Modern OTP Input Boxes */
.otp-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  max-width: 420px;
  margin: 0 auto;
}

.otp-input {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  border: 3px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  background: white;
  color: var(--tca-dark);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.otp-input:focus {
  border-color: var(--tca-primary);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
  transform: scale(1.05);
  background: rgba(22, 163, 74, 0.02);
}

.otp-input.filled {
  border-color: var(--tca-success);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.05) 0%, rgba(34, 197, 94, 0.02) 100%);
  color: var(--tca-success);
}

.otp-input:disabled {
  background: #f1f5f9;
  cursor: not-allowed;
}

/* Modern Icon Circle */
.icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--tca-gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 12px 32px rgba(22, 163, 74, 0.3);
}
