/* Modal de faturas pendentes na Home (Acesso Rápido) */

body.hf-modal-aberto {
    overflow: hidden;
}

.hf-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1050;
    animation: hf-fade 160ms ease-out;
}

.hf-modal-wrap {
    position: fixed;
    inset: 0;
    z-index: 1051;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

.hf-modal {
    pointer-events: auto;
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 28px 0;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    animation: hf-pop 180ms cubic-bezier(0.16, 1, 0.3, 1);
    font-family: "Roboto", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
    overflow: hidden;
}

.hf-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #9aa4b2;
    font-size: 22px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: background 120ms, color 120ms;
}

.hf-modal-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.hf-modal-title {
    margin: 4px 0 6px;
    font-size: 21px;
    font-weight: 700;
    color: #0f172a;
}

.hf-modal-sub {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
}

.hf-fatura-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hf-fatura-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

/* Pendente (a vencer) -> amarelo */
.hf-fatura-item.hf-pendente {
    background: #fffbeb;
    border-color: #fde68a;
}

/* Vencida -> vermelho */
.hf-fatura-item.hf-vencida {
    background: #fef2f2;
    border-color: #fecaca;
}

.hf-fatura-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.hf-dot {
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: #94a3b8;
}

.hf-fatura-item.hf-pendente .hf-dot {
    background: #f59e0b;
}

.hf-fatura-item.hf-vencida .hf-dot {
    background: #dc2626;
}

.hf-fatura-texto {
    min-width: 0;
}

.hf-fatura-titulo {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hf-fatura-status {
    margin-top: 2px;
    font-size: 12.5px;
    color: #94a3b8;
}

.hf-fatura-item.hf-pendente .hf-fatura-status {
    color: #b45309;
}

.hf-fatura-item.hf-vencida .hf-fatura-status {
    color: #b91c1c;
}

.hf-fatura-valor {
    flex: none;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.hf-fatura-item.hf-vencida .hf-fatura-valor {
    color: #dc2626;
}

.hf-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4px 20px;
}

.hf-total-label {
    font-size: 14px;
    color: #64748b;
}

.hf-total-valor {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
}

.hf-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 -28px;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
}

.hf-btn-link {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 120ms, color 120ms;
}

.hf-btn-link:hover {
    background: #eef2f7;
    color: #1e293b;
}

.hf-btn-primary {
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.30);
    transition: background 120ms, transform 120ms;
}

.hf-btn-primary:hover {
    background: #1d4ed8;
}

.hf-btn-primary:active {
    transform: translateY(1px);
}

@keyframes hf-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hf-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
    .hf-modal {
        padding: 24px 20px 0;
    }
    .hf-modal-actions {
        margin: 0 -20px;
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .hf-btn-primary,
    .hf-btn-link {
        width: 100%;
        text-align: center;
    }
}
