/* Admin Panel CSS */
:root {
  --admin-bg: #0b0f19;
  --admin-sidebar-bg: #111827;
  --admin-card-bg: #1f2937;
  --admin-border: #374151;
  --admin-accent: #6366f1;
  --admin-accent-hover: #4f46e5;
  --admin-text: #f3f4f6;
  --admin-muted: #9ca3af;
}

body.admin-body {
  background-color: var(--admin-bg);
  color: var(--admin-text);
  font-family: 'Inter', system-ui, sans-serif;
  margin: 0;
  height: 100vh;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.admin-app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* LOGIN OVERLAY SCREEN */
.login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1e1b4b 0%, #090d16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1rem;
}

.login-card {
  background: #111827;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.4s ease;
}

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

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-icon {
  font-size: 2.5rem;
  color: var(--admin-accent);
  margin-bottom: 1rem;
  background: rgba(99, 102, 241, 0.1);
  padding: 1rem;
  border-radius: 50%;
}

.login-header h2 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.login-header p {
  font-size: 0.88rem;
  color: var(--admin-muted);
}

.login-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-hint {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--admin-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--admin-border);
  padding-top: 1rem;
}

/* Admin Sidebar */
.admin-sidebar {
  width: 280px;
  background-color: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-logo {
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-logo i {
  color: var(--admin-accent);
}

.admin-nav {
  list-style: none;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.admin-nav-item button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--admin-muted);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.admin-nav-item button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--admin-text);
}

.admin-nav-item button.active {
  background: var(--admin-accent);
  color: #fff;
}

.admin-sidebar-footer {
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Admin Main Content Area */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.admin-header {
  height: 70px;
  background-color: var(--admin-sidebar-bg);
  border-bottom: 1px solid var(--admin-border);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header-title h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

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

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

/* Tab Panels */
.tab-panel {
  display: none;
  max-width: 1000px;
  margin: 0 auto;
}

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

/* Admin Cards & Forms */
.admin-card {
  background-color: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.8rem;
  margin-bottom: 2rem;
}

.admin-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-form-group {
  margin-bottom: 1.2rem;
}

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

.admin-input, .admin-select, .admin-textarea {
  width: 100%;
  padding: 10px 14px;
  background: #111827;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
  outline: none;
  border-color: var(--admin-accent);
}

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

/* Color Palette Chips & Inputs */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.color-item {
  background: #111827;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.2s ease;
}

.color-item:hover {
  border-color: var(--admin-accent);
}

.color-picker-input {
  width: 48px;
  height: 48px;
  border: 2px solid var(--admin-border);
  border-radius: 10px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}

.color-info {
  flex-grow: 1;
}

.color-info span {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.color-info small {
  display: block;
  color: #818cf8;
  font-size: 0.82rem;
  line-height: 1.35;
}

/* Theme Preset Selector */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.preset-card {
  background: #111827;
  border: 2px solid var(--admin-border);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.preset-card:hover {
  border-color: var(--admin-accent);
  transform: translateY(-2px);
}

.preset-card.active {
  border-color: var(--admin-accent);
  background: rgba(99, 102, 241, 0.1);
}

.preset-swatches {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
}

/* Page List Item */
.page-list-item {
  background: #111827;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-list-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.page-list-actions {
  display: flex;
  gap: 0.5rem;
}

/* Section Item Card in Section Editor */
.section-item-card {
  background: #111827;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.section-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drag-handle {
  color: var(--admin-muted);
  cursor: grab;
}

.section-item-body {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--admin-border);
  display: none;
}

.section-item-card.open .section-item-body {
  display: block;
}

/* Modal Overlay */
.admin-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.admin-modal.show {
  display: flex;
}

.admin-modal-content {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
}

.admin-btn {
  background: var(--admin-accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.admin-btn:hover {
  background: var(--admin-accent-hover);
}

.admin-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
}

.admin-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.admin-btn-danger {
  background: #ef4444;
  color: #fff;
}

.admin-btn-danger:hover {
  background: #dc2626;
}

.admin-btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1e293b;
  color: #fff;
  border: 1px solid var(--admin-accent);
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Shape Selector Cards */
.shape-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.shape-card {
  background: var(--admin-sidebar-bg);
  border: 2px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.shape-card:hover {
  border-color: var(--admin-accent);
  transform: translateY(-2px);
}

.shape-card.active {
  border-color: var(--admin-accent);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.shape-preview {
  width: 100%;
  height: 100px;
  background: #0b0f19;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 1rem;
}

.shape-preview-round .preview-box {
  width: 40px;
  height: 40px;
  background: var(--admin-accent);
  border-radius: 10px;
}

.shape-preview-round .preview-btn {
  padding: 8px 18px;
  background: #d97706;
  color: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.shape-preview-square .preview-box {
  width: 40px;
  height: 40px;
  background: var(--admin-accent);
  border-radius: 0px;
}

.shape-preview-square .preview-btn {
  padding: 8px 18px;
  background: #d97706;
  color: #fff;
  border-radius: 0px;
  font-size: 0.8rem;
  font-weight: 600;
}

.shape-info strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.shape-info small {
  color: var(--admin-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Stats & Analytics Dashboard */
.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-kpi-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.stat-kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--admin-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-kpi-info h4 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-kpi-info span {
  font-size: 0.85rem;
  color: var(--admin-muted);
}

.visits-chart-container {
  background: var(--admin-sidebar-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.visits-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 180px;
  gap: 12px;
  padding-top: 1.5rem;
  border-bottom: 1px solid var(--admin-border);
}

.chart-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 8px;
}

.chart-bar-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--admin-muted);
}

.chart-bar-track {
  width: 100%;
  max-width: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px 6px 0 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.chart-bar-fill {
  width: 100%;
  background: linear-gradient(to top, var(--admin-accent), #818cf8);
  border-radius: 6px 6px 0 0;
  transition: height 0.5s ease;
}

.chart-bar-label {
  font-size: 0.75rem;
  color: var(--admin-muted);
}

/* SEO Tag Chips */
.seo-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  background: #0b0f19;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  min-height: 48px;
}

.seo-chip {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seo-chip-remove {
  cursor: pointer;
  opacity: 0.7;
}

.seo-chip-remove:hover {
  opacity: 1;
  color: #ef4444;
}

/* SEO Score Meter & Health Bar */
.seo-score-card {
  background: #111827;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.seo-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.seo-score-badge {
  font-size: 1.8rem;
  font-weight: 800;
  color: #10b981;
}

.seo-progress-track {
  height: 12px;
  background: #1f2937;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.seo-progress-fill {
  height: 100%;
  background: #10b981;
  width: 0%;
  transition: width 0.5s ease;
}

.seo-check-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.seo-check-item {
  background: #0b0f19;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stats Table */
.stats-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.stats-data-table th, .stats-data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
  font-size: 0.9rem;
}

.stats-data-table th {
  color: var(--admin-muted);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.2);
}

.stats-data-table td {
  color: var(--admin-text);
}

/* ==========================================================================
   Addons & Weekly Agenda Styles
   ========================================================================== */
.addon-switch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111827;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.addon-info {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.addon-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.addon-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.addon-desc {
  font-size: 0.88rem;
  color: var(--admin-muted);
}

/* Toggle Switch Widget */
.switch-label {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
}

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #374151;
  transition: 0.3s;
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: #6366f1;
}

input:checked + .switch-slider:before {
  transform: translateX(26px);
}

/* Weekly Agenda Grid */
.agenda-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.agenda-week-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.weekly-grid-container {
  overflow-x: auto;
  background: #0b0f19;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1rem;
}

.weekly-grid {
  display: grid;
  grid-template-columns: 70px repeat(7, minmax(130px, 1fr));
  gap: 1px;
  background: var(--admin-border);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
}

.weekly-grid-cell {
  background: #111827;
  padding: 10px 8px;
  min-height: 52px;
  font-size: 0.82rem;
  color: var(--admin-text);
  position: relative;
}

.weekly-grid-header {
  background: #1f2937;
  text-align: center;
  font-weight: 600;
  padding: 12px 6px;

}

.weekly-grid-header .day-name {
  display: block;
  font-size: 0.85rem;
  color: #a5b4fc;
  text-transform: uppercase;
}

.weekly-grid-header .day-date {
  font-size: 0.78rem;
  color: var(--admin-muted);
}

.time-label-cell {
  background: #192233;
  color: var(--admin-muted);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apt-card {
  background: rgba(99, 102, 241, 0.2);
  border-left: 4px solid #6366f1;
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.apt-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.apt-card.confirmed {
  background: rgba(16, 185, 129, 0.2);
  border-left-color: #10b981;
  color: #a7f3d0;
}

.apt-card.pending {
  background: rgba(245, 158, 11, 0.2);
  border-left-color: #f59e0b;
  color: #fde68a;
}

.apt-card.cancelled {
  background: rgba(239, 68, 68, 0.2);
  border-left-color: #ef4444;
  color: #fca5a5;
  text-decoration: line-through;
}

.apt-card .apt-time {
  font-weight: 700;
  font-size: 0.75rem;
}

.apt-card .apt-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apt-card .apt-service {
  font-size: 0.7rem;
  opacity: 0.85;
}



