/* Admin Panel Styles */
.admin-login-page {
  background: linear-gradient(135deg, #3b5d50 0%, #2f4a3f 100%);
  min-height: 100vh;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.login-card {
  background: #ffffff;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.admin-body {
  background: #f5f5f5;
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: 250px;
  height: 100vh;
  background: #2f2f2f;
  color: #ffffff;
  padding: 0;
  z-index: 1000;
  overflow-y: auto;
}

.admin-sidebar-header {
  padding: 30px 20px;
  background: #3b5d50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header h3 {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 5px;
}

.admin-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-menu li a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s;
}

.admin-menu li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.admin-menu li.active a {
  background: #3b5d50;
  color: #ffffff;
}

.admin-menu li a i {
  width: 20px;
  margin-left: 10px;
}

.admin-main {
  margin-right: 250px;
  min-height: 100vh;
}

.admin-header {
  background: #ffffff;
  padding: 20px 30px;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-header .btn-group {
  display: flex;
  gap: 10px;
}

.admin-header .gap-2 {
  gap: 10px;
}

.admin-content {
  padding: 30px;
}

.admin-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.admin-card-header {
  padding: 20px 25px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-card-header h5 {
  margin: 0;
  font-weight: 600;
}

.admin-card-body {
  padding: 25px;
}

.admin-stat-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 20px;
  color: #ffffff;
  font-size: 24px;
}

.stat-info h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #2f2f2f;
}

.stat-info p {
  margin: 5px 0 0 0;
  color: #6a6a6a;
  font-size: 14px;
}

.table th {
  font-weight: 600;
  color: #2f2f2f;
  border-bottom: 2px solid #e0e0e0;
}

.table td {
  vertical-align: middle;
}

.btn-action {
  padding: 5px 10px;
  margin: 0 3px;
  font-size: 12px;
}

.product-image-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
}

.order-status {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.order-status.pending {
  background: #fff3cd;
  color: #856404;
}

.order-status.processing {
  background: #d1ecf1;
  color: #0c5460;
}

.order-status.completed {
  background: #d4edda;
  color: #155724;
}

.order-status.cancelled {
  background: #f8d7da;
  color: #721c24;
}

.product-status {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.product-status.active {
  background: #d4edda;
  color: #155724;
}

.product-status.inactive {
  background: #f8d7da;
  color: #721c24;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
  display: none;
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: inline-block;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }
  
  .admin-sidebar {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .admin-sidebar.active {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .admin-header {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .admin-header .btn-group {
    flex-wrap: wrap;
    margin-top: 10px;
  }
  
  .admin-content {
    padding: 15px;
    overflow-x: hidden;
  }
  
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  
  .table-responsive table {
    min-width: 600px;
  }
  
  .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
  }
}
  
  .admin-header h4 {
    font-size: 18px;
  }
  
  .admin-card {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .admin-card-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .admin-card-header h5 {
    font-size: 16px;
  }
  
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -15px;
    padding: 0 15px;
  }
  
  .table {
    font-size: 12px;
  }
  
  .table th,
  .table td {
    padding: 8px 4px;
    white-space: nowrap;
  }
  
  /* Admin forms */
  .admin-form .form-control {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 10px 12px;
  }
  
  .admin-form .btn {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 16px;
    width: 100%;
    margin-bottom: 10px;
  }
  
  .admin-form .btn-group {
    flex-direction: column;
  }
  
  .admin-form .btn-group .btn {
    width: 100%;
    margin-bottom: 10px;
  }
  
  /* Modal improvements */
  .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
  
  .modal-content {
    padding: 15px;
  }
  
  .modal-header {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .modal-body {
    padding: 15px;
  }
  
  .modal-footer {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .modal-footer .btn {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .table {
    font-size: 12px;
  }
  
  .table th,
  .table td {
    padding: 8px 5px;
    white-space: nowrap;
  }
  
  .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .btn-action {
    margin: 2px;
  }
  
  .product-image-preview {
    width: 50px;
    height: 50px;
    object-fit: cover;
  }
  
  .modal-dialog {
    margin: 10px;
  }
  
  .modal-content {
    padding: 15px;
  }
  
  .form-label {
    font-size: 14px;
    margin-bottom: 5px;
  }
  
  .input-group {
    flex-wrap: wrap;
  }
  
  .input-group .form-control {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .admin-header h4 {
    font-size: 16px;
  }
  
  .admin-card-header h5 {
    font-size: 14px;
  }
  
  .table {
    font-size: 11px;
  }
  
  .table th,
  .table td {
    padding: 6px 3px;
  }
  
  .btn-sm {
    padding: 3px 6px;
    font-size: 10px;
  }
  
  .product-image-preview {
    width: 40px;
    height: 40px;
  }
}
