:root {
  --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  --accent-pink: #e88ba6;
  --accent-pink-dark: #d46b88;
  --accent-gold: #d4af37;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
  --radius: 20px;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo {
  max-width: 170px;
  width: 100%;
  height: auto;
  margin: 0 auto 12px auto;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(232, 139, 166, 0.25));
  border-radius: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-logo:hover {
  transform: scale(1.04);
}

.header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #333;
  letter-spacing: -0.5px;
}

.header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-card.hidden-section {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden;
  border: none;
  pointer-events: none;
}

.section-card {
  opacity: 1;
  max-height: 1200px;
  scroll-margin-top: 16px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

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

.section-title h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}

.step-badge {
  background: linear-gradient(135deg, #e88ba6 0%, #d46b88 100%);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.btn-change {
  background: transparent;
  border: 1px solid rgba(232, 139, 166, 0.4);
  color: var(--accent-pink-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-change:hover {
  background: rgba(232, 139, 166, 0.1);
}

.service-item {
  border: 1px solid rgba(232, 139, 166, 0.2);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
  background: rgba(255, 255, 255, 0.65);
}

.service-item:hover, .service-item.selected {
  border-color: var(--accent-pink);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgba(232, 139, 166, 0.18);
}

.service-item-info {
  flex: 1;
  min-width: 0;
}

.service-name {
  font-weight: 600;
  font-size: 0.98rem;
  color: #2c3e50;
  line-height: 1.4;
  word-break: break-word;
}

.service-price {
  font-weight: 700;
  color: var(--accent-pink-dark);
  font-size: 1rem;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(232, 139, 166, 0.12);
  border: 1px solid rgba(232, 139, 166, 0.25);
  padding: 6px 12px;
  border-radius: 10px;
}

.service-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.service-price {
  font-weight: 700;
  color: var(--accent-pink);
  font-size: 1.1rem;
}

/* Days Carousel */
.days-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.day-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.day-pill:hover, .day-pill.selected {
  background: var(--accent-pink);
  color: white;
  border-color: var(--accent-pink);
}

.day-pill .day-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.8;
}

.day-pill .day-num {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 2px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #e88ba6 0%, #d46b88 100%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(232, 139, 166, 0.4);
  transition: opacity 0.2s, transform 0.1s;
}

.btn-primary:active {
  transform: scale(0.98);
}

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

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-pink);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.slot-btn {
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.slot-btn.selected {
  background: var(--accent-pink);
  color: white;
  border-color: var(--accent-pink);
}

.booking-summary-badge {
  background: rgba(232, 139, 166, 0.12);
  border: 1px solid rgba(232, 139, 166, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #333;
}

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

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

.modal-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

.modal-summary {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.message-preview-box {
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.85rem;
  color: #2c3e50;
  margin-bottom: 20px;
  font-style: italic;
}

.btn-whatsapp-action {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-delete-only-action {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 12px;
  background: rgba(231, 76, 60, 0.08);
  color: #c0392b;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
}

.btn-cancel-modal-action {
  width: 100%;
  padding: 10px;
  border: none;
  background: transparent;
  color: #7f8c8d;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-cancel-modal-action {
  width: 100%;
  padding: 10px;
  border: none;
  background: transparent;
  color: #7f8c8d;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

/* Admin Base & Responsive Styles */
.admin-container {
  max-width: 720px;
  width: 100%;
}

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

.btn-logout-header {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: #e74c3c;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
  transition: transform 0.2s, background 0.2s;
  white-space: nowrap;
}

.btn-logout-header:active {
  transform: scale(0.96);
}

.admin-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.nav-tab {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-tab.active {
  background: var(--accent-pink);
  color: white;
  border-color: var(--accent-pink);
}

.tab-content {
  display: none;
}

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

.date-group-header {
  background: rgba(232, 139, 166, 0.12);
  border: 1px solid rgba(232, 139, 166, 0.25);
  color: #2c3e50;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  margin: 20px 0 12px 0;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.date-group-badge {
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--accent-pink);
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.app-card {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.app-info {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

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

.whatsapp-btn {
  color: #27ae60;
  text-decoration: none;
  font-weight: 600;
  background: #e8f8f5;
  border: 1px solid rgba(39, 174, 96, 0.2);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  white-space: nowrap;
}

.btn-delete-appt {
  border: none;
  background: #e74c3c;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.service-admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  margin-bottom: 8px;
  gap: 10px;
}

.form-row-2col {
  display: flex;
  gap: 10px;
}

.hour-row-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.hour-day-label {
  width: 90px;
  font-weight: 600;
}

.hour-times-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hour-row-item input[type="time"] {
  width: 110px;
}

/* Mobile Responsiveness (< 560px) */
@media (max-width: 560px) {
  body {
    padding: 10px 8px;
  }

  .admin-container {
    padding: 0;
  }

  .admin-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .admin-header h1 {
    font-size: 1.35rem;
  }

  .admin-header p {
    font-size: 0.8rem;
  }

  .form-row-2col {
    flex-direction: column;
    gap: 0;
  }

  .app-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .app-actions {
    width: 100%;
    justify-content: space-between;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    padding-top: 10px;
    margin-top: 4px;
  }

  .service-admin-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .service-admin-item button {
    align-self: flex-end;
  }

  .hour-row-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hour-row-item .hour-day-label {
    flex: 1;
    font-weight: 700;
    width: auto;
  }

  .hour-row-item .hour-times-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .hour-row-item input[type="time"] {
    flex: 1;
    width: auto !important;
  }

  .form-control, .btn-primary, .btn-secondary {
    font-size: 16px !important;
    min-height: 46px;
  }

  .service-item {
    padding: 12px 14px;
    gap: 10px;
  }

  .service-name {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .service-price {
    font-size: 0.92rem;
    padding: 5px 10px;
  }

  .modal-card {
    padding: 20px 16px;
    max-width: 95%;
    border-radius: 20px;
  }
}

