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

/* =====================================
   FONTES - MODERNAS E LIMPAS
===================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* =====================================
   VARIÁVEIS - TEMA BARBEARIA AZUL MARINHO
===================================== */
:root {
    --bg-primary: #F5F7FA;
    --bg-secondary: #E8EDF3;
    --card-bg: #FFFFFF;
    --card-bg-hover: #F0F4F9;
    --border-color: #D5DEE8;
    --border-hover: #B0BFD1;

    --accent: #1E3A5F;
    --accent-hover: #2C4F7C;
    --accent-dark: #142845;
    --accent-light: #4A6FA5;
    --accent-glow: rgba(30, 58, 95, 0.25);

    --dark: #0F1B2E;
    --dark-soft: #1A2A42;

    --text-primary: #1A2332;
    --text-secondary: #4A5A72;
    --text-muted: #8A96A8;

    --success: #2F855A;
    --success-glow: rgba(47, 133, 90, 0.22);
    --danger: #C53030;
    --danger-glow: rgba(197, 48, 48, 0.22);

    --font-title: 'Poppins', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;

    /* Espaçamentos fluidos */
    --spacing-xs: clamp(6px, 1.5vw, 10px);
    --spacing-sm: clamp(10px, 2vw, 16px);
    --spacing-md: clamp(16px, 3vw, 24px);
    --spacing-lg: clamp(24px, 4vw, 40px);

    /* Padding global do body */
    --body-padding: clamp(10px, 3vw, 20px);
}

/* =====================================
   BASE
===================================== */
html {
    min-height: 100%;
    /* Evita zoom indesejado em inputs no iOS */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle at 20% 10%, rgba(30, 58, 95, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(30, 58, 95, 0.04) 0%, transparent 40%);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100dvh;

    /* Padding fluido + suporte a safe-area (notch/câmera) */
    padding: var(--body-padding);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* Safe area para dispositivos com notch */
@supports (padding: max(0px)) {
    body {
        padding-top:    max(var(--body-padding), env(safe-area-inset-top));
        padding-right:  max(var(--body-padding), env(safe-area-inset-right));
        padding-bottom: max(var(--body-padding), env(safe-area-inset-bottom));
        padding-left:   max(var(--body-padding), env(safe-area-inset-left));
    }
}

/* =====================================
   SEÇÕES - BASE
===================================== */
section {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* =====================================
   TELA INICIAL - SEMPRE CENTRALIZADA VERTICALMENTE
===================================== */
#telaInicial {
    align-items: center !important;
    justify-content: center !important;
    min-height: calc(100vh - (var(--body-padding) * 2));
    min-height: calc(100svh - (var(--body-padding) * 2));
}


/* =====================================
   TELA AGENDAMENTO - COLADA NO TOPO E CENTRALIZADA
===================================== */
#telaAgendamento {
    align-items: flex-start !important; /* Mantém colada no topo */
    justify-content: center !important; /* <--- Centraliza horizontalmente */
    padding-top: 0 !important;
    min-height: auto !important;
} 

/* =====================================
   CONTAINER PRINCIPAL
===================================== */
div.container {
    background: transparent;
    width: 100%;
    max-width: 420px;
    padding: 0;
    border: none;
    box-shadow: none;
    position: relative;
    /* Garante centralização */
    margin-left: auto;
    margin-right: auto;
}

#telaAgendamento .container,
#telaInicial .container {
    position: relative;
    margin-left: auto;
    margin-right: auto;
} 

/* =====================================
   CARD GENÉRICO
===================================== */
.card {
    background: var(--card-bg);
    width: 100%;
    max-width: 420px;
    padding: clamp(24px, 5vw, 40px) clamp(18px, 4vw, 30px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow:
        0 4px 24px rgba(30, 58, 95, 0.08),
        0 1px 4px rgba(30, 58, 95, 0.05);
    position: relative;
}

/* =====================================
   BARBER POLE
===================================== */
.barber-pole {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 8px;
    height: 50px;
    background: repeating-linear-gradient(
        45deg,
        #C41E3A 0 8px,
        #FFFFFF 8px 16px,
        #1E3A5F 16px 24px,
        #FFFFFF 24px 32px
    );
    background-size: 100% 32px;
    border-radius: 4px;
    border: 1px solid var(--dark);
    box-shadow: 0 2px 6px rgba(15, 27, 46, 0.3);
    animation: barberPole 2s linear infinite;
    z-index: 2;
}

@keyframes barberPole {
    0%   { background-position: 0 0; }
    100% { background-position: 0 32px; }
}

/* =====================================
   LOGO LOGIN
===================================== */
.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.logo {
    width: clamp(60px, 15vw, 78px);
    height: clamp(60px, 15vw, 78px);
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.35);
}

/* =====================================
   LOGO BARBEARIA
===================================== */
.logoBarbearia {
    width: 100%;
    aspect-ratio: 16 / 10;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0F1B2E 0%, #1E3A5F 50%, #0F1B2E 100%);
    padding: 0;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    position: relative;
    border-radius: clamp(10px, 2.5vw, 14px);
    border: 1px solid var(--border-color);
    box-shadow:
        0 8px 30px rgba(15, 27, 46, 0.2),
        0 2px 8px rgba(15, 27, 46, 0.1);
}

.logoBarbearia::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0,0,0,0.3) 0%, transparent 50%);
    pointer-events: none;
}

.logoBarbearia img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    position: relative;
    z-index: 1;
}

/* Oculta logo/título/info na tela de agendamento */
#telaAgendamento .logoBarbearia,
#telaAgendamento #tituloBarbearia,
#telaAgendamento .infoBarbearia {
    display: none;
}

/* =====================================
   TÍTULOS
===================================== */
h1 {
    font-family: var(--font-title);
    text-align: left;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.card h1 {
    text-align: center;
    font-size: clamp(18px, 3.5vw, 26px);
    font-weight: 700;
}

#tituloBarbearia,
#tituloInicialBarbearia {
    font-family: var(--font-title);
    text-align: center;
    font-size: clamp(22px, 5.5vw, 34px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    padding: 8px 0;
    line-height: 1.15;
}

p {
    color: var(--text-secondary);
    font-size: clamp(13px, 2.5vw, 15px);
    line-height: 1.6;
    font-weight: 400;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 500;
}

/* =====================================
   INFO BARBEARIA
===================================== */
.infoBarbearia {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding: clamp(12px, 2.5vw, 16px) clamp(14px, 3vw, 18px);
    background: rgba(30, 58, 95, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
}

.infoBarbearia p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: clamp(12px, 2vw, 14px);
    text-align: left;
    font-weight: 500;
}

.infoBarbearia p::after {
    content: none !important;
}

.infoBarbearia p:first-child::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E3A5F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

.infoBarbearia p:last-child::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E3A5F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3e%3ccircle cx='12' cy='10' r='3'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

/* =====================================
   DIVISOR
===================================== */
.divisor-ornamental {
    display: none;
}

/* =====================================
   LABELS E INPUTS
===================================== */
label {
    display: block;
    margin-bottom: 8px;
    margin-top: 4px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: clamp(12px, 2vw, 13px);
    letter-spacing: 0.02em;
}

input,
select {
    width: 100%;
    padding: clamp(11px, 2.5vw, 13px) clamp(12px, 2.5vw, 14px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: clamp(12px, 2.5vw, 16px);
    background-color: #FFFFFF;
    color: var(--text-primary);
    /* Mínimo 16px no iOS evita zoom automático */
    font-size: max(16px, 1rem);
    font-family: var(--font-body);
    font-weight: 500;
    transition: all 0.2s ease;
    /* Aparência nativa removida para consistência */
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background-color: #FFFFFF;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5A72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 40px;
    background-color: #FFFFFF;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

.form-group {
    margin-bottom: 4px;
}

/* =====================================
   BOTÕES PRINCIPAIS
===================================== */
button {
    width: 100%;
    padding: clamp(13px, 3vw, 16px);
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #FFFFFF;
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    font-family: var(--font-body);
    transition:
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
    box-shadow: 0 4px 14px var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    /* Área mínima de toque - acessibilidade mobile */
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Hover apenas em dispositivos que suportam (não-touch) */
@media (hover: hover) and (pointer: fine) {
    button:hover {
        background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px var(--accent-glow);
    }
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* =====================================
   BOTÃO INICIAR AGENDAMENTO
===================================== */
#btnIniciarAgendamento {
    display: flex;
    width: 100%;
    margin: 4px 0 14px;
    padding: clamp(15px, 3.5vw, 18px);
    font-size: clamp(13px, 2.5vw, 14px);
    color: #FFFFFF;
    min-height: 52px;
}

#btnIniciarAgendamento::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 22px;
    min-width: 22px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='6' cy='6' r='3'/%3e%3ccircle cx='6' cy='18' r='3'/%3e%3cline x1='20' y1='4' x2='8.12' y2='15.88'/%3e%3cline x1='14.47' y1='14.48' x2='20' y2='20'/%3e%3cline x1='8.12' y1='8.12' x2='12' y2='12'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

#btnEntrar {
    margin-top: 10px;
}

/* =====================================
   MENSAGEM LOGIN
===================================== */
#mensagemLogin {
    margin-top: 15px;
    text-align: center;
    font-size: clamp(12px, 2vw, 13px);
    color: var(--danger);
    min-height: 20px;
    font-weight: 500;
}

/* =====================================
   HORÁRIOS
===================================== */
#listaHorarios {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 2vw, 10px);
    margin-bottom: var(--spacing-md);
    margin-top: 4px;
}

.btnHorario {
    /* Fluido: cresce para preencher, mínimo de 65px */
    flex: 1 1 65px;
    max-width: calc(25% - 8px);
    min-width: 65px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-family: var(--font-body);
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(30, 58, 95, 0.06);
    padding: 0;
    font-size: clamp(12px, 2.5vw, 14px);
    gap: 0;
    letter-spacing: 0.02em;
    text-transform: none;
    /* Área mínima de toque */
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .btnHorario:hover {
        background: var(--card-bg-hover);
        border-color: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-glow);
    }
}

.btnHorario.selecionado,
.selecionado {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #FFFFFF;
    border: 1px solid var(--accent-dark);
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* Placeholder vazio */
#listaHorarios:empty {
    display: block;
    width: 100%;
    padding: 20px;
    text-align: center;
    background: rgba(30, 58, 95, 0.05);
    color: var(--text-muted);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    font-size: clamp(12px, 2vw, 13px);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

#listaHorarios:empty::before {
    content: "Selecione uma data";
}

/* =====================================
   AGENDAMENTOS
===================================== */
.agendamento {
    border-radius: 8px;
    padding: clamp(12px, 2.5vw, 15px);
    margin: 10px 0;
    background: #FFFFFF;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.ocupado {
    background-color: rgba(197, 48, 48, 0.06);
    border-left: 4px solid var(--danger);
}

.livre {
    background-color: rgba(47, 133, 90, 0.06);
    border-left: 4px solid var(--success);
}

/* =====================================
   BOTÃO AGENDAR
===================================== */
#btnAgendar {
    width: 100%;
    padding: clamp(15px, 3.5vw, 18px);
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: clamp(13px, 2.5vw, 15px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition:
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
    box-shadow: 0 6px 20px var(--accent-glow);
    margin-top: 15px;
    font-family: var(--font-body);
    min-height: 52px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#btnAgendar::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='6' cy='6' r='3'/%3e%3ccircle cx='6' cy='18' r='3'/%3e%3cline x1='20' y1='4' x2='8.12' y2='15.88'/%3e%3cline x1='14.47' y1='14.48' x2='20' y2='20'/%3e%3cline x1='8.12' y1='8.12' x2='12' y2='12'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
    #btnAgendar:hover {
        background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(30, 58, 95, 0.4);
    }
}

/* =====================================
   DIA FECHADO
===================================== */
.diaFechado {
    background: rgba(197, 48, 48, 0.06);
    border: 1px solid rgba(197, 48, 48, 0.25);
    border-radius: 12px;
    padding: clamp(20px, 4vw, 30px);
    text-align: center;
    margin-top: 15px;
}

.diaFechado h3 {
    font-family: var(--font-title);
    color: var(--danger);
    font-size: clamp(18px, 3.5vw, 22px);
    margin-bottom: 10px;
    font-weight: 700;
}

.diaFechado p {
    color: var(--text-secondary);
    font-size: clamp(13px, 2vw, 14px);
    text-align: center;
}

.semHorarios {
    width: 100%;
    padding: clamp(16px, 3vw, 20px);
    text-align: center;
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--text-muted);
    font-size: clamp(12px, 2vw, 13px);
    font-weight: 500;
    border: 1px dashed var(--border-color);
}

/* =====================================
   MODAL
===================================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 46, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    /* flex-start + margin:auto = centraliza mas permite scroll */
    align-items: flex-start;
    overflow-y: auto;
    z-index: 9999;
    padding: clamp(14px, 3vw, 20px);
}

.modal.ativo {
    display: flex;
}

.modalConteudo {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: clamp(22px, 5vw, 32px);
    text-align: center;
    box-shadow:
        0 25px 60px rgba(15, 27, 46, 0.35),
        0 8px 20px rgba(15, 27, 46, 0.15);
    /* Centraliza verticalmente quando há espaço */
    margin: auto;
    position: relative;
}

.modalConteudo h2 {
    font-family: var(--font-title);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: clamp(18px, 3.5vw, 24px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modalConteudo h3 {
    font-family: var(--font-title);
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: clamp(16px, 3vw, 20px);
}

.modalConteudo p {
    margin: 8px 0;
    color: var(--text-secondary);
    text-align: center;
}

#btnFecharModal {
    margin-top: 25px;
    width: 100%;
}

.confirmacaoIcone {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    margin: 0 auto var(--spacing-md);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #1F6B47);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(30px, 7vw, 42px);
    box-shadow: 0 8px 25px var(--success-glow);
}

.comprovante {
    text-align: left;
    margin-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
}

.comprovante p {
    margin: 12px 0;
    color: var(--text-primary);
    text-align: left;
    font-size: clamp(13px, 2vw, 14px);
}

/* =====================================
   CONSULTAR AGENDAMENTO
===================================== */
.consulta-area {
    margin-top: 4px;
    text-align: center;
    padding-bottom: 8px;
}

.consulta-area p {
    font-size: clamp(12px, 2vw, 13px);
    color: var(--text-muted);
    margin-bottom: 0;
    text-align: center;
}

#btnConsultar {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s ease;
    border-bottom: 1px dotted var(--accent);
    padding-bottom: 1px;
    -webkit-tap-highlight-color: transparent;
}

#btnConsultar::before,
#btnConsultar::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

@media (hover: hover) and (pointer: fine) {
    #btnConsultar:hover {
        color: var(--accent-hover);
        border-bottom-color: var(--accent-hover);
    }
}

#modalConsulta {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 46, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: clamp(14px, 3vw, 20px);
    z-index: 9999;
}

#modalConsulta .modalConteudo {
    width: 100%;
    max-width: 420px;
    margin: auto;
}

#modalConsulta h2 {
    color: var(--text-primary);
}

#modalConsulta label {
    text-align: left;
}

#telefoneConsulta {
    width: 100%;
    padding: clamp(11px, 2.5vw, 13px);
    margin: 15px 0;
}

#resultadoConsulta {
    margin-top: var(--spacing-md);
}

.card-consulta {
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    padding: clamp(14px, 3vw, 18px);
    border-radius: 10px;
    text-align: left;
    border-left: 3px solid var(--accent);
}

.card-consulta p {
    text-align: left;
    color: var(--text-primary);
    margin: 6px 0;
    font-size: clamp(13px, 2vw, 14px);
}

/* =====================================
   BOTÃO VOLTAR
===================================== */
.btn-voltar {
    position: relative;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    background: #FFFFFF;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(30, 58, 95, 0.08);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 0;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    text-transform: none;
    letter-spacing: normal;
    /* Área de toque mínima */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-voltar::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5A72' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='19' y1='12' x2='5' y2='12'/%3e%3cpolyline points='12 19 5 12 12 5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: background-image 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .btn-voltar:hover {
        background: var(--card-bg-hover);
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .btn-voltar:hover::before {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E3A5F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='19' y1='12' x2='5' y2='12'/%3e%3cpolyline points='12 19 5 12 12 5'/%3e%3c/svg%3e");
    }
}

/* =====================================
   BOTÃO CANCELAR CLIENTE
===================================== */
.btnCancelarCliente {
    width: 100%;
    margin-top: var(--spacing-md);
    padding: clamp(12px, 3vw, 15px);
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--danger) 0%, #8B2020 100%);
    color: #fff;
    font-size: clamp(12px, 2.5vw, 13px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition:
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
    box-shadow: 0 4px 16px var(--danger-glow);
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .btnCancelarCliente:hover {
        background: linear-gradient(180deg, #8B2020 0%, #6B1818 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(197, 48, 48, 0.4);
    }
}

/* =====================================
   LISTA SERVIÇOS
===================================== */
#listaServicos,
.listaServicos {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 2vw, 10px);
    margin-top: 8px;
    margin-bottom: clamp(12px, 2.5vw, 16px);
}

.btnServico {
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    color: var(--text-primary);
    padding: clamp(11px, 2.5vw, 14px) clamp(14px, 3vw, 20px);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    /* Fluido: ocupa 50% menos gaps em telas pequenas */
    flex: 1 1 130px;
    max-width: calc(50% - 5px);
    box-shadow: 0 1px 3px rgba(30, 58, 95, 0.06);
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    font-size: clamp(13px, 2.5vw, 14px);
    text-transform: none;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .btnServico:hover {
        background: var(--card-bg-hover);
        border-color: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-glow);
    }
}

.btnServico.selecionado {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #FFFFFF;
    border-color: var(--accent-dark);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.nomeServico {
    font-weight: 600;
    font-size: clamp(13px, 2.5vw, 14px);
    letter-spacing: 0.02em;
}

.duracaoServico {
    font-size: clamp(11px, 2vw, 12px);
    opacity: 0.8;
    font-weight: 500;
    letter-spacing: 0.02em;
}

#listaServicos:empty::before {
    content: "Escolha seu barbeiro";
    display: block;
    width: 100%;
    padding: clamp(12px, 2.5vw, 16px);
    text-align: center;
    background: rgba(30, 58, 95, 0.05);
    color: var(--text-muted);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    font-size: clamp(12px, 2vw, 13px);
    font-weight: 500;
}

/* =====================================
   RESPONSIVO - TELAS GRANDES (1024px+)
===================================== */
@media (min-width: 1024px) {
    body {
        padding: 40px 20px;
        align-items: center;
    }

    #telaInicial {
        min-height: auto;
    }

    div.container,
    .card {
        max-width: 440px;
    }
}

/* =====================================
   RESPONSIVO - TABLET (768px)
===================================== */
@media (max-width: 768px) {
    div.container,
    .card {
        max-width: 420px;
    }
}

/* =====================================
   RESPONSIVO - MOBILE (480px)
===================================== */
@media (max-width: 480px) {
    .card {
        border-radius: 14px;
    }

    .logoBarbearia {
        border-radius: 12px;
    }

    /* Horários: 3 por linha em mobile */
    .btnHorario {
        max-width: calc(33.333% - 7px);
    }

    .barber-pole {
        top: 15px;
        right: 15px;
        width: 6px;
        height: 40px;
    }
}

/* =====================================
   RESPONSIVO - MOBILE PEQUENO (360px)
===================================== */
@media (max-width: 360px) {
    /* Horários: 2 por linha em mobile muito pequeno */
    .btnHorario {
        max-width: calc(50% - 5px);
    }

    /* Serviços: 1 por linha em mobile muito pequeno */
    .btnServico {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

/* =====================================
   TELA MUITO BAIXA (altura < 700px)
===================================== */
@media (max-height: 700px) {
    body {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    /* Tela inicial continua centralizada, mas permite scroll se necessário */
    #telaInicial {
        min-height: calc(100vh - 32px);
        min-height: calc(100svh - 32px);
    }
}

/* =====================================
   ACESSIBILIDADE - REDUÇÃO DE MOVIMENTO
===================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .barber-pole {
        animation: none;
    }
}

/* =====================================
   ACESSIBILIDADE - ALTO CONTRASTE
===================================== */
@media (prefers-contrast: high) {
    :root {
        --border-color: #8A96A8;
        --text-muted: #4A5A72;
    }

    input,
    select,
    .btnHorario,
    .btnServico {
        border-width: 2px;
    }
}

/* =====================================
   FOCO VISÍVEL (teclado / acessibilidade)
===================================== */
button:focus-visible,
input:focus-visible,
select:focus-visible,
.btnHorario:focus-visible,
.btnServico:focus-visible,
.btn-voltar:focus-visible,
#btnConsultar:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ===================================== */
/* HEADER COM LOGO + BOTÃO VOLTAR        */
/* ===================================== */

.header-logo-wrapper{
    position: relative !important;
    width: 100% !important;
    margin-bottom: 24px !important;
    display: block !important;
}

.header-logo-wrapper .btn-voltar-logo{
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: #1f2937 !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 10 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
}

.header-logo-wrapper .btn-voltar-logo:hover{
    background: #f3f4f6 !important;
}

/* CARD DA LOGO — força tamanho mesmo sem imagem */
.header-logo-wrapper .logoBarbearia{
    width: 100% !important;
    height: 200px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #fff !important;
    border-radius: 16px !important;
    padding: 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.header-logo-wrapper .logoBarbearia img{
    max-width: 220px !important;
    max-height: 160px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Se a imagem não carregou (src vazio), esconde o ícone quebrado */
.header-logo-wrapper .logoBarbearia img:not([src]),
.header-logo-wrapper .logoBarbearia img[src=""]{
    display: none !important;
}

.header-logo-wrapper .logoBarbearia{
    width: 100% !important;
    height: 200px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #fff !important;
    border-radius: 16px !important;
    padding: 0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.header-logo-wrapper .logoBarbearia img{
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
}

/* Título "Agende seu horário" */
.tituloAgende {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    margin: 18px 0 10px 0;
    color: #333;
    font-family: 'Inter', sans-serif;
}

.tituloAgende .destaqueAgende {
    color: #1E3A5F; /* mesma cor do botão AGENDAR */
    font-weight: 800;
}

/* ========================================================= */
/* MODAL DE CONFIRMAÇÃO                                      */
/* ========================================================= */

/* Título com ícone (agora maior e destacado) */
.tituloConfirmacao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.2;
}

.tituloConfirmacao i {
    width: 32px;
    height: 32px;
    color: #10b981;
    stroke-width: 2.5;
    animation: popIn 0.4s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Subtítulo */
.confirmacaoSubtitulo {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

/* ========================================================= */
/* COMPROVANTE                                               */
/* ========================================================= */

.comprovante {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.comprovanteItem {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

.comprovanteLabel {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.comprovanteLabel i {
    width: 16px;
    height: 16px;
    color: #10b981;
    stroke-width: 2;
}

.comprovanteLabel strong {
    font-weight: 600;
    color: #475569;
}

.comprovanteValor {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    padding-left: 24px;
}

/* ========================================================= */
/* RESPONSIVO                                                */
/* ========================================================= */

@media (max-width: 480px) {
    .tituloConfirmacao {
        font-size: 1.35rem;
    }

    .tituloConfirmacao i {
        width: 28px;
        height: 28px;
    }

    .comprovanteItem {
        padding: 10px;
    }
}

/* ========================================================= */
/* COMPROVANTE                                               */
/* ========================================================= */

.comprovante {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.comprovanteItem {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

.comprovanteLabel {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.comprovanteLabel i {
    width: 16px;
    height: 16px;
    color: #10b981;
    stroke-width: 2;
}

.comprovanteLabel strong {
    font-weight: 600;
    color: #475569;
}

.comprovanteValor {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    padding-left: 24px;
}

/* ========================================================= */
/* RESPONSIVO                                                */
/* ========================================================= */

@media (max-width: 480px) {
    .tituloConfirmacao {
        font-size: 1.15rem;
    }

    .confirmacaoIcone {
        width: 70px;
        height: 70px;
    }

    .confirmacaoIcone i {
        width: 38px;
        height: 38px;
    }

    .comprovanteItem {
        padding: 10px;
    }
}

/* ===== ÍCONES NOS LABELS ===== */
form label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

form label i {
    width: 16px;
    height: 16px;
    color: #64748b;
    stroke-width: 2;
}

/* ===== BOTÕES COM ÍCONE ===== */
#btnIniciarAgendamento,
#btnAgendar,
#btnFecharModal,
#btnBuscarAgendamento,
#btnFecharConsulta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#btnIniciarAgendamento i,
#btnAgendar i,
#btnFecharModal i,
#btnBuscarAgendamento i,
#btnFecharConsulta i {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* ===== BOTÃO VOLTAR ===== */
.btn-voltar-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-voltar-logo i {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* ===== LINK CONSULTAR ===== */
.consulta-area a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.consulta-area a i {
    width: 15px;
    height: 15px;
}

/* ========================================================= */
/* REMOVE ÍCONES ANTIGOS (tesoura via ::before/::after)      */
/* ========================================================= */

#btnIniciarAgendamento::before,
#btnIniciarAgendamento::after,
#btnAgendar::before,
#btnAgendar::after,
#btnFecharModal::before,
#btnFecharModal::after,
#btnBuscarAgendamento::before,
#btnBuscarAgendamento::after {
    content: none !important;
    display: none !important;
    background: none !important;
}