/**
 * EV Bike Assembly ERP System
 * Main Stylesheet
 * Modern, Responsive Design
 */

/* ========================================
   CSS VARIABLES & RESET
   ======================================== */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #06b6d4;
  --dark-color: #1e293b;
  --light-color: #f8fafc;
  --white: #ffffff;
  --border-color: #e2e8f0;
  --text-color: #334155;
  --text-light: #94a3b8;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: var(--text-color);
  background-color: var(--light-color);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Animated background particles */
.login-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: backgroundMove 20s linear infinite;
  pointer-events: none;
}

@keyframes backgroundMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.login-container {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 450px;
  padding: 40px;
  position: relative;
  z-index: 1;
}

/* Responsive login container */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 20px;
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .login-container {
    padding: 25px 15px;
  }
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

/* Company Logo Container */
.logo-container {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  position: relative;
}

.company-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  padding: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.company-logo:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.logo-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 40px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.login-header h1 {
  font-size: 26px;
  color: var(--dark-color);
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -0.5px;
  word-wrap: break-word;
}

@media (max-width: 480px) {
  .login-header h1 {
    font-size: 22px;
  }
}

.login-header p {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  word-wrap: break-word;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-color);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: var(--transition);
}

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

.form-control:disabled {
  background-color: var(--light-color);
  cursor: not-allowed;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  z-index: 1;
  pointer-events: none;
}

.input-group .form-control {
  padding-left: 40px;
  width: 100%;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
}

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

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

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

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

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

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

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

.btn-block {
  display: block;
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
  padding: 12px 16px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  border-left: 4px solid;
}

.alert-success {
  background-color: #d1fae5;
  border-color: var(--success-color);
  color: #065f46;
}

.alert-danger {
  background-color: #fee2e2;
  border-color: var(--danger-color);
  color: #991b1b;
}

.alert-warning {
  background-color: #fef3c7;
  border-color: var(--warning-color);
  color: #92400e;
}

.alert-info {
  background-color: #e0f2fe;
  border-color: var(--info-color);
  color: #075985;
}

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.card-header {
  padding: 20px;
  background: var(--light-color);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 16px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 20px;
  background: var(--light-color);
  border-top: 1px solid var(--border-color);
}

/* ========================================
   DASHBOARD
   ======================================== */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--dark-color);
  color: var(--white);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: var(--transition);
}

.sidebar-header {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

/* Sidebar Logo Container */
.sidebar-logo-container {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  position: relative;
}

.sidebar-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.sidebar-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.sidebar-logo-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 36px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.6); }
}

.sidebar-header h2 {
  font-size: 18px;
  margin-bottom: 5px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--white);
  text-align: center;
  line-height: 1.3;
}

.sidebar-header p {
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.sidebar-menu li {
  margin-bottom: 5px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-light);
  transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.sidebar-menu a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 20px;
}

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

/* Company Branding in Top Bar */
.top-bar-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.company-branding {
  display: flex;
  align-items: center;
  gap: 15px;
}

.company-logo-wrapper {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.company-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  padding: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.company-logo-img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.company-logo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  animation: dashboardLogoPulse 3s ease-in-out infinite;
}

@keyframes dashboardLogoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5); }
}

.company-info h1 {
  font-size: 24px;
  color: var(--dark-color);
  margin: 0 0 5px 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.company-info p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

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

/* ========================================
   STATS CARDS
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--white);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
}

.stat-card.success::before {
  background: var(--success-color);
}

.stat-card.warning::before {
  background: var(--warning-color);
}

.stat-card.danger::before {
  background: var(--danger-color);
}

.stat-card.info::before {
  background: var(--info-color);
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.stat-card-title {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

.stat-card-icon {
  font-size: 24px;
  color: var(--primary-color);
}

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

.stat-card-label {
  font-size: 12px;
  color: var(--text-light);
}

/* Trend Indicators */
.trend-indicator {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.trend-up {
  background: #d1fae5;
  color: #065f46;
}

.trend-down {
  background: #fee2e2;
  color: #991b1b;
}

/* Dashboard Grid Enhancements */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .main-content > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================
   TABLES
   ======================================== */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.table thead {
  background: var(--light-color);
}

.table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--dark-color);
  border-bottom: 2px solid var(--border-color);
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

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

/* ========================================
   BADGES
   ======================================== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-info {
  background: #e0f2fe;
  color: #075985;
}

.badge-primary {
  background: #dbeafe;
  color: #1e40af;
}

.badge-secondary {
  background: #f1f5f9;
  color: #475569;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  list-style: none;
  gap: 5px;
  justify-content: center;
  padding: 20px 0;
}

.pagination li a {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
  transition: var(--transition);
}

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

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

.modal.active {
  display: flex;
}

.modal-dialog {
  background: var(--white);
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
}

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

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

  .main-content {
    margin-left: 0;
  }

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

  .top-bar {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
  text-align: center;
}

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

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gap-10 {
  gap: 10px;
}

.gap-20 {
  gap: 20px;
}

/* ========================================
   ANALYTICS DASHBOARD CARDS
   ======================================== */
.analytics-dashboard {
  padding: 0;
}

.analytics-dashboard .row.flex-nowrap {
  flex-wrap: nowrap;
}

.analytics-card {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  height: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.analytics-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.analytics-card:hover::before {
  opacity: 1;
}

.analytics-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
}

.analytics-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 16px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.analytics-card:hover .analytics-icon {
  transform: scale(1.1) rotate(5deg);
}

.analytics-content {
  flex: 1;
  min-width: 0;
}

.analytics-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark-color);
  margin: 0 0 4px 0;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.analytics-label {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  white-space: nowrap;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Color Variants with Gradients */
.analytics-primary .analytics-icon {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.1));
  color: var(--primary-color);
}

.analytics-success .analytics-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.1));
  color: var(--success-color);
}

.analytics-info .analytics-icon {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(34, 211, 238, 0.1));
  color: var(--info-color);
}

.analytics-warning .analytics-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
  color: var(--warning-color);
}

.analytics-danger .analytics-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.1));
  color: var(--danger-color);
}

/* Responsive - Single Row Layout */
@media (max-width: 991px) {
  .analytics-card {
    padding: 16px 12px;
  }
  
  .analytics-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
    margin-right: 12px;
  }
  
  .analytics-value {
    font-size: 22px;
  }
  
  .analytics-label {
    font-size: 11px;
  }
}

@media (max-width: 767px) {
  .analytics-card {
    padding: 12px 8px;
  }
  
  .analytics-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-right: 10px;
  }
  
  .analytics-value {
    font-size: 18px;
  }
  
  .analytics-label {
    font-size: 10px;
  }
}

/* ========================================
   CUSTOMER FORM ENHANCEMENTS
   ======================================== */
.customer-form-card {
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.customer-form-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.customer-form-card .card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-bottom: 2px solid var(--primary-light);
  padding: 16px 20px;
}

.customer-form-card .card-header h5 {
  font-weight: 600;
  letter-spacing: 0.3px;
}

.customer-form-card .card-body {
  padding: 24px;
}

.form-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
}

.form-section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--primary-color);
  margin-right: 8px;
  border-radius: 2px;
}

.form-label {
  font-weight: 500;
  color: var(--dark-color);
  margin-bottom: 6px;
}

.form-control,
.form-select {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 14px;
  transition: all 0.2s ease;
  font-size: 14px;
}

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

.form-control:hover,
.form-select:hover {
  border-color: var(--primary-light);
}

.form-control[readonly] {
  background-color: #f8fafc;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

.help-text {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
  display: block;
}

/* ========================================
   CUSTOMER LIST TABLE ENHANCEMENTS
   ======================================== */
.customer-list-card {
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius);
}

.customer-list-card .card-header {
  background: var(--white);
  border-bottom: 2px solid var(--border-color);
  padding: 16px 20px;
  font-weight: 600;
  color: var(--dark-color);
}

.customer-table {
  margin: 0;
}

.customer-table thead th {
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--dark-color);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  white-space: nowrap;
}

.customer-table tbody tr {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.customer-table tbody tr:hover {
  background-color: #f8fafc;
  border-left-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.customer-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.customer-table tbody tr.row-even {
  background-color: #fafbfc;
}

.customer-table tbody tr.row-even:hover {
  background-color: #f1f5f9;
}

/* Status and Type Badges */
.badge {
  padding: 6px 12px;
  font-weight: 500;
  font-size: 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-success {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.badge-danger {
  background: linear-gradient(135deg, #ef4444, #f87171);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.badge-info {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

.badge-warning {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.badge-secondary {
  background: linear-gradient(135deg, #64748b, #94a3b8);
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.2);
}

/* Action Buttons */
.btn-group-sm .btn {
  padding: 6px 10px;
  font-size: 13px;
  transition: all 0.2s ease;
  border-width: 2px;
}

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

.btn-outline-primary:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-color: var(--primary-color);
}

.btn-outline-info:hover {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  border-color: #06b6d4;
}

/* ========================================
   SEARCH CARD ENHANCEMENTS
   ======================================== */
.search-card {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-radius: var(--border-radius);
}

.search-card .card-body {
  padding: 16px 20px;
}

/* ========================================
   BUTTON ENHANCEMENTS
   ======================================== */
.btn {
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
  padding: 10px 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

.btn-outline-secondary {
  border: 2px solid var(--border-color);
  background: var(--white);
}

.btn-outline-secondary:hover {
  background: var(--light-color);
  border-color: var(--secondary-color);
  transform: translateY(-1px);
}

/* ========================================
   ALERT ENHANCEMENTS
   ======================================== */
.alert {
  border: none;
  border-left: 4px solid;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 14px 18px;
}

.alert-success {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-left-color: #10b981;
}

.alert-danger {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-left-color: #ef4444;
}

/* ========================================
   PAGINATION ENHANCEMENTS
   ======================================== */
.pagination .page-link {
  border-radius: 6px;
  margin: 0 2px;
  padding: 8px 14px;
  font-weight: 500;
  color: var(--dark-color);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.pagination .page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   MODERN TABLE STYLES
   ======================================== */
.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.modern-table thead {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modern-table thead th {
  padding: 14px 16px;
  font-weight: 600;
  color: var(--dark-color);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.modern-table tbody tr {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.modern-table tbody tr:hover {
  background-color: #f8fafc;
  border-left-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.modern-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.modern-table tbody tr:nth-child(even):hover {
  background-color: #f1f5f9;
}

.modern-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

/* Table Sorting */
.table-sortable th {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 24px !important;
}

.table-sortable th:hover {
  background: #e2e8f0;
}

.table-sortable th::after {
  content: '\f0dc';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 8px;
  color: var(--text-light);
  font-size: 12px;
}

.table-sortable th.sort-asc::after {
  content: '\f0de';
  color: var(--primary-color);
}

.table-sortable th.sort-desc::after {
  content: '\f0dd';
  color: var(--primary-color);
}

/* Table Search and Filter */
.table-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.table-search {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.table-search input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.table-search input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.table-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.table-filter select {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--white);
  min-width: 150px;
}

/* Stock Highlighting */
.highlight-low-stock {
  background-color: #fef2f2 !important;
  border-left-color: var(--danger-color) !important;
}

.highlight-low-stock td {
  color: #991b1b;
}

.highlight-critical {
  background-color: #fee2e2 !important;
  border-left-color: #dc2626 !important;
}

.highlight-warning {
  background-color: #fef3c7 !important;
  border-left-color: var(--warning-color) !important;
}

.highlight-good {
  border-left-color: var(--success-color) !important;
}

/* Stock Status Badges */
.stock-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stock-status-badge i {
  font-size: 10px;
}

.stock-status-badge.in-stock {
  background: #d1fae5;
  color: #065f46;
}

.stock-status-badge.low-stock {
  background: #fef3c7;
  color: #92400e;
}

.stock-status-badge.critical {
  background: #fee2e2;
  color: #991b1b;
}

.stock-status-badge.out-of-stock {
  background: #f3f4f6;
  color: #6b7280;
}

/* ========================================
   ENHANCED KPI CARDS
   ======================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
}

.kpi-card.success::before { background: var(--success-color); }
.kpi-card.warning::before { background: var(--warning-color); }
.kpi-card.danger::before { background: var(--danger-color); }
.kpi-card.info::before { background: var(--info-color); }

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.kpi-title {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.kpi-card.primary .kpi-icon {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.1));
  color: var(--primary-color);
}

.kpi-card.success .kpi-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.1));
  color: var(--success-color);
}

.kpi-card.warning .kpi-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
  color: var(--warning-color);
}

.kpi-card.danger .kpi-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.1));
  color: var(--danger-color);
}

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

.kpi-label {
  font-size: 12px;
  color: var(--text-light);
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
}

.kpi-trend.up {
  color: var(--success-color);
}

.kpi-trend.down {
  color: var(--danger-color);
}

/* ========================================
   PROGRESS BARS
   ======================================== */
.progress-bar-thin {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-thin .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-bar-thin .progress-fill.success {
  background: linear-gradient(90deg, var(--success-color), #34d399);
}

.progress-bar-thin .progress-fill.warning {
  background: linear-gradient(90deg, var(--warning-color), #fbbf24);
}

.progress-bar-thin .progress-fill.danger {
  background: linear-gradient(90deg, var(--danger-color), #f87171);
}

/* ========================================
   MINI CHARTS
   ======================================== */
.mini-chart {
  height: 40px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  margin-top: 12px;
}

.mini-chart-bar {
  flex: 1;
  background: var(--primary-color);
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.mini-chart-bar:hover {
  opacity: 1;
}

/* ========================================
   ALERT CARDS
   ======================================== */
.alert-card {
  border-radius: var(--border-radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-card.critical {
  background: #fef2f2;
  border-left: 4px solid var(--danger-color);
}

.alert-card.warning {
  background: #fef3c7;
  border-left: 4px solid var(--warning-color);
}

.alert-card.info {
  background: #e0f2fe;
  border-left: 4px solid var(--info-color);
}

.alert-card-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.alert-card.critical .alert-card-icon { color: var(--danger-color); }
.alert-card.warning .alert-card-icon { color: var(--warning-color); }
.alert-card.info .alert-card-icon { color: var(--info-color); }

.alert-card-content {
  flex: 1;
}

.alert-card-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--dark-color);
}

.alert-card-text {
  font-size: 13px;
  color: var(--text-color);
}

/* ========================================
   ACTION BUTTONS
   ======================================== */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

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

.btn-action.view {
  background: #e0f2fe;
  color: #075985;
}

.btn-action.edit {
  background: #fef3c7;
  color: #92400e;
}

.btn-action.delete {
  background: #fee2e2;
  color: #991b1b;
}

/* ========================================
   RESPONSIVE TABLE
   ======================================== */
@media (max-width: 768px) {
  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .table-search {
    min-width: auto;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .modern-table {
    font-size: 13px;
  }
  
  .modern-table thead th,
  .modern-table tbody td {
    padding: 10px 12px;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .sidebar,
  .table-controls,
  .btn-group,
  .pagination {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
  
  .modern-table {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ========================================
   ANIMATIONS & TRANSITIONS
   ======================================== */

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

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

.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
  opacity: 0;
}

/* Shake Animation for Errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

/* Animation Delays */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-700 { animation-delay: 0.7s; }
.animation-delay-800 { animation-delay: 0.8s; }
.animation-delay-900 { animation-delay: 0.9s; }
.animation-delay-1000 { animation-delay: 1s; }

/* Enhanced Form Animations */
.form-group {
  transition: all 0.3s ease;
}

.form-group:hover {
  transform: translateX(5px);
}

/* Input Focus Animations */
.form-control {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.15);
}

/* Button Hover Effects */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: scale(0.98);
}

/* Loading Spinner */
.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.fa-spinner.fa-spin {
  animation: spin 1s linear infinite;
}

/* Checkbox Label Enhancement */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkbox-label:hover {
  color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

/* Alert Animations */
.alert {
  animation: slideDown 0.4s ease-out;
}

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

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Card Hover Effects */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Responsive Animation Adjustments */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
