/* ============================================
   RESET
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, #FAF7F2 0%, #F0E9E0 100%);
  color: #4A3B30;
  min-height: 100vh;
  overflow-x: hidden;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

/* ============================================
   HEADER / LOGO
   ============================================ */
.header {
  text-align: center;
  padding: 24px 0 16px;
}

.brand-logo {
  max-width: 130px;
  width: 45%;
  height: auto;
  display: block;
  margin: 0 auto 6px;
}

.subtitle {
  font-size: 11px;
  color: #8B6F5C;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ============================================
   CONTEÚDO / CARDS
   ============================================ */
.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 4px 20px rgba(139, 90, 60, 0.08);
}

.card h2 {
  font-size: 17px;
  color: #8B5A3C;
  margin-bottom: 12px;
}

.card p {
  font-size: 14px;
  color: #6B5B4B;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ============================================
   BOTÕES
   ============================================ */
.btn-primary {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #8B5A3C 0%, #B8895E 100%);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 20px rgba(139, 90, 60, 0.3);
  font-family: inherit;
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(139, 90, 60, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secundario {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  background: none;
  border: 2px solid #EDE4D8;
  border-radius: 12px;
  color: #8B5A3C;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-secundario:hover,
.btn-secundario:active {
  background: #FAF7F2;
}

.btn-voltar {
  background: none;
  border: none;
  color: #8B5A3C;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  padding: 8px 0;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 4px;
}

/* ============================================
   LISTA DE SERVIÇOS (tela inicial - resumo)
   ============================================ */
.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #FAF7F2;
  border-radius: 12px;
  font-size: 14px;
}

.service-list li strong {
  color: #8B5A3C;
  font-size: 15px;
}

/* ============================================
   TELAS (navegação)
   ============================================ */
.tela {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.tela.ativa {
  display: flex;
}

/* ============================================
   SERVIÇOS (tela de agendamento - seleção)
   ============================================ */
.servicos-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.servico-item {
  padding: 14px 16px;
  background: #FAF7F2;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.servico-item:active {
  background: #F5EFE6;
}

.servico-item.selecionado {
  border-color: #8B5A3C;
  background: #F5EFE6;
}

.servico-item .nome {
  font-size: 14px;
  font-weight: 500;
  color: #4A3B30;
}

.servico-item .preco {
  font-size: 14px;
  color: #8B5A3C;
  font-weight: 700;
}

/* ============================================
   INPUTS
   ============================================ */
.input-data,
.input-text {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #EDE4D8;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #4A3B30;
  background: #FAF7F2;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 10px;
}

.input-text:last-child {
  margin-bottom: 0;
}

.input-text:focus,
.input-data:focus {
  border-color: #8B5A3C;
  background: #FFFFFF;
}

textarea.input-text {
  resize: vertical;
  min-height: 60px;
}

/* ============================================
   HORÁRIOS
   ============================================ */
.horarios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.horario-item {
  padding: 12px 8px;
  text-align: center;
  background: #FAF7F2;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #4A3B30;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.horario-item:active:not(.bloqueado) {
  transform: scale(0.95);
}

.horario-item.selecionado {
  background: #8B5A3C;
  color: white;
  border-color: #8B5A3C;
}

.horario-item.bloqueado {
  background: #F0EAE0;
  color: #C4B5A0;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ============================================
   TELA DE SUCESSO
   ============================================ */
.card-sucesso {
  text-align: center;
}

.check-icon {
  font-size: 64px;
  margin-bottom: 8px;
  line-height: 1;
}

.resumo {
  background: #FAF7F2;
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.8;
}

.resumo strong {
  color: #8B5A3C;
}

.aviso {
  font-size: 13px;
  color: #8B6F5C;
  margin: 12px 0;
  line-height: 1.5;
}

/* ============================================
   LOADING
   ============================================ */
.loading {
  text-align: center;
  color: #8B6F5C;
  font-size: 14px;
  padding: 20px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  margin-top: 32px;
  font-size: 12px;
  color: #A89880;
}

/* ============================================
   CONSENTIMENTO (LGPD)
   ============================================ */
.consentimento {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #6B5B4B;
  cursor: pointer;
}

.consentimento input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #8B5A3C;
  cursor: pointer;
}

.consentimento a,
.link-privacidade {
  color: #8B5A3C;
  text-decoration: underline;
}

.footer .link-privacidade {
  font-size: 12px;
  color: #8B6F5C;
}

/* ============================================
   MODO APP (standalone)
   ============================================ */
@media (display-mode: standalone) {
  .header {
    padding-top: 40px;
  }
}