@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
    --bg: #faf7f9;
    --bg-textura: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    --bg-acrilico: rgba(250, 247, 249, 0.98);
    --surface: #ffffff;
    --surface-2: #fdfbfc;
    --surface-hover: rgba(212, 175, 55, 0.08);
    --surface-ativa: rgba(212, 175, 55, 0.15);
    --border: rgba(163, 22, 54, 0.1);
    --border-forte: rgba(163, 22, 54, 0.2);
    --texto: #6e122a; 
    --texto-2: #8c334a; 
    --texto-3: #b36b7d; 
    --accent: #c94968; 
    --accent-hover: #b03c58;
    --accent-light: #fceef1;
    --gold: #d4af37; 
    --gold-hover: #b5952f;
    --gold-light: #fbf7e8;
    --perigo: #c53030;
    --sucesso: #16a34a;
    --sombra-1: 0 2px 5px rgba(110, 18, 42, 0.05), 0 4px 10px rgba(110, 18, 42, 0.03);
    --sombra-2: 0 4px 12px rgba(110, 18, 42, 0.08), 0 10px 30px rgba(110, 18, 42, 0.06);
    --sombra-janela: 0 10px 40px rgba(110, 18, 42, 0.15);
    --raio: 8px;
    --raio-g: 12px;
    --transicao: 150ms cubic-bezier(0.2, 0, 0, 1);
    --transicao-lenta: 250ms cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1c1014;
        --bg-textura: none; 
        --bg-acrilico: rgba(28, 16, 20, 0.98);
        --surface: #2d1b21;
        --surface-2: #3a2229;
        --surface-hover: rgba(212, 175, 55, 0.1);
        --surface-ativa: rgba(201, 73, 104, 0.2);
        --border: rgba(255, 255, 255, 0.08);
        --border-forte: rgba(255, 255, 255, 0.15);
        --texto: #fceef1;
        --texto-2: #e0aeb9;
        --texto-3: #b36b7d;
        --accent: #e06b87;
        --accent-hover: #c94968;
        --accent-light: rgba(201, 73, 104, 0.15);
        --gold: #e5c76b;
        --gold-hover: #d4af37;
        --gold-light: rgba(212, 175, 55, 0.15);
        --sombra-1: 0 2px 5px rgba(0,0,0,0.4);
        --sombra-2: 0 4px 12px rgba(0,0,0,0.5);
        --sombra-janela: 0 10px 40px rgba(0,0,0,0.6);
    }
}

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

body {
    font-family: "Montserrat", -apple-system, sans-serif;
    font-size: 15px;
    background-color: var(--bg);
    background-image: var(--bg-textura);
    color: var(--texto);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100%;
    transition: background var(--transicao-lenta), color var(--transicao-lenta);
}

/* Títulos com Fallback de cor para não sumirem no PC */
h1, h2, h3, .hero h1, .secao-titulo h2, .card-prof h3, .topo h1 {
    font-family: "Playfair Display", serif !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--texto) !important; 
    background: linear-gradient(to right, var(--texto), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* HEADER */
.topo {
    background: var(--surface); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-bottom: 1px solid var(--gold); padding: 1.4rem 1.25rem; text-align: center; position: sticky; top: 0; z-index: 10; transition: background var(--transicao-lenta);
    box-shadow: 0 2px 10px rgba(110, 18, 42, 0.05);
}
.topo h1 { font-size: 2rem; }
.topo p { color: var(--texto-2); font-size: .9rem; margin-top: .2rem; }

.container { max-width: 620px; margin: 1.5rem auto; padding: 0 1rem 3rem; animation: paginaIn 280ms cubic-bezier(0.2, 0, 0, 1); }

@keyframes paginaIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* FORMULÁRIOS */
.passo { background: var(--surface); border-radius: var(--raio-g); padding: 1.1rem 1.25rem; margin-bottom: .9rem; box-shadow: var(--sombra-1); border: 1px solid var(--border); transition: box-shadow var(--transicao); }
.passo:hover { box-shadow: var(--sombra-2); border-color: var(--gold); }
.passo label { display: block; font-weight: 600; margin-bottom: .55rem; color: var(--texto); font-size: .9rem; }
.passo select, .passo input, .passo textarea {
    width: 100%; padding: .65rem .85rem; border: 1px solid var(--border-forte); border-bottom: 2px solid var(--border-forte);
    border-radius: 6px; font-size: 15px; font-family: inherit; background: var(--surface-2); color: var(--texto); transition: all var(--transicao);
}
.passo select:focus, .passo input:focus, .passo textarea:focus { outline: none; background: var(--surface); border-bottom-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-light); }

/* BOTÕES E HORÁRIOS */
.grade-horarios { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot {
    background: var(--surface); border: 1px solid var(--border-forte); color: var(--texto); padding: .55rem 1rem; border-radius: 6px;
    cursor: pointer; font-weight: 600; font-size: .92rem; font-family: inherit; transition: all var(--transicao);
}
.slot:hover { background: var(--gold-light); border-color: var(--gold); color: var(--gold-hover); }
.slot.selecionado { background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: #fff; border-color: var(--gold); box-shadow: 0 2px 8px rgba(201,73,104,.3); }
.dica { color: var(--texto-3); font-size: .86rem; }

.botao-principal {
    width: 100%; padding: .95rem; background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: #fff; border: 1px solid var(--gold);
    border-radius: 6px; font-size: 1rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: all var(--transicao);
    box-shadow: 0 4px 15px rgba(201, 73, 104, 0.3); text-shadow: 0 1px 2px rgba(0,0,0,0.2); margin-top: .5rem;
}
.botao-principal:hover:not(:disabled) { background: linear-gradient(135deg, var(--accent-hover), var(--accent)); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201, 73, 104, 0.4), 0 0 10px rgba(212, 175, 55, 0.3); }
.botao-principal:active:not(:disabled) { transform: scale(.99); }
.botao-principal:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.alerta { padding: 1rem 1.15rem; border-radius: var(--raio-g); margin-bottom: 1rem; font-size: .9rem; box-shadow: var(--sombra-1); border: 1px solid var(--border); animation: paginaIn .3s; }
.alerta.sucesso { background: var(--gold-light); color: #854d0e; border-left: 4px solid var(--gold); }
.alerta.aviso { background: #fff7ed; color: #9a3412; border-left: 4px solid #f97316; }
.alerta a { color: inherit; font-weight: 600; text-decoration: underline; }

/* CALENDÁRIO */
.calendario { background: var(--surface); border: 1px solid var(--gold); border-radius: var(--raio-g); padding: 1.25rem; box-shadow: var(--sombra-1); margin-top: 1rem; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.cal-nav h2 { font-size: 1.4rem; color: var(--texto); margin: 0; }
.cal-nav a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface-2); color: var(--texto); font-size: 1.3rem; text-decoration: none; transition: all var(--transicao); }
.cal-nav a:hover { background: var(--gold-light); color: var(--gold-hover); text-decoration: none; }

.cal-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.cal-dia-semana { text-align: center; font-size: .75rem; font-weight: 700; color: var(--texto-3); text-transform: uppercase; padding: .35rem 0; }
.cal-dia { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: .92rem; font-weight: 500; color: var(--texto); text-decoration: none; transition: all var(--transicao); }
.cal-dia.vazio { visibility: hidden; }
.cal-dia.passado { color: var(--texto-3); opacity: .5; }
.cal-dia.disponivel { background: var(--accent-light); color: var(--accent); font-weight: 700; cursor: pointer; }
.cal-dia.disponivel:hover { background: var(--accent); color: #fff; transform: scale(1.08); box-shadow: 0 2px 8px rgba(201,73,104,.35); }
.cal-dia.hoje { box-shadow: inset 0 0 0 2px var(--gold); }

@media (max-width: 480px) {
    .topo { padding: 1.1rem .9rem; }
    .topo h1 { font-size: 1.6rem; }
    .container { padding: 0 .75rem 2rem; margin-top: 1rem; }
    .passo { padding: .9rem 1rem; }
    .slot { padding: .5rem .8rem; font-size: .88rem; }
}
/* ============================================================
   PÁGINA DE SUCESSO
   ============================================================ */
.card-sucesso {
    background: var(--surface);
    border-radius: var(--raio-g);
    padding: 2.5rem 2rem;
    box-shadow: var(--sombra-2);
    border: 1px solid var(--border);
    text-align: center;
    animation: sucessoIn 500ms cubic-bezier(0.2, 0, 0, 1);
}

@keyframes sucessoIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Check animado (SVG) */
.check-animado {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
}
.check-animado svg {
    width: 100%;
    height: 100%;
}
.check-circle {
    stroke: var(--sucesso, #16a34a);
    stroke-width: 3;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: desenhaCirculo 600ms cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.check-mark {
    stroke: var(--sucesso, #16a34a);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: desenhaCheck 400ms cubic-bezier(0.65, 0, 0.45, 1) 600ms forwards;
}

@keyframes desenhaCirculo {
    to { stroke-dashoffset: 0; }
}
@keyframes desenhaCheck {
    to { stroke-dashoffset: 0; }
}

.card-sucesso h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--texto);
    margin-bottom: .5rem;
}
.card-sucesso .subtitulo {
    color: var(--texto-2);
    font-size: .95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.card-sucesso .subtitulo strong {
    color: var(--accent);
}

/* Resumo do agendamento */
.resumo-agendamento {
    background: var(--surface-2);
    border-radius: var(--raio);
    padding: .5rem 1.25rem;
    margin-bottom: 1.75rem;
    text-align: left;
    border: 1px solid var(--border);
}
.linha-resumo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
}
.linha-resumo:last-child { border-bottom: none; }
.linha-resumo .rotulo {
    color: var(--texto-2);
    font-weight: 500;
}
.linha-resumo .valor {
    color: var(--texto);
    font-weight: 600;
    text-align: right;
}
.linha-resumo.destaque .valor {
    color: var(--accent);
    font-size: 1rem;
}

/* Botão WhatsApp */
.botao-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    padding: .95rem;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transicao);
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
    margin-bottom: .75rem;
}
.botao-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    text-decoration: none;
    color: #fff;
}
.botao-whatsapp:active { transform: scale(.99); }

/* Botão secundário */
.botao-secundario {
    display: inline-block;
    width: 100%;
    padding: .75rem;
    background: transparent;
    color: var(--texto-2);
    border: 1px solid var(--border-forte);
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transicao);
}
.botao-secundario:hover {
    background: var(--surface-hover);
    color: var(--texto);
    text-decoration: none;
}

@media (max-width: 480px) {
    .card-sucesso { padding: 2rem 1.25rem; }
    .card-sucesso h2 { font-size: 1.3rem; }
    .check-animado { width: 70px; height: 70px; }
}