/* ==========================================
   ADMIN PANEL STYLES - REACT COPY
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f5f7;
}

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #f5f5f7;
}

.admin-sidebar {
  background: #1a1a2e;
  color: white;
  width: 250px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #f97384, #ffa5b2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.admin-sidebar-nav {
  flex: 1;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

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

.admin-nav-item.active {
  background: rgba(249, 115, 132, 0.15);
  color: #f97384;
}

.admin-nav-item.logout {
  color: rgba(255,255,255,0.4);
  margin-top: auto;
}

.admin-nav-item.logout:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}

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

/* Admin Main */
.admin-main {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  background: white;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.admin-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a2e;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.demo-badge {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
}

.admin-user {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
}

.admin-logout-link {
  color: #ef4444;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.admin-logout-link:hover {
  text-decoration: underline;
}

.admin-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Demo Banner */
.demo-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.demo-banner-icon {
  font-size: 2rem;
}

.demo-banner h4 {
  margin: 0 0 0.5rem;
  color: #92400e;
  font-size: 1.1rem;
}

.demo-banner p {
  margin: 0;
  color: #92400e;
  font-size: 0.9rem;
}

/* Dashboard Stats */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-card-gradient {
  padding: 1.5rem;
  border-radius: 12px;
  color: white;
}

.stat-card-gradient.purple {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-card-gradient.pink {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.stat-card-gradient.cyan {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.stat-card-gradient.green {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
}

/* Tables */
.admin-table-wrapper {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-top: 1.5rem;
}

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

.admin-table th {
  background: #fafafa;
  padding: 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #f0f0f0;
}

.admin-table td {
  padding: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid #f5f5f5;
  color: #333;
}

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

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

/* Action Buttons */
.admin-action-bar {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.admin-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  background: linear-gradient(135deg, #f97384, #ffa5b2);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: transform 0.2s;
  text-decoration: none;
}

.admin-btn-primary:hover {
  transform: translateY(-2px);
}

.admin-actions {
  display: flex;
  gap: 0.3rem;
}

.admin-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
  font-size: 0.85rem;
}

.admin-btn-sm:hover {
  transform: scale(1.1);
}

.admin-btn-edit {
  background: #e3f2fd;
  color: #1976d2;
}

.admin-btn-delete {
  background: #fce4ec;
  color: #e53935;
}

.admin-btn-save {
  background: #e8f5e9;
  color: #4caf50;
}

.admin-btn-cancel {
  background: #f5f5f5;
  color: #666;
}

/* Forms */
.admin-form-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
}

.admin-form-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: #1a1a2e;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-field.full {
  grid-column: span 2;
}

.admin-field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  padding: 0.75rem 1rem;
  border: 2px solid #f0f0f0;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: 'Nunito', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  border-color: #f97384;
}

.admin-field textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  flex-direction: row;
}

.admin-checkbox input[type="checkbox"] {
  width: auto;
  accent-color: #f97384;
}

.admin-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.admin-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  background: #f0f0f0;
  color: #666;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  text-decoration: none;
}

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

/* Inline Edit */
.admin-inline-input {
  padding: 0.4rem 0.6rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: 'Nunito', sans-serif;
  outline: none;
  width: 100%;
}

.admin-inline-input:focus {
  border-color: #f97384;
}

/* Tag */
.admin-tag {
  display: inline-block;
  background: rgba(249, 115, 132, 0.1);
  color: #f97384;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Image Upload */
.image-upload-area {
  border: 2px dashed #e0e0e0;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: #fafafa;
}

.image-preview {
  max-width: 400px;
  max-height: 250px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-upload-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.admin-btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  background: white;
  border: 2px solid #f97384;
  color: #f97384;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-btn-upload:hover {
  background: #f97384;
  color: white;
}

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

.image-url-text {
  font-size: 0.75rem;
  color: #888;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-img-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-thumb {
  width: 60px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

/* Save Message */
.admin-save-msg {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #4caf50;
  font-size: 0.85rem;
  font-weight: 700;
  background: #e8f5e9;
  padding: 0.5rem 1rem;
  border-radius: 50px;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 70px;
  }
  
  .admin-main {
    margin-left: 70px;
  }
  
  .admin-sidebar-logo span {
    display: none;
  }
  
  .admin-nav-item span {
    display: none;
  }
  
  .stat-cards {
    grid-template-columns: 1fr;
  }
  
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-field.full {
    grid-column: span 1;
  }
  
  .admin-topbar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .admin-content {
    padding: 1rem;
  }
}

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

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
