:root {
    --azul: #2563eb;
    --azul-escuro: #1e40af;
    --verde: #16a34a;
    --vermelho: #dc2626;
    --fundo: #f3f4f6;
    --branco: #ffffff;
    --borda: #e5e7eb;
    --texto: #111827;
    --texto-claro: #6b7280;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--fundo);
    color: var(--texto);
    padding-bottom: 100px;
}
/* ── Header redesenhado ── */
.app-header {
    position: relative;
    overflow: hidden;
    /* altura proporcional: ~30% da largura, min 180px, max 280px */
    height: clamp(180px, 30vw, 280px);
    display: flex;
    align-items: flex-end;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
/* Camada 1: imagem de fundo */
.app-header-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: var(--azul-escuro);
    background-image: var(--header-bg-image, none);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
/* Camada 2: gradiente de baixo para cima — escurece só a parte inferior */
.app-header-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.0) 20%,
        rgba(0,0,0,0.70) 100%
    );
}
/* Camada 3: tint sutil da cor primaria no canto esquerdo */
.app-header-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        color-mix(in srgb, var(--azul-escuro) 25%, transparent) 0%,
        transparent 70%
    );
}
.app-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 24px 20px 22px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}
.app-header-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    flex: 1;
}
.app-header-logo-wrap {
    flex-shrink: 0;
    width: 114px;
    height: 114px;
    border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,0.5);
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.app-header-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.app-header-logo-placeholder {
    font-size: 46px;
    line-height: 1;
}
.app-header-subtitulo {
    margin: 0;
    font-size: 13.2px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    opacity: 0.75;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
.app-header-nome {
    margin: 0;
    font-size: 24.2px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    text-shadow: 0 1px 6px rgba(0,0,0,0.35);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

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

.passo { background: white; border-radius: 14px; padding: 18px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.passo h2 { font-size: 15px; margin: 0 0 12px; color: var(--azul-escuro); }

.opcoes-toggle { display: flex; gap: 10px; }
.opcao-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--borda);
    border-radius: 10px;
    background: white;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--texto-claro);
}
.opcao-btn.selecionado { border-color: var(--azul); background: #eff6ff; color: var(--azul-escuro); }
.opcao-btn i { font-size: 24px; display: block; margin-bottom: 4px; }

.lista-servicos { display: flex; flex-direction: column; gap: 10px; }
.servico-card {
    border: 2px solid var(--borda);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
}
.servico-card.selecionado { border-color: var(--azul); background: #eff6ff; }
.servico-card .nome { font-weight: 700; font-size: 14px; }
.servico-card .desc { font-size: 12px; color: var(--texto-claro); margin: 2px 0 6px; }
.servico-card .valor { font-weight: 700; color: var(--verde); font-size: 14px; }

.adicional-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--borda); }
.adicional-item:last-child { border-bottom: none; }
.adicional-item label { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.adicional-item input[type=checkbox] { width: 18px; height: 18px; }
.adicional-item .valor { font-weight: 600; color: var(--texto-claro); font-size: 13px; }

.campo-endereco { margin-top: 12px; }
.campo-endereco label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
.campo-endereco input { width: 100%; padding: 10px; border: 1px solid var(--borda); border-radius: 8px; font-size: 14px; }

.aviso-destaque {
    background: #fef3c7;
    color: #78350f;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    margin-bottom: 12px;
    font-weight: 600;
}

input[type=date] { width: 100%; padding: 10px; border: 1px solid var(--borda); border-radius: 8px; font-size: 14px; margin-bottom: 12px; }

.grade-horarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.horario-btn {
    padding: 10px 4px;
    border: 2px solid var(--borda);
    border-radius: 8px;
    background: white;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}
.horario-btn.selecionado { border-color: var(--azul); background: var(--azul); color: white; }
.horario-vazio { color: var(--texto-claro); font-size: 13px; text-align: center; padding: 10px; grid-column: 1 / -1; }

.campo-form { margin-bottom: 12px; }
.campo-form label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
.campo-form input, .campo-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--borda);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.resumo-total {
    background: white;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.resumo-total .label { font-size: 14px; color: var(--texto-claro); }
.resumo-total .valor { font-size: 22px; font-weight: 700; color: var(--verde); }

.btn-agendar {
    width: 100%;
    padding: 16px;
    background: var(--verde);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(22,163,74,0.35);
}
.btn-agendar:hover { background: #15803d; }
.btn-agendar:disabled { background: #9ca3af; box-shadow: none; cursor: not-allowed; }

.erro-msg { background: #fee2e2; color: #991b1b; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }

.tela-sucesso { text-align: center; padding: 30px 16px; }
.tela-sucesso .icone { font-size: 56px; margin-bottom: 10px; }
.tela-sucesso h2 { margin: 0 0 8px; }
.tela-sucesso p { color: var(--texto-claro); font-size: 14px; margin-bottom: 20px; }
.btn-whatsapp {
    display: inline-block;
    background: #25d366;
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
}

.hidden { display: none !important; }
.loading-spinner { text-align: center; padding: 20px; color: var(--texto-claro); font-size: 13px; }

/* Logística busca/retirada */
.campos-busca {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.campos-busca select,
.campos-busca input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--borda);
    border-radius: 8px;
    font-size: 14px;
    background: var(--fundo-card);
    color: var(--texto);
    box-sizing: border-box;
}
.campos-busca select:focus,
.campos-busca input[type="text"]:focus {
    outline: none;
    border-color: var(--azul);
}
.taxa-busca-info {
    margin-top: 6px;
    padding: 8px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
