/* Admin Panel Styling */

.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #f7fafc;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: #2d3748;
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.admin-sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.admin-sidebar-header p {
  font-size: 0.85rem;
  color: #a0aec0;
  margin: 0.25rem 0 0 0;
}

.admin-nav {
  padding: 1rem 0;
}

.admin-nav-section {
  margin-bottom: 1.5rem;
}

.admin-nav-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a0aec0;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.2s;
}

.admin-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.admin-nav-link.active {
  background: rgba(102, 126, 234, 0.2);
  color: white;
  border-left: 3px solid #667eea;
}

.admin-nav-icon {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
}

/* Main Content */
.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
}

.admin-header {
  background: white;
  padding: 1.5rem 2rem;
  margin: -2rem -2rem 2rem -2rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
}

.admin-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Statistics Cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #667eea;
}

.stat-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #718096;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
}

.stat-card:nth-child(2) {
  border-left-color: #48bb78;
}

.stat-card:nth-child(3) {
  border-left-color: #ed8936;
}

.stat-card:nth-child(4) {
  border-left-color: #9f7aea;
}

.stat-card:nth-child(5) {
  border-left-color: #38b2ac;
}

/* Content Sections */
.admin-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  overflow: hidden;
}

.admin-section-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-section-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a202c;
  margin: 0;
}

.admin-section-content {
  padding: 1.5rem;
}

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  background: #f7fafc;
}

.admin-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #2d3748;
}

.admin-table tbody tr:hover {
  background: #f7fafc;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

/* Badges */
.admin-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-badge.badge-approved,
.admin-badge.badge-active,
.admin-badge.badge-completed {
  background: #c6f6d5;
  color: #22543d;
}

.admin-badge.badge-pending {
  background: #feebc8;
  color: #7c2d12;
}

.admin-badge.badge-rejected,
.admin-badge.badge-suspended,
.admin-badge.badge-failed {
  background: #fed7d7;
  color: #742a2a;
}

.admin-badge.badge-sold {
  background: #bee3f8;
  color: #2c5282;
}

/* Buttons */
.admin-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.admin-btn-primary {
  background: #667eea;
  color: white;
}

.admin-btn-primary:hover {
  background: #5a67d8;
}

.admin-btn-secondary {
  background: #e2e8f0;
  color: #2d3748;
}

.admin-btn-secondary:hover {
  background: #cbd5e0;
}

.admin-btn-danger {
  background: #fc8181;
  color: white;
}

.admin-btn-danger:hover {
  background: #f56565;
}

.admin-btn-success {
  background: #48bb78;
  color: white;
}

.admin-btn-success:hover {
  background: #38a169;
}

/* Search Form */
.admin-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.admin-search input[type="text"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
}

.admin-search input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
}

.admin-search button {
  padding: 0.75rem 1.5rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.admin-search button:hover {
  background: #5a67d8;
}

/* Filters */
.admin-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-filter label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a5568;
}

.admin-filter select {
  padding: 0.5rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
}

/* Pagination */
.admin-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.admin-pagination a,
.admin-pagination span {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-decoration: none;
  color: #2d3748;
}

.admin-pagination a:hover {
  background: #f7fafc;
}

.admin-pagination .current {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Forms */
.admin-form-group {
  margin-bottom: 1.5rem;
}

.admin-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.admin-form-group input[type="text"],
.admin-form-group input[type="email"],
.admin-form-group input[type="number"],
.admin-form-group textarea,
.admin-form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
}

.admin-form-group input:focus,
.admin-form-group textarea:focus,
.admin-form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.admin-form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Alerts */
.admin-alert {
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.admin-alert-success {
  background: #c6f6d5;
  color: #22543d;
  border-left: 4px solid #48bb78;
}

.admin-alert-error {
  background: #fed7d7;
  color: #742a2a;
  border-left: 4px solid #fc8181;
}

.admin-alert-warning {
  background: #feebc8;
  color: #7c2d12;
  border-left: 4px solid #ed8936;
}

.admin-alert-info {
  background: #bee3f8;
  color: #2c5282;
  border-left: 4px solid #4299e1;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .admin-stats {
    grid-template-columns: 1fr;
  }
  
  .admin-table {
    font-size: 0.75rem;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.5rem;
  }
}

/* Empty State */
.admin-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #718096;
}

.admin-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.admin-empty h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.admin-empty p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
