/* ========================================
   ABCEMS Admin Portal - Tech Theme
   Modern, Dark-Mode Ready Design System
   ======================================== */

:root {
  /* === Primary Tech Colors (Red/Yellow/Grey Scheme) === */
  --tech-primary: #dc2626; /* Red-600 */
  --tech-primary-dark: #991b1b; /* Red-800 */
  --tech-primary-light: #f87171; /* Red-400 */
  
  --tech-secondary: #eab308; /* Yellow-500 */
  --tech-secondary-dark: #ca8a04; /* Yellow-600 */
  
  --tech-accent: #f59e0b; /* Amber-500 */
  --tech-accent-glow: rgba(245, 158, 11, 0.3);
  
  --tech-success: #10b981; /* Emerald-500 (keep for status) */
  --tech-warning: #f59e0b; /* Amber-500 */
  --tech-danger: #dc2626; /* Red-600 */
  --tech-info: #6b7280; /* Gray-500 */
  
  /* === Neutral Colors (Light Mode) === */
  --tech-bg-base: #ffffff;
  --tech-bg-elevated: #f9fafb; /* Gray-50 */
  --tech-bg-card: #ffffff;
  --tech-bg-hover: #f3f4f6; /* Gray-100 */
  
  --tech-border: #e5e7eb; /* Gray-200 */
  --tech-border-light: #f3f4f6; /* Gray-100 */
  
  --tech-text-primary: #111827; /* Gray-900 */
  --tech-text-secondary: #6b7280; /* Gray-500 */
  --tech-text-tertiary: #9ca3af; /* Gray-400 */
  
  /* === Gradients (Red/Yellow/Grey Theme) === */
  --tech-gradient-primary: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  --tech-gradient-secondary: linear-gradient(135deg, #eab308 0%, #f59e0b 100%);
  --tech-gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --tech-gradient-warm: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
  --tech-gradient-danger: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  --tech-gradient-neutral: linear-gradient(135deg, #6b7280 0%, #374151 100%);
  
  /* === Shadows === */
  --tech-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --tech-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --tech-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --tech-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --tech-shadow-glow: 0 0 20px rgba(220, 38, 38, 0.5);
  --tech-shadow-glow-yellow: 0 0 20px rgba(234, 179, 8, 0.5);
  
  /* === Spacing === */
  --tech-space-xs: 0.25rem;
  --tech-space-sm: 0.5rem;
  --tech-space-md: 1rem;
  --tech-space-lg: 1.5rem;
  --tech-space-xl: 2rem;
  --tech-space-2xl: 3rem;
  
  /* === Border Radius === */
  --tech-radius-sm: 0.375rem;
  --tech-radius-md: 0.5rem;
  --tech-radius-lg: 0.75rem;
  --tech-radius-xl: 1rem;
  --tech-radius-full: 9999px;
  
  /* === Transitions === */
  --tech-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --tech-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --tech-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Dark Mode Colors === */
.dark, [data-theme="dark"] {
  --tech-bg-base: #0f172a; /* Slate-900 */
  --tech-bg-elevated: #1e293b; /* Slate-800 */
  --tech-bg-card: #1e293b;
  --tech-bg-hover: #334155; /* Slate-700 */
  
  --tech-border: #334155; /* Slate-700 */
  --tech-border-light: #475569; /* Slate-600 */
  
  --tech-text-primary: #f1f5f9; /* Slate-100 */
  --tech-text-secondary: #94a3b8; /* Slate-400 */
  --tech-text-tertiary: #64748b; /* Slate-500 */
  
  --tech-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --tech-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --tech-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* ========================================
   ADMIN LAYOUT COMPONENTS
   ======================================== */

.admin-layout {
  min-height: 100vh;
  background: var(--tech-bg-base);
  color: var(--tech-text-primary);
  transition: background var(--tech-transition-base);
}

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--tech-space-lg);
}

/* === Glassmorphism Cards === */
.tech-card {
  background: var(--tech-bg-card);
  border: 1px solid var(--tech-border);
  border-radius: var(--tech-radius-lg);
  box-shadow: var(--tech-shadow-md);
  transition: all var(--tech-transition-base);
}

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

.tech-card-glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.dark .tech-card-glass {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* === Gradient Cards === */
.tech-card-gradient {
  position: relative;
  overflow: hidden;
}

.tech-card-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--tech-gradient-primary);
}

.tech-card-gradient-success::before {
  background: var(--tech-gradient-success);
}

.tech-card-gradient-warm::before {
  background: var(--tech-gradient-warm);
}

/* === Stat Cards with Animations === */
.tech-stat-card {
  position: relative;
  padding: var(--tech-space-lg);
  background: var(--tech-bg-card);
  border-radius: var(--tech-radius-lg);
  border: 1px solid var(--tech-border);
  overflow: hidden;
  transition: all var(--tech-transition-base);
}

.tech-stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(59, 130, 246, 0.05) 100%);
  opacity: 0;
  transition: opacity var(--tech-transition-base);
}

.tech-stat-card:hover::after {
  opacity: 1;
}

.tech-stat-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tech-radius-lg);
  background: var(--tech-gradient-primary);
  box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
}

.tech-stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: var(--tech-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Buttons === */
.tech-btn {
  padding: 0.625rem 1.25rem;
  border-radius: var(--tech-radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--tech-transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  outline: none;
}

.tech-btn-primary {
  background: var(--tech-gradient-primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
}

.tech-btn-primary:hover {
  box-shadow: 0 6px 20px 0 rgba(220, 38, 38, 0.5);
  transform: translateY(-2px);
}

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

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

.tech-btn-ghost {
  background: transparent;
  color: var(--tech-text-secondary);
  border: 1px solid var(--tech-border);
}

.tech-btn-ghost:hover {
  background: var(--tech-bg-hover);
  border-color: var(--tech-border-light);
}

/* === Badges === */
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--tech-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.tech-badge-primary {
  background: rgba(220, 38, 38, 0.1);
  color: var(--tech-primary);
}

.tech-badge-secondary {
  background: rgba(234, 179, 8, 0.1);
  color: var(--tech-secondary);
}

.tech-badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--tech-success);
}

.tech-badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--tech-warning);
}

.tech-badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--tech-danger);
}

/* === Tables === */
.tech-table-container {
  overflow-x: auto;
  border-radius: var(--tech-radius-lg);
  border: 1px solid var(--tech-border);
}

.tech-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.tech-table thead {
  background: var(--tech-bg-elevated);
}

.tech-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tech-text-secondary);
  border-bottom: 1px solid var(--tech-border);
}

.tech-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--tech-border-light);
  color: var(--tech-text-primary);
}

.tech-table tbody tr {
  transition: background var(--tech-transition-fast);
}

.tech-table tbody tr:hover {
  background: var(--tech-bg-hover);
}

/* === Inputs === */
.tech-input {
  width: 100%;
  padding: 0.625rem 1rem;
  background: var(--tech-bg-base);
  border: 1px solid var(--tech-border);
  border-radius: var(--tech-radius-md);
  color: var(--tech-text-primary);
  font-size: 0.875rem;
  transition: all var(--tech-transition-fast);
}

.tech-input:focus {
  outline: none;
  border-color: var(--tech-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.tech-input::placeholder {
  color: var(--tech-text-tertiary);
}

/* === Loading States === */
.tech-skeleton {
  background: linear-gradient(
    90deg,
    var(--tech-bg-elevated) 0%,
    var(--tech-bg-hover) 50%,
    var(--tech-bg-elevated) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--tech-radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.tech-spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--tech-border);
  border-top-color: var(--tech-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* === Glow Effects === */
.tech-glow-primary {
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.tech-glow-secondary {
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.5);
}

.tech-glow-success {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.tech-glow-warning {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

/* === Animations === */
.tech-fade-in {
  animation: fadeIn 0.3s ease-in;
}

.tech-slide-up {
  animation: slideUp 0.4s ease-out;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === Responsive === */
@media (max-width: 768px) {
  .admin-container {
    padding: var(--tech-space-md);
  }
  
  .tech-stat-card {
    padding: var(--tech-space-md);
  }
}
