/* ============================================================
   Estilos do site do cliente — tema "barbearia" escuro + dourado.
   Sem frameworks: CSS puro com variáveis, fácil de trocar as cores
   em admin/index.html (ou aqui) para revender white-label.
   ============================================================ */

:root {
  --primary: #c9962c;
  --primary-dark: #a97a1e;
  --bg: #101012;
  --bg-elevated: #18181b;
  --card: #1e1e22;
  --card-hover: #26262b;
  --border: #2d2d32;
  --text: #f4efe6;
  --text-muted: #a9a29a;
  --success: #4caf6b;
  --danger: #e0585a;
  --warning: #d9a441;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: 84px; /* espaço pra bottom nav mobile */
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

button {
  font-family: inherit;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 16, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar .brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--primary);
  flex: 1;
}

.topbar .back-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.topbar .back-btn:active {
  background: var(--card);
}

/* ---------- hero ---------- */

.hero {
  padding: 34px 0 22px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(201, 150, 44, 0.14), transparent 60%);
}

.hero .logo-circle {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  background-size: cover;
  background-position: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 14px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  margin: 0 0 6px;
}

.hero p.tagline {
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 0.98rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: none;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, opacity 0.15s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--primary);
  color: #191305;
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}
.btn-danger {
  background: rgba(224, 88, 90, 0.15);
  color: var(--danger);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- cards / sections ---------- */

.section {
  padding: 22px 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.info-row:last-child {
  border-bottom: none;
}
.info-row .ic {
  flex-shrink: 0;
}

/* ---------- services grid ---------- */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.service-card,
.picker-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  width: 100%;
  /* <button> não herda a cor do texto por padrão -> forçar */
  color: var(--text);
  font-family: inherit;
}
.service-card:hover,
.picker-card:hover {
  border-color: var(--primary);
  background: var(--card-hover);
}
.service-card.selected,
.picker-card.selected {
  border-color: var(--primary);
  background: rgba(201, 150, 44, 0.1);
}
.service-card .name,
.picker-card .name {
  font-weight: 600;
  margin: 0 0 3px;
  color: var(--text);
}
.service-card .meta,
.picker-card .meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.service-card .price {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

/* ---------- barbers ---------- */

.barbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.barber-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  color: var(--text); /* <button> não herda a cor do texto */
  font-family: inherit;
  width: 100%;
}
.barber-card:hover {
  border-color: var(--primary);
}
.barber-card.selected {
  border-color: var(--primary);
  background: rgba(201, 150, 44, 0.1);
}
.barber-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 8px;
}
.barber-card .name {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 3px;
  overflow-wrap: anywhere;
  hyphens: auto;
  color: var(--text);
}
.barber-card .bio {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- stepper (fluxo de agendamento) ---------- */

.stepper {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}
.stepper .dot {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.stepper .dot.active {
  background: var(--primary);
}
.stepper .dot.done {
  background: var(--primary-dark);
}

/* ---------- date picker ---------- */

.date-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.date-scroll::-webkit-scrollbar {
  display: none;
}
.date-chip {
  flex-shrink: 0;
  width: 62px;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  text-align: center;
  cursor: pointer;
}
.date-chip .dow {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.date-chip .num {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2px 0;
}
.date-chip .mon {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.date-chip.selected {
  border-color: var(--primary);
  background: rgba(201, 150, 44, 0.12);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
}
.time-chip {
  padding: 11px 4px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.time-chip:hover {
  border-color: var(--primary);
}
.time-chip.selected {
  background: var(--primary);
  color: #191305;
  border-color: var(--primary);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 30px 10px;
  font-size: 0.9rem;
}

/* ---------- forms ---------- */

.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
}
.field textarea {
  resize: vertical;
  min-height: 70px;
}

/* ---------- summary box ---------- */

.summary-box {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}
.summary-box .row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--border);
}
.summary-box .row:last-child {
  border-bottom: none;
}
.summary-box .row .label {
  color: var(--text-muted);
}
.summary-box .row.total {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
}

/* ---------- success screen ---------- */

.success-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(76, 175, 107, 0.15);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 10px auto 18px;
}

/* ---------- badges ---------- */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-confirmado {
  background: rgba(76, 175, 107, 0.15);
  color: var(--success);
}
.badge-concluido {
  background: rgba(120, 150, 220, 0.18);
  color: #93b1f0;
}
.badge-cancelado {
  background: rgba(224, 88, 90, 0.15);
  color: var(--danger);
}
.badge-faltou {
  background: rgba(217, 164, 65, 0.18);
  color: var(--warning);
}

/* ---------- appointment list item (minhas reservas / admin) ---------- */

.appt-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.appt-item .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.appt-item .when {
  font-weight: 700;
}
.appt-item .details {
  color: var(--text-muted);
  font-size: 0.87rem;
}
.appt-item .actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* ---------- bottom nav (mobile app feel) ---------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav button {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  padding: 6px 0;
  cursor: pointer;
  border-radius: 10px;
}
.bottom-nav button.active {
  color: var(--primary);
}
.bottom-nav .icon {
  font-size: 1.25rem;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(20px);
  background: #232327;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 100;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error {
  border-color: var(--danger);
  color: #ffb3b4;
}

/* ---------- utility ---------- */

.hidden {
  display: none !important;
}
.flex {
  display: flex;
}
.gap-8 {
  gap: 8px;
}
.mt-16 {
  margin-top: 16px;
}
.center {
  text-align: center;
}
.muted {
  color: var(--text-muted);
}
.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

footer.site-footer {
  text-align: center;
  padding: 26px 18px 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.footer-admin-link {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.footer-admin-link:hover,
.footer-admin-link:focus {
  border-color: var(--primary);
  color: var(--primary);
}
