/* Admin CMS Dashboard Styles - Strictly Scoped to prevent touching original site */

#cms-modal-wrapper, .cms-admin-root {
  --cms-bg-main: #0a0d14;
  --cms-bg-card: rgba(16, 22, 36, 0.95);
  --cms-border-card: rgba(255, 255, 255, 0.12);
  --cms-primary: #10b981;
  --cms-primary-glow: rgba(16, 185, 129, 0.3);
  --cms-text-main: #f3f4f6;
  --cms-text-muted: #9ca3af;
  font-family: system-ui, -apple-system, sans-serif;
}

#cms-modal-wrapper * {
  box-sizing: border-box;
}

/* Modal Overlay & Container */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0f1420;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 92%;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  position: relative;
  color: #fff;
}

/* Admin Buttons */
.cms-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.cms-btn-primary:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.cms-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.cms-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.cms-btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.cms-btn-danger:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff !important;
}

/* Inputs & Form Controls */
#cms-modal-wrapper .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

#cms-modal-wrapper .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d1d5db;
}

#cms-modal-wrapper .form-input, 
#cms-modal-wrapper .form-textarea, 
#cms-modal-wrapper .form-select {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}

#cms-modal-wrapper .form-input:focus, 
#cms-modal-wrapper .form-textarea:focus {
  border-color: #10b981;
}

/* Sidebar Nav Tabs */
#cms-modal-wrapper .admin-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

#cms-modal-wrapper .admin-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

#cms-modal-wrapper .admin-sidebar-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Glass Panel for CMS */
#cms-modal-wrapper .cms-glass-panel {
  background: rgba(16, 22, 36, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #111827;
  border: 1px solid #10b981;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}
