/* CedCast Custom Styles */

:root {
  /* Ghana-inspired brand tokens (use sparingly) */
  --primary-color: #006B3F; /* Ghana green */
  --accent-color: #FF6B35;  /* warm accent */
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #0dcaf0;
  --light-bg: #f8f9f9;
  --dark-text: #212529;
  --border-radius: 10px;
  /* Softer, modern shadows */
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.08);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--light-bg);
  color: var(--dark-text);
  line-height: 1.6;
}

/* Organization Admin Pages */
.org-admin-page {
  background: var(--light-bg);
  min-height: calc(100vh - 76px);
}

/* Navbar improvements */
.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar-brand img {
  filter: brightness(0) invert(1);
}

/* Card improvements */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-header {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
  border: none;
  font-weight: 600;
}

/* Button improvements */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  border: none;
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #157347);
  border: none;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #e0a800);
  border: none;
  color: #212529;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color), #bb2d3b);
  border: none;
}

/* Form improvements */
.form-control, .form-select {
  border-radius: 6px;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Table improvements */
.btn {
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border: none;
}
.btn-outline-light {
  border: 1px solid rgba(255,255,255,0.18);
}
.badge {
  font-weight: 500;
  border-radius: 20px;
  padding: 0.35em 0.65em;
}

/* Alert improvements */
.alert {
  border-radius: var(--border-radius);
  border: none;
}

/* Avatar improvements */
.avatar {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  font-weight: 600;
}

/* Dashboard specific styles */
.dashboard-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.metric-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
}

.metric-card .metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.metric-card .metric-label {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 500;
}

/* Quick action buttons */
.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
}

.quick-action-btn:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.quick-action-btn.primary {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.quick-action-btn.success {
  background: linear-gradient(135deg, var(--success-color), #157347);
}

.quick-action-btn.info {
  background: linear-gradient(135deg, var(--info-color), #0aa2c0);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .dashboard-card {
    padding: 1rem;
  }

  .metric-card {
    padding: 1rem;
  }

  .metric-card .metric-value {
    font-size: 2rem;
  }

  /* Mobile-friendly containers */
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Better spacing for mobile */
  .org-admin-page {
    padding-top: 0;
  }

  /* Card spacing on mobile */
  .card {
    margin-bottom: 1rem;
  }

  /* Button sizing for mobile */
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  /* Form controls on mobile */
  .form-control, .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.5rem;
  }

  /* Table responsiveness */
  .table-responsive {
    font-size: 0.875rem;
  }

  /* Modal improvements for mobile */
  .modal-dialog {
    margin: 0.5rem;
  }

  /* Alert positioning on mobile */
  .alert {
    margin-bottom: 1rem;
  }

  /* Badge sizing */
  .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }
}

/* Loading animation */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-right-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Glassmorphism Effects */
.glassmorphism-card {
  /* gentler glass effect for legibility */
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.glassmorphism-card:hover {
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

/* Gradient Backgrounds */
.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* Modern Logo */
.logo-container {
  position: relative;
}

.logo-svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Hero logo sizing: keep large and consistent on mobile and desktop */
.cedcast-hero-logo {
  width: 260px; /* larger, consistent size on desktop and mobile */
  height: auto;
  max-width: none;
  display: block;
  margin: 0 auto 1rem;
}

/* Modern Avatar */
.avatar-modern {
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

/* Hero Section */
.hero-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.04);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
}

.hero-stats {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-cta .btn {
  background: rgba(255, 255, 255, 0.95);
  color: #667eea;
  border: none;
  transition: all 0.3s ease;
}

.hero-cta .btn:hover {
  background: white;
  color: #5a67d8;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Modern Metric Cards */
.metric-card-modern {
  background: linear-gradient(180deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.06));
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 14px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}

.metric-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.metric-card-modern:hover::before {
  transform: translateX(100%);
}

.metric-card-modern:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.metric-icon {
  opacity: 0.9;
}

.metric-trend {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Action Cards */
.action-card {
  background: #fff;
  color: var(--dark-text);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.action-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.action-icon {
  opacity: 0.8;
  transition: all 0.3s ease;
}

.action-card:hover .action-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* Modern Table */
.table-hover-modern {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
}

.table-hover-modern thead th {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  font-weight: 600;
  padding: 1rem;
}

.table-hover-modern tbody tr {
  background: rgba(255, 255, 255, 0.02);
  border: none;
  transition: all 0.2s ease;
}

.table-hover-modern tbody tr:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.01);
}

.table-row-hover {
  transition: all 0.2s ease;
}

.table-row-hover:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Organization Avatar */
.org-avatar {
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

/* Modern Badges */
.badge-modern {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
}

/* Status Items */
.status-item {
  transition: all 0.3s ease;
}

.status-item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: translateX(4px);
}

/* Quick Stats */
.quick-stat-item {
  transition: all 0.2s ease;
}

.quick-stat-item:hover {
  transform: translateX(2px);
}

/* Empty State */
.empty-state-icon {
  opacity: 0.3;
}

/* Super Admin specific mobile styles */
@media (max-width: 768px) {
  /* Super admin dashboard cards */
  .super-admin-page .card {
    margin-bottom: 1rem;
  }

  /* Stats cards */
  .super-admin-page .col-xl-3 {
    margin-bottom: 1rem;
  }

  /* Table responsiveness */
  .super-admin-page .table-responsive {
    font-size: 0.875rem;
  }

  /* Organization list cards */
  .super-admin-page .organization-card {
    margin-bottom: 1rem;
  }

  /* Enrollment request cards */
  .super-admin-page .enrollment-card {
    margin-bottom: 1rem;
  }

  /* Package management */
  .super-admin-page .package-card {
    margin-bottom: 1rem;
  }

  /* Payment analytics */
  .super-admin-page .payment-summary {
    margin-bottom: 1.5rem;
  }

  /* Form controls */
  .super-admin-page .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Modal dialogs */
  .super-admin-page .modal-dialog {
    margin: 0.5rem;
  }
}

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  z-index: 10;
}

/* Message Logs Styles */
.avatar-circle {
  width: 40px;
  height: 40px;
  font-weight: 600;
}

.message-preview {
  max-width: 300px;
}

.message-content {
  white-space: pre-wrap;
}

/* Settings Page Styles */
.viewer-circle {
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-small {
  font-size: 0.7rem;
}

.empty-state-icon {
  font-size: 3rem;
  color: rgba(102, 126, 234, 0.3);
  margin-bottom: 1rem;
}

/* Ensure hero logo remains same size on small screens */
@media (max-width: 768px) {
  .cedcast-hero-logo {
    width: 260px;
  }
}