:root {
    --app-footer-height: 84px;
    --app-footer-gap: 24px;
    --app-footer-icon-lift: 10px;
}

html,
body {
    min-height: 100%;
    overflow-x: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

body {
    overflow-y: auto;
    overscroll-behavior-y: none;
}

body.modal-open {
    overflow: hidden;
}

.view.active {
    width: 100%;
}

/* Bottom Menu Styles */
.agenda-menu {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: min(calc(100% - 24px), 640px);
    background: rgba(26, 30, 34, 0.96);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.72rem 0.45rem calc(0.72rem + env(safe-area-inset-bottom));
    z-index: 200;
    box-shadow: 0 14px 38px rgba(0,0,0,0.32);
    box-sizing: border-box;
    min-height: var(--app-footer-height);
    border: 1px solid rgba(46, 54, 62, 0.95);
    border-radius: 26px;
    backdrop-filter: blur(14px);
}

body.nav-cliente .view.active,
body.nav-admin .view.active,
body.nav-barbeiro .view.active {
    padding-bottom: calc(var(--app-footer-height) + var(--app-footer-gap));
    box-sizing: border-box;
}

body.nav-cliente.auth-page .view.active {
    min-height: calc(100vh - var(--app-footer-height) - 1rem);
    padding-bottom: calc(var(--app-footer-height) + 0.75rem);
}

.agenda-menu-item {
    background: none;
    border: none;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: #bdbdbd;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
    padding: 0.45rem 0.2rem 0;
    text-decoration: none;
}

/* Cor padrão para ícones */
.agenda-menu-item i {
    stroke: #bdbdbd;
    transition: stroke 0.2s;
}

/* Cor para item de menu ativo (padrão azul/verde) */
.agenda-menu-item.active {
    color: #19b6a4;
}
.agenda-menu-item.active i {
    stroke: #19b6a4;
}

.agenda-menu-item svg {
    width: 1.35rem;
    height: 1.35rem;
    margin-bottom: 0.28rem;
    transform: translateY(calc(var(--app-footer-icon-lift) * -1));
}

.agenda-menu-item span {
    font-size: 0.72rem !important; /* CORREÇÃO: Força o mesmo tamanho para todos os itens */
    margin-top: -4px;
    font-weight: 500 !important; /* Peso normal para todos os itens */
    line-height: 1;
    text-align: center;
}

.center-btn-circle {
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #22d0c0 0%, #18a395 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
    margin-top: -22px;
    box-shadow: 0 12px 22px rgba(25,182,164,.38);
    transform: translateY(calc(var(--app-footer-icon-lift) * -1));
    border: 3px solid rgba(17, 17, 17, 0.9);
}

.center-btn-circle i,
.center-btn-circle svg {
    stroke: #111;
    width: 1.5rem;
    height: 1.5rem;
    transform: none;
    margin-bottom: 0;
}

.agenda-menu-center span {
    color: #19b6a4;
    font-size: 0.68rem !important;
}

/* Apenas o item ativo fica em negrito */
.agenda-menu-item.active span {
    font-weight: 600 !important;
    font-size: 0.75rem !important; /* Garante que o tamanho não mude */
}

/* --- Estilos Especiais para o Botão de Usuário Logado --- */

/* Deixa o botão de usuário laranja CONSTANTEMENTE quando logado */
.agenda-menu-item.perfil-link {
    color: #ff9800; /* Laranja */
    text-shadow: 0 0 6px rgba(255, 152, 0, 0.6); /* Efeito de brilho (luz acesa) */
}

/* Ícone também fica laranja */
.agenda-menu-item.perfil-link i {
    stroke: #ff9800;
}

/* Quando a página de perfil está ativa, o texto e o brilho ficam mais fortes */
.agenda-menu-item.perfil-link.active {
    color: #ffc107; /* Laranja mais vivo */
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.8);
}
.agenda-menu-item.perfil-link.active i {
    stroke: #ffc107;
}

/* Efeito de clique */
.agenda-menu-item.perfil-link:active {
    background-color: rgba(255, 152, 0, 0.2);
}

/* Garante que o botão de assinatura seja sempre vermelho, sobrepondo a classe .active */
#menu-assinatura,
#menu-assinatura.active {
    color: #dc3545 !important;
}
#menu-assinatura i,
#menu-assinatura.active i {
    stroke: #dc3545 !important;
}

/* --- Media Query para Telas Maiores --- */
@media (min-width: 768px) {
    :root {
        --app-footer-height: 96px;
        --app-footer-gap: 28px;
        --app-footer-icon-lift: 8px;
    }

    .agenda-menu {
        width: min(calc(100% - 32px), 700px);
        bottom: 16px;
        padding: 0.95rem 0.7rem;
    }
    .agenda-menu-item svg {
        width: 1.7rem;
        height: 1.7rem;
    }
    .agenda-menu .agenda-menu-item span {
        font-size: 0.82rem !important;
    }
    .agenda-menu .agenda-menu-item.active span {
        font-size: 0.82rem !important;
    }
}

/* --- Estilo do Botão de Instalação do PWA --- */
.install-pwa-button {
    position: fixed;
    top: 1.5rem;
    left: 1.25rem;
    z-index: 1000;
    background-color: #19b6a4;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: opacity 0.3s;
}

/* ====================================================
   ASSINATURA / PLANOS — Cards de venda
   ==================================================== */
.assinatura-page {
    padding: 1.25rem 1rem 0;
    max-width: 520px;
    margin: 0 auto;
}

.assinatura-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.assinatura-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.3rem;
}

.assinatura-subtitle {
    font-size: 0.88rem;
    color: #8b949e;
    margin: 0;
    line-height: 1.4;
}

.assinatura-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assinatura-card {
    position: relative;
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid #30363d;
    border-radius: 18px;
    padding: 1.5rem 1.25rem;
    backdrop-filter: blur(12px);
    transition: transform 0.2s, border-color 0.2s;
}

.assinatura-card:hover {
    transform: translateY(-2px);
}

.assinatura-card--destaque {
    border-color: #19b6a4;
    background: rgba(25, 182, 164, 0.06);
    box-shadow: 0 0 20px rgba(25, 182, 164, 0.12);
}

.assinatura-card--ativa {
    border-color: #19b6a4;
}

.assinatura-card-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, #19b6a4, #118b7c);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assinatura-card-nome {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.75rem;
}

.assinatura-card-preco {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    margin-bottom: 0.75rem;
}

.assinatura-card-cifrao {
    font-size: 0.95rem;
    color: #8b949e;
    font-weight: 600;
}

.assinatura-card-valor {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.assinatura-card-periodo {
    font-size: 0.85rem;
    color: #8b949e;
    font-weight: 500;
}

.assinatura-card-desc {
    font-size: 0.85rem;
    color: #8b949e;
    margin: 0 0 1rem;
    line-height: 1.4;
}

.assinatura-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.assinatura-card-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #c9d1d9;
}

.assinatura-card-features li svg {
    stroke: #19b6a4;
    flex-shrink: 0;
}

.assinatura-card-btn {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #30363d;
    border-radius: 10px;
    background: #21262d;
    color: #c9d1d9;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.assinatura-card-btn:hover {
    border-color: #8b949e;
    color: #fff;
}

.assinatura-card-btn--destaque {
    background: linear-gradient(135deg, #19b6a4, #118b7c);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(25, 182, 164, 0.3);
}

.assinatura-card-btn--destaque:hover {
    box-shadow: 0 6px 20px rgba(25, 182, 164, 0.45);
    transform: translateY(-1px);
}

.assinatura-card-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.assinatura-status-pill {
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assinatura-status-ativa {
    color: #3fb950;
    border: 1px solid #3fb950;
    background: rgba(46, 160, 67, 0.1);
}

.assinatura-status-pendente {
    color: #d29922;
    border: 1px solid #d29922;
    background: rgba(210, 153, 34, 0.1);
}

.assinatura-status-cancelada {
    color: #f85149;
    border: 1px solid #f85149;
    background: rgba(248, 81, 73, 0.1);
}

.assinatura-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
}

.assinatura-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.assinatura-detail-label {
    font-size: 0.75rem;
    color: #8b949e;
    text-transform: uppercase;
    font-weight: 500;
}

.assinatura-detail-value {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
}

/* ── Assinatura: inadimplente status pill ──────────────── */
.assinatura-status-inadimplente {
    color: #d29922;
    border: 1px solid #d29922;
    background: rgba(210, 153, 34, 0.1);
}

.assinatura-status-suspensa {
    color: #f85149;
    border: 1px solid #f85149;
    background: rgba(248, 81, 73, 0.1);
}

/* ── Assinatura: Modal de compra ──────────────────────── */
.ass-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ass-modal {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 18px;
    padding: 1.5rem;
    width: 100%;
    max-width: 380px;
    position: relative;
}

.ass-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #8b949e;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.ass-modal-title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 .25rem;
}

.ass-modal-sub {
    color: #19b6a4;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 1.25rem;
}

.ass-modal-opcoes {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.ass-modal-opcao {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: 1rem;
    border: 1px solid #30363d;
    border-radius: 12px;
    background: #21262d;
    cursor: pointer;
    transition: all 0.2s;
}

.ass-modal-opcao:hover {
    border-color: #19b6a4;
    background: rgba(25, 182, 164, 0.06);
}

.ass-modal-opcao-icon { font-size: 1.5rem; }
.ass-modal-opcao-label { color: #fff; font-weight: 600; font-size: 0.95rem; }
.ass-modal-opcao-desc { color: #8b949e; font-size: 0.78rem; }

.ass-pix-box {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    margin-top: 1rem;
}

.ass-pix-label {
    color: #8b949e;
    font-size: 0.8rem;
    margin: 0 0 .5rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ass-pix-chave {
    color: #19b6a4;
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-all;
    padding: .5rem;
    background: rgba(25, 182, 164, 0.06);
    border-radius: 8px;
}

/* ── Assinatura: Stats row ────────────────────────────── */
.ass-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: .75rem;
}

@media (max-width: 400px) {
    .ass-stats-row { grid-template-columns: 1fr; }
}

.ass-stat-card {
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid #30363d;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(12px);
    position: relative;
}

.ass-stat-card--economia {
    border-color: rgba(63, 185, 80, 0.3);
    background: rgba(63, 185, 80, 0.04);
}

.ass-ring { display: block; margin: 0 auto .5rem; }

.ass-ring-text {
    position: absolute;
    top: calc(1.25rem + 65px);
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ass-ring-number { font-size: 1.6rem; font-weight: 800; color: #19b6a4; line-height: 1; }
.ass-ring-label { font-size: 0.65rem; color: #8b949e; margin-top: .15rem; }
.ass-stat-footer { color: #c9d1d9; font-size: 0.82rem; font-weight: 600; margin: .25rem 0 0; }

.ass-economia-icon { font-size: 2rem; margin-bottom: .5rem; }
.ass-economia-valor { font-size: 1.5rem; font-weight: 800; color: #3fb950; line-height: 1; }
.ass-economia-label { font-size: 0.78rem; color: #8b949e; margin-top: .25rem; }
.ass-economia-detalhe { font-size: 0.72rem; color: #58a6ff; margin-top: .5rem; }

/* ── Assinatura: Catálogo membro ──────────────────────── */
.ass-catalogo { margin-bottom: 1rem; }
.ass-catalogo-grid { display: flex; flex-direction: column; gap: .75rem; }

.ass-catalogo-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid #30363d;
    border-radius: 14px;
    padding: .75rem;
    backdrop-filter: blur(12px);
}

.ass-catalogo-foto { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }

.ass-catalogo-foto-placeholder {
    width: 56px; height: 56px; border-radius: 10px; background: #21262d;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}

.ass-catalogo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.ass-catalogo-nome { color: #fff; font-weight: 600; font-size: 0.9rem; }
.ass-catalogo-marca { color: #8b949e; font-size: 0.72rem; }
.ass-catalogo-precos { display: flex; align-items: center; gap: .5rem; }
.ass-catalogo-preco-de { color: #8b949e; font-size: 0.78rem; text-decoration: line-through; }
.ass-catalogo-preco-membro { color: #3fb950; font-size: 0.95rem; font-weight: 700; }
.ass-catalogo-economia { font-size: 0.7rem; color: #19b6a4; font-weight: 500; }

.ass-catalogo-btn {
    flex-shrink: 0; padding: .4rem .75rem; border: 1px solid #19b6a4; border-radius: 8px;
    background: transparent; color: #19b6a4; font-size: 0.78rem; font-weight: 600;
    cursor: pointer; transition: all .2s;
}
.ass-catalogo-btn:hover { background: rgba(25, 182, 164, 0.12); }

/* ── Assinatura: Tabs ─────────────────────────────────── */
.ass-tabs { display: flex; gap: .25rem; border-bottom: 1px solid #21262d; margin-bottom: .75rem; }

.ass-tab {
    padding: .5rem .85rem; background: none; border: none;
    border-bottom: 2px solid transparent; color: #8b949e;
    font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all .2s;
}
.ass-tab:hover { color: #c9d1d9; }
.ass-tab--ativo { color: #19b6a4; border-bottom-color: #19b6a4; }

/* ── Assinatura: Timeline ─────────────────────────────── */
.ass-timeline-item {
    display: flex; gap: .75rem; padding: .6rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}
.ass-timeline-item:last-child { border-bottom: none; }

.ass-timeline-dot {
    width: 10px; height: 10px; border-radius: 50%; background: #19b6a4;
    flex-shrink: 0; margin-top: .35rem;
}
.ass-timeline-dot--hist { background: #58a6ff; }
.ass-timeline-dot--compra { background: #3fb950; }

.ass-timeline-content { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ass-timeline-titulo { color: #c9d1d9; font-size: 0.88rem; font-weight: 600; text-transform: capitalize; }
.ass-timeline-meta { color: #8b949e; font-size: 0.75rem; }
.ass-timeline-detalhe { color: #8b949e; font-size: 0.75rem; font-style: italic; line-height: 1.3; }
.ass-empty { text-align: center; color: #484f58; font-size: 0.85rem; padding: 1rem 0; }

/* ── Assinatura: Filter buttons ───────────────────────── */
.ass-filter--active { background: #19b6a4 !important; color: #fff !important; border-color: #19b6a4 !important; }

/* ── Barbeiro Clientes: Stats row ─────────────────────── */
.bc-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
    margin-bottom: .75rem;
}

.bc-stat {
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid #30363d;
    border-radius: 14px;
    padding: .85rem .5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.bc-stat-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.bc-stat-lbl {
    font-size: 0.68rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ── Barbeiro Clientes: Serviços chart ────────────────── */
.bc-servicos-chart {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin-top: .5rem;
}

.bc-servico-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.bc-servico-nome {
    flex-shrink: 0;
    width: 110px;
    font-size: 0.8rem;
    color: #c9d1d9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-servico-bar-bg {
    flex: 1;
    height: 10px;
    background: #21262d;
    border-radius: 6px;
    overflow: hidden;
}

.bc-servico-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #19b6a4, #118b7c);
    border-radius: 6px;
    transition: width .5s ease;
}

.bc-servico-cnt {
    flex-shrink: 0;
    width: 28px;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 700;
    color: #19b6a4;
}

/* ── Nav barbeiro: center button lift ─────────────────── */
.nav-barbeiro .agenda-menu-item--center {
    flex: 1.2;
}

.nav-barbeiro .agenda-menu-item--center .center-btn-circle {
    margin-top: -18px;
}

.nav-barbeiro .agenda-menu-item--center span {
    color: #19b6a4;
    font-weight: 700 !important;
}
