/* css/admin.css */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --color-bg-dark:    #080808;   /* Main background - Deep black */
  --color-bg-light:   #101010;   /* Section background - Card backgrounds */
  --color-gold:       #C9A84C;   /* Gold Accent */
  --color-gold-light: #E3C06A;   /* Hover gold */
  --color-white:      #F5F0E8;   /* Light text */
  --color-text-muted: #A89880;   /* Gray text */
  --color-danger:     #D9534F;   /* Red accent */
  --color-success:    #2A7A4A;   /* Green accent */
  
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Poppins', sans-serif;
  
  --sidebar-width: 260px;
}

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

body {
  background-color: var(--color-bg-dark);
  color: var(--color-white);
  font-family: var(--font-body);
  line-height: 1.6;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 4px;
}

/* LOGIN PANEL STYLING */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
  background-color: var(--color-bg-dark);
  position: relative;
}

.login-card {
  background-color: var(--color-bg-light);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  padding: 3rem 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.login-logo {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--color-white);
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.login-logo span {
  color: var(--color-gold);
}

.login-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--color-gold);
  margin-bottom: 2.5rem;
}

.form-group {
  margin-bottom: 1.8rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  background-color: rgba(26, 18, 8, 0.6);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-white);
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-bg-dark);
}

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

.btn-primary:active {
  transform: scale(0.98);
}

.btn-danger {
  background-color: var(--color-danger);
  color: var(--color-white);
}

.btn-danger:hover {
  background-color: #c9302c;
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: var(--color-white);
}

.btn-secondary:hover {
  background-color: rgba(201, 168, 76, 0.1);
}

.alert {
  padding: 0.8rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: none;
}

.alert-danger {
  background-color: rgba(217, 83, 79, 0.15);
  border: 1px solid var(--color-danger);
  color: #f2dede;
  display: block;
}

.alert-success {
  background-color: rgba(92, 184, 92, 0.15);
  border: 1px solid var(--color-success);
  color: #dff0d8;
  display: block;
}

/* ADMIN DASHBOARD PANELS */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--color-bg-light);
  border-right: 1px solid rgba(201, 168, 76, 0.2);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  text-align: center;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: 1px;
}

.sidebar-title span {
  color: var(--color-gold);
}

.sidebar-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  margin-top: 0.2rem;
}

.sidebar-menu {
  list-style: none;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow-y: auto;
  flex-grow: 1;
}

.menu-item button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.menu-item button:hover {
  color: var(--color-white);
  background-color: rgba(201, 168, 76, 0.05);
}

.menu-item.active button {
  color: var(--color-gold);
  background-color: rgba(201, 168, 76, 0.08);
  border-left-color: var(--color-gold);
  font-weight: 500;
}

.menu-item button i {
  width: 20px;
  font-size: 1.1rem;
  text-align: center;
}

/* Main Dashboard Pane */
.main-content {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  padding: 2.5rem;
  min-height: 100vh;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  padding-bottom: 1rem;
}

.top-header h2 {
  font-size: 2rem;
  font-weight: 700;
}

.top-header .user-info {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.dashboard-panel {
  display: none;
}

.dashboard-panel.active {
  display: block;
  animation: fadeInDashboard 0.4s ease;
}

@keyframes fadeInDashboard {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CARD / CONTENT CONTAINERS */
.admin-card {
  background-color: var(--color-bg-light);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.admin-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* MENU MANAGER STYLING */
.category-manager-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background-color: rgba(26, 18, 8, 0.4);
  border-radius: 6px;
  border: 1px solid rgba(201, 168, 76, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.category-list-item:hover,
.category-list-item.active {
  border-color: var(--color-gold);
  background-color: rgba(201, 168, 76, 0.05);
}

.category-list-item.active {
  color: var(--color-gold);
  font-weight: 500;
}

.category-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.delete-badge-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.2rem;
  transition: color 0.15s;
}

.delete-badge-btn:hover {
  color: #ff6b6b;
}

/* Item Manager */
.item-manager-panel {
  display: flex;
  flex-direction: column;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.item-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.2rem;
  background-color: rgba(26, 18, 8, 0.3);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 8px;
  transition: var(--transition-fast);
}

.item-list-item:hover {
  border-color: rgba(201, 168, 76, 0.3);
  background-color: rgba(26, 18, 8, 0.5);
}

.item-title-editable {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  width: 70%;
  transition: border-color 0.15s;
}

.item-title-editable:focus {
  outline: none;
  border-color: var(--color-gold);
  background-color: rgba(26,18,8,0.6);
}

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

/* FILE UPLOAD & MEDIA MANAGERS */
.upload-zone {
  border: 2px dashed rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  background-color: rgba(26, 18, 8, 0.2);
  margin-bottom: 2rem;
}

.upload-zone:hover {
  border-color: var(--color-gold);
  background-color: rgba(201, 168, 76, 0.05);
}

.upload-zone i {
  font-size: 2.5rem;
  color: var(--color-gold);
  margin-bottom: 1rem;
}

.upload-zone p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.media-item {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.15);
  background-color: rgba(26, 18, 8, 0.4);
  position: relative;
  aspect-ratio: 1;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item-label {
  position: absolute;
  top: 4px;
  left: 4px;
  background-color: rgba(26, 18, 8, 0.7);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--color-gold-light);
}

.media-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: rgba(217, 83, 79, 0.9);
  color: var(--color-white);
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.15s;
}

.media-delete-btn:hover {
  background-color: var(--color-danger);
}

/* REVIEWS MANAGER STYLING */
.admin-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-review-card {
  background-color: rgba(26, 18, 8, 0.4);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.admin-review-info {
  flex-grow: 1;
}

.admin-review-stars {
  color: var(--color-gold);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.admin-review-text {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.admin-reviewer {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* TOGGLE SWITCHES */
.switch-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 18, 8, 0.6);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(201, 168, 76, 0.25);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--color-text-muted);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: rgba(201, 168, 76, 0.2);
  border-color: var(--color-gold);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: var(--color-gold);
}

/* BUTTON COLUMNS */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* MOBILE TOGGLE & RESPONSIVENESS */
.admin-mobile-header {
  display: none;
  background-color: var(--color-bg-light);
  padding: 1rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.admin-mobile-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
}

.admin-hamburger {
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .admin-mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    top: 57px; /* Mobile header offset */
    height: calc(100vh - 57px);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 1.5rem;
  }
  
  .category-manager-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
