.admin-body {
  background: #0e0c09;
  color: #f3efe7;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The site-wide h1-h4 default color is a near-black meant for light
   backgrounds. Every heading on this dark admin page needs to override it. */
.admin-body h1,
.admin-body h2,
.admin-body h3,
.admin-body h4 {
  color: #f3efe7;
}

.admin-body .form-group label {
  color: #c7c0b2;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.4px;
}

/* The site-wide form-group input/select/textarea is light-themed
   (cream background, near-black text) — needs a dark override here,
   same reasoning as the .btn and .modal overrides above. */
.admin-body .form-group input,
.admin-body .form-group select,
.admin-body .form-group textarea {
  background: rgba(243, 239, 231, 0.04);
  border: 1px solid #3a352c;
  color: #f3efe7;
  color-scheme: dark;
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
}

.admin-body .form-group input:focus,
.admin-body .form-group select:focus,
.admin-body .form-group textarea:focus {
  border-color: var(--gold-light);
}

.admin-body .form-group input[readonly] {
  color: #c7c0b2;
  cursor: default;
}

/* The site-wide .btn is a near-black border/text meant for light
   backgrounds — invisible on this dark admin page without an override. */
.admin-body .btn {
  border-color: #f3efe7;
  color: #f3efe7;
  font-weight: 600;
  font-size: 0.88rem;
}

.admin-body .btn:hover {
  background: #f3efe7;
  color: #0e0c09;
}

.admin-body .form-note {
  color: #b8b0a0;
}

/* Login screen */
.admin-login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #1a1611 0%, #0e0c09 70%);
  padding: 24px;
}

.admin-login-card {
  background: rgba(28, 24, 18, 0.6);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(207, 161, 94, 0.25);
  border-radius: 20px;
  padding: 44px;
  width: 100%;
  max-width: 380px;
}

.admin-login-card .form-group label {
  color: #b8b0a0;
}

.admin-login-card input {
  background: rgba(14, 12, 9, 0.6);
  border: 1px solid rgba(207, 161, 94, 0.25);
  color: #f3efe7;
}

/* App shell */
.admin-app {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 230px;
  flex-shrink: 0;
  background: #131009;
  border-right: 1px solid #2a2620;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar-logo {
  padding: 0 24px 24px;
  display: block;
  border-bottom: 1px solid #2a2620;
  margin-bottom: 16px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  padding: 0 12px;
}

.admin-nav-item {
  text-align: left;
  background: none;
  border: none;
  color: #c7c0b2;
  font-family: "Montserrat", sans-serif;
  font-size: 0.94rem;
  font-weight: 500;
  padding: 13px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.admin-nav-item:hover {
  background: rgba(207, 161, 94, 0.08);
  color: #f3efe7;
}

.admin-nav-item.active {
  background: rgba(207, 161, 94, 0.15);
  color: var(--gold-light);
  font-weight: 500;
}

.admin-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--gold-light);
  color: #1c1a14;
  font-size: 0.7rem;
  font-weight: 700;
}

.admin-sidebar-footer {
  padding: 16px 24px 0;
  border-top: 1px solid #2a2620;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-sidebar-link {
  background: none;
  border: none;
  color: #b8b0a0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.admin-sidebar-link:hover {
  color: var(--gold-light);
}

.admin-main {
  flex: 1;
  padding: 40px 44px;
  max-width: 1200px;
}

.admin-section-title {
  font-family: "Montserrat", sans-serif;
  font-style: normal;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.3px;
  margin-bottom: 28px;
}

.admin-section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-section-header-row .admin-section-title {
  margin-bottom: 0;
}

/* Glassmorphism stat cards */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

.admin-stat-card {
  background: rgba(243, 239, 231, 0.04);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(207, 161, 94, 0.2);
  border-radius: 16px;
  padding: 22px 24px;
}

.admin-stat-card-clickable {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.admin-stat-card-clickable:hover {
  border-color: var(--gold-light);
  background: rgba(207, 161, 94, 0.08);
  transform: translateY(-2px);
}

.admin-panel-clickable {
  cursor: pointer;
  transition: border-color 0.15s;
}

.admin-panel-clickable:hover {
  border-color: rgba(207, 161, 94, 0.4);
}

.admin-panel-link {
  float: right;
  font-size: 0.78rem;
  text-transform: none;
  color: var(--gold-light);
  font-style: normal;
  font-family: var(--font-sans);
}

.admin-panel-link-hint {
  color: #8a8377;
  cursor: default;
}

.appt-date-badge,
.appt-time-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 4px;
}

.appt-date-badge { background: rgba(86, 152, 196, 0.18); color: #8cc6f0; }
.appt-time-badge { background: rgba(207, 161, 94, 0.2); color: #f0c987; }

.reminder-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 4px;
}

.reminder-scheduled { background: rgba(138, 131, 119, 0.18); color: #b8b0a0; }
.reminder-sent { background: rgba(86, 167, 99, 0.16); color: #93e0a3; }
.reminder-failed { background: rgba(196, 86, 86, 0.16); color: #f0a0a0; }

.admin-stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #c7c0b2;
  margin-bottom: 8px;
}

.admin-stat-value {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.9rem;
  color: var(--gold-light);
}

.admin-stat-sub {
  font-size: 0.78rem;
  color: #8a8377;
  margin-top: 4px;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-panel {
  background: rgba(243, 239, 231, 0.03);
  border: 1px solid #2a2620;
  border-radius: 16px;
  padding: 24px;
}

.admin-panel-title {
  font-family: "Montserrat", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.1px;
  margin-bottom: 16px;
  color: #f3efe7;
}

/* Filters */
.admin-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.admin-filter-row input {
  flex: 1;
  min-width: 220px;
  background: rgba(243, 239, 231, 0.04);
  border: 1px solid #3a352c;
  color: #f3efe7;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.92rem;
}

.admin-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-pill {
  background: none;
  border: 1px solid #3a352c;
  color: #c7c0b2;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-pill:hover {
  border-color: var(--gold-light);
}

.admin-pill.active {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: #0e0c09;
}

#client-search {
  width: 100%;
  background: rgba(243, 239, 231, 0.04);
  border: 1px solid #2a2620;
  color: #f3efe7;
  padding: 11px 14px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

/* Row cards (appointments, clients, services, reviews) */
.admin-row-card {
  background: rgba(243, 239, 231, 0.035);
  border: 1px solid #2a2620;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.admin-row-card:hover {
  border-color: rgba(207, 161, 94, 0.45);
  background: rgba(243, 239, 231, 0.05);
  cursor: pointer;
}

.admin-row-main h4 {
  font-family: "Montserrat", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.1px;
  color: #ffffff;
  margin-bottom: 8px;
}

.admin-row-meta {
  color: #c7c0b2;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.65;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-row-actions select,
.admin-row-actions button {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  background: #1c1813;
  border: 1px solid #3a352c;
  color: #f3efe7;
  color-scheme: dark;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  transition: border-color 0.15s, background 0.15s;
}

.admin-row-actions button:hover {
  border-color: var(--gold-light);
  background: rgba(207, 161, 94, 0.1);
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pending { background: rgba(207, 161, 94, 0.16); color: #e0b46e; border-color: rgba(207, 161, 94, 0.35); }
.status-confirmed { background: rgba(86, 152, 196, 0.16); color: #8cc6f0; border-color: rgba(86, 152, 196, 0.35); }
.status-completed { background: rgba(86, 167, 99, 0.16); color: #93e0a3; border-color: rgba(86, 167, 99, 0.35); }
.status-cancelled { background: rgba(196, 86, 86, 0.16); color: #f0a0a0; border-color: rgba(196, 86, 86, 0.35); }

.admin-empty {
  color: #6b6558;
  font-size: 0.9rem;
  padding: 16px 0;
}

/* Revenue calendar */
.revenue-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a8377;
  padding-bottom: 6px;
}

.calendar-day {
  background: rgba(243, 239, 231, 0.03);
  border: 1px solid #2a2620;
  border-radius: 10px;
  min-height: 76px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.calendar-day:hover {
  border-color: var(--gold-light);
  background: rgba(207, 161, 94, 0.06);
}

.calendar-day.empty {
  background: none;
  border: none;
  cursor: default;
}

.calendar-day.today {
  border-color: var(--gold-light);
}

.calendar-day-num {
  font-size: 0.8rem;
  color: #b8b0a0;
  margin-bottom: 6px;
}

.calendar-day-revenue {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gold-light);
}

.calendar-day-count {
  font-size: 0.7rem;
  color: #8a8377;
  margin-top: 2px;
}

/* Weekly appointments calendar */
.weekly-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.weekly-day {
  background: rgba(243, 239, 231, 0.03);
  border: 1px solid #2a2620;
  border-radius: 10px;
  padding: 10px;
  min-height: 120px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.weekly-day:hover {
  border-color: var(--gold-light);
  background: rgba(207, 161, 94, 0.06);
}

.weekly-day.today {
  border-color: var(--gold-light);
}

.weekly-day-header {
  text-align: center;
  margin-bottom: 8px;
}

.weekly-day-name {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #a39c8e;
}

.weekly-day-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f3efe7;
}

.weekly-appt {
  background: rgba(207, 161, 94, 0.1);
  border: 1px solid #3a352c;
  border-radius: 8px;
  padding: 7px 9px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.weekly-appt:hover {
  border-color: var(--gold-light);
  background: rgba(207, 161, 94, 0.18);
}

.weekly-appt-time {
  color: #f0c987;
  font-weight: 700;
}

.weekly-appt-name {
  color: #f3efe7;
  font-weight: 500;
  display: block;
}

.weekly-day-empty {
  font-size: 0.75rem;
  color: #6b6558;
  text-align: center;
  padding-top: 12px;
}

/* Notifications dropdown */
.admin-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.notif-bell-wrap {
  position: relative;
}

.notif-bell-btn {
  position: relative;
  background: rgba(243, 239, 231, 0.03);
  border: 1px solid #2a2620;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #f3efe7;
  font-size: 1.1rem;
}

.notif-bell-btn:hover {
  border-color: var(--gold-light);
}

.notif-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold-light);
  color: #1c1a14;
  font-size: 0.68rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}

.notif-bell-badge.visible {
  display: flex;
}

.notif-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: #1c1a14;
  border: 1px solid #2a2620;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  z-index: 50;
  display: none;
}

.notif-dropdown.open {
  display: block;
}

.notif-dropdown-header {
  padding: 14px 18px;
  border-bottom: 1px solid #2a2620;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f3efe7;
}

.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid #2a2620;
  padding: 12px 18px;
  cursor: pointer;
  color: #f3efe7;
}

.notif-item:hover {
  background: rgba(207, 161, 94, 0.06);
}

.notif-item-type {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold-light);
  margin-bottom: 3px;
}

.notif-item-text {
  font-size: 0.85rem;
  color: #d8d2c0;
}

.notif-empty {
  padding: 24px 18px;
  text-align: center;
  color: #6b6558;
  font-size: 0.85rem;
}

/* Email composer */
.email-editor-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.email-editor-btn {
  background: rgba(243, 239, 231, 0.03);
  border: 1px solid #2a2620;
  border-radius: 6px;
  color: #f3efe7;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

.email-editor-btn:hover,
.email-editor-btn.active {
  border-color: var(--gold-light);
  background: rgba(207, 161, 94, 0.12);
}

.email-editor-body {
  width: 100%;
  min-height: 160px;
  max-height: 320px;
  overflow-y: auto;
  background: rgba(243, 239, 231, 0.03);
  border: 1px solid #2a2620;
  border-radius: 10px;
  padding: 12px 14px;
  color: #f3efe7;
  font-size: 0.95rem;
  line-height: 1.6;
}

.email-editor-body:focus {
  outline: none;
  border-color: var(--gold-light);
}

.email-editor-body ul {
  margin: 0 0 0 18px;
  padding: 0;
}

.btn-loading {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

@media (max-width: 640px) {
  .email-editor-toolbar { flex-wrap: wrap; }
}

/* Weekly day detail modal */
.week-day-modal-list {
  margin-top: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.week-day-modal-item:hover {
  border-color: var(--gold-light);
  background: rgba(207, 161, 94, 0.06);
}

@keyframes highlight-pulse {
  0%, 100% { box-shadow: none; background: rgba(243, 239, 231, 0.03); }
  25% { box-shadow: 0 0 0 3px rgba(207, 161, 94, 0.5); background: rgba(207, 161, 94, 0.12); }
}

.highlight-pulse {
  animation: highlight-pulse 1s ease-in-out 2;
  border-color: var(--gold-light) !important;
}

@media (max-width: 640px) {
  .week-day-modal-list {
    max-height: 70vh;
  }
}

.admin-stat-card-total {
  border-color: var(--gold-light);
  background: rgba(207, 161, 94, 0.08);
}

.admin-stat-card-total .admin-stat-value {
  font-size: 2.1rem;
}

/* Responsive */
@media (max-width: 900px) {
  .admin-app { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; flex-direction: row; overflow-x: auto; padding: 16px; }
  .admin-sidebar-logo { display: none; }
  .admin-nav { flex-direction: row; padding: 0; }
  .admin-sidebar-footer { display: none; }
  .admin-main { padding: 24px 18px; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid-2 { grid-template-columns: 1fr; }
  .weekly-calendar { grid-template-columns: repeat(7, 110px); overflow-x: auto; padding-bottom: 6px; }
}

@media (max-width: 640px) {
  .notif-dropdown { width: calc(100vw - 36px); right: -10px; }
}

/* Itemized services + total inside an appointment row */
.appt-services-list {
  background: rgba(243, 239, 231, 0.04);
  border: 1px solid #2a2620;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.appt-service-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 0.92rem;
  padding: 5px 0;
  color: #ddd6c8;
}

.price-value {
  display: inline-block;
  color: #f0c987;
  font-family: "Montserrat", sans-serif;
  font-style: normal;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 12px rgba(207, 161, 94, 0.25);
}

#day-detail-list {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 6px;
}

#day-detail-modal .modal {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#day-detail-list::-webkit-scrollbar {
  width: 8px;
}

#day-detail-list::-webkit-scrollbar-thumb {
  background: rgba(207, 161, 94, 0.3);
  border-radius: 8px;
}

.appt-service-line .appt-service-name {
  color: #8fd0e8;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
}

.delete-appt-btn,
.delete-service-btn {
  color: #e68a8a !important;
  border-color: rgba(196, 86, 86, 0.35) !important;
}

.delete-appt-btn:hover,
.delete-service-btn:hover {
  background: rgba(196, 86, 86, 0.18) !important;
  border-color: #e68a8a !important;
}

.appt-service-total {
  border-top: 1px solid #3a352c;
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #f3efe7;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.appt-service-total span.price-value {
  font-size: 1.25rem;
}

/* The default .modal is light-themed (for the public site's service modal).
   Every modal on this admin page reuses dark-themed components
   (.admin-row-card etc), so the modal shell itself needs to be dark here,
   not the light default — scoped to .admin-body so it never touches the
   public site's modals. */
.admin-body .modal {
  background: #161310;
  border: 1px solid #2a2620;
}

.admin-body .modal h3 {
  font-family: "Montserrat", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.2px;
}

.admin-body .modal-close {
  color: #b8b0a0;
}

.admin-body .modal-close:hover {
  color: #f3efe7;
}
