:root {
  --primary: #c59b27;
  --primary-hover: #b38a1f;
  --primary-light: #fef9db;
  --primary-border: #f6e05e;
  --dark: #121212;
  --dark-surface: #1e1e1e;
  --bg-page: #f8fafc;
  --surface: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}

/* App Container */
.app-container {
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--surface);
  min-height: 100vh;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Header SalonSoft Style */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand-soft-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.soft-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.soft-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1a1a1a;
}

.soft-title span {
  color: var(--primary);
  font-weight: 300;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header {
  background-color: #f3f4f6;
  color: #374151;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-header:hover {
  background-color: #e5e7eb;
}

/* PWA Banner */
.pwa-banner {
  background: linear-gradient(135deg, #18181b, #27272a);
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  gap: 10px;
}

.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pwa-logo-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pwa-banner-btn {
  background: var(--primary);
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.pwa-close-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

/* Hero Section */
.hero-barbershop {
  padding: 20px 20px 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border-light);
}

.barbershop-logo-wrap {
  position: relative;
}

.barbershop-logo-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--primary);
  background: #000;
}

.barbershop-info {
  flex: 1;
}

.welcome-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.shop-name-title {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
}

.shop-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--primary-light);
  color: #854d0e;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.cat-pill {
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.cat-pill.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

/* Section Titles */
.section-header {
  padding: 16px 20px 8px 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

/* Services List */
.services-list {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

.service-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  transition: background 0.2s;
}

.service-card:last-child {
  border-bottom: none;
}

.service-details {
  flex: 1;
}

.service-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
  text-transform: capitalize;
}

.service-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.service-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4b5563;
}

.service-meta-item.price {
  font-weight: 600;
  color: #111827;
}

.btn-reserve {
  background-color: var(--primary-light);
  color: #1f2937;
  border: 1px solid rgba(197, 155, 39, 0.25);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 0.2s;
  white-space: nowrap;
  margin-top: 4px;
}

.btn-reserve:hover {
  background-color: #fef08a;
  transform: translateY(-1px);
}

/* STEP 2: Seleção de Profissional, Data e Horário */
.selection-page {
  padding: 16px 20px;
}

.selection-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.selected-service-info {
  font-size: 14px;
  color: var(--text-muted);
}

.selected-service-info strong {
  color: #111827;
  font-size: 15px;
}

.btn-text-back {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.step-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 12px;
}

/* Professional Card */
.professional-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary-border);
  background-color: var(--primary-light);
  width: fit-content;
  margin-bottom: 24px;
}

.prof-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
}

.prof-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.prof-info p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Date Carousel SalonSoft Style */
.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.month-label {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  text-transform: capitalize;
}

.month-nav-btns {
  display: flex;
  gap: 6px;
}

.nav-arrow-btn {
  background: #f3f4f6;
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #4b5563;
  transition: all 0.2s;
}

.nav-arrow-btn:hover {
  background: #e5e7eb;
}

.days-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.days-strip::-webkit-scrollbar {
  display: none;
}

.day-chip {
  flex: 0 0 calc(14.28% - 7px);
  min-width: 54px;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  background-color: #f3f4f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.day-chip-name {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}

.day-chip-num {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  margin-top: 2px;
}

.day-chip.active {
  background-color: #fef08a;
  border: 1px solid var(--primary-border);
}

.day-chip.active .day-chip-name {
  color: #854d0e;
}

.day-chip.active .day-chip-num {
  color: #111827;
}

.day-chip.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Time Slots Grid */
.slots-container {
  margin-top: 20px;
}

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

@media (max-width: 400px) {
  .slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.slot-btn {
  padding: 10px 4px;
  background-color: #f3f4f6;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.slot-btn:hover:not(.disabled) {
  background-color: #e5e7eb;
}

.slot-btn.selected {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(197, 155, 39, 0.4);
}

.slot-btn.disabled {
  background-color: #fafafa;
  color: #d1d5db;
  border-color: #f3f4f6;
  cursor: not-allowed;
  text-decoration: line-through;
  font-size: 13px;
}

.slots-empty-notice {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
  font-size: 14px;
  background: #f9fafb;
  border-radius: var(--radius-md);
  margin-top: 10px;
}

/* MODAL: Serviço Adicionado (SalonSoft Exact Style) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 380px;
  padding: 24px 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  text-align: center;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header-title {
  font-size: 17px;
  font-weight: 700;
  color: #374151;
  text-align: center;
  width: 100%;
}

.modal-close-icon-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
}

.modal-circle-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #e5e7eb;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  margin: 0 auto 18px auto;
}

.modal-prompt-text {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  line-height: 1.4;
  margin-bottom: 22px;
  padding: 0 10px;
}

.modal-actions-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-modal-green {
  background-color: #059669;
  color: #ffffff;
  border: none;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-green:hover {
  background-color: #047857;
}

.btn-modal-yellow {
  background-color: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-yellow:hover {
  background-color: #fef08a;
}

.btn-modal-grey {
  background-color: #f3f4f6;
  color: #4b5563;
  border: none;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-grey:hover {
  background-color: #e5e7eb;
}

/* CART & USER INFO SCREEN */
.cart-page {
  padding: 20px;
}

.cart-item-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.cart-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.cart-item-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  text-transform: capitalize;
}

.btn-delete-item {
  background-color: var(--danger-light);
  border: none;
  color: var(--danger);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 4px;
}

.cart-item-row strong {
  color: #111827;
}

.user-info-section {
  margin-top: 16px;
}

.user-info-title {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  margin-bottom: 16px;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  background-color: #ffffff;
}

.form-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.btn-cart-finalize {
  background-color: #059669;
  color: #ffffff;
  border: none;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  margin-bottom: 10px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-cart-finalize:hover {
  background-color: #047857;
}

.btn-cart-back {
  background-color: #f3f4f6;
  color: #4b5563;
  border: none;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cart-back:hover {
  background-color: #e5e7eb;
}

/* COMPROVANTE & RECEIPT SCREEN */
.receipt-page {
  padding: 24px 20px;
}

.success-badge-card {
  text-align: center;
  margin-bottom: 20px;
}

.success-check-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px auto;
  border: 2px solid #a7f3d0;
}

.receipt-ticket {
  background: #ffffff;
  border: 2px dashed #d1d5db;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.ticket-header {
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.ticket-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 6px;
  border: 1px solid var(--primary);
}

.ticket-code-tag {
  display: inline-block;
  background: #111827;
  color: var(--primary);
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 6px;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.ticket-label {
  color: #6b7280;
}

.ticket-value {
  font-weight: 600;
  color: #111827;
  text-align: right;
}

.ticket-total-row {
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 800;
  color: #059669;
}

.btn-whatsapp-ticket {
  background-color: #25d366;
  color: #ffffff;
  border: none;
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  text-decoration: none;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.btn-whatsapp-ticket:hover {
  background-color: #22c35e;
  transform: translateY(-1px);
}

.btn-outline-print {
  background-color: transparent;
  color: #374151;
  border: 1px solid #d1d5db;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* FLOATING CART BUTTON (if in booking step) */
.floating-cart-badge {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  z-index: 50;
  font-size: 14px;
  font-weight: 700;
}

.floating-cart-badge span {
  background: var(--primary);
  color: #000;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.toast-notice.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Meus Agendamentos Modal */
.my-bookings-list {
  max-height: 380px;
  overflow-y: auto;
  text-align: left;
  margin-top: 14px;
}

.my-booking-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  background: #f9fafb;
}

.my-booking-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.status-confirmado {
  background: #d1fae5;
  color: #065f46;
}

.status-pendente {
  background: #fef3c7;
  color: #92400e;
}

.status-concluido {
  background: #e0f2fe;
  color: #075985;
}

.status-cancelado {
  background: #fee2e2;
  color: #991b1b;
}

/* Utility Helpers */
.hidden {
  display: none !important;
}
