/* ========================================
   ADELUNA ADMIN PANEL - CLEAN FLAT DESIGN
   Soft, Professional Colors
   ======================================== */

:root {
  /* Soft Color Palette */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;

  --secondary: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Neutral Colors */
  --dark: #1f2937;
  --dark-light: #374151;
  --gray: #6b7280;
  --gray-light: #9ca3af;
  --light: #f3f4f6;
  --light-dark: #e5e7eb;
  --white: #ffffff;

  /* Background */
  --bg-main: #f9fafb;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Border */
  --border-color: #e5e7eb;
  --border-radius: 8px;
}

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

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

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  z-index: 1000;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--gray-light);
  border-radius: 4px;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--white);
}

.sidebar-header h1 {
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sidebar-header p {
  color: var(--gray);
  font-size: 13px;
  font-weight: 500;
}

.sidebar-menu {
  padding: 16px 0;
}

.menu-item {
  margin: 2px 12px;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.menu-item a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  border-radius: var(--border-radius);
}

.menu-item a i {
  margin-right: 12px;
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: var(--gray);
  transition: all 0.2s ease;
}

.menu-item:hover {
  background: var(--light);
}

.menu-item:hover a {
  color: var(--primary);
}

.menu-item:hover a i {
  color: var(--primary);
}

.menu-item.active {
  background: var(--primary);
}

.menu-item.active a {
  color: var(--white);
}

.menu-item.active a i {
  color: var(--white);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
  margin-left: 260px;
  min-height: 100vh;
  padding: 24px;
  transition: all 0.3s ease;
}

.top-bar {
  background: var(--white);
  padding: 20px 24px;
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color);
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
}

.user-details h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.user-details p {
  font-size: 12px;
  color: var(--gray);
}

/* ========================================
   STATS CARDS
   ======================================== */

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

.stat-card {
  background: var(--white);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--white);
  margin-bottom: 12px;
}

.stat-card.purple .stat-icon {
  background: var(--primary);
}

.stat-card.pink .stat-icon {
  background: var(--secondary);
}

.stat-card.blue .stat-icon {
  background: var(--info);
}

.stat-card.green .stat-icon {
  background: var(--success);
}

.stat-card.orange .stat-icon {
  background: var(--warning);
}

.stat-card.red .stat-icon {
  background: var(--danger);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
}

/* ========================================
   CONTENT CARD
   ======================================== */

.content-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

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

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

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

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
}

.btn-info {
  background: var(--info);
  color: var(--white);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* ========================================
   TABLE
   ======================================== */

.table-container {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--light);
}

thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

tbody tr {
  background: var(--white);
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background: var(--light);
}

tbody td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--dark);
}

tbody tr:last-child {
  border-bottom: none;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-primary {
  background: var(--primary);
  color: var(--white);
}

.badge-success {
  background: var(--success);
  color: var(--white);
}

.badge-danger {
  background: var(--danger);
  color: var(--white);
}

.badge-warning {
  background: var(--warning);
  color: var(--white);
}

.badge-info {
  background: var(--info);
  color: var(--white);
}

/* ========================================
   FORMS
   ======================================== */

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

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: all 0.2s ease;
  background: var(--white);
}

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

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
  padding: 14px 16px;
  border-radius: var(--border-radius);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 14px;
}

.alert i {
  font-size: 18px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

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

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* ========================================
   MODAL
   ======================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 28px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--light);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--danger);
  color: var(--white);
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border-radius: var(--border-radius);
  background: var(--white);
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.pagination a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination .active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* ========================================
   MOBILE MENU TOGGLE
   ======================================== */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

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

  .mobile-overlay {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: 80px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 16px;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 8px;
}

.gap-2 {
  gap: 16px;
}

/* ========================================
   LOGIN PAGE
   ======================================== */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.login-logo p {
  color: var(--gray);
  font-size: 14px;
  font-weight: 500;
}

/* ========================================
   FADE IN ANIMATION
   ======================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.fade-in {
  animation: fadeIn 0.3s ease-out;
}