/* ============================================
   FLEXAGENDA - styles.css
   Design baseado no layout FlexAgenda
   ============================================ */

/* === RESET & VARIABLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #5C7C6B;
    --primary-dark: #4A6558;
    --primary-light: #E8F0EC;
    --accent: #C9A87C;
    --accent-light: #F5EDE3;
    --bg: #F5F3F0;
    --card-bg: #FFFFFF;
    --text: #2D2D2D;
    --text-light: #7A7A7A;
    --border: #E8E5E1;
    --danger: #D4574E;
    --success: #5C7C6B;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.10);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === BASE === */
body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* === CONTAINER === */
.container {
    width: 100%;
    max-width: 440px;
    background: var(--bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* === TOP BAR === */
.topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
}

.topbar.has-border {
    border-bottom-color: var(--border);
}

.topbar-back {
    position: absolute;
    left: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 4px 8px;
    display: none;
    align-items: center;
    justify-content: center;
}

.topbar-back.visible {
    display: flex;
}

.topbar-title {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text);
}

/* Menu ("Como posso ajudar?"): cabeçalho compacto, com 20px de altura
   (10px de respiro em cima e embaixo) — o nome da marca sai do fluxo para o
   conteúdo subir. Só vale neste passo; nos demais o topbar mantém o normal. */
.topbar.compacto {
    padding: 10px 20px;
}
.topbar.compacto .topbar-title {
    display: none;
}

/* === PRIMEIRA TELA (login) — identidade da empresa + formulário ===
   Estrutura: topo com logo/nome/Horários (abre a gaveta da empresa), título,
   descrição, formulário, termos e as linhas de atalho. */
/* Escala do topo tirada do Figma (frame de 400 px): margem 30, foto
   110×110, 30 entre a foto e o nome, bloco do nome com 200 de largura e o
   conjunto centralizado na altura da foto. Foto e nome guardam a
   proporção 110:200 em qualquer largura: a foto fica com 35,48% do par
   (foto + vão + nome), então tudo encolhe junto no celular estreito. */
#step-login { --tela-pad: min(30px, 7.7vw); --topo-gap: min(30px, 7.7vw); }

.login-topo {
    padding: var(--tela-pad) var(--tela-pad) 0;
}

.login-topo-id {
    display: flex;
    align-items: center;
    gap: var(--topo-gap);
    width: 100%;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font-family: var(--font-family);
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.login-topo-id:active { opacity: .75; }

/* 35,48% do par (100% - vão): é a foto de 110 sobre os 310 de foto+nome */
.login-logo {
    display: block;
    flex: none;
    width: calc((100% - var(--topo-gap)) * .3548);
}

.hero-logo,
.hero-logo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    display: block;
}

.hero-logo {
    object-fit: cover;
    background: linear-gradient(135deg, var(--accent), var(--primary-light));
}

.hero-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: min(2rem, 8vw);
    background: var(--card-bg);
    color: var(--text-light);
    border: 1px solid var(--border);
}

/* O bloco nome + Horários é centralizado na altura da foto pelo
   align-items do botão; 10px entre as duas linhas (Figma). */
.login-topo-txt {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.login-topo-nome {
    font-size: min(1.3rem, 4.9vw);
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.login-topo-horarios {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: min(.95rem, 3.9vw);
    color: var(--text-light);
}
.login-topo-horarios[hidden] { display: none; }

/* Bloco de texto do Figma (frame de 400): título em 2 linhas com 76 de
   altura, 12 até a descrição, 12 até a chamada em negrito e 32 até o
   primeiro campo. O 32 entra como respiro de baixo do bloco. */
.login-head { padding: 30px var(--tela-pad) 32px; }

.hero-title {
    font-size: min(2.05rem, 8.4vw);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.15;
    letter-spacing: -.05em;
}

.hero-subtitle {
    color: var(--text-light);
    font-size: min(1rem, 4.2vw);
    line-height: 1.5;
    margin-bottom: 12px;
    white-space: pre-line;
}

.hero-chamada {
    font-size: min(1rem, 4.2vw);
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
    white-space: pre-line;
}
.hero-chamada[hidden] { display: none; }

/* Sem chamada (Texto 2 vazio no painel), o Texto 1 não deixa respiro:
   os 12 px abaixo dele só existem quando há a linha seguinte. */
.login-head.sem-chamada .hero-subtitle { margin-bottom: 0; }

/* Ícones (traço, estilo tabler) */
.ico {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ico-seta { width: 18px; height: 18px; }

/* Campos do Figma: 340×50, com 8 px entre um campo e outro */
#loginForm .form-group { margin-bottom: 8px; padding: 0 var(--tela-pad); }

#loginForm .form-input {
    border-color: transparent;
    box-shadow: none;
    border-radius: 12px;
    padding: 14px 18px;
    min-height: 50px;
    font-size: 1rem;
}

#loginForm .form-input:focus { border-color: var(--primary); }

/* Campo em erro: só a marca visual na tela — a regra de validação é a mesma */
#loginForm .form-input.erro,
#loginForm .phone-input-wrapper.erro { border-color: var(--danger); }
#loginForm .form-input.erro::placeholder { color: var(--danger); }

#loginForm .phone-input-wrapper {
    border-color: transparent;
    box-shadow: none;
    border-radius: 12px;
    min-height: 50px;
}
#loginForm .phone-input-wrapper .form-input {
    padding: 14px 0;
    min-height: 0;
}

#loginForm .btn-primary {
    margin: 8px var(--tela-pad) 0;
    width: calc(100% - var(--tela-pad) * 2);
    text-transform: none;
    letter-spacing: 0;
    font-size: 1.02rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 17px;
}

/* "Já sou cliente": o botão contornado do site, com a mesma largura e o mesmo formato do botão principal */
#loginForm .btn-outline {
    margin: 8px var(--tela-pad) 0;
    width: calc(100% - var(--tela-pad) * 2);
    text-transform: none;
    letter-spacing: 0;
    font-size: 1.02rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 17px;
}

/* Atalhos da primeira tela (Onde estamos · Suporte) */
.login-atalhos {
    margin: 40px var(--tela-pad) 0;
    border-top: 1px solid var(--border);
    /* Linhas do bloco: texto claro a 25% (o valor anterior fica de reserva
       em navegador que não entende color-mix) */
    border-top-color: color-mix(in srgb, var(--text-light) 25%, transparent);
}

.login-atalho {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-bottom-color: color-mix(in srgb, var(--text-light) 25%, transparent);
    padding: 25px 10px;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.login-atalho:active { opacity: .6; }
.login-atalho .ico { width: 22px; height: 22px; }
.login-atalho-txt { flex: 1; }
.login-atalho .ico-seta { margin-left: auto; color: var(--text-light); }

/* === FORMS === */
.form-group {
    margin-bottom: 14px;
    padding: 0 24px;
}

.form-input {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: var(--font-family);
    background: var(--card-bg);
    color: var(--text);
    transition: border-color 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input::placeholder {
    color: #B0ADA9;
}

/* Phone input with flag */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 18px;
    box-shadow: var(--shadow-sm);
}

.phone-flag {
    font-size: 1.2rem;
    margin-right: 8px;
    flex-shrink: 0;
}

.phone-prefix {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-right: 10px;
    flex-shrink: 0;
    font-weight: 500;
}

.phone-input-wrapper .form-input {
    border: none;
    box-shadow: none;
    padding: 16px 0;
}

.phone-input-wrapper .form-input:focus {
    border: none;
}

/* === BUTTONS === */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--primary);
    color: white;
    margin: 20px 24px 0;
    width: calc(100% - 48px);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    margin: 20px 24px 0;
    width: calc(100% - 48px);
}

.btn-outline:hover {
    background: var(--card-bg);
}

.btn-group {
    display: flex;
    gap: 12px;
    padding: 24px 24px 0;
}

.btn-group .btn {
    flex: 1;
    margin: 0;
    width: auto;
    letter-spacing: 0;
    text-transform: none;
}

/* === TERMS TEXT === */
.terms-text {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    padding: 12px 30px 0;
    line-height: 1.5;
}

.terms-text a {
    color: var(--text);
    text-decoration: underline;
}

/* === CONTENT AREA === */
.content {
    padding: 0;
    min-height: 400px;
}

/* === STEPS === */
.step {
    display: none;
    animation: fadeSlideIn 0.3s ease;
}

.step.active {
    display: block;
}

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

/* === STEP HEADER (used in most steps) === */
.step-header {
    padding: 8px 24px 20px;
    text-align: center;
}

.step-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.step-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* === MENU CHOICE CARDS (Step 2 - Choose path) === */
.choice-list {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.choice-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.choice-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.choice-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-card-icon img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.choice-card-info {
    flex: 1;
}

.choice-card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
}

.choice-card-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* === SERVICE CARDS (with image) === */
.service-list {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.service-card-img {
    width: 100px;
    height: 90px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--accent-light);
}

.service-card-img-placeholder {
    width: 100px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--accent-light);
    flex-shrink: 0;
}

.service-card-info {
    flex: 1;
    padding: 14px 14px 14px 0;
}

.service-card-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 3px;
}

.service-card-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* === PROFESSIONAL CARDS (with photo) === */
.prof-list {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prof-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.prof-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.prof-card-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--accent-light);
}

.prof-card-img-placeholder {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    flex-shrink: 0;
    color: var(--primary);
}

.prof-card-info {
    flex: 1;
    padding: 14px 14px 14px 0;
}

.prof-card-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 3px;
}

.prof-card-desc {
    font-size: 0.82rem;
    color: var(--text-light);
}

/* === SUB-SERVICE / ITEM LIST === */
.item-list {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.item-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.item-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: var(--primary-light);
    flex-shrink: 0;
}

.item-card-info {
    flex: 1;
}

.item-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.item-card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.item-card-price {
    font-size: 0.82rem;
    color: var(--primary-dark);
    margin-top: 2px;
}

/* === SUMMARY STRIP (shown at top of date/time steps) === */
.summary-strip {
    margin: 0 24px 20px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.summary-strip-service {
    padding: 14px 18px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-strip-service-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    background: var(--card-bg);
    flex-shrink: 0;
}

.summary-strip-service-info .summary-strip-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.summary-strip-service-info .summary-strip-detail {
    font-size: 0.78rem;
    color: var(--text-light);
}

.summary-strip-prof {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
}

/* Foto (ou inicial) do profissional: o MESMO quadro dos ícones do serviço, do calendário e do pagamento (36x36). */
.summary-strip-prof-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--accent-light);
    flex-shrink: 0;
}

.summary-strip-prof-img-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    background: var(--accent-light);
    color: var(--primary);
    flex-shrink: 0;
}

.summary-strip-prof-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.summary-strip-datetime {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
}

.summary-strip-datetime-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    background: var(--primary-light);
    flex-shrink: 0;
}

.summary-strip-datetime-text {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Pagamento no cartão de resumo: a mesma linha do dia e horário (ícone à esquerda); rótulo à esquerda, valor à direita. */
.summary-strip-checkout-linhas {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.summary-strip-checkout-linha {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 0.85rem;
}
.summary-strip-checkout-linha > span:last-child { white-space: nowrap; }
.summary-strip-checkout-linha.destaque { font-weight: 700; font-size: 1rem; }

.summary-strip-cliente {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
}
/* Círculo do cliente no resumo: o MESMO tamanho (36) e a mesma borda esquerda (18) da foto do profissional e dos ícones */
.summary-strip-cliente .user-welcome-avatar { width: 36px; height: 36px; font-size: 1rem; }
.success-section { margin-top: 0; padding-top: 24px; }
.success-menu { margin-top: 0; }
.modal-info-body { padding: .2rem .2rem .4rem; }
.modal-mapa-frame { width: 100%; height: 220px; border: 0; border-radius: var(--radius-md); }
.modal-mapa-input {
    width: 100%;
    padding: 12px 14px;
    margin: .8rem 0 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    color: var(--text);
    font-size: .9rem;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.modal-mapa-input:focus { outline: none; border-color: var(--primary); }
.modal-mapa-dica { font-size: .78rem; color: var(--text-light); text-align: center; margin: 6px 0 12px; }
.mapa-opcao {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}
.mapa-opcao:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.mapa-opcao-emoji { font-size: 1.6rem; flex: none; }
.mapa-opcao-texto { flex: 1; font-weight: 700; font-size: .95rem; text-align: left; }
.mapa-opcao-icone { flex: none; color: var(--text-light); }

/* === SUPORTE (formulário do menu) === */
.suporte-form { display: block; }
.suporte-label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px; /* label → campo */
}
.suporte-texto {
    width: 100%;
    min-height: 96px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    color: var(--text);
    font-size: .92rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 24px; /* campo → sanfona */
}
.suporte-texto:focus { outline: none; border-color: var(--primary); }
.suporte-acordeao-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: .92rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}
.suporte-acordeao-btn:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.suporte-acordeao-seta { flex: none; color: var(--text-light); font-size: .85rem; }
.suporte-acordeao-corpo {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px 16px 12px;
    margin-top: 6px;
}
.suporte-acordeao-corpo .hours-box { margin: 0; border: 0; box-shadow: none; background: transparent; padding: 0; }
.suporte-enviar { margin: 24px 0 0; width: 100%; } /* anula a margem lateral do .btn-primary */

/* === DATE SELECTION === */
.date-section-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0 24px 6px;
}

.date-section-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0 24px 18px;
}

.date-list {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.date-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.date-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.date-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.date-card.disabled:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
}

.date-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    flex-shrink: 0;
}

.date-card-icon img {
    width: 24px;
    height: 24px;
}

.date-card-text {
    flex: 1;
}

.date-card-main {
    font-weight: 700;
    font-size: 0.95rem;
}

.date-card-sub {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* === TIME SELECTION === */
.time-section-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0 24px 6px;
}

.time-section-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0 24px 18px;
}

.time-list {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.time-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.time-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.time-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    flex-shrink: 0;
}

.time-card-text {
    font-weight: 600;
    font-size: 1rem;
}

/* === CONFIRMATION STEP === */
.confirm-section {
    padding: 0 24px;
}

.confirm-whatsapp-title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 20px 0 6px;
}

.confirm-whatsapp-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 14px;
}

.confirm-phone-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 4px;
}

.confirm-phone-flag {
    font-size: 1.2rem;
}

.confirm-phone-prefix {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.confirm-phone-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    outline: none;
    padding: 0;
}

/* === CONFIRMAÇÃO EM 2 FATORES (código por WhatsApp) === */
.fase2fa-telefone.oculto { display: none; }
.fase2fa-codigo {
    position: relative;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease;
}
.fase2fa-codigo.aberto {
    max-height: 760px;
    opacity: 1;
    overflow: visible;
}
/* Campo real: fica por cima das caixas (recebe o toque e o foco, abre o teclado). */
.otp-sensor {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* O toque não cai no campo: quem foca é o toque nas caixas (ver app.js), sem a alça de seleção azul do Android */
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    opacity: 0;
    font-size: 16px;            /* abaixo de 16px o iPhone aplica zoom */
    text-transform: uppercase;
    outline: none;
}
.otp-area {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 18px 0 10px;
}
.otp-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 62px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.otp-box.ativa {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(92, 124, 107, 0.18);
    position: relative;
}
/* Cursor piscando na posição em que o próximo número entra */
.otp-box.ativa::after {
    content: '';
    width: 2px;
    height: 28px;
    background: var(--primary);
    animation: otp-cursor 1s steps(1) infinite;
}
@keyframes otp-cursor { 50% { opacity: 0; } }
/* Sem foco (voltou de outro app): a posição continua marcada, mas sem cursor piscando */
.otp-area.sem-foco .otp-box.ativa {
    border-color: var(--text-light);
    box-shadow: none;
}
.otp-area.sem-foco .otp-box.ativa::after { animation: none; opacity: 0.35; }

/* Teclado aberto: reserva espaço embaixo para o componente poder rolar até ficar à vista */
#step-confirmacao.otp-aberto { padding-bottom: var(--teclado, 0px); }
/* Mesma reserva na fase do WhatsApp: trocar o número com o teclado aberto tem de
   caber sem empurrar o campo e o botão para fora da tela. */
#step-confirmacao.campo-aberto { padding-bottom: var(--teclado, 0px); }
.teclado-aberto .fase2fa-codigo .confirm-whatsapp-title { margin-top: 10px; font-size: 1.05rem; }
.teclado-aberto .fase2fa-codigo .otp-area { margin: 10px 0 6px; }
/* Validando: as caixas acendem em sequência (o servidor está conferindo) */
.otp-area.validando .otp-box {
    border-color: var(--primary);
    animation: otp-pulsar 0.9s ease-in-out infinite;
}
.otp-area.validando .otp-box:nth-child(2) { animation-delay: 0.12s; }
.otp-area.validando .otp-box:nth-child(3) { animation-delay: 0.24s; }
.otp-area.validando .otp-box:nth-child(4) { animation-delay: 0.36s; }
.otp-area.validando .otp-box:nth-child(5) { animation-delay: 0.48s; }
@keyframes otp-pulsar {
    0%, 100% { transform: translateY(0); box-shadow: var(--shadow-sm); }
    50% { transform: translateY(-4px); box-shadow: 0 6px 14px rgba(92, 124, 107, 0.28); }
}
.otp-validando {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}
.otp-validando[hidden] { display: none; }
.otp-validando-ico {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(92, 124, 107, 0.25);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: otp-girar 0.8s linear infinite;
}
@keyframes otp-girar { to { transform: rotate(360deg); } }

/* Tentativas: 3 bolinhas, a usada fica cinza */
.otp-tentativas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 6px;
    font-size: 0.85rem;
    color: var(--text-light);
}
.otp-tentativas-txt { font-weight: 500; }
.otp-bolinhas { display: inline-flex; gap: 5px; }
.otp-bolinhas i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
    transition: background 0.2s ease;
}
.otp-bolinhas i.usada { background: var(--border); }

.otp-area.erro .otp-box {
    animation: otp-tremer 0.35s ease;
    border-color: var(--danger);
}
@keyframes otp-tremer {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.otp-dica {
    margin: 0 0 6px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
}
.otp-dica[hidden] { display: none; }
.otp-erro[hidden],
.otp-tentativas[hidden],
.otp-sucesso[hidden] { display: none; }

/* Código conferido: mensagem verde e caixas travadas (sem pulso, sem cursor) */
.otp-sucesso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 10px 14px;
    background: #e8f6ee;
    border: 1px solid #9fd8b5;
    border-radius: var(--radius-md);
    color: #1f7a4d;
    font-size: 0.95rem;
    font-weight: 700;
}
.otp-sucesso-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2e9d62;
    color: #fff;
    font-size: 0.8rem;
}
.otp-area.confirmado .otp-box,
.otp-area.confirmado .otp-box.ativa {
    animation: none;
    border-color: #2e9d62;
    background: #eef9f2;
    color: #1f7a4d;
    box-shadow: none;
}
.otp-area.confirmado .otp-box.ativa::after { display: none; }
.otp-erro {
    min-height: 1.2em;
    margin: 0 0 4px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--danger);
}
.otp-timer {
    margin: 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}
.otp-timer strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.otp-reenviar,
.otp-trocar {
    display: block;
    margin: 10px auto 0;
    padding: 6px 10px;
    background: none;
    border: 0;
    font-family: var(--font-family);
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}
.otp-reenviar[hidden],
#btnConfirmar[hidden] { display: none; }
.otp-trocar { color: var(--text-light); }
.otp-reenviar:disabled { color: var(--text-light); text-decoration: none; cursor: default; }

@media (prefers-reduced-motion: reduce) {
    .fase2fa-codigo, .otp-box { transition: none; }
    .otp-area.erro .otp-box,
    .otp-area.validando .otp-box,
    .otp-box.ativa::after,
    .otp-validando-ico { animation: none; }
    /* Gaveta: sem deslizar, abre e fecha direto */
    .gaveta, .gaveta-painel, .gaveta-saindo, .gaveta-saindo .gaveta-painel { animation: none !important; }
}

.btn-corrigir {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    margin: 16px 24px 0;
    width: calc(100% - 48px);
    text-transform: none;
    letter-spacing: 0;
}
.btn-corrigir:hover { background: var(--bg); }

/* === SUCCESS STEP === */
.success-section {
    text-align: center;
    padding: 24px 24px 32px;
}

.success-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 20px 0 8px;
}

.success-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.5;
}

/* === MENU GRID === */
.menu-section {
    padding: 0 24px;
}

.menu-strip { margin: 0 0 20px; }
.empresa-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--card-bg);
}
.empresa-strip-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--card-bg);
    flex-shrink: 0;
}
.empresa-strip-logo-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: var(--primary-light);
}
.empresa-strip-nome {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    font-size: .95rem;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
}

.user-welcome-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.user-welcome-info {
    flex: 1;
    min-width: 0;
}

.user-welcome-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-welcome-phone {
    font-size: 0.8rem;
    color: var(--text-light);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* === ATALHOS EM FITA (primeira tela e confirmação) ===
   Uma linha com rolagem lateral e encaixe (scroll-snap): sem laço e sem rolar
   sozinha. No celular cabem dois cards e aparece um pedaço do terceiro. */
.menu-carrossel {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 10px;
    column-gap: 8px;
    /* A fita começa e termina no recuo da página: é a margem negativa do
       trilho (abaixo) que a leva até a borda real da tela. */
    margin: 40px var(--tela-pad, 24px) 0;
}
.menu-carrossel > .menu-grid { grid-column: 1 / -1; }

.menu-grid--fita {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Sem ancoragem: reordenar os cards não pode deslocar a rolagem */
    overflow-anchor: none;
    -webkit-overflow-scrolling: touch;
    /* Ponta a ponta: escapa do recuo pela margem negativa e devolve o MESMO
       valor como padding-inline — o primeiro card nasce alinhado ao formulário,
       a rolagem vai até a borda real da tela e o último card termina no recuo. */
    margin-inline: calc(var(--tela-pad, 24px) * -1);
    padding: 2px var(--tela-pad, 24px) 6px;
    scroll-padding-inline: var(--tela-pad, 24px);
}
.menu-grid--fita::-webkit-scrollbar { display: none; }
.menu-grid--fita > .menu-card {
    flex: 0 0 calc(50% - 22px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
}
.menu-grid--fita > .menu-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Setas: só quando não cabe tudo (o app.js decide), abaixo da fita, à direita. */
.menu-carrossel > [data-menu-seta] {
    grid-row: 2;
    justify-self: end;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.menu-carrossel > [data-menu-seta][hidden] { display: none; }
.menu-carrossel > [data-menu-seta]:disabled { opacity: .35; cursor: default; }
.menu-carrossel > [data-menu-seta] .ico { width: 18px; height: 18px; }

/* Na confirmação a fita mora dentro de .menu-section (recuo de 24px) */
.success-menu .menu-carrossel { margin: 0 0 4px; }

/* Cards da primeira tela: sem título, um pouco mais compactos */
.menu-login .menu-card { padding: 18px 10px; }
.menu-login .menu-icon { font-size: 1.6rem; margin-bottom: 8px; }
.menu-login .menu-icon svg { width: 24px; height: 24px; }

.menu-card {
    padding: 24px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.menu-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* O card feito com <button> (fita da confirmação e gaveta do agendamento) tem de
   ficar IGUAL ao feito com <div> (menu "Como posso ajudar?"): o botão não herda
   fonte nem cor e seus <span> ficam em linha (sem a margem do ícone), por isso a
   mesma coluna centralizada que a fita já usa vale para todo botão .menu-card. */
button.menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: inherit;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
}

.menu-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.menu-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-logout {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
    margin-top: 20px;
    font-size: 0.85rem;
    letter-spacing: 0;
    text-transform: none;
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.btn-logout:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* === APPOINTMENTS LIST === */
.appointments-section {
    padding: 0 24px;
}

.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.appointment-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    cursor: pointer;
}

/* Seta › do card (o mesmo ícone .ico-seta das outras linhas tocáveis). */
.appointment-seta { flex: none; color: var(--text-light); }
.appointment-card:active { background: var(--bg); }
.appointment-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.appointment-card[hidden] { display: none; }

.appointment-date {
    text-align: center;
    min-width: 54px;
}

.appointment-date-day {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.appointment-date-month {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 500;
}

.appointment-info {
    flex: 1;
}

.appointment-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.appointment-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.appointment-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 8px 14px;
    font-size: 0.8rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-cancel-small {
    background: var(--danger);
    color: white;
}

.btn-cancel-small:hover {
    opacity: 0.9;
}

/* === SUPPORT / TEXTAREA === */
.support-section {
    padding: 0 24px;
}

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: var(--font-family);
    resize: vertical;
    min-height: 120px;
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    color: var(--text);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* === LOADING === */
.loading-overlay {
    display: none;
    text-align: center;
    padding: 50px 20px;
}

.loading-overlay.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* === MESSAGES === */
.message-toast {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin: 0 24px 16px;
    display: none;
    font-size: 0.9rem;
    font-weight: 500;
    /* Fixo e acima dos pop-ups (z-index 900): senão o aviso sumia atrás do
       overlay escuro quando o toast era disparado dentro de um modal.
       Acima também da gaveta da empresa (1200) — "Endereço copiado" acontece lá dentro. */
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 1300;
}

.message-toast.active {
    display: block;
}

.message-success {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary);
}

.message-error {
    background: #FDE8E8;
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* === AVISO ACIMA DO FORMULÁRIO (ex.: número bloqueado) ===
   Diferente do .message-toast (fixo no topo da tela), este entra no fluxo,
   logo acima dos campos, e some sozinho após 5 segundos. */
.form-aviso {
    margin: 0 24px 16px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}
.form-aviso[hidden] { display: none; }

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 14px;
}

/* === MAP SECTION === */
.map-section {
    padding: 30px 24px 0;
}

.map-section-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.map-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.map-container iframe {
    width: 100%;
    height: 220px;
    border: none;
    display: block;
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 64px 24px 22px;
    color: var(--text-light);
    font-size: 0.75rem;
}

.footer-brand {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.footer-brand strong {
    color: var(--text);
}

/* "Agendamento por Agenda Flexness": o texto do rodapé é um botão que abre a gaveta de captação */
.footer-brand-btn {
    background: none;
    border: 0;
    padding: 6px 10px;
    min-height: 32px;
    font-family: var(--font-family);
    color: var(--text-light);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.footer-brand-btn:active { opacity: .6; }

.footer-legal {
    margin-top: 10px;
    line-height: 1.5;
}

/* Termos e política no pé da página: 13 px, uma linha, bem espaçados */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
}
.footer-links[hidden] { display: none; }
.footer-links a {
    color: var(--text-light);
    text-decoration: underline;
    padding: 3px 0;
}
.footer-ponto { color: var(--text-light); opacity: .6; }

/* === PROGRESS BAR === */
.progress-bar {
    display: none;
    padding: 0 24px 12px;
    gap: 6px;
}

.progress-bar.visible {
    display: flex;
}

.progress-step {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: var(--primary);
}

.progress-step.completed {
    background: var(--primary-dark);
}

/* === RESPONSIVE === */
@media (min-width: 480px) {
    body {
        padding: 0;
    }
    
    .container {
        box-shadow: var(--shadow-lg);
        min-height: 100vh;
    }
}

@media (max-width: 380px) {
    .step-title {
        font-size: 1.15rem;
    }
}

/* === UTILITY === */
.hidden {
    display: none !important;
}

.mt-16 {
    margin-top: 16px;
}

.mb-20 {
    margin-bottom: 20px;
}

.pb-30 {
    padding-bottom: 30px;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Hours Panel */
.hours-panel {
    margin: 20px 24px;
    border: 1px solid var(--border-color, #E8E5E1);
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg, #FFFFFF);
}
.hours-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color, #2D2D2D);
    cursor: pointer;
}
.hours-chevron {
    transition: transform 0.25s;
    font-size: 14px;
    color: var(--text-light, #7A7A7A);
}
.hours-panel.open .hours-chevron {
    transform: rotate(90deg);
}
.hours-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 18px;
}
.hours-panel.open .hours-content {
    max-height: 400px;
    padding: 0 18px 16px;
}
.hours-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color, #E8E5E1);
    font-size: 14px;
}
.hours-row:last-child { border-bottom: none; }
.hours-day { font-weight: 600; color: var(--text-color, #2D2D2D); }
.hours-time { color: var(--text-light, #7A7A7A); }
.hours-closed { color: var(--danger-color, #D4574E); font-style: italic; }
/* ============================================
   ORÇAMENTO — avisos e marcações
   ============================================ */
.badge-orcamento {
    display: inline-block;
    margin-top: .2rem;
    padding: .1rem .45rem;
    background: #FFF8E7;
    color: #8A6D2F;
    border: 1px solid #E8C77C;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
}

.orcamento-msg {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    background: #FFF8E7;
    border: 1px solid #E8C77C;
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    font-size: .88rem;
    line-height: 1.45;
    color: #6B5426;
    text-align: left;
}
.orcamento-msg.hidden { display: none; }
.orcamento-msg-ico { font-size: 1.1rem; line-height: 1.3; }
/* Aviso antes de pagar: sem ícone, o texto ocupa a largura toda (dentro do espaçamento interno do aviso). */
.orcamento-msg-pg > div { flex: 1; min-width: 0; }

.appointment-card-orc { border-left: 3px solid #E8C77C; }
.appointment-badge-orc {
    margin-top: .25rem;
    font-size: .74rem;
    font-weight: 600;
    color: #8A6D2F;
}

/* ============================================
   G3 — SEÇÕES EM TELA CHEIA (hero / 100dvh)
   Cada passo ocupa a altura visível menos o cabeçalho fixo,
   empurrando o rodapé para fora da primeira dobra.
   Desativável por config: fluxo.telaCheia = false.
   ============================================ */
:root {
    /* Altura de topbar + barra de progresso, medida em runtime pelo app.js */
    --chrome-h: 0px;
}

.tela-cheia .content {
    display: flex;
    flex-direction: column;
}

.tela-cheia .step.active {
    display: flex;
    flex-direction: column;
    /* 100vh é o fallback; 100dvh desconta a barra do navegador no celular,
       que é justamente o que corta o conteúdo no iOS. */
    min-height: calc(100vh - var(--chrome-h));
    min-height: calc(100dvh - var(--chrome-h));
}

/* Empurra um elemento para o rodapé da seção quando sobra espaço. */
.tela-cheia .push-bottom { margin-top: auto; }

/* O rodapé fica logo abaixo da dobra — visível só ao rolar. */
.tela-cheia .footer {
    padding-top: 64px;
}

/* ============================================================
   Pop-up de calendário ("Outro dia")
   Backdrop: blur 7 no CSS; a cor (TEXTO do tema, alpha .3)
   é aplicada inline por app.js#openCalendario.
   ============================================================ */
.modal-cal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    background: rgba(0, 0, 0, 0.3); /* substituído pela cor TEXTO ao abrir */
}
.modal-cal[hidden] { display: none; }

.modal-cal-box {
    width: min(92vw, 380px);
    aspect-ratio: 1 / 1;
    max-height: 92vh;
    max-width: 92vh;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: .9rem .9rem .6rem;
    animation: modalCalIn .18s ease-out;
}
@keyframes modalCalIn {
    from { transform: scale(.96) translateY(6px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-cal-head {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .35rem;
}
.cal-titulo {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    text-transform: capitalize;
}
.cal-nav {
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: .7rem;
    cursor: pointer;
    transition: background .15s, color .15s, opacity .15s;
}
.cal-nav:hover:not(:disabled) { background: var(--primary-light); color: var(--primary-dark); }
.cal-nav:disabled { opacity: .3; cursor: not-allowed; }

/* Pop-ups de informação (Onde estamos / Nossos horários): altura acompanha o
   conteúdo, teto de 80vh, e fundo na cor "Fundo" do tema. Precisa ficar DEPOIS
   de .modal-cal-box — especificidade igual, a última regra vence. */
.modal-info-box {
    aspect-ratio: auto;
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--bg);
}
.modal-info-box .cal-titulo { text-align: left; }
.modal-info-box .modal-info-body { padding-left: 0; padding-right: 0; }
.hours-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 8px 16px;
    margin: .6rem 0 .8rem;
}
.modal-cal-close {
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: .9rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}
.modal-cal-close:hover { background: var(--border); color: var(--text); }

.cal-semana {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    padding: .25rem 0;
    text-transform: uppercase;
}
.cal-grade {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    gap: 2px;
    align-items: stretch;
    height: 100%;
}
.cal-view {
    flex: 1;
    position: relative;
    overflow: hidden;
    touch-action: pan-y; /* rolagem vertical continua; horizontal vira carrossel */
}
.cal-track {
    display: flex;
    width: 300%; /* 3 slides de um viewport cada: repousa em -33,33% (meio) */
    height: 100%;
    transform: translateX(-33.3333%);
    transition: transform .25s ease-out;
}
.cal-track.cal-dragging { transition: none; } /* segue o dedo 1:1 */
.cal-slide { width: 33.3333%; flex: 0 0 33.3333%; }
.cal-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
}
.cal-loading[hidden] { display: none; }
.cal-dia {
    border: none;
    background: transparent;
    border-radius: 50%;
    align-self: center;
    justify-self: center;
    width: 100%;
    max-width: 44px;
    aspect-ratio: 1 / 1;
    font-size: .82rem;
    color: var(--text);
    cursor: default;
}
.cal-dia-vazio { visibility: hidden; }
.cal-dia-on {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--primary-light);
    transition: transform .12s, background .12s, color .12s;
}
.cal-dia-on:hover { background: var(--primary); color: #fff; transform: scale(1.06); }
.cal-dia-off { color: var(--text-light); opacity: .35; }
.cal-dia-hoje { box-shadow: inset 0 0 0 1.5px var(--primary); }

.modal-cal-foot {
    text-align: center;
    font-size: .72rem;
    color: var(--text-light);
    padding-top: .35rem;
}

/* Primeira tela: altura natural do conteúdo (sem forçar 100dvh) — o rodapé
   institucional sobe para logo abaixo das linhas e a página não fica com
   um vazio grande antes da barra fixa. */
.tela-cheia #step-login { min-height: 0; }

/* ============================================================
   GAVETA DA EMPRESA (abre de cima para baixo)
   Fundo na cor "Fundo" do tema; cada mini seção na cor "Card".
   Aberta pelo topo da primeira tela, pelo "Onde estamos" e pelo
   "Perfil" do rodapé fixo. O conteúdo é montado em app.js#preencherGaveta.
   ============================================================ */
.gaveta {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: rgba(0, 0, 0, .38);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: gavetaFundoIn .18s ease-out;
}
.gaveta[hidden] { display: none; }

@keyframes gavetaFundoIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gavetaFundoOut { from { opacity: 1; } to { opacity: 0; } }
/* Bottom sheet: o painel entra e sai pela base, só com transform — nada de
   mexer em altura/topo, que forçaria recálculo de layout a cada quadro. */
@keyframes gavetaSobe {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
@keyframes gavetaDesce {
    from { transform: translateY(0); }
    to   { transform: translateY(100%); }
}

.gaveta-painel {
    width: 100%;
    max-width: 440px;
    height: 100vh;
    height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -14px 44px rgba(0, 0, 0, .22);
    animation: gavetaSobe .3s cubic-bezier(.22, .81, .27, .99);
    overflow: hidden;
    overscroll-behavior: contain;
}

/* Fechamento: mesma animação ao contrário, e só então a gaveta é escondida
   (app.js#fecharEmpresa espera o animationend). */
.gaveta-saindo { animation: gavetaFundoOut .26s ease-in forwards; }
.gaveta-saindo .gaveta-painel { animation: gavetaDesce .28s cubic-bezier(.32, 0, .67, 0) forwards; }

/* Altura das gavetas: a do "Minha agenda" cresce com o conteúdo; a do Perfil
   para em ~85% da tela, deixando o topo livre. */
#gavetaAgenda .gaveta-painel { height: auto; max-height: 92dvh; }
#gavetaAgendamento .gaveta-painel { height: auto; max-height: 92dvh; }
#gavetaCadastro .gaveta-painel { height: auto; max-height: 92dvh; }
#gavetaFlexness .gaveta-painel { height: auto; max-height: 92dvh; }
#gavetaRedes .gaveta-painel { height: auto; max-height: 70dvh; }
/* Agenda Flexness (rodapé): título da peça do código, a fita de benefícios (60 px) e os campos do formulário do site */
/* Sem cartão de fundo: o conteúdo usa a largura do recuo da gaveta (20px), alinhado ao topo; 20px entre a linha do X e o título */
#gavetaFlexness .gaveta-corpo { padding-top: 20px; }
#gavetaFlexness .gaveta-sec { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
#gavetaFlexness .confirm-whatsapp-title { margin: 0 0 14px; }
/* A faixa vai de ponta a ponta da gaveta: o trilho escapa do recuo (20px) e devolve o mesmo valor como padding */
#flexnessFitaWrap { --tela-pad: 20px; margin: 0 0 16px; }
.menu-flexness { padding-top: 0; padding-bottom: 4px; }
.menu-flexness > .menu-card {
    flex: 0 0 42%;
    height: 60px;
    padding: 6px 10px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: default;
}
.menu-flexness > .menu-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }
.menu-flexness .menu-title { font-size: .78rem; line-height: 1.25; }
#gavetaFlexness .form-group,
#agendaFaseNome .form-group { padding: 0; margin-bottom: 10px; }
#gavetaFlexness .terms-text { padding: 4px 0 0; }
#gavetaFlexness .btn-primary,
#agendaFaseNome .btn-primary {
    margin: 14px 0 0;
    width: 100%;
    text-transform: none;
    letter-spacing: 0;
    font-size: 1.02rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 17px;
}
#agendaFaseNome[hidden] { display: none; }
#agendaFaseNome .confirm-whatsapp-title { margin-top: 4px; }
/* Campo escondido contra robôs: fora da tela, sem tamanho, nunca recebe o foco */
.campo-armadilha { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* Redes: as linhas são as de "Montar rota" (.gaveta-rota), em cor de texto e sem a linha de cima na primeira */
#redesLista .gaveta-rota { color: var(--text); }
#redesLista .gaveta-rota .ico { color: var(--text-light); }
#redesLista .gaveta-rota .ico-seta { color: var(--text-light); }
#redesLista .gaveta-rota:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
/* Meus dados (Minha agenda > Editar): os campos do formulário do site dentro do cartão da gaveta */
#gavetaCadastro .form-group { padding: 0; }
#gavetaCadastro .gaveta-desc { margin: 0 0 16px; }
#cadastroCelular { color: var(--text-light); }
/* Cartão do cliente em Minha agenda: o mesmo do menu, sem a linha de cima (não há faixa da empresa) */
#agendaCliente .user-welcome { border-top: 0; }
#agendaCliente .user-welcome-info .gaveta-vermais { min-height: 28px; padding: 2px 0; }
#agendaCliente .user-welcome > .gaveta-vermais { flex: none; }
#agendaCliente[hidden] { display: none; }
/* O bloco de opções é um .menu-grid (display:grid): sem esta regra o [hidden]
   não esconde, e a confirmação apareceria junto com os cards. */
#agendamentoOpcoes[hidden] { display: none; }
#gavetaAgendamento .menu-card[hidden] { display: none; }
/* Resumo: a faixa da tela de confirmação (.summary-strip), sem a margem lateral dela: a gaveta já tem a sua */
#agendamentoResumo { margin: 0; }
/* Pergunta do cancelamento e formulário de suporte, dentro do mesmo cartão */
#gavetaAgendamento .gaveta-pergunta {
    margin: 16px 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
#gavetaAgendamento .btn-group { padding: 16px 0 0; }
#agendamentoSuporte { margin-top: 16px; }
#agendamentoSuporte .suporte-texto { margin-bottom: 0; }
/* Com a peça do código dentro da gaveta, a descrição de cima sai de cena: o
   mesmo texto já aparece na peça. O [hidden] precisa vencer o display do
   .gaveta-desc (senão o texto aparece duas vezes). */
#gavetaAgenda .gaveta-desc[hidden] { display: none; }
/* Com a peça do código dentro da gaveta, o título da barra sai (o card mostra). */
#gavetaAgenda .gaveta-nome[hidden] { display: none; }
#gavetaEmpresa .gaveta-painel { height: auto; max-height: 85dvh; }
/* Teclado aberto: a gaveta encolhe para o campo e o botão ficarem acima dele. */
body.teclado #gavetaFlexness .gaveta-painel,
body.teclado #gavetaAgenda .gaveta-painel,
body.teclado #gavetaAgendamento .gaveta-painel,
body.teclado #gavetaCadastro .gaveta-painel,
body.teclado #gavetaEmpresa .gaveta-painel { max-height: 60dvh; }
/* iPhone: o teclado cobre a janela sem encolher a página; a gaveta sobe pela altura dele
   (a variável vem de app.js#ajustarTeclado2fa e é 0 onde a página já encolhe sozinha) */
body.gaveta-aberta .gaveta { padding-bottom: var(--teclado, 0px); }

.gaveta-alca {
    width: 44px;
    height: 5px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--text-light) 25%, transparent);
    margin: 8px auto 0;
    flex: none;
}

.gaveta-topo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px 0;
    flex: none;
}

.gaveta-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--text-light);
}
.gaveta-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gaveta-id { flex: 1; min-width: 0; }

.gaveta-nome {
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gaveta-tipo {
    font-size: .875rem;
    color: var(--text-light);
    margin-top: 2px;
}
.gaveta-tipo:empty { display: none; }

/* Ações do cabeçalho: compartilhar e fechar, sem balão, 2 px entre eles
   (o botão de 44 px já dá o respiro em volta do ícone) */
.gaveta-acoes {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: none;
}

.gaveta-fechar,
.gaveta-acao {
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.gaveta-acao .ico { width: 20px; height: 20px; }
.gaveta-fechar:active,
.gaveta-acao:active { opacity: .55; }
.gaveta-fechar .ico { width: 20px; height: 20px; }

.gaveta-corpo {
    flex: 1;
    min-height: 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gaveta-desc {
    font-size: .95rem;
    line-height: 1.58;
    color: var(--text-light);
    white-space: pre-line;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}
/* Aberta pelo "Ver mais" */
.gaveta-desc.aberta {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}
/* Com o texto cortado, o próprio parágrafo abre ao toque */
.gaveta-desc.clicavel { cursor: pointer; }
.gaveta-desc:empty { display: none; }

.gaveta-vermais {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 0;
    border: 0;
    background: none;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
}
.gaveta-vermais[hidden] { display: none; }

.gaveta-sec {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.gaveta-sec-tit {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
}
.gaveta-sec-tit .ico { width: 20px; height: 20px; color: var(--text-light); }

.gaveta-status {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
}
.gaveta-bolinha {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: none;
    background: var(--text-light);
}
.gaveta-bolinha.on { background: var(--success, #5C7C6B); }
.gaveta-bolinha.off { background: var(--danger); }

.gaveta-acc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
    padding: 14px 0 0;
    border: 0;
    border-top: 1px solid var(--border);
    background: none;
    font-family: var(--font-family);
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}
.gaveta-seta { color: var(--text-light); transition: transform .2s ease; }
.gaveta-acc.aberta .gaveta-seta { transform: rotate(180deg); }

.gaveta-acc-corpo { padding-top: 10px; }
.gaveta-acc-corpo[hidden] { display: none; }
.gaveta-acc-corpo .hours-box {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
.gaveta-acc-corpo .hours-row { font-size: .92rem; }

.gaveta-mapa {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 14px;
}
.gaveta-mapa[hidden] { display: none; }
.gaveta-mapa iframe {
    width: 100%;
    height: 210px;
    border: 0;
    display: block;
}

.gaveta-end {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: 0;
    padding: 10px 0;
    font-family: var(--font-family);
    font-size: .95rem;
    line-height: 1.4;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.gaveta-end-txt { flex: 1; }
.gaveta-end .ico { color: var(--text-light); }

.gaveta-rota {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 14px 0 0;
    border-top: 1px solid var(--border);
    min-height: 44px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.gaveta-rota span { flex: 1; }
.gaveta-rota .ico-seta { color: var(--primary); margin-left: 0; }
.gaveta-rota[hidden] { display: none; }

.gaveta-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    font-size: .875rem;
    color: var(--text-light);
}
.gaveta-info + .gaveta-info { border-top: 1px solid var(--border); }
.gaveta-info span { flex: none; }
.gaveta-info strong { flex: 1; min-width: 0; color: var(--text); font-weight: 600; font-size: .9rem; text-align: right; word-break: break-word; }
.gaveta-info[hidden] { display: none; }

.gaveta-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.gaveta-links a { font-size: 13px; font-weight: 600; color: var(--text-light); text-decoration: none; }
.gaveta-links a[hidden] { display: none; }

body.gaveta-aberta { overflow: hidden; }
/* O botão flutuante do WhatsApp fica acima de tudo (9999) e aparecia por cima
   da gaveta: some enquanto ela está aberta. */
body.gaveta-aberta .whatsapp-float { display: none !important; }

/* ============================================================
   RODAPÉ FIXO DA PRIMEIRA TELA (atalhos)
   ============================================================ */
.topbar.oculto { display: none; }

.nav-fixa {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 440px;
    z-index: 500;
    display: flex;
    align-items: stretch;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 7px 4px calc(11px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .06);
}
.nav-fixa[hidden] { display: none; }

.nav-fixa button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: 0;
    padding: 7px 2px;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: .62rem;
    font-weight: 500;
    line-height: 1.1;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-fixa button[hidden] { display: none; }
.nav-fixa button:active { background: var(--bg); color: var(--text); }
.nav-fixa .ico { width: 22px; height: 22px; }

/* Espaço para o rodapé fixo não cobrir o fim da primeira tela */
.container.com-nav { padding-bottom: 92px; }

/* Com o rodapé fixo na tela a bolinha senta ACIMA dele, sem cobrir item nenhum
   (--nav-h é a altura real do rodapé, medida pelo app.js). */
.whatsapp-float.com-nav { bottom: calc(var(--nav-h, 62px) + 16px); }

/* Rodapé fixo: some enquanto o teclado virtual está aberto, para não cobrir
   o campo em uso (iOS desloca a barra para cima do teclado). */
body.teclado .nav-fixa,
body.teclado .whatsapp-float { display: none !important; }

@media (max-width: 359px) {
    /* a primeira tela encolhe sozinha pela --tela-pad */
    .footer { padding-left: 20px; padding-right: 20px; }
    .nav-fixa button { font-size: .58rem; }
    .nav-fixa .ico { width: 20px; height: 20px; }
}


/* ---- Pagamento por Pix dentro da confirmação ----
   A fase usa os componentes da peça do código (.fase2fa-codigo, .otp-validando, .otp-timer, .otp-erro, .btn).
   Aqui só a ordem: no celular o botão de copiar vem primeiro e o QR Code abaixo; no computador, o QR Code primeiro. */
.fase-pix .btn-primary { margin: 12px 0 0; width: 100%; }
.fase-pix .pix-fase { display: flex; flex-direction: column; align-items: center; margin-bottom: 12px; }
.fase-pix .pix-qr { width: 220px; height: 220px; max-width: 100%; margin: 16px auto 4px; display: block; }
.fase-pix [hidden] { display: none; }
@media (min-width: 768px) {
    .fase-pix .pix-qr { order: -1; margin: 4px auto 2px; }
}
#agendamentoAvisoPg { margin: 12px 0 0; }
