/* Admin Styles */
.admin-body {
  /* Updated to luxury black background */
  background-color: #1a1a1a;
  font-family: "Inter", sans-serif;
}

/* Login Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  /* Updated gradient to black and gold */
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  position: relative;
  overflow: hidden;
}

/* Added gold accent overlay */
.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.login-form {
  background: var(--secondary-color);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  /* Added gold border */
  border: 2px solid #d4af37;
  position: relative;
  z-index: 1;
}

.login-form h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
  /* Fixed text overflow for long titles */
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.2;
}

/* Admin Dashboard */
.admin-dashboard {
  display: grid;
  grid-template-areas:
    "header header"
    "sidebar content";
  grid-template-columns: 250px 1fr;
  grid-template-rows: 60px 1fr;
  min-height: 100vh;
  /* Updated background to luxury black */
  background-color: #1a1a1a;
}

.admin-header {
  grid-area: header;
  /* Updated to dark background with gold accent */
  background: #2d2d2d;
  border-bottom: 2px solid #d4af37;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.admin-logo {
  /* Updated to gold color */
  color: #d4af37;
  font-size: 1.5rem;
  margin: 0;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Updated text color for dark theme */
  color: #ffffff;
}

.logout-btn {
  background: none;
  /* Updated border and text color to gold */
  border: 1px solid #d4af37;
  color: #d4af37;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.logout-btn:hover {
  /* Updated hover to gold background */
  background-color: #d4af37;
  color: #1a1a1a;
  border-color: #d4af37;
}

/* Admin Sidebar */
.admin-sidebar {
  grid-area: sidebar;
  /* Updated to dark background */
  background: #2d2d2d;
  border-right: 2px solid #d4af37;
  padding: 2rem 0;
}

.admin-menu ul {
  list-style: none;
}

.admin-menu .menu-item {
  display: block;
  padding: 1rem 2rem;
  /* Updated text color for dark theme */
  color: #cccccc;
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.admin-menu .menu-item:hover,
.admin-menu .menu-item.active {
  /* Updated hover background and border to gold */
  background-color: rgba(212, 175, 55, 0.1);
  border-left-color: #d4af37;
  color: #d4af37;
}

/* Admin Content */
.admin-content {
  grid-area: content;
  padding: 2rem;
  overflow-y: auto;
  /* Updated background to dark */
  background-color: #1a1a1a;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

/* Updated section titles for dark theme */
.admin-section h2 {
  color: #ffffff;
}

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

.stat-card {
  /* Updated to dark background with gold accent */
  background: #2d2d2d;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.stat-card h3 {
  /* Updated text color */
  color: #cccccc;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  /* Updated to gold color */
  color: #d4af37;
}

/* Tables */
.products-table-container,
.orders-table-container {
  /* Updated to dark background */
  background: #2d2d2d;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow-x: auto;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.products-table,
.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.products-table th,
.products-table td,
.orders-table th,
.orders-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  /* Updated text color */
  color: #ffffff;
  /* Fixed text overflow in table cells */
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 200px;
}

.products-table th:first-child,
.products-table td:first-child {
  max-width: 50px;
}

.products-table th:nth-child(3),
.products-table td:nth-child(3) {
  max-width: 150px;
}

.products-table th,
.orders-table th {
  /* Updated header background to darker with gold text */
  background-color: rgba(212, 175, 55, 0.1);
  font-weight: 600;
  color: #d4af37;
}

.product-image-small {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background-color: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid #4caf50;
}

.status-inactive {
  background-color: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid #f44336;
}

.action-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  margin: 0 0.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  background-color: rgba(212, 175, 55, 0.1);
}

.edit-btn {
  color: #d4af37;
}

.delete-btn {
  color: #f44336;
}

/* Product Form */
.product-form {
  /* Updated to dark background */
  background: #2d2d2d;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Updated form labels for dark theme */
.product-form label,
.settings-form label {
  color: #cccccc;
}

/* Updated form inputs for dark theme */
.product-form input,
.product-form select,
.product-form textarea,
.settings-form input,
.settings-form select {
  background-color: #1a1a1a;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #ffffff;
}

.product-form input:focus,
.product-form select:focus,
.product-form textarea:focus,
.settings-form input:focus,
.settings-form select:focus {
  border-color: #d4af37;
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.image-preview {
  margin-top: 1rem;
  text-align: center;
}

.image-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 2px solid #d4af37;
}

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

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.settings-card {
  /* Updated to dark background */
  background: #2d2d2d;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Updated settings card titles */
.settings-card h3 {
  color: #d4af37;
}

.settings-form .form-group {
  margin-bottom: 1.5rem;
}

/* Responsive Admin */
@media (max-width: 768px) {
  .admin-dashboard {
    grid-template-areas:
      "header"
      "content";
    grid-template-columns: 1fr;
    grid-template-rows: 60px 1fr;
  }

  .admin-sidebar {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .admin-content {
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}
