/* --- ADMIN PANEL SPECIFIC STYLING --- */

/* Login page wrap */
.login-body {
  background-color: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header .logo {
  justify-content: center;
  margin-bottom: 16px;
}

.login-header h2 {
  font-size: 24px;
  font-weight: 700;
}

.login-error {
  background-color: rgba(229, 62, 62, 0.1);
  border: 1px solid rgba(229, 62, 62, 0.3);
  color: var(--accent-red);
  padding: 12px;
  border-radius: var(--border-radius);
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}

/* Admin Dashboard layout */
.admin-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  background-color: var(--bg-secondary);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.admin-sidebar-header .logo img {
  height: 38px;
}

.admin-sidebar-header .logo-text {
  font-size: 16px;
}

.admin-sidebar-header .logo-text span {
  font-size: 9px;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.admin-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--border-radius);
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition-fast);
}

.admin-menu-btn:hover {
  background-color: rgba(255,255,255,0.03);
  color: var(--text-primary);
}

.admin-menu-btn.active {
  background-color: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid rgba(197, 168, 128, 0.2);
}

.admin-sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

.admin-logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
  width: 100%;
  text-align: left;
}

.admin-logout-btn:hover {
  color: var(--accent-red);
}

/* Main Content Area */
.admin-main {
  padding: 40px;
  background-color: var(--bg-primary);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
}

.admin-header h1 {
  font-size: 28px;
}

.admin-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Tab Content Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Content block styling */
.admin-card {
  padding: 30px;
  margin-bottom: 30px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-card h3 {
  font-size: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 12px;
  color: var(--accent-gold);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Image upload styling in admin */
.admin-image-upload-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-image-upload-wrapper label {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
}

.image-preview-box {
  width: 100%;
  height: 200px;
  border-radius: var(--border-radius);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  background-color: var(--bg-secondary);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.image-preview-placeholder i {
  font-size: 32px;
}

.image-upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 12, 16, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
  cursor: pointer;
}

.image-preview-box:hover .image-upload-overlay {
  opacity: 1;
}

.upload-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  display: none;
}

.upload-progress-bar {
  width: 0%;
  height: 100%;
  background-color: var(--accent-gold);
  transition: width 0.1s ease;
}

.admin-input-file-trigger {
  color: var(--text-primary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Floating Actions Bar (Bottom save bar) */
.admin-actions-bar {
  position: sticky;
  bottom: 30px;
  background: rgba(18, 19, 28, 0.8);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  box-shadow: var(--shadow-strong);
  z-index: 100;
}

.admin-actions-info {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Dynamic rows editor for arrays (e.g. features list) */
.dynamic-row-item {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 16px;
  background-color: rgba(255, 255, 255, 0.01);
  position: relative;
}

.dynamic-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 8px;
}

.dynamic-row-header h4 {
  font-size: 14px;
  color: var(--text-muted);
}

/* Global Alert Toasts */
.toast-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-gold);
  border-radius: 4px;
  box-shadow: var(--shadow-strong);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 24px;
  min-width: 300px;
  transform: translateX(-120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left-color: var(--accent-green);
}

.toast.error {
  border-left-color: var(--accent-red);
}

.toast-icon {
  font-size: 20px;
}

.toast.success .toast-icon { color: var(--accent-green); }
.toast.error .toast-icon { color: var(--accent-red); }

.toast-content {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
  .admin-container {
    grid-template-columns: 1fr;
  }
  
  .admin-sidebar {
    height: auto;
    position: relative;
  }
  
  .admin-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .admin-menu-btn {
    width: auto;
  }
  
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
