/* =========================================
   SMM PANEL - PREMIUM SAAS DESIGN SYSTEM
   ========================================= */

:root {
  /* Brand Colors */
  --brand-primary: #4f46e5;
  --brand-primary-hover: #4338ca;
  --brand-primary-light: #eef2ff;
  
  /* Backgrounds */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: rgba(255, 255, 255, 0.05);
  --bg-sidebar-active: rgba(79, 70, 229, 0.2);
  
  /* Typography Colors */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-sidebar: #cbd5e1;
  --text-sidebar-active: #ffffff;
  
  /* Borders */
  --border-color: #e2e8f0;
  --border-sidebar: rgba(255, 255, 255, 0.1);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* =========================================
   BASE & TYPOGRAPHY
   ========================================= */
body {
  background-color: var(--bg-body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { 
  font-weight: 700; 
  letter-spacing: -0.025em; 
  color: var(--text-primary); 
}

.text-muted { color: var(--text-secondary) !important; }

/* =========================================
   COMPONENTS (CARDS, BUTTONS, FORMS)
   ========================================= */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
}
.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
}
.card-body { padding: 1.5rem; }

.btn { 
  font-weight: 500; 
  border-radius: var(--radius-sm); 
  padding: 0.6rem 1.2rem; 
  transition: all 0.2s ease; 
  font-size: 0.9rem;
}
.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  box-shadow: 0 1px 2px 0 rgba(79, 70, 229, 0.3);
}
.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}
.btn-light, .btn-secondary {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-light:hover, .btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.form-control, .form-select {
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.95rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* =========================================
   ADMIN LAYOUT & SIDEBAR
   ========================================= */
.admin-shell {
  min-height: 100vh;
  display: flex;
  background-color: var(--bg-body);
}

.admin-sidebar {
  width: 260px;
  min-height: 100vh;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-sidebar);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1035;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.75rem 1.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-sidebar);
}
.sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), #818cf8);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 1.2rem;
}
.sidebar-brand .brand-text {
  color: var(--text-sidebar-active);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.admin-sidebar .nav-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 1rem 0.75rem 0.5rem 0.75rem;
}

.admin-sidebar .nav-link {
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text-sidebar);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
  transition: all 0.2s ease;
  opacity: 1;
}
.admin-sidebar .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  opacity: 0.8;
}
.admin-sidebar .nav-link:hover {
  background-color: var(--bg-sidebar-hover);
  color: var(--text-sidebar-active);
}
.admin-sidebar .nav-link.active-link {
  background-color: var(--bg-sidebar-active);
  color: var(--text-sidebar-active);
  font-weight: 600;
}
.admin-sidebar .nav-link.active-link i {
  color: #a5b4fc;
  opacity: 1;
}

.sidebar-footer { 
  margin-top: auto; 
  padding: 1rem 0.75rem; 
  border-top: 1px solid var(--border-sidebar); 
}

.admin-content {
  flex-grow: 1;
  margin-left: 260px;
  padding: 2rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page-header {
  margin-bottom: 2rem;
}
.page-header h3 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}
.page-header p {
  color: var(--text-secondary);
  margin: 0;
}

/* =========================================
   STATUS BADGES (ANIMATED & PILL SHAPED)
   ========================================= */
.status-badge {
  text-transform: capitalize;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}
.status-pending { background-color: #fef3c7; color: #92400e; }
.status-processing { background-color: #dbeafe; color: #1e40af; }
.status-in-progress { background-color: #e0e7ff; color: #3730a3; }
.status-completed { background-color: #d1fae5; color: #065f46; }
.status-partial { background-color: #fed7aa; color: #9a3412; }
.status-cancelled { background-color: #fee2e2; color: #991b1b; }
.status-refunded { background-color: #f3f4f6; color: #374151; }

/* =========================================
   MODERN TABLES
   ========================================= */
.table-modern thead th {
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  font-weight: 600;
}
.table-modern tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.table-modern tbody tr:last-child td {
  border-bottom: none;
}
.table-modern tbody tr {
  transition: background-color 0.2s ease;
}
.table-modern tbody tr:hover {
  background-color: #f8fafc;
}

/* =========================================
   RESPONSIVE FIXES
   ========================================= */
@media (max-width: 992px) {
  .admin-content {
    margin-left: 0;
    padding: 1.5rem 1rem;
  }
}
