/* ============================================
   ADMIN PANEL
   Scoped styles for the slide-in editor panel.
   Always dark theme, independent of site theme.
   ============================================ */

/* ===== FONT ISOLATION =====
   Prevent site font changes from leaking into admin panel.
   base.css sets h1-h6 { font-family: var(--font-heading) }
   which would override the inherited Inter from #admin-panel. */
#admin-panel,
#admin-panel h1,
#admin-panel h2,
#admin-panel h3,
#admin-panel h4,
#admin-panel h5,
#admin-panel h6,
#admin-panel p,
#admin-panel span,
#admin-panel label,
#admin-panel input,
#admin-panel select,
#admin-panel textarea,
#admin-panel button {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== ADMIN DESIGN SYSTEM =====
   Shared with TS-Template. All variables use --admin-* prefix.
   Applied to admin panel AND auth modal (which lives outside #admin-panel). */
#admin-panel,
.admin-toast,
.auth-modal-overlay,
.site-banner {

  /* Colors */
  --admin-bg: #1E1E2E;
  --admin-bg-secondary: #181825;
  --admin-bg-tertiary: #252538;
  --admin-bg-elevated: #2A2A3C;
  --admin-bg-input: #2A2A3C;
  --admin-text: #CDD6F4;
  --admin-text-secondary: #A6ADC8;
  --admin-text-muted: #6C7086;
  --admin-border: rgba(147, 153, 178, 0.12);
  --admin-border-strong: rgba(147, 153, 178, 0.2);
  --admin-accent: #3B82F6;
  --admin-accent-hover: #2563EB;
  --admin-accent-glow: rgba(59, 130, 246, 0.3);
  --admin-accent-subtle: rgba(59, 130, 246, 0.12);
  --admin-success: #10B981;
  --admin-danger: #EF4444;
  --admin-warning: #F59E0B;

  /* Shadows */
  --admin-shadow-2xl: 0 25px 60px rgba(0, 0, 0, 0.5);
  --admin-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --admin-shadow-glow-sm: 0 0 12px rgba(59, 130, 246, 0.3);

  /* Border radius */
  --admin-radius-sm: 0.375rem;
  --admin-radius: 0.5rem;
  --admin-radius-md: 0.75rem;
  --admin-radius-lg: 1rem;
  --admin-radius-xl: 1.5rem;
  --admin-radius-2xl: 2rem;
  --admin-radius-full: 9999px;

  /* Spacing */
  --admin-space-1: 0.25rem;
  --admin-space-2: 0.5rem;
  --admin-space-3: 0.75rem;
  --admin-space-4: 1rem;
  --admin-space-5: 1.25rem;
  --admin-space-6: 1.5rem;
  --admin-space-8: 2rem;
  --admin-space-10: 2.5rem;
  --admin-space-12: 3rem;

  /* Typography */
  --admin-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --admin-text-xs: 0.75rem;
  --admin-text-sm: 0.875rem;
  --admin-text-base: 1rem;
  --admin-text-lg: 1.125rem;
  --admin-text-xl: 1.25rem;
  --admin-text-2xl: 1.5rem;
  --admin-weight-light: 300;
  --admin-weight-normal: 400;
  --admin-weight-medium: 500;
  --admin-weight-semibold: 600;
  --admin-weight-bold: 700;
  --admin-tracking-wider: 0.05em;

  /* Transitions */
  --admin-transition: 300ms;
  --admin-transition-fast: 200ms;
  --admin-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ADMIN PANEL SHELL ===== */
#admin-panel {
  position: fixed;
  top: 0;
  right: -500px;
  width: 470px;
  height: 100vh;
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--admin-border);
  color: var(--admin-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

#admin-panel.active {
  right: 0;
}

/* Admin panel scrollbar */
#admin-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--admin-accent) var(--admin-bg-tertiary);
}

#admin-panel::-webkit-scrollbar {
  width: 8px;
}

#admin-panel::-webkit-scrollbar-track {
  background: var(--admin-bg-tertiary);
}

#admin-panel::-webkit-scrollbar-thumb {
  background: var(--admin-accent);
  border-radius: var(--admin-radius-full);
}

/* ===== ADMIN TOGGLE BUTTON ===== */
/* Hardcoded values - button lives on document.body, outside scoped --admin-* variables */
.admin-toggle-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 10000;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(147, 153, 178, 0.2);
  background: rgba(30, 30, 46, 0.95);
  color: #CDD6F4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.admin-toggle-btn:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: #3B82F6;
  transform: scale(1.05);
}

body.admin-open .admin-toggle-btn {
  right: 486px;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body:not(.admin-open) .admin-toggle-btn {
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ADMIN LOGO ===== */
.admin-logo {
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  flex-shrink: 0;
}

/* ===== ADMIN HEADER ===== */
.admin-header {
  display: flex;
  align-items: center;
  gap: var(--admin-space-3);
  padding: var(--admin-space-4) var(--admin-space-5);
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-bg-secondary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: var(--admin-space-2);
}

/* ===== SAVE STATUS ===== */
.admin-save-status {
  font-size: var(--admin-text-xs);
  font-weight: var(--admin-weight-medium);
  opacity: 0;
  transition: opacity var(--admin-transition-fast);
  white-space: nowrap;
}

.admin-save-status.saving {
  opacity: 1;
  color: var(--admin-text-muted);
}

.admin-save-status.saved {
  opacity: 1;
  color: var(--admin-success);
}

.admin-save-status.error {
  opacity: 1;
  color: var(--admin-danger);
}

/* ===== UNDO BUTTON ===== */
.admin-undo-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: var(--admin-text-xs);
  font-weight: var(--admin-weight-medium);
  color: var(--admin-text-secondary);
  background: var(--admin-bg-tertiary);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-full);
  cursor: pointer;
  transition: all var(--admin-transition-fast);
  white-space: nowrap;
  font-family: inherit;
}

.admin-undo-btn:hover {
  background: var(--admin-accent-subtle);
  border-color: var(--admin-accent);
  color: var(--admin-accent);
}

/* ===== HELP BUTTON ===== */
.admin-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--admin-border);
  border-radius: 50%;
  background: transparent;
  color: var(--admin-text-secondary);
  font-size: var(--admin-text-sm);
  font-weight: var(--admin-weight-bold);
  text-decoration: none;
  transition: all 0.15s;
}

.admin-help-btn:hover {
  color: var(--admin-accent);
  background: var(--admin-bg-tertiary);
  border-color: var(--admin-accent);
}

/* ===== PAGE BANNER ===== */
.admin-page-banner {
  padding: var(--admin-space-3) var(--admin-space-6);
  background: var(--admin-accent-subtle);
  border-bottom: 1px solid var(--admin-border);
  font-size: var(--admin-text-sm);
  color: var(--admin-text-secondary);
  flex-shrink: 0;
}

.admin-page-banner strong {
  color: var(--admin-accent);
  font-weight: var(--admin-weight-semibold);
}

/* ===== CLOSE BUTTON ===== */
.admin-close-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--admin-border);
  border-radius: var(--admin-radius-full);
  color: var(--admin-text-secondary);
  font-size: var(--admin-text-xl);
  line-height: 1;
  cursor: pointer;
  transition: all var(--admin-transition-fast);
}

.admin-close-btn:hover {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
  color: var(--admin-text);
  transform: rotate(90deg);
  box-shadow: var(--admin-shadow-glow-sm);
}

/* ===== ADMIN TABS ===== */
.admin-tabs {
  display: flex;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-bg-secondary);
  position: relative;
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  flex: 1;
  padding: var(--admin-space-4) var(--admin-space-3);
  border: none;
  background: transparent;
  font-family: var(--admin-font);
  font-size: var(--admin-text-sm);
  font-weight: var(--admin-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--admin-tracking-wider);
  color: var(--admin-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--admin-transition-fast);
  position: relative;
  text-align: center;
}

.admin-tab-btn:hover {
  color: var(--admin-text);
}

.admin-tab-btn.active {
  color: var(--admin-accent);
}

.admin-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--admin-accent);
}

.admin-tab-content {
  display: none;
  padding: 0;
}

.admin-tab-content.active {
  display: block;
  animation: adminFadeIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

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

/* ===== ADMIN SECTIONS (Bordered Card Style) ===== */
.admin-section {
  margin: var(--admin-space-3);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-md);
  overflow: hidden;
  background: var(--admin-bg-tertiary);
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--admin-space-4);
  cursor: pointer;
  user-select: none;
  transition: background var(--admin-transition-fast);
}

.admin-section-header:hover {
  background: var(--admin-bg-elevated);
}

.admin-section-header h4 {
  font-size: var(--admin-text-sm);
  font-weight: var(--admin-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--admin-tracking-wider);
  color: var(--admin-text);
  margin: 0;
}

.admin-section-chevron {
  font-size: var(--admin-text-sm);
  color: var(--admin-text-muted);
  transition: transform var(--admin-transition);
}

.admin-section.open .admin-section-chevron {
  transform: rotate(180deg);
}

.admin-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 var(--admin-space-4);
  border-top: 1px solid transparent;
}

.admin-section.open .admin-section-content {
  border-top-color: var(--admin-border);
}

.admin-section-body {
  padding: var(--admin-space-4) 0;
}

/* ===== FORM FIELDS ===== */
.admin-field {
  margin-bottom: var(--admin-space-4);
}

.admin-field:last-child {
  margin-bottom: 0;
}

.admin-label {
  display: block;
  font-size: var(--admin-text-xs);
  font-weight: var(--admin-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--admin-tracking-wider);
  color: var(--admin-text);
  margin-bottom: var(--admin-space-2);
}

.admin-input,
.admin-select,
.admin-textarea {
  width: 100%;
  padding: var(--admin-space-3);
  background: var(--admin-bg-elevated);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-md);
  color: var(--admin-text);
  font-size: var(--admin-text-sm);
  font-family: var(--admin-font);
  line-height: 1.4;
  transition: all var(--admin-transition-fast);
  box-sizing: border-box;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px var(--admin-accent-subtle);
}

.admin-input::placeholder,
.admin-textarea::placeholder {
  color: var(--admin-text-muted);
}

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

.admin-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239999bb' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ===== COLOR PICKER ===== */
.admin-color-picker-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-color-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.admin-color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  padding: 0;
}

.admin-color-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.admin-color-swatch.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--admin-accent);
}

.admin-color-swatch.active::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Color wheel canvas */
.admin-color-wheel {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  cursor: crosshair;
  border: 2px solid var(--admin-border);
}

/* Color picker controls */
.admin-color-picker-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Lightness slider */
.admin-color-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #000, #888, #fff);
  outline: none;
  cursor: pointer;
}

.admin-color-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.3);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.admin-color-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.3);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Color preview swatch */
.admin-color-picker-preview {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 2px solid var(--admin-border);
  flex-shrink: 0;
}

.admin-custom-color {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-custom-color input[type="color"] {
  width: 36px;
  height: 36px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
  background: var(--admin-bg-input);
}

.admin-custom-color input[type="text"] {
  flex: 1;
}

/* ===== CORNER STYLE BUTTONS ===== */
.admin-corner-toggle {
  display: flex;
  gap: 8px;
}

.corner-style-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  background: var(--admin-bg-input);
  color: var(--admin-text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.corner-style-btn:hover {
  border-color: var(--admin-border-strong);
  color: var(--admin-text);
}

.corner-style-btn.active {
  border-color: var(--admin-accent);
  background: var(--admin-accent-subtle);
  color: var(--admin-text);
  box-shadow: 0 0 0 1px var(--admin-accent);
}

.corner-preview {
  width: 36px;
  height: 24px;
  border: 2px solid var(--admin-text-secondary);
  transition: border-radius 0.2s;
}

.corner-style-btn.active .corner-preview {
  border-color: var(--admin-accent);
}

/* ===== THEME TOGGLE ===== */
.admin-theme-toggle {
  display: flex;
  gap: 8px;
}

.admin-theme-btn {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  background: var(--admin-bg-input);
  color: var(--admin-text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: inherit;
}

.admin-theme-btn:hover {
  border-color: var(--admin-border-strong);
  color: var(--admin-text);
}

.admin-theme-btn.active {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
  color: #ffffff;
}

/* ===== IMAGE UPLOAD ===== */
.admin-image-upload {
  border: 2px dashed var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--admin-bg-input);
}

.admin-image-upload:hover {
  border-color: var(--admin-accent);
  background: var(--admin-accent-subtle);
}

.admin-image-upload-icon {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--admin-text-muted);
}

.admin-image-upload-text {
  font-size: 13px;
  color: var(--admin-text-secondary);
}

.admin-image-upload-hint {
  font-size: 11px;
  color: var(--admin-text-muted);
  margin-top: 4px;
}

/* Image preview in upload area */
.admin-image-preview {
  position: relative;
  border-radius: var(--admin-radius);
  overflow: hidden;
  margin-bottom: 8px;
}

.admin-image-preview img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.admin-image-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== PORTFOLIO IMAGE LIST ===== */
.admin-image-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.admin-image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
}

.admin-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-image-item-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.admin-image-item:hover .admin-image-item-remove {
  display: flex;
}

.admin-image-item[draggable="true"] {
  cursor: grab;
}

.admin-image-item.dragging {
  opacity: 0.4;
}

.admin-image-item.drag-over {
  outline: 2px solid var(--admin-accent);
  outline-offset: -2px;
}

/* ===== SPECIALTY TAGS EDITOR ===== */
.admin-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--admin-bg-elevated);
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--admin-text-secondary);
}

.admin-tag-remove {
  background: none;
  border: none;
  color: var(--admin-text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
}

.admin-tag-remove:hover {
  color: var(--admin-danger);
}

.admin-tag-add {
  display: flex;
  gap: 6px;
}

.admin-tag-add input {
  flex: 1;
}

/* ===== PRESET GRID ===== */
.admin-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.admin-preset-card {
  background: var(--admin-bg-elevated);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  cursor: pointer;
  transition: all 0.15s;
  overflow: hidden;
  position: relative;
}

.admin-preset-card:hover {
  border-color: var(--admin-border-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.admin-preset-preview {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.admin-preset-color-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.admin-preset-font-sample {
  font-size: 22px;
  font-weight: 700;
  opacity: 0.7;
}

.admin-preset-info {
  padding: 10px 12px;
}

.admin-preset-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 2px;
}

.admin-preset-desc {
  font-size: 11px;
  color: var(--admin-text-muted);
}

.admin-preset-dots {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.admin-preset-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* Preset delete button */
.admin-preset-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.admin-preset-card:hover .admin-preset-delete {
  opacity: 1;
}

/* ===== BUTTONS ===== */
.admin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--admin-space-2);
  width: 100%;
  padding: var(--admin-space-3);
  border-radius: var(--admin-radius-md);
  font-family: var(--admin-font);
  font-size: var(--admin-text-sm);
  font-weight: var(--admin-weight-semibold);
  cursor: pointer;
  transition: all var(--admin-transition-fast);
  border: none;
}

.admin-btn-primary {
  background: var(--admin-accent);
  color: #ffffff;
}

.admin-btn-primary:hover {
  background: var(--admin-accent-hover);
  box-shadow: var(--admin-shadow-glow-sm);
}

.admin-btn-secondary {
  background: var(--admin-bg-elevated);
  color: var(--admin-text-secondary);
  border: 1px solid var(--admin-border);
}

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

.admin-btn-danger {
  background: transparent;
  color: var(--admin-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--admin-danger);
}

.admin-btn-sm {
  width: auto;
  display: inline-flex;
  padding: var(--admin-space-2) var(--admin-space-3);
  font-size: var(--admin-text-xs);
}

.admin-btn-block {
  width: 100%;
}

.admin-btn + .admin-btn {
  margin-top: var(--admin-space-3);
}

/* ===== ADMIN TOAST ===== */
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: var(--admin-space-3) var(--admin-space-5);
  border-radius: var(--admin-radius);
  font-size: var(--admin-text-sm);
  font-family: var(--admin-font);
  font-weight: var(--admin-weight-medium);
  z-index: 10001;
  opacity: 0;
  transition: opacity var(--admin-transition) var(--admin-ease), transform var(--admin-transition) var(--admin-ease);
  pointer-events: none;
  white-space: nowrap;
}

.admin-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.admin-toast.success {
  background: var(--admin-success);
  color: #fff;
}

.admin-toast.error {
  background: var(--admin-danger);
  color: #fff;
}

/* ===== HELPER TEXT ===== */
.admin-help {
  font-size: 11px;
  color: var(--admin-text-muted);
  margin-top: 4px;
}

.admin-divider {
  height: 1px;
  background: var(--admin-border);
  margin: 16px 0;
}

/* ===== HOURS EDITOR ===== */
.admin-hours-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.admin-hours-row input:first-child {
  flex: 1.2;
}

.admin-hours-row input:nth-child(2) {
  flex: 1;
}

.admin-hours-row button {
  flex-shrink: 0;
}

/* ===== FORM SERVICE PICKER ===== */
.admin-form-service-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form-service-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--admin-bg-input);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  cursor: pointer;
  transition: all 0.15s;
}

.admin-form-service-option:hover {
  border-color: var(--admin-border-strong);
}

.admin-form-service-option.active {
  border-color: var(--admin-accent);
  background: var(--admin-accent-subtle);
}

.admin-form-service-option input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--admin-accent);
}

.admin-form-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--admin-bg-elevated);
  color: var(--admin-text-muted);
  border: 1px solid var(--admin-border);
}

.admin-form-badge.recommended {
  background: rgba(16, 185, 129, 0.15);
  color: var(--admin-success);
  border-color: rgba(16, 185, 129, 0.3);
}

.admin-form-service-details {
  margin-top: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) {
  #admin-panel {
    width: 100%;
    right: -100%;
  }

  #admin-panel.active {
    right: 0;
  }

  body.admin-open {
    overflow: hidden;
  }

  body.admin-open .admin-toggle-btn {
    right: 16px;
    z-index: 10001;
  }
}

@media (max-width: 768px) {
  .admin-input,
  .admin-select,
  .admin-textarea {
    font-size: 16px; /* Prevents iOS zoom */
  }

  .admin-color-grid {
    grid-template-columns: repeat(6, 1fr);
  }

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

  .admin-preset-grid {
    grid-template-columns: 1fr;
  }

  .admin-color-picker-controls {
    flex-direction: column;
  }
}

/* ===== AUTH INDICATOR ===== */
.admin-auth-btn {
  padding: 4px 10px;
  border: 1px solid var(--admin-border);
  background: transparent;
  color: var(--admin-text-secondary);
  cursor: pointer;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}

.admin-auth-btn.signed-in {
  color: var(--admin-accent);
  border-color: var(--admin-accent-subtle);
}

.admin-auth-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--admin-border-strong);
}

.admin-auth-btn.signed-in:hover {
  background: var(--admin-accent-subtle);
}

.admin-auth-menu {
  position: fixed;
  z-index: 10001;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border-strong);
  border-radius: 8px;
  padding: 4px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.auth-menu-email {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--admin-text-muted);
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--admin-text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s;
}

.auth-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ===== AUTH MODAL ===== */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.auth-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.auth-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 16px;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow-2xl, 0 24px 48px rgba(0, 0, 0, 0.7));
  padding: 32px;
  color: var(--admin-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transform: translateY(8px);
  transition: transform 0.2s ease;
}

.auth-modal-dialog h1,
.auth-modal-dialog h2,
.auth-modal-dialog h3,
.auth-modal-dialog h4,
.auth-modal-dialog label,
.auth-modal-dialog input,
.auth-modal-dialog button {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.auth-modal-overlay.open .auth-modal-dialog {
  transform: translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--admin-text-muted);
  font-size: 18px;
  cursor: pointer;
  border-radius: var(--admin-radius-sm, 4px);
}

.auth-modal-close:hover {
  background: var(--admin-bg-tertiary);
  color: var(--admin-text);
}

.auth-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0 0 6px 0;
  text-align: center;
}

.auth-subtitle {
  font-size: var(--admin-text-sm);
  color: var(--admin-text-muted);
  text-align: center;
  margin-bottom: var(--admin-space-6);
}

.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--admin-space-3);
  width: 100%;
  padding: var(--admin-space-3);
  border: 1px solid var(--admin-border-strong);
  border-radius: var(--admin-radius);
  font-size: var(--admin-text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--admin-transition-fast);
}

.auth-provider-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-apple-btn {
  background: var(--admin-text);
  color: #000;
  margin-bottom: var(--admin-space-2);
}

.auth-apple-btn:hover:not(:disabled) {
  background: #d4d4d4;
}

.auth-google-btn {
  background: #fff;
  color: #333;
}

.auth-google-btn:hover:not(:disabled) {
  background: #f0f0f0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--admin-space-3);
  margin: var(--admin-space-5) 0;
  color: var(--admin-text-muted);
  font-size: var(--admin-text-xs);
}

.auth-divider span:first-child,
.auth-divider span:last-child {
  flex: 1;
  height: 1px;
  background: var(--admin-border);
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--admin-text-secondary);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 10px 12px;
  background: var(--admin-bg-secondary);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm, 4px);
  color: var(--admin-text);
  font-size: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px var(--admin-accent-subtle);
}

.auth-field input::placeholder {
  color: var(--admin-text-muted);
}

.auth-error {
  display: none;
  padding: var(--admin-space-2) var(--admin-space-3);
  margin-bottom: var(--admin-space-4);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--admin-radius-sm, 4px);
  color: var(--admin-danger);
  font-size: var(--admin-text-sm);
}

.auth-submit-btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--admin-accent);
  color: #fff;
  border: none;
  border-radius: var(--admin-radius-sm, 4px);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
  background: var(--admin-accent-hover);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-switch {
  text-align: center;
  margin-top: var(--admin-space-4);
  font-size: var(--admin-text-sm);
  color: var(--admin-text-muted);
}

.auth-switch-link {
  background: none;
  border: none;
  color: var(--admin-accent);
  font-size: var(--admin-text-sm);
  cursor: pointer;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.auth-switch-link:hover {
  color: var(--admin-accent-hover);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-modal-dialog {
    padding: 32px 20px 24px;
    border-radius: 12px;
  }
}

/* ===== UPSELL PRICING CARDS ===== */
.upsell-pricing-cards {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.upsell-pricing-card {
  flex: 1;
  background: var(--admin-bg-secondary);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-md);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s ease;
}

.upsell-pricing-card:hover {
  border-color: var(--admin-border-strong);
}

.upsell-pricing-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
}

.upsell-pricing-badge.artist {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.12);
}

.upsell-pricing-badge.studio {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.upsell-pricing-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--admin-text);
  line-height: 1;
}

.upsell-pricing-desc {
  font-size: 11px;
  color: var(--admin-text-muted);
  line-height: 1.3;
}

.upsell-pricing-btn {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 7px 0;
  background: var(--admin-accent);
  color: #fff;
  border: none;
  border-radius: var(--admin-radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.upsell-pricing-btn:hover {
  background: var(--admin-accent-hover);
  color: #fff;
}

/* Locked button state */
.admin-btn-locked {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.admin-lock-message {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--admin-text-muted);
}

.admin-lock-message button {
  background: none;
  border: none;
  color: var(--admin-accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.admin-lock-message button:hover {
  text-decoration: underline;
}
