:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --bg-color: #f3f4f6;
  --sidebar-bg: #1f2937;
  --sidebar-text: #e5e7eb;
  --card-bg: #ffffff;
  --text-color: #111827;
  --border-color: #e5e7eb;
  --danger-color: #ef4444;
}

.admin-container {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-color);
  font-family: 'Inter', sans-serif;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex-shrink: 0;
}

.sidebar-header {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 40px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--sidebar-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item:hover, .nav-item.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Main Content */
.admin-main {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

/* Cards */
.admin-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 24px;
  margin-bottom: 32px;
}

.card-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

/* Form */
.admin-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-input, .form-textarea, .form-select {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  width: 100%;
}

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

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.file-upload-wrapper {
  border: 2px dashed var(--border-color);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f9fafb;
}

.file-upload-wrapper:hover {
  border-color: var(--primary-color);
  background: #eff6ff;
}

.image-preview {
  margin-top: 10px;
  max-height: 150px;
  border-radius: 6px;
  object-fit: cover;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  width: fit-content;
}

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

/* Table */
.table-container {
  overflow-x: auto;
}

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

.admin-table th {
  background-color: #f9fafb;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: #6b7280;
}

.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  vertical-align: middle;
}

.product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #f3f4f6;
}

.action-btn {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--danger-color);
  transition: all 0.2s;
}

.action-btn:hover {
  background: #fee2e2;
  border-color: #fecaca;
}

.admin-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #fecaca;
}

@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    padding: 16px;
  }
  .admin-form {
    grid-template-columns: 1fr;
  }
}



