/* Partnership Management – Modern UI with animations */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --sidebar-width: 260px;
  --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #f8fafc;
  --sidebar-accent: #818cf8;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --main-bg: #f1f5f9;
  --card-bg: #ffffff;
  --card-radius: 16px;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease;
}

* {
  box-sizing: border-box;
}

.fw-500 {
  font-weight: 500;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--main-bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ----- Animations ----- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse-soft {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.85;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.3s ease-out forwards;
}

.stagger-1 {
  animation-delay: 0.05s;
}

.stagger-2 {
  animation-delay: 0.1s;
}

.stagger-3 {
  animation-delay: 0.15s;
}

.stagger-4 {
  animation-delay: 0.2s;
}

.stagger-5 {
  animation-delay: 0.25s;
}

.stagger-6 {
  animation-delay: 0.3s;
}

.opacity-0 {
  opacity: 0;
}

/* ----- Sidebar ----- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.sidebar-brand a:hover {
  opacity: 0.9;
  transform: translateX(2px);
}

.sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sidebar-accent), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(129, 140, 248, 0.4);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 2px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
  position: relative;
}

.sidebar-nav .nav-link i {
  font-size: 1.15rem;
  opacity: 0.9;
}

.sidebar-nav .nav-link:hover {
  color: var(--sidebar-text-active);
  background: var(--sidebar-hover);
  transform: translateX(4px);
}

.sidebar-nav .nav-link.active {
  color: var(--sidebar-text-active);
  background: rgba(129, 140, 248, 0.15);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.2);
}

.sidebar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  border-radius: 0 3px 3px 0;
  background: var(--sidebar-accent);
  animation: slideInLeft 0.3s ease-out;
}

.sidebar-nav .nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 1rem 0;
  list-style: none;
}

.sidebar-nav .nav-link.text-warning:hover {
  color: #fbbf24 !important;
}

/* ----- Main content ----- */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 1.75rem 2rem;
  animation: fadeIn 0.4s ease-out;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 6.5rem 1rem 1.5rem;
    /* Increased top padding for taller mobile navbar */
  }

  .mobile-top-bar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 84px;
    /* Substantially increased height */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 1.5rem;
    align-items: center;
    z-index: 999;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-bottom: 2px solid rgba(0, 0, 0, 0.04);
  }

  .mobile-logo {
    width: 38px;
    height: 38px;
    margin-right: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  }

  .mobile-brand-text {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    color: var(--text);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity var(--transition);
  }

  .sidebar-backdrop.show {
    display: block;
    opacity: 1;
  }
}

/* ----- Cards ----- */
.app-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition-fast);
  overflow: hidden;
}

.app-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.06);
}

.app-card .card-body {
  padding: 1.5rem;
}

/* Dashboard summary cards: Vibrant gradients and depth */
.dashboard-stat {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.dashboard-stat:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dashboard-stat::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.dashboard-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.dashboard-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.dashboard-stat-icon {
  position: absolute;
  right: -10px;
  bottom: -10px;
  font-size: 4rem;
  opacity: 0.05;
  transform: rotate(-15deg);
}

.dashboard-stat-primary::after {
  background: var(--accent);
}

.dashboard-stat-success::after {
  background: var(--success);
}

.dashboard-stat-warning::after {
  background: var(--warning);
}

.dashboard-stat-danger::after {
  background: var(--danger);
}

.text-gradient-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-success {
  background: linear-gradient(135deg, #10b981, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ----- Buttons ----- */
.btn-app {
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 10px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-app:hover {
  transform: translateY(-1px);
}

.btn-app:active {
  transform: translateY(0);
}

.btn-app-primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-app-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #7c3aed);
  color: #fff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-app-outline {
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
}

.btn-app-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
}

/* ----- Tables ----- */
.app-table {
  margin: 0;
}

.app-table thead th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.8);
}

.app-table tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.app-table tbody tr {
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.app-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

.app-table tbody tr:last-child td {
  border-bottom: none;
}

/* ----- Badges ----- */
.badge-app {
  font-weight: 600;
  font-size: 0.6875rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-app.success {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.badge-app.primary {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.badge-app.secondary {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

/* Progress bar in tables */
.progress-bar-wrap {
  min-width: 80px;
}

.progress-bar-wrap .progress {
  border-radius: 4px;
  background: #e2e8f0;
}

.progress-bar-wrap .progress-bar {
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar-wrap small {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
}

/* ----- Page title ----- */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.4s ease-out;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.75rem 0 1rem;
  animation: fadeInUp 0.4s ease-out;
}

.section-title:first-of-type {
  margin-top: 0;
}

/* ----- Alerts ----- */
.alert-app {
  border-radius: 12px;
  border: none;
  animation: scaleIn 0.3s ease-out;
}

/* ----- Modals ----- */
.modal-content {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.18);
  animation: scaleIn 0.25s ease-out;
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.form-control,
.form-select {
  border-radius: 10px;
  border: 1.5px solid var(--border);
  padding: 0.625rem 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  outline: none;
}

/* ----- Avatars ----- */
.avatar-sm {
  width: 36px;
  height: 36px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50% !important;
  font-size: 0.875rem;
  line-height: 1;
}

.avatar-sm.xsmall {
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
}

@keyframes bounceSlow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.animate-bounce-slow {
  animation: bounceSlow 3s ease-in-out infinite;
}

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

.shadow-hover:hover {
  box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.4) !important;
  transform: translateY(-2px) scale(1.05);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.glass-card {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.cursor-help {
  cursor: help;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Filter UI (Migrated from payments.php) */
.filter-group {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-pill {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-pill:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.05);
}

.filter-pill.active {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: #fff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}