/* ==========================================================================
   VANITY STUDIOS — ADMIN CMS STYLESHEET
   Clean, modern, accessible interface for non-technical users
   ========================================================================== */

:root {
  --admin-bg: #0f1015;
  --admin-sidebar: #15161e;
  --admin-card: #1b1c27;
  --admin-card-hover: #222433;
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-border-focus: #d4af37;
  
  --gold-accent: #d4af37;
  --gold-light: #f3e5ab;
  --gold-glow: rgba(212, 175, 55, 0.15);

  --text-main: #f3f3f8;
  --text-muted: #9d9db2;
  --text-subtle: #6c6c82;

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--admin-bg);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}

/* ==========================================================================
   LOGIN MODAL / SCREEN
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 14, 0.95);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.login-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.login-sub {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--gold-accent);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.login-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: #fff;
}

.login-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.pin-input-group {
  margin-bottom: 20px;
  text-align: left;
}

.pin-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #111219;
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 0.2em;
  font-weight: 600;
  transition: all 0.2s;
}

.pin-input:focus {
  outline: none;
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.login-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f5e2a3 0%, #d4af37 100%);
  color: #0b0b0e;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.login-hint {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 18px;
}

.login-error {
  display: none;
  color: #f87171;
  font-size: 0.82rem;
  margin-top: 12px;
}

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */
.admin-sidebar {
  width: 280px;
  background: var(--admin-sidebar);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--admin-border);
}

.sidebar-brand h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  text-transform: uppercase;
}

.sidebar-brand span {
  font-size: 0.75rem;
  color: var(--gold-accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

.sidebar-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  width: 100%;
}

.nav-tab-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  color: #fff;
  background: rgba(212, 175, 55, 0.15);
  border-left: 3px solid var(--gold-accent);
  font-weight: 600;
}

.nav-tab-btn.active svg {
  color: var(--gold-accent);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-sidebar-view {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-sidebar-view:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold-light);
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 6px;
  transition: all 0.2s;
}

.btn-logout:hover {
  color: #f87171;
}

/* ==========================================================================
   ADMIN MAIN CONTENT
   ========================================================================== */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(21, 22, 30, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--admin-border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Page Switcher Dropdown */
.topbar-page-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(11, 11, 14, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.45);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.topbar-page-selector label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.page-select-dropdown {
  background: #191b26;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.page-select-dropdown:hover, .page-select-dropdown:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
  background: #202230;
}

.page-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.page-badge.home {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.page-badge.maternity {
  background: rgba(236, 72, 153, 0.18);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.45);
}

.topbar-title h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.topbar-title p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.save-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.save-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.save-status-dot.unsaved {
  background: var(--warning);
}

.btn-save-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f5e2a3 0%, #d4af37 100%);
  color: #0b0b0e;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.btn-save-all:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.admin-body {
  padding: 32px;
  max-width: 1000px;
  width: 100%;
}

/* ==========================================================================
   TAB PANES & FORM SECTIONS
   ========================================================================== */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

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

.admin-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.card-header-clean {
  border-bottom: 1px solid var(--admin-border);
  padding-bottom: 16px;
  margin-bottom: 22px;
}

.card-header-clean h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.card-header-clean p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Form Controls */
.admin-field-group {
  margin-bottom: 20px;
}

.admin-field-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e2ec;
  margin-bottom: 6px;
}

.admin-field-help {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

.admin-input, .admin-textarea, .admin-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: #12131b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.2s;
}

.admin-input:focus, .admin-textarea:focus, .admin-select:focus {
  outline: none;
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

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

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* Image Upload & Preset Picker */
.image-selector-widget {
  background: #13141c;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.image-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.image-thumb-preview {
  width: 110px;
  height: 80px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--admin-border);
  object-fit: cover;
  background: #090a0f;
}

.image-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.file-upload-btn-wrap {
  position: relative;
  display: inline-block;
}

.btn-upload-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--admin-border);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload-file:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--gold-accent);
}

.hidden-file-input {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.curated-presets-row {
  border-top: 1px dashed var(--admin-border);
  padding-top: 12px;
}

.curated-presets-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  margin-bottom: 8px;
  display: block;
}

.curated-presets-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.preset-thumb-btn {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  width: 60px;
  height: 45px;
  flex-shrink: 0;
  padding: 0;
  background: none;
  transition: all 0.2s;
}

.preset-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preset-thumb-btn:hover {
  border-color: var(--gold-accent);
  transform: scale(1.05);
}

/* Repeated items list (Services & Testimonials) */
.item-card {
  background: #151620;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.item-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
}

.item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--admin-border);
}

.item-title-badge {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.btn-danger-sm {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-add-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed var(--admin-border-focus);
  color: var(--gold-light);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.btn-add-item:hover {
  background: rgba(212, 175, 55, 0.12);
}

/* Inquiries Table */
.inquiries-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.inquiries-table th {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--admin-border);
  color: var(--text-subtle);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.inquiries-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e2eb;
}

.inquiries-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.new {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.status-badge.contacted {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-badge.booked {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Toast Notifications */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  background: #1b1c27;
  border: 1px solid var(--gold-accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  animation: slideUp 0.3s ease-out;
}

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

@media (max-width: 900px) {
  body {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .grid-2col, .grid-4col {
    grid-template-columns: 1fr;
  }
}
