/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #f4f6f8;
}

/* ESTRUTURA GERAL */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #0f4c81, #0a2a4a);
    color: #fff;
    transition: width 0.3s ease;
    overflow: hidden;
}

/* SIDEBAR FECHADA */
.sidebar.fechada {
    width: 70px;
}

/* TOPO DA SIDEBAR */
.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}

.logo {
    font-size: 26px;
}

/* BOTÃO TOGGLE */
.btn-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

/* MENU */
.menu {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

/* LINKS */
.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.menu a:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ÍCONE */
.menu .icon {
    font-size: 20px;
    width: 24px;
    min-width: 24px;
    text-align: center;
}

/* TEXTO */
.menu .text {
    transition: opacity 0.2s ease, width 0.2s ease;
}

/* ============================= */
/* QUANDO A SIDEBAR FECHA */
/* ============================= */

.sidebar.fechada .menu a {
    justify-content: center;
    padding: 14px 0;           /* REMOVE deslocamento lateral */
    gap: 0;                    /* REMOVE espaço vazio */
}

.sidebar.fechada .menu .text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.sidebar.fechada .menu .icon {
    margin: 0;
    font-size: 22px;           /* Destaque visual no modo fechado */
}

/* ÁREA PRINCIPAL */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.app-header {
    background: #ffffff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.app-header h1 {
    font-size: 22px;
}

/* BOTÃO SAIR */
.btn-logout {
    text-decoration: none;
    color: #0f4c81;
    font-weight: bold;
}

/* CONTEÚDO */
.conteudo {
    padding: 24px;
}



/* ===== DASHBOARD ===== */

.dashboard-topo {
    margin-bottom: 24px;
}

.dashboard-topo h2 {
    font-size: 22px;
    margin-bottom: 4px;
}

.dashboard-topo p {
    color: #6b7280;
}

/* CARDS RESUMO */
.cards-resumo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.card .icone {
    font-size: 28px;
}

.card p {
    font-size: 14px;
    color: #6b7280;
}

.card strong {
    font-size: 18px;
}

.card-familia { border-left: 5px solid #22c55e; }
.card-empresa { border-left: 5px solid #f59e0b; }
.card-assinatura { border-left: 5px solid #8b5cf6; }

/* TOTAL GERAL */
.card-total {
    background: linear-gradient(135deg, #0f4c81, #0a2a4a);
    color: #fff;
    border-radius: 18px;
    padding: 26px;
    text-align: center;
    margin-bottom: 30px;
}

.card-total p {
    font-size: 15px;
    opacity: 0.9;
}

.card-total strong {
    font-size: 32px;
    display: block;
    margin-top: 6px;
}

/* AÇÕES */
.acoes-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.acao {
    background: #ffffff;
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    color: #0f4c81;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: transform 0.15s ease;
}

.acao:hover {
    transform: translateY(-2px);
}

.acao.destaque {
    background: #0f4c81;
    color: #fff;
}






/* ===== TELA MÊS ===== */

.mes-topo {
    margin-bottom: 24px;
}

.mes-topo h2 {
    font-size: 26px;
}

.mes-topo p {
    color: #6b7280;
}

/* GRID */
.mes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* COLUNA */
.mes-coluna {
    background: #f9fafb;
    border-radius: 16px;
    padding: 16px;
}

/* HEADER */
.mes-header {
    font-weight: bold;
    padding: 12px;
    border-radius: 12px;
    color: #fff;
    margin-bottom: 12px;
    text-align: center;
}

.mes-header.familia {
    background: linear-gradient(90deg, #22c55e, #15803d);
}

.mes-header.empresa {
    background: linear-gradient(90deg, #f59e0b, #b45309);
}

.mes-header.assinatura {
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}

/* CARD DESPESA */
.mes-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    font-size: 14px;
}

.mes-card strong {
    font-size: 14px;
}

/* STATUS */
.mes-card.pago {
    border-left: 5px solid #22c55e;
}

.mes-card.pendente {
    border-left: 5px solid #f59e0b;
}
