/* BarberBook — estilos globais */

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

:root {
  --amber:      #BA7517;
  --amber-lt:   #FAEEDA;
  --amber-md:   #FAC775;
  --amber-dk:   #633806;
  --teal:       #0F6E56;
  --teal-lt:    #E1F5EE;
  --red:        #A32D2D;
  --red-lt:     #FCEBEB;
  --gray-50:    #F1EFE8;
  --gray-100:   #D3D1C7;
  --gray-600:   #5F5E5A;
  --text:       #1a1a18;
  --text-muted: #5F5E5A;
  --border:     rgba(0,0,0,0.10);
  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 1px 4px rgba(0,0,0,0.08);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: #f8f7f4;
  line-height: 1.6;
}

/* ── Layout ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.page-wrap  { padding: 24px 0 60px; }

/* ── Topbar ── */
.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 52px; gap: 12px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 16px; color: var(--text);
  text-decoration: none;
}
.logo-icon {
  width: 28px; height: 28px;
  background: var(--amber-md);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ── Cards ── */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}
.card-sm { padding: 14px 16px; }

/* ── Grids ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

@media (max-width: 640px) {
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
}

/* ── Métricas ── */
.metric {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.metric-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.metric-value { font-size: 22px; font-weight: 600; }
.metric-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Botões ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 500;
  cursor: pointer; background: white;
  color: var(--text);
  transition: all 0.15s;
  text-decoration: none;
}
.btn:hover { background: var(--gray-50); }
.btn-primary {
  background: var(--amber-md);
  border-color: var(--amber-md);
  color: var(--amber-dk);
}
.btn-primary:hover { background: var(--amber); color: white; border-color: var(--amber); }
.btn-teal   { background: var(--teal-lt); border-color: #9FE1CB; color: var(--teal); }
.btn-danger { background: var(--red-lt);  border-color: #F7C1C1; color: var(--red); }
.btn-sm     { padding: 5px 11px; font-size: 12px; }
.btn-full   { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Formulários ── */
.form-row   { margin-bottom: 14px; }
.label      { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 5px; }
.input, select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
  background: white; color: var(--text);
  outline: none; transition: border-color 0.15s;
}
.input:focus, select:focus, textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-lt);
}
textarea { resize: vertical; min-height: 80px; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px; font-weight: 600;
}
.badge-amber  { background: var(--amber-lt); color: var(--amber-dk); }
.badge-teal   { background: var(--teal-lt);  color: var(--teal); }
.badge-red    { background: var(--red-lt);   color: var(--red); }
.badge-gray   { background: var(--gray-50);  color: var(--gray-600); }

/* ── Avatar ── */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  flex-shrink: 0;
  background: var(--amber-lt); color: var(--amber-dk);
}

/* ── Seção título ── */
.sec-title {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* ── Divisor ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Row helpers ── */
.row   { display: flex; align-items: center; gap: 10px; }
.row-b { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ── Steps (agendamento) ── */
.steps { display: flex; align-items: center; margin-bottom: 24px; }
.step-circle {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  flex-shrink: 0; background: white;
}
.step-circle.done   { background: var(--amber-md); border-color: var(--amber); color: var(--amber-dk); }
.step-circle.active { background: var(--amber-lt); border-color: var(--amber); color: var(--amber-dk); }
.step-line  { flex: 1; height: 1px; background: var(--border); margin: 0 4px; }
.step-label { font-size: 11px; color: var(--text-muted); }
.step-label.active { color: var(--amber-dk); font-weight: 600; }

/* ── Time slots ── */
.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.tslot {
  padding: 8px 4px; text-align: center;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; background: white;
  transition: all 0.15s;
}
.tslot:hover   { border-color: var(--amber); background: var(--amber-lt); color: var(--amber-dk); }
.tslot.sel     { background: var(--amber-lt); border-color: var(--amber); color: var(--amber-dk); font-weight: 600; }
.tslot.booked  { background: var(--red-lt); color: var(--red); cursor: not-allowed; }
.tslot.blocked { background: var(--gray-50); color: var(--gray-100); cursor: not-allowed; text-decoration: line-through; }

/* ── Date strip ── */
.date-strip { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.date-btn {
  flex-shrink: 0; width: 52px; padding: 7px 4px;
  text-align: center; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  background: white; transition: all 0.15s;
}
.date-btn .day-name { font-size: 10px; color: var(--text-muted); }
.date-btn .day-num  { font-size: 17px; font-weight: 600; }
.date-btn.sel { background: var(--amber-lt); border-color: var(--amber); }
.date-btn.sel .day-name,
.date-btn.sel .day-num  { color: var(--amber-dk); }

/* ── WhatsApp box ── */
.wapp-box {
  background: var(--teal-lt);
  border: 1px solid #9FE1CB;
  border-radius: var(--radius);
  padding: 16px;
  display: flex; gap: 12px;
}
.wapp-icon {
  width: 36px; height: 36px;
  background: var(--teal); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Timeline (agenda) ── */
.timeline { border-left: 2px solid var(--border); margin-left: 6px; padding-left: 16px; }
.tl-item  { position: relative; margin-bottom: 16px; }
.tl-dot   {
  position: absolute; left: -22px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray-100);
}
.tl-dot.done   { background: var(--teal); }
.tl-dot.active { background: var(--amber); }
.tl-time  { font-size: 11px; color: var(--text-muted); margin-bottom: 1px; }
.tl-name  { font-size: 13px; font-weight: 600; }
.tl-sub   { font-size: 12px; color: var(--text-muted); }

/* ── Loading / empty states ── */
.loading { text-align: center; padding: 40px; color: var(--text-muted); font-size: 14px; }
.empty   { text-align: center; padding: 32px; color: var(--text-muted); font-size: 14px; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1a1a18; color: white;
  padding: 10px 20px; border-radius: 99px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity 0.3s;
  z-index: 999; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ── Stars ── */
.stars { color: var(--amber); letter-spacing: 1px; }
