/* --- Loading Overlay para Agendamento --- */
#loading-overlay {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 65vh;
    background: linear-gradient(135deg, #232323 80%, #222 100%);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s, transform 0.35s cubic-bezier(.4,1.4,.6,1);
}
#loading-overlay.active {
    opacity: 1;
    transform: translateY(0);
}
.loading-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #19b6a4;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
}
.loading-text {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    margin-top: 0;
    letter-spacing: 0.5px;
}
@media (max-width: 500px) {
    #loading-overlay {
        height: 65vh;
        min-height: 320px;
        border-radius: 2rem 2rem 0 0;
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }
    .loading-spinner {
        width: 44px;
        height: 44px;
        border-width: 5px;
    }
    .loading-text {
        font-size: 1.1rem;
    }
}
/* General Body and Date Styles */
body {
     /* Define a base para a unidade 'rem' e suaviza a rolagem */
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    background: #111;
    margin: 0;
    font-family: 'Montserrat', 'Roboto', 'Arial', sans-serif;
}

.data-topo {
    position: absolute;
    top: 1.5rem; /* 24px */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px; /* Mesma largura máxima do container do formulário */
    padding: 0 20px; /* Mesmo padding lateral do container do formulário */
    box-sizing: border-box;
    text-align: center; /* Centraliza o dia da semana */
    z-index: 10;
}

.data-topo .dia-semana {
    color: #19b6a4;
    font-size: 0.8rem; /* 17.6px */
    font-weight: 800;
    font-family: 'Montserrat', 'Roboto', 'Arial', sans-serif; /* Garante a mesma fonte do título */
    letter-spacing: 1px;
    margin-right: 0.5rem; /* 8px */
}




/* Agendamento Form Styles */
.agendamento-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 8.35rem 1.25rem calc(var(--app-footer-height) + 1.5rem) 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    justify-content: flex-end;
    min-height: 100vh;
    gap: 1rem;
}

.titulo-agenda {
    position: absolute;
    top: 6.9rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 20;
    margin: 0;
    text-align: center; /* Centraliza o título e subtítulo */
}

.titulo-agenda h1 {
    font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
    font-size: 1.8rem; /* Título reduzido */
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.1;
}

.titulo-agenda .agenda-bold {
    color: #fff;
}

.titulo-agenda .agenda-color {
    color: #19b6a4;
}

.titulo-agenda .agenda-sub {
    font-family: 'Montserrat', 'Roboto', 'Arial', sans-serif;
    font-size: 1rem; /* Fonte um pouco maior */
    color: #e0e0e0;
    margin-top: 0.5rem; /* Adiciona espaço do título */
    margin-bottom: 0;
    display: block;
    text-align: center; /* Alinha ao centro */
    line-height: 1.2; /* Melhora a legibilidade */
    white-space: pre-line; /* Permite quebra de linha */
}

/* Corrigido: Removido HTML do bloco CSS, mantendo apenas propriedades válidas */
.accordion-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.agendamento-form {
    width: 82%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: center;
}

.agendamento-campo.fake-btn {
    border: none;
    font-family: 'Montserrat', 'Roboto', 'Arial', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    height: 3.2rem;
    background: #232323;
    border-radius: 0.9rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0 1.1rem;
    margin: 0 auto;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}

.agendamento-campo.fake-btn:hover {
    background: #333;
}

.agendamento-campo.fake-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.agendamento-campo.fake-btn:disabled:hover {
    /* Impede que o efeito hover seja aplicado em botões desabilitados */
    background: #232323;
}

.agendamento-campo.fake-btn svg.main-icon {
    width: 1.75rem; /* 28px */
    height: 1.75rem; /* 28px */
    stroke: #19b6a4;
}

.agendamento-campo.fake-btn span {
    flex: 1;
    text-align: left;
    font-size: 1rem; /* 16px */
    font-weight: 500;
    letter-spacing: 0.5px;
}

.agendamento-campo.fake-btn svg.chevron-indicator {
    width: 1.5rem; /* 24px */
    height: 1.5rem; /* 24px */
    stroke: #19b6a4;
    transition: transform 0.3s ease;
}

.agendamento-campo.fake-btn.active svg.chevron-indicator {
    transform: rotate(180deg);
}

.panel-option {
    background: none;
    border: none;
    border-top: 1px solid #3a3a3a;
    color: #e0e0e0;
    padding: 1.25rem 0.625rem; /* 20px 10px */
    width: 100%;
    text-align: left;
    font-size: 1rem; /* 16px */
    font-family: 'Montserrat', 'Roboto', 'Arial', sans-serif;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.panel-option:hover {
    color: #19b6a4;
    background-color: #2f2f2f;
}

.panel-info {
    color: #999;
    padding: 1.25rem 0.625rem; /* 20px 10px */
    text-align: center;
    font-family: 'Montserrat', 'Roboto', 'Arial', sans-serif;
}

.btn-agendar {
    background: #19b6a4;
    color: #fff;
    border: none;
    border-radius: 0.9rem;
    padding: 0 2rem;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 3.2rem;
    transition: background 0.2s;
    cursor: pointer;
}

@media (max-width: 560px) {
    .data-topo {
        top: 1rem;
        padding: 0 14px;
    }

    .data-topo .dia-semana {
        font-size: 0.72rem;
    }

    .agendamento-container {
        padding: 5rem 0.9rem calc(var(--app-footer-height) + 1rem) 0.9rem;
        gap: 0.8rem;
    }

    .titulo-agenda {
        top: 5.2rem;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .titulo-agenda h1 {
        font-size: 1.4rem;
    }

    .titulo-agenda .agenda-sub {
        font-size: 0.88rem;
        margin-top: 0.35rem;
    }

    .agendamento-form {
        width: 88%;
        margin-top: 0;
        gap: 0.7rem;
    }

    .agendamento-campo.fake-btn {
        height: 2.85rem;
        border-radius: 0.75rem;
        gap: 0.65rem;
        padding: 0 0.85rem;
        font-size: 0.88rem;
    }

    .agendamento-campo.fake-btn span {
        font-size: 0.92rem;
    }

    .agendamento-campo.fake-btn svg.main-icon {
        width: 1.45rem;
        height: 1.45rem;
    }

    .agendamento-campo.fake-btn svg.chevron-indicator {
        width: 1.25rem;
        height: 1.25rem;
    }

    .btn-agendar {
        height: 2.85rem;
        line-height: 2.85rem;
        font-size: 0.92rem;
        border-radius: 0.75rem;
    }
}

.btn-agendar:hover {
    background: #1cb5e0;
}

.daily-verse {
    color: #8e8e8e;
    font-size: 0.82rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    margin-top: 0.25rem;
    text-align: center;
    line-height: 1.35;
    max-width: 380px;
    padding: 0 1rem;
    opacity: 0.95;
}

.daily-verse.is-hidden {
    display: none;
}

/* --- Media Query para Telas Maiores (Tablets e Desktops) --- */
@media (min-width: 768px) {
    .agendamento-container {
        padding-top: 9.5rem;
        padding-bottom: calc(var(--app-footer-height) + 4.5rem);
    }

    .agendamento-form {
        margin-top: 7.6rem;
    }

    .titulo-agenda {
        top: 7.35rem;
    }

    .titulo-agenda h1 {
        font-size: 2.4rem; /* Título reduzido */
    }
    .titulo-agenda .agenda-sub {
        font-size: 1.2rem;
    }
    .agendamento-campo.fake-btn {
        height: 5.2rem; /* Altura Aumentada */
        font-size: 1.1rem;
    }
    .agendamento-campo.fake-btn svg.main-icon {
        width: 2.25rem; /* 36px */
        height: 2.25rem; /* 36px */
    }
    .agendamento-campo.fake-btn svg.chevron-indicator {
        width: 2rem; /* 32px */
        height: 2rem; /* 32px */
    }
    .btn-agendar {
        height: 5.2rem; /* Altura Aumentada */
        font-size: 1.5rem;
    }

    .daily-verse {
        font-size: 0.98rem;
        max-width: 520px;
    }
}

/* --- Estilos para o Calendário e Horários (Novos) --- */

/* Contêiner para o grid de datas */
.date-grid {
    display: flex; /* Alterado de grid para flex para rolagem horizontal */
    overflow-x: auto; /* Adiciona rolagem horizontal */
    -webkit-overflow-scrolling: touch; /* Melhora a rolagem em iOS */
    gap: 0.5rem; /* Espaçamento entre os botões de data */
    padding: 1rem 1rem; /* Preenchido interno do grid */
}

/* Estilo base para os botões de opção de data */
.panel-option.date-option {
    text-align: center;
    padding: 0.8rem 0.5rem;
    border-radius: 0.5rem; /* Cantos arredondados para parecer um dia de calendário */
    flex: 0 0 auto; /* Impede que os itens encolham e cresçam */
    width: 55px; /* Largura fixa para o círculo (menor) */
    height: 55px; /* Altura fixa para o círculo (menor) */
    border-radius: 50%; /* Transforma em círculo */
    border: 1px solid #3a3a3a; /* Borda sutil */
    background-color: #2f2f2f; /* Fundo ligeiramente diferente */
    color: #e0e0e0;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.panel-option.date-option:hover {
    background-color: #19b6a4;
    color: #fff;
    border-color: #19b6a4;
}

/* Estilo para datas disponíveis (verde) */
.panel-option.date-option.available:not(.selected) {
    background-color: #19b6a4; /* Cor verde para datas disponíveis */
    color: #fff;
    border-color: #19b6a4;
}

/* Estilo para datas indisponíveis (vermelho) */
.panel-option.date-option.unavailable {
    background-color: #442f2f;
    border-color: #d32f2f;
    color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Estilo para cliente com pagamento atrasado (laranja) */
.panel-option.date-option.overdue:not(.selected) {
    background-color: #ff9800; /* Laranja */
    border-color: #f57c00;
    color: #fff;
}

/* Estilo para a data selecionada */
.panel-option.date-option.selected {
    background-color: #1cb5e0; /* Uma cor diferente para indicar seleção */
    border-color: #1cb5e0;
}

/* Estilos para as partes internas do botão de data */
.panel-option.date-option .date-day-number {
    font-size: 1.1rem; /* Número do dia maior, ajustado para caber */
    font-weight: 700;
    line-height: 1;
}

.panel-option.date-option .date-month,
.panel-option.date-option .date-day-of-week {
    font-size: 0.6rem; /* Menor para caber */
    font-weight: 400;
    line-height: 1;
    margin-top: 0.1rem; /* Espaçamento menor */
    color: #bdbdbd; /* Cor mais suave para mês/dia da semana */
}

.panel-option.date-option.available:not(.selected) .date-month,
.panel-option.date-option.available:not(.selected) .date-day-of-week,
.panel-option.date-option.selected .date-month,
.panel-option.date-option.selected .date-day-of-week {
    color: #fff; /* Branco quando a data está disponível */
}

/* Contêiner para o grid de horários */
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); /* Colunas responsivas */
    gap: 0.5rem; /* Espaçamento entre os botões de horário */
    padding: 1rem 0; /* Preenchido interno do grid */
}

/* Estilo para o horário selecionado */
.panel-option.time-option.selected {
    background-color: #1cb5e0; /* Azul para indicar seleção */
    color: #fff;
}
    transform: translateY(0);

.modal-header {
    display: flex;
    align-items: center;
    padding: 0 0 1.2rem 0;
    background: none;
    border-bottom: none;
    border-radius: 0;
}

.modal-close-btn {
    opacity: 0;
    width: 1px;
    height: 1px;
    background: #111;
    border: none;
    pointer-events: none;
    position: absolute;
}

.modal-header h2 {
    color: #19b6a4;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0 auto;
    text-align: right;
    flex: 1;
    padding-right: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.modal-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #19b6a4 0%, #1cb5e0 100%);
    margin-bottom: 0.5rem;
    border-radius: 2px;
}

.modal-content {
    background: #000;
    border-radius: 16px;
    max-width: 350px;
    margin: 0 auto;
    position: relative;
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 1.25rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #3a3a3a;
    flex-shrink: 0; /* Impede que o footer encolha */
    display: none; /* Fica oculto por padrão */
}

/* O botão de confirmar usa o mesmo estilo do botão de agendar */
.btn-confirmar {
    width: 100%;
}

/* Flatpickr Customization */
.flatpickr-day .availability-dot {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.flatpickr-day .availability-dot.available {
    background-color: #28a745; /* Verde */
}

.flatpickr-day .availability-dot.unavailable {
    background-color: #dc3545; /* Vermelho */
}

.chevron-indicator.icon-success {
    stroke: #28a745; /* Verde sucesso */
}

/*
==============================================
CUSTOM FLATPCIKR THEME V4 (Black/Cyan - More Specific)
==============================================
*/

/* LAYOUT FIX */
#selection-modal #modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
}

/* Main calendar container */
#selection-modal .flatpickr-calendar {
    background: #000 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    width: 100% !important; /* Força a ocupar o espaço do container */
    max-width: 400px;
    border: none !important;
    margin: 0 auto;
}

/* Month/Year Header */
#selection-modal .flatpickr-months {
    background: #000 !important;
    padding-top: 10px;
}
#selection-modal .flatpickr-months .flatpickr-month, 
#selection-modal .flatpickr-months .flatpickr-prev-month, 
#selection-modal .flatpickr-months .flatpickr-next-month {
    height: 52px;
    color: #22D3EE !important; /* Ciano vibrante */
    fill: #22D3EE !important;
}
#selection-modal .flatpickr-current-month .cur-month {
    font-size: 1.2rem;
    font-weight: 600;
    color: #22D3EE !important;
}
#selection-modal .numInputWrapper, 
#selection-modal .flatpickr-current-month input.cur-year {
    color: #22D3EE !important;
    font-weight: 600;
}
#selection-modal .flatpickr-months .flatpickr-prev-month:hover svg,
#selection-modal .flatpickr-months .flatpickr-next-month:hover svg {
    fill: #fff !important;
}

/* Weekday names (Seg, Ter, etc.) */
#selection-modal .flatpickr-weekdays {
    background: #000 !important;
    display: flex; /* Adicionado para garantir o alinhamento */
    justify-content: center; /* Centraliza os dias da semana */
    padding: 0 10px; /* Alinha com o padding do dayContainer */
    max-width: 380px; /* Ajuste para corresponder ao container dos dias */
    margin: 0 auto; /* Garante a centralização do container */
}
#selection-modal .flatpickr-weekday {
    /* Correção: Remove a largura de 100% que quebrava o layout */
    flex: 1; /* Permite que o item ocupe o espaço disponível na linha */
    font-size: 0.95rem;
    text-align: center;
    color: #b3b0b0; /* Cor mais sutil para os dias da semana */
    font-weight: 500;
}

/* Day numbers container */
#selection-modal .dayContainer {
    padding: 0 10px 10px 10px;
    max-width: 380px; /* Reduz a largura máxima para um melhor encaixe */
    margin: 0 auto;
    border: none !important;
}

/* Individual day numbers */
#selection-modal .flatpickr-day {
    border: none !important;
    color: #fff !important;
    font-weight: 500;
    line-height: 38px;
    height: 38px;
    width: 38px;
    border-radius: 50% !important;
    position: relative;
}

/* --- Day Status Colors --- */

/* Unavailable / Disabled day */
#selection-modal .flatpickr-day.flatpickr-disabled {
    color: #555 !important;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.5;
    background: transparent !important;
}

/* Past day */
#selection-modal .flatpickr-day.prevMonthDay,
#selection-modal .flatpickr-day.nextMonthDay {
    color: #444 !important;
    opacity: 0.5;
}

/* Today's date */
#selection-modal .flatpickr-day.today {
    border-color: #22D3EE !important;
}
#selection-modal .flatpickr-day.today:not(.selected) {
     color: #fff !important;
}

/* Selected day (círculo ciano) */
#selection-modal .flatpickr-day.selected {
    background: #22D3EE !important;
    border-color: #22D3EE !important;
    color: #000 !important; /* Texto preto para contraste */
    font-weight: 700;
}

/* Dia disponível (verde) */
#selection-modal .flatpickr-day.available:not(.flatpickr-disabled) {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
}

/* Dia indisponível (vermelho) */
#selection-modal .flatpickr-day.unavailable:not(.flatpickr-disabled) {
    background: #442f2f !important;
    border-color: #dc3545 !important;
    color: #9e9e9e !important;
    cursor: not-allowed;
}

/* Hover effect */
#selection-modal .flatpickr-day:not(.flatpickr-disabled):hover {
    background: #222 !important;
    border-color: #333 !important;
    color: #fff !important;
}

/* Ponto de disponibilidade */
.flatpickr-day .availability-dot {
    position: absolute;
    bottom: 6px; /* Posição abaixo do número */
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.flatpickr-day .availability-dot.available {
    background-color: #28a745; /* Verde */
}

.flatpickr-day .availability-dot.unavailable {
    background-color: #dc3545; /* Vermelho */
}


/* Container dos horários que aparece abaixo */
#time-slots-container {
    width: 100%;
    max-width: 350px; /* Mesma largura do calendário */
    margin-top: 1rem;
}

/* Correção: Removidas regras conflitantes. A centralização agora é 
   controlada pelo flexbox do container pai (#modal-content) */


@keyframes flash-red-shadow {
    0% { box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.5); }
    50% { box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.0); }
    100% { box-shadow: 0 2px 12px rgba(0,0,0,0.10); } /* Volta para a sombra original */
}

.flash-error {
    animation: flash-red-shadow 0.8s ease-out;
}

/*
==============================================
TOOLTIP FOR DISABLED BUTTONS
==============================================
*/
.info-tooltip {
    position: absolute;
    background-color: #19b6a4; /* Cor primária */
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Não interfere com cliques */
}

.info-tooltip.visible {
    opacity: 1;
}

/* Upsell Modal Specific Styles */
#upsell-modal-content {
    text-align: center;
    padding: 2rem 1.25rem;
    font-size: 1.1rem;
    color: #e0e0e0;
}

#upsell-modal-content span {
    font-weight: bold;
    color: #19b6a4; /* Cor primária */
}

#upsell-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

#upsell-modal-footer .btn-secondary {
    background: #6c757d; /* Cinza */
}

#upsell-modal-footer .btn-secondary:hover {
    background: #5a6268;
}

/* --- Estilos para o Card de Resumo no Modal de Confirmação --- */

#confirmation-modal-content {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.summary-card {
    background: #1c1c1c;
    border-radius: 18px;
    padding: 1.2rem;
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #333;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .icon {
    width: 22px;
    height: 22px;
    stroke: #19b6a4;
    stroke-width: 2;
    flex-shrink: 0;
}

.summary-details {
    font-size: 0.9rem;
}

.summary-label {
    color: #aaa;
    font-weight: 500;
    margin-bottom: 2px;
}

.summary-value {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

/*
==============================================
MODO DE EDIÇÃO (LARANJA)
==============================================
*/

.edit-mode .btn-agendar {
    background: #ff9800; /* Laranja */
}

.edit-mode .btn-agendar:hover {
    background: #f57c00; /* Laranja mais escuro no hover */
}

.edit-mode .agendamento-campo.fake-btn svg.chevron-indicator {
    stroke: #ff9800; /* Laranja */
}

/* --- Loading Overlay for Auto-booking --- */
#autobook-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#autobook-overlay.visible {
    display: flex;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #19b6a4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #fff;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-options-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem 1rem 1rem;
    align-items: stretch;
}

.modal-option.panel-option {
    background: #232323;
    color: #fff !important;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1.2rem 1rem;

}

.daily-verse-text.is-hidden {
    display: none;
}

/* --- Refinos da tela de agendamento --- */
.agendamento-container {
    max-width: 620px;
    padding: 7.7rem 1rem calc(var(--app-footer-height) + 5.6rem) 1rem;
    gap: 1.15rem;
}

.data-topo {
    top: 1.1rem;
    max-width: 620px;
    padding: 0 1rem;
}

.titulo-agenda {
    top: 5.7rem;
    width: min(100%, 620px);
    padding: 0 1rem;
    box-sizing: border-box;
}

.titulo-agenda h1 {
    font-size: 1.56rem;
}

.titulo-agenda .agenda-sub {
    font-size: 0.9rem;
    margin-top: 0.38rem;
}

.agendamento-form {
    width: 100%;
    max-width: 560px;
    margin: 5.95rem auto 0;
    gap: 0.95rem;
}

.accordion-item {
    width: 100%;
}

.agendamento-campo.fake-btn {
    height: 3.32rem;
    gap: 0.78rem;
    border-radius: 1rem;
    padding: 0 0.95rem;
    font-size: 0.94rem;
    background: linear-gradient(180deg, #202428 0%, #181c20 100%);
    border: 1px solid rgba(52, 63, 73, 0.9);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.agendamento-campo.fake-btn span {
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.agendamento-campo.fake-btn svg.main-icon {
    width: 1.38rem;
    height: 1.38rem;
}

.agendamento-campo.fake-btn svg.chevron-indicator {
    width: 1.12rem;
    height: 1.12rem;
}

.btn-agendar[type="submit"] {
    width: 100%;
    max-width: 560px;
    height: 3.45rem;
    border-radius: 1rem;
    margin-top: 0.2rem;
    background: linear-gradient(135deg, #21c8b9 0%, #13988b 100%);
    box-shadow: 0 16px 34px rgba(25, 182, 164, 0.25);
}

.daily-verse {
    width: 100%;
    max-width: 520px;
    margin-top: 1.2rem;
    padding: 0 0.5rem;
    text-align: center;
}

.daily-verse-reference {
    color: #8fd8cf;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.daily-verse-text {
    margin-top: 0.32rem;
    color: #98a4ae;
    font-size: 0.74rem;
    line-height: 1.5;
    font-style: italic;
}

/* ── Overlay de seleção — BASE ────────────────────────────── */
.selection-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 450;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.selection-overlay.visible {
    display: flex;
}

.selection-modal {
    background: #13171c;
    border: 1px solid #2a333d;
    border-radius: 26px;
    padding: 1.25rem 1.1rem;
    width: min(100%, 480px);
    max-height: min(86vh, 760px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.26s ease, opacity 0.26s ease;
    opacity: 0;
    transform: translateY(20px) scale(0.97);
}
.selection-overlay.visible .selection-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Modal de seleção — refinamentos responsivos --- */
.selection-overlay {
    padding: 0.9rem;
    align-items: center;
}

.selection-modal {
    width: min(100%, 372px);
    min-width: 0;
    min-height: auto;
    max-height: min(84vh, 720px);
    padding: 1rem 0.9rem 0.85rem;
    border-radius: 26px;
    border: 1px solid rgba(45, 52, 60, 0.95);
    transform: translateY(16px) scale(0.98);
}

.modal-header {
    padding: 0 0.15rem 0.8rem;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    padding-right: 0;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.2;
}

.modal-close-btn {
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
}

.modal-content {
    width: 100%;
    max-width: none;
    margin-left: 0;
    left: auto;
    padding: 0 0.15rem 0.15rem;
    border-radius: 18px;
    background: transparent;
}

.modal-footer {
    padding: 0.8rem 0.15rem 0;
    border-top: 1px solid rgba(58, 58, 58, 0.7);
}

.modal-options-wrapper {
    gap: 0.75rem;
    padding: 0.25rem 0 0.15rem;
}

.modal-option.panel-option {
    border-radius: 0.95rem;
    font-size: 0.98rem;
    padding: 1rem 0.95rem;
}

.service-card-list {
    gap: 0.6rem;
}

.service-card {
    border-radius: 1rem;
    padding: 0.8rem 0.9rem;
    min-height: 0;
}

@media (max-width: 560px) {
    .agendamento-container {
        padding: 6.45rem 0.95rem calc(var(--app-footer-height) + 5.15rem) 0.95rem;
        gap: 0.95rem;
    }

    .data-topo {
        top: 0.95rem;
        padding: 0 0.95rem;
    }

    .titulo-agenda {
        top: 4.9rem;
        padding: 0 0.95rem;
    }

    .titulo-agenda h1 {
        font-size: 1.34rem;
    }

    .titulo-agenda .agenda-sub {
        font-size: 0.84rem;
    }

    .agendamento-form {
        margin-top: 5.05rem;
        gap: 0.82rem;
    }

    .agendamento-campo.fake-btn {
        height: 3.1rem;
        padding: 0 0.88rem;
        gap: 0.68rem;
    }

    .agendamento-campo.fake-btn span {
        font-size: 0.88rem;
    }

    .btn-agendar[type="submit"] {
        height: 3.16rem;
        font-size: 0.98rem;
    }

    .daily-verse {
        margin-top: 1.05rem;
        padding: 0 0.2rem;
    }

    .daily-verse-reference {
        font-size: 0.74rem;
    }

    .daily-verse-text {
        font-size: 0.68rem;
    }

    .selection-overlay {
        padding: 0.75rem;
    }

    .selection-modal {
        width: min(100%, 348px);
        max-height: min(82vh, 650px);
        padding: 0.9rem 0.8rem 0.75rem;
        border-radius: 24px;
    }

    .modal-header h2 {
        font-size: 0.98rem;
    }

    .modal-close-btn {
        opacity: 0;
        width: 1px;
        height: 1px;
    }
}

@media (min-width: 768px) {
    .agendamento-container {
        padding-top: 8.35rem;
        padding-bottom: calc(var(--app-footer-height) + 5.8rem);
    }

    .titulo-agenda {
        top: 6.05rem;
    }

    .titulo-agenda h1 {
        font-size: 1.92rem;
    }

    .titulo-agenda .agenda-sub {
        font-size: 1rem;
    }

    .agendamento-form {
        margin-top: 6.2rem;
        max-width: 540px;
    }

    .agendamento-campo.fake-btn {
        height: 3.55rem;
        font-size: 0.98rem;
    }

    .btn-agendar[type="submit"] {
        max-width: 540px;
        height: 3.6rem;
        font-size: 1.05rem;
    }

    .daily-verse {
        max-width: 500px;
    }

    .selection-modal {
        width: min(100%, 388px);
    }
}

/* Flatpickr Customization */
.flatpickr-day .availability-dot {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.flatpickr-day .availability-dot.available {
    background-color: #28a745; /* Verde */
}

.flatpickr-day .availability-dot.unavailable {
    background-color: #dc3545; /* Vermelho */
}

.chevron-indicator.icon-success {
    stroke: #28a745; /* Verde sucesso */
}

/*
==============================================
CUSTOM FLATPCIKR THEME V4 (Black/Cyan - More Specific)
==============================================
*/

/* LAYOUT FIX */
#selection-modal #modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
}

/* Main calendar container */
#selection-modal .flatpickr-calendar {
    background: #000 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 400px;
    border: none !important;
    margin: 0 auto;
}

/* Month/Year Header */
#selection-modal .flatpickr-months {
    background: #000 !important;
    padding-top: 10px;
}
#selection-modal .flatpickr-months .flatpickr-month, 
#selection-modal .flatpickr-months .flatpickr-prev-month, 
#selection-modal .flatpickr-months .flatpickr-next-month {
    height: 52px;
    color: #22D3EE !important; /* Ciano vibrante */
    fill: #22D3EE !important;
}
#selection-modal .flatpickr-current-month .cur-month {
    font-size: 1.2rem;
    font-weight: 600;
    color: #22D3EE !important;
}
#selection-modal .numInputWrapper, 
#selection-modal .flatpickr-current-month input.cur-year {
    color: #22D3EE !important;
    font-weight: 600;
}
#selection-modal .flatpickr-months .flatpickr-prev-month:hover svg,
#selection-modal .flatpickr-months .flatpickr-next-month:hover svg {
    fill: #fff !important;
}

/* Weekday names (Seg, Ter, etc.) */
#selection-modal .flatpickr-weekdays {
    background: #000 !important;
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}
#selection-modal .flatpickr-weekday {
    width: 100%;
    font-size: 0.95rem;
    padding: 0 2px;
    text-align: center;
}

/* Day numbers container */
#selection-modal .dayContainer {
    border: none !important;
    padding: 0 10px 10px 10px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    max-width: 400px;
    margin: 0 auto;
}

/* Individual day numbers */
#selection-modal .flatpickr-day {
    border: none !important;
    color: #fff !important;
    font-weight: 500;
    line-height: 38px;
    height: 38px;
    width: 38px;
    border-radius: 50% !important;
    position: relative;
}

/* --- Day Status Colors --- */

/* Unavailable / Disabled day */
#selection-modal .flatpickr-day.flatpickr-disabled {
    color: #555 !important;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.5;
    background: transparent !important;
}

/* Past day */
#selection-modal .flatpickr-day.prevMonthDay,
#selection-modal .flatpickr-day.nextMonthDay {
    color: #444 !important;
    opacity: 0.5;
}

/* Today's date */
#selection-modal .flatpickr-day.today {
    border-color: #22D3EE !important;
}
#selection-modal .flatpickr-day.today:not(.selected) {
     color: #fff !important;
}

/* Selected day (círculo ciano) */
#selection-modal .flatpickr-day.selected {
    background: #22D3EE !important;
    border-color: #22D3EE !important;
    color: #000 !important; /* Texto preto para contraste */
    font-weight: 700;
}

/* Hover effect */
#selection-modal .flatpickr-day:not(.flatpickr-disabled):hover {
    background: #222 !important;
    border-color: #333 !important;
    color: #fff !important;
}

/* Ponto de disponibilidade */
.flatpickr-day .availability-dot {
    position: absolute;
    bottom: 6px; /* Posição abaixo do número */
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.flatpickr-day .availability-dot.available {
    background-color: #28a745; /* Verde */
}

.flatpickr-day .availability-dot.full {
    background-color: #22D3EE; /* Azul Ciano do tema */
}

.flatpickr-day .availability-dot.limited {
    background-color: #ff9800; /* Laranja */
}

.flatpickr-day .availability-dot.unavailable {
    background-color: #dc3545; /* Vermelho */
}


/* Container dos horários que aparece abaixo */
#time-slots-container {
    width: 100%;
    max-width: 350px; /* Mesma largura do calendário */
    margin-top: 1rem;
}

.parent-container {
    display: flex;
    justify-content: center;
}
#calendar-container,
#time-slots-container {
    margin-left: 10%;
}

#calendar-container,
#time-slots-container {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

@keyframes flash-red-shadow {
    0% { box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.5); }
    50% { box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.0); }
    100% { box-shadow: 0 2px 12px rgba(0,0,0,0.10); } /* Volta para a sombra original */
}

.flash-error {
    animation: flash-red-shadow 0.8s ease-out;
}

/*
==============================================
TOOLTIP FOR DISABLED BUTTONS
==============================================
*/
.info-tooltip {
    position: absolute;
    background-color: #19b6a4; /* Cor primária */
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Não interfere com cliques */
}

.info-tooltip.visible {
    opacity: 1;
}

/* Upsell Modal Specific Styles */
#upsell-modal-content {
    text-align: center;
    padding: 2rem 1.25rem;
    font-size: 1.1rem;
    color: #e0e0e0;
}

#upsell-modal-content span {
    font-weight: bold;
    color: #19b6a4; /* Cor primária */
}

#upsell-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

#upsell-modal-footer .btn-secondary {
    background: #6c757d; /* Cinza */
}

#upsell-modal-footer .btn-secondary:hover {
    background: #5a6268;
}

/* --- Estilos para o Card de Resumo no Modal de Confirmação --- */

#confirmation-modal-content {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.summary-card {
    background: #1c1c1c;
    border-radius: 18px;
    padding: 1.2rem;
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #333;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .icon {
    width: 22px;
    height: 22px;
    stroke: #19b6a4;
    stroke-width: 2;
    flex-shrink: 0;
}

.summary-details {
    font-size: 0.9rem;
}

.summary-label {
    color: #aaa;
    font-weight: 500;
    margin-bottom: 2px;
}

.summary-value {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

/*
==============================================
MODO DE EDIÇÃO (LARANJA)
==============================================
*/

.edit-mode .btn-agendar {
    background: #ff9800; /* Laranja */
}

.edit-mode .btn-agendar:hover {
    background: #f57c00; /* Laranja mais escuro no hover */
}

.edit-mode .agendamento-campo.fake-btn svg.chevron-indicator {
    stroke: #ff9800; /* Laranja */
}

/* --- Loading Overlay for Auto-booking --- */
#autobook-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#autobook-overlay.visible {
    display: flex;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #19b6a4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #fff;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-options-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem 1rem 1rem;
    align-items: stretch;
}

.modal-option.panel-option {
    background: #232323;
    color: #fff !important;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1.2rem 1rem;
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    outline: none;
}

.modal-option.panel-option:hover {
    background: #19b6a4;
    color: #fff !important;
}

.modal-option.panel-option:active {
    background: #1cb5e0;
    color: #fff !important;
}

/* --- Estilos para a Página de Assinatura --- */
body.assinatura-page {
    background: #000 !important; /* Fundo preto */
    color: #fff; /* Garante que o texto padrão seja branco */
}

/* --- Estilo para o botão de Assinatura (destaque) --- */
#menu-assinatura {
    color: #dc3545 !important; /* Vermelho */
}
#menu-assinatura i {
    stroke: #dc3545 !important; /* Vermelho */
}

/*
==============================================
NOVO DESIGN - PÁGINA DE LOGIN
==============================================
*/

/* Aplica o fundo preto e centraliza o conteúdo */
body.login-page {
    background-color: #111 !important;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    font-family: 'Montserrat', 'Roboto', 'Arial', sans-serif;
}

/* Remove o menu inferior da página de login */
body.login-page #menu-inferior {
    display: none;
}

/* Contêiner do formulário com a cor do tema */
.login-page .form-container {
    background-color: #232323; /* Tom de cinza escuro do tema */
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Título */
.login-page .form-container h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2rem;
}

.login-page .form-container h1 span {
    color: #19b6a4; /* Azul do tema */
}

/* Inputs do formulário */
.login-page .form-input {
    height: 3.5rem;
    background-color: #1c1c1c;
    border: 1px solid #333;
    border-radius: 0.8rem;
    color: #fff;
    font-size: 1rem;
}

/* Botão de Entrar com o azul do tema */
.login-page .form-submit-btn {
    background: #19b6a4; /* Azul do tema */
    color: #fff;
    border: none;
    border-radius: 0.8rem;
    font-size: 1.1rem;
    font-weight: bold;
    height: 3.5rem;
    margin-top: 1rem;
}