/* Main Styles */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #8b5cf6;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #06b6d4;
  --dark-color: #1e293b;
  --light-bg: #f8fafc;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection for inputs and content areas */
input, textarea, [contenteditable] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #1e293b;
  touch-action: pan-y pan-x;
  -ms-touch-action: pan-y pan-x;
  overflow-x: hidden;
  position: relative;
}

/* Container fluid - push content from sidebar */
.container-fluid {
  padding-left: 80px !important;
  transition: padding-left 0.3s ease;
}

/* Animations */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0.5;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0.5;
  }
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  padding: 100px 0 0;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  width: 80px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1200;
}

/* Sidebar expanded */
.sidebar.show {
  width: 280px;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.3);
  z-index: 1300;
}

/* Sidebar Toggle Button (inside sidebar) */
.sidebar-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: 3px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.sidebar-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
  border-color: rgba(255, 255, 255, 0.4);
}

.sidebar-toggle-btn i {
  transition: transform 0.3s ease;
  font-size: 1.8rem;
}

.sidebar.show .sidebar-toggle-btn i {
  transform: rotate(180deg);
}

/* Sidebar Overlay - only when expanded */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1250;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

/* Hide modal backdrop */
.modal-backdrop {
  display: none !important;
}

/* Sidebar scrollbar styling */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar > div {
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  z-index: 1;
}

/* Hide text when sidebar is collapsed */
.sidebar .nav-link span,
.sidebar .sidebar-user-info {
  opacity: 1;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.sidebar:not(.show) .nav-link span,
.sidebar:not(.show) .sidebar-user-info {
  opacity: 0;
  width: 0;
  height: 0;
  display: none;
  overflow: hidden;
}

/* Center icons when collapsed */
.sidebar:not(.show) .nav-link {
  justify-content: center;
  padding: 14px 0;
  margin: 8px auto;
  width: 60px;
}

.sidebar:not(.show) .nav-link i {
  margin-right: 0;
}

.sidebar .nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  padding: 14px 24px;
  margin: 8px 16px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sidebar .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.sidebar .nav-link:hover::before {
  left: 100%;
}

.sidebar .nav-link:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  transform: translateX(8px) scale(1.02);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.sidebar .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sidebar .nav-link i {
  margin-right: 12px;
  width: 24px;
  font-size: 18px;
  text-align: center;
}

/* Sidebar logout button */
.sidebar a[href="/auth/logout"]:hover {
  background: rgba(239, 68, 68, 0.4) !important;
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Main Content */
.main-content {
  margin-left: 0;
  padding: 30px;
  padding-top: 100px;
  min-height: 100vh;
  background: var(--light-bg);
  transition: margin-left 0.3s ease-in-out;
  position: relative;
  z-index: 50;
}

/* Mobile: no sidebar margin */
@media (max-width: 767px) {
  .container-fluid {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .main-content {
    margin-left: 0;
    padding-top: 90px;
  }
  
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
    width: 280px;
  }
}

/* Cards */
.card {
  border: none;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-8px);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  border-bottom: none;
  border-radius: 20px 20px 0 0 !important;
  font-weight: 600;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

/* Buttons */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 12px 28px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  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.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(-1px);
}

.btn i {
  margin-right: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Tables */
.table {
  background: white;
  border-radius: 16px;
  overflow: hidden;
}

.table thead th {
  border-bottom: 2px solid #e5e7eb;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 16px 20px;
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
}

.table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover {
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
  transform: scale(1.01);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.table tbody td {
  padding: 16px 20px;
  vertical-align: middle;
}

/* Badges */
.badge {
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.badge.bg-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.badge.bg-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.badge.bg-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.badge.bg-info {
  background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.badge.bg-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Forms */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #ced4da;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Date and Time inputs */
input[type="date"], input[type="datetime-local"], input[type="time"] {
  position: relative;
  padding: 12px 15px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: #1e293b;
  background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
  font-weight: 500;
}

input[type="date"]:hover,
input[type="datetime-local"]:hover,
input[type="time"]:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

input[type="date"]:focus, 
input[type="datetime-local"]:focus, 
input[type="time"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15), 0 4px 6px rgba(0, 0, 0, 0.05);
  outline: none;
  background: #ffffff;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  font-size: 1.2rem;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(99, 102, 241, 0.15);
  opacity: 1;
  transform: scale(1.1);
}

/* Empty date input placeholder */
input[type="date"]:not(:focus):invalid,
input[type="datetime-local"]:not(:focus):invalid,
input[type="time"]:not(:focus):invalid {
  color: #94a3b8;
}

.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 8px;
}

/* Modals */
.modal {
  padding-left: 0 !important;
}

.modal-dialog {
  margin: 13.75rem auto;
  max-width: 500px;
}

.modal-content {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  border-radius: 0 0 15px 15px;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 10px;
  padding: 15px 20px;
  font-weight: 500;
}

.alert i {
  margin-right: 8px;
}

/* Navbar */
.navbar {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
  position: fixed;
  top: 0;
  left: 80px;
  right: 0;
  z-index: 1100;
  padding: 16px 24px;
  backdrop-filter: blur(10px);
  margin-left: 0;
  transition: left 0.3s ease;
}

/* Sidebar Toggle Button */
#sidebarToggle {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: white !important;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sidebarToggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
  z-index: 0;
}

#sidebarToggle i {
  position: relative;
  z-index: 1;
}

#sidebarToggle:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#sidebarToggle:hover::before {
  width: 100px;
  height: 100px;
}

#sidebarToggle:active {
  transform: scale(0.95);
}

#sidebarToggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Digital Clock */
.digital-clock {
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
  border-radius: 12px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(99, 102, 241, 0.2);
  transition: all 0.3s ease;
}

.digital-clock:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.clock-icon {
  color: var(--primary-color);
  font-size: 1.2rem;
  animation: clockPulse 2s ease-in-out infinite;
}

@keyframes clockPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.time-display {
  font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
  will-change: contents;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: white !important;
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand i {
  font-size: 2rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
}

.navbar .dropdown-menu {
  border-radius: 12px;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 8px;
}

.navbar .dropdown-item {
  border-radius: 8px;
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateX(4px);
}

/* Stats Cards */
.card.bg-primary, .card.bg-success, .card.bg-warning, .card.bg-info {
  border: none;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.card.bg-primary::after, .card.bg-success::after, .card.bg-warning::after, .card.bg-info::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 10s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.card .card-body {
  position: relative;
  z-index: 1;
}

.card .card-body button {
  position: relative;
  z-index: 2;
}

.card.bg-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.card.bg-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.card.bg-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.card {
  animation: scaleIn 0.5s ease;
}

.alert {
  animation: slideInRight 0.5s ease;
}

.table tbody tr {
  animation: fadeIn 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    position: relative;
    top: 0;
    width: 100%;
    padding: 20px 0;
  }
  
  .main-content {
    margin-left: 0;
    margin-top: 80px;
    border-radius: 20px;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
}

/* Print styles */
@media print {
  .sidebar, .navbar, .btn, .no-print {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    margin-top: 0 !important;
  }
}

/* Additional Modern Styles */
.glass-effect {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

/* Nofaol foydalanuvchi card stili */
.hover-lift.bg-light.opacity-75 {
  background-color: #f8f9fa !important;
  opacity: 0.75 !important;
  border: 2px dashed #dee2e6;
}

.hover-lift.bg-light.opacity-75:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  opacity: 0.85 !important;
}

/* Forms */
.form-control, .form-select {
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  padding: 12px 18px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.form-label {
  font-weight: 600;
  color: #475569;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

/* Modals */
.modal-content {
  border: none;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-header {
  border-bottom: none;
  padding: 24px 32px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.modal-body {
  padding: 32px;
}

.modal-footer {
  border-top: none;
  padding: 20px 32px;
  background: #f8fafc;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 16px;
  padding: 20px 24px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left: 4px solid;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left-color: #10b981;
  color: #065f46;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left-color: #ef4444;
  color: #991b1b;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left-color: #f59e0b;
  color: #92400e;
}

.alert-info {
  background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
  border-left-color: #06b6d4;
  color: #164e63;
}

.alert i {
  margin-right: 12px;
  font-size: 1.2rem;
}

/* Loading Spinner */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.spinner-border {
  width: 4rem;
  height: 4rem;
  border-width: 0.4rem;
}

/* Order Cards */
.order-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-width: 2px;
}

.order-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.order-item {
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  transition: all 0.2s ease;
}

.order-item:hover {
  border-color: var(--primary-color);
  background: #f8fafc;
}

/* Table Cards */
.table-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.table-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.table-card:hover::before {
  opacity: 1;
}

.table-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.table-icon {
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s ease;
}

.table-card:hover .table-icon {
  transform: rotate(15deg) scale(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

.shadow-lg-hover {
  transition: box-shadow 0.3s ease;
}

.shadow-lg-hover:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Smooth Transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cart Wrapper - Desktop */
@media (min-width: 769px) {
  .cart-wrapper {
    position: relative;
  }
  
  .cart-wrapper .card {
    position: sticky !important;
    top: 20px;
  }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet va kichikroq ekranlar uchun */
@media (max-width: 991px) {
  /* Sidebar yashirish */
  .sidebar {
    width: 100%;
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    padding: 0;
    height: auto;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  }
  
  .sidebar > div {
    min-height: auto;
    flex-direction: row;
    justify-content: space-around;
    padding: 10px 0;
  }
  
  .sidebar::before {
    display: none;
  }
  
  .sidebar .nav-link {
    margin: 0;
    padding: 12px 8px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  
  .sidebar .nav-link i {
    font-size: 1.3rem;
    margin: 0;
  }
  
  .sidebar .nav-link span {
    font-size: 0.7rem;
  }
  
  /* Main content mobile */
  .main-content {
    padding-bottom: 80px !important;
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Navbar mobile */
  .navbar {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .navbar .navbar-brand {
    font-size: 1.2rem;
  }
  
  /* Card mobile */
  .card {
    margin-bottom: 15px;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Order cards mobile */
  .order-card {
    font-size: 0.9rem;
  }
  
  .order-card .card-header h5 {
    font-size: 1rem;
  }
  
  /* Buttons mobile */
  .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  /* Table mobile */
  .table-responsive {
    font-size: 0.85rem;
  }
  
  /* Modal mobile */
  .modal-dialog {
    margin: 10px;
  }
  
  /* Grid mobile */
  .row {
    margin-left: -10px;
    margin-right: -10px;
  }
  
  .row > [class*='col-'] {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Mobile telefon (kichik ekranlar) */
@media (max-width: 576px) {
  /* Typography mobile */
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  h4 {
    font-size: 1.1rem;
  }
  
  h5 {
    font-size: 1rem;
  }
  
  /* Card header mobile */
  .card-header h5 {
    font-size: 0.95rem;
  }
  
  .card-header small {
    font-size: 0.7rem;
  }
  
  /* Badge mobile */
  .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  
  /* Alert mobile */
  .alert {
    padding: 10px;
    font-size: 0.85rem;
  }
  
  /* Form mobile */
  .form-control,
  .form-select {
    font-size: 0.9rem;
    padding: 10px 14px;
  }
  
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }
  
  /* Button group mobile */
  .btn-group .btn {
    font-size: 0.8rem;
    padding: 8px 12px;
  }
  
  /* Order items mobile */
  .order-item {
    padding: 8px !important;
    margin-bottom: 10px !important;
  }
  
  /* Sticky top mobile */
  .sticky-top {
    position: relative !important;
    top: 0 !important;
  }

  /* Cart mobile - pastda */
  .cart-wrapper {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    max-height: 60px; /* Faqat tugma ko'rinadi */
    overflow: hidden;
    transition: max-height 0.4s ease, box-shadow 0.3s ease;
  }

  .cart-wrapper.cart-expanded {
    max-height: 70vh !important; /* Ochilganda katta bo'ladi */
    box-shadow: 0 -8px 24px rgba(0,0,0,0.25);
  }

  .cart-toggle-btn {
    width: 100%;
    border-radius: 0;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .cart-toggle-btn i {
    font-size: 1.2rem;
  }

  .cart-toggle-btn .badge {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 700;
  }

  .cart-wrapper .cart-content {
    position: relative !important;
    top: auto !important;
    max-height: calc(70vh - 60px) !important;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  .cart-wrapper .card-body {
    max-height: calc(70vh - 220px) !important;
    overflow-y: auto !important;
  }

  /* Cart animation */
  .cart-wrapper {
    animation: slideInFromBottom 0.3s ease-out;
  }

  @keyframes slideInFromBottom {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Hide toggle button on desktop */
  @media (min-width: 769px) {
    .cart-toggle-btn {
      display: none !important;
    }
  }

  /* Cart scroll button */
  .cart-scroll-toggle {
    display: block;
    text-align: center;
    padding: 8px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%);
    cursor: pointer;
    border-top: 1px solid #e5e7eb;
  }
  
  /* Pagination mobile */
  .pagination {
    font-size: 0.85rem;
  }
  
  .page-link {
    padding: 6px 12px;
  }
  
  /* Stats card mobile */
  .stats-card {
    margin-bottom: 15px;
  }
  
  .stats-card h3 {
    font-size: 1.5rem;
  }
  
  /* Sidebar mobile bottom */
  .sidebar {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto !important;
    height: 70px;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 1000;
    width: 100% !important;
  }
  
  /* Hide user profile on mobile sidebar */
  .sidebar .user-profile-section {
    display: none !important;
  }
  
  .sidebar .d-flex.flex-column {
    flex-direction: row !important;
    height: 70px !important;
    padding: 0 !important;
  }
  
  .sidebar .nav.flex-column {
    flex-direction: row !important;
    display: flex;
    width: 100%;
    justify-content: space-around;
  }
  
  .sidebar .mt-auto {
    display: none !important;
  }
  
  .sidebar .nav-link {
    min-width: 70px;
    padding: 8px 6px;
    text-align: center;
  }
  
  .sidebar .nav-link i {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 2px;
  }
  
  .sidebar .nav-link span {
    font-size: 0.65rem;
    display: block;
  }
  
  /* Main content spacing */
  .main-content {
    padding: 15px !important;
    padding-bottom: 90px !important;
  }
  
  /* Container fluid mobile */
  .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Remove hover effects on mobile */
  .hover-lift:hover {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
}

/* Landscape orientation */
@media (max-width: 991px) and (orientation: landscape) {
  .sidebar {
    height: 60px;
  }
  
  .sidebar .nav-link {
    padding: 6px 4px;
  }
  
  .main-content {
    padding-bottom: 75px !important;
  }
}

/* Mobile - fix navbar user info */
@media (max-width: 991px) {
  .navbar .avatar {
    margin-right: 8px !important;
  }
  
  .navbar .d-md-block {
    display: block !important;
    max-width: 150px;
  }
  
  .navbar .dropdown-toggle {
    white-space: nowrap;
  }
  
  /* Category filter horizontal scroll */
  #categoryFilter {
    scrollbar-width: thin;
  }
  
  #categoryFilter::-webkit-scrollbar {
    height: 6px;
  }
  
  #categoryFilter::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }
  
  #categoryFilter::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
  }
  
  #categoryFilter::-webkit-scrollbar-thumb:hover {
    background: #555;
  }
  
  /* Product grid spacing on mobile */
  #productsGrid {
    padding-bottom: 120px !important;
  }
  
  /* Cart sticky on mobile */
  .col-md-4 .card.sticky-top {
    position: fixed !important;
    bottom: 70px;
    left: 0;
    right: 0;
    top: auto !important;
    z-index: 999;
    margin: 0;
    border-radius: 15px 15px 0 0;
    max-height: 50vh;
    overflow-y: auto;
  }
  
  /* Sidebar user profile compact */
  .user-profile-section {
    margin-bottom: 15px !important;
  }
  
  .user-avatar-wrapper {
    width: 50px !important;
    height: 50px !important;
    margin-bottom: 8px !important;
  }
  
  .user-avatar-wrapper i {
    font-size: 1.5rem !important;
  }
}

/* Desktop - compact sidebar profile */
@media (min-width: 992px) {
  .user-profile-section {
    padding: 0 10px;
  }
  
  .user-avatar-wrapper {
    width: 60px !important;
    height: 60px !important;
  }
}

/* Cart items scroll styling */
#cartItems {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
}

#cartItems::-webkit-scrollbar {
  width: 6px;
}

#cartItems::-webkit-scrollbar-track {
  background: transparent;
}

#cartItems::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
}

#cartItems::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.3);
}

/* Cart item styling */
.cart-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 0;
}

.cart-item:last-child {
  border-bottom: none;
}

/* SweetAlert2 z-index fix - must be above navbar */
.swal2-container {
  z-index: 10000 !important;
}

.swal2-popup {
  z-index: 10001 !important;
}

/* Modal backdrop fix */
.modal-backdrop {
  z-index: 9999 !important;
}

.modal {
  z-index: 10000 !important;
}
