/* ============================================================
   RESET / BASE
============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    background: #f5f7fa;
    min-height: 100vh;
    color: #111;
}

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar {
    width: 260px;
    background: #25677b;
    color: #fff;
    min-height: 100vh;
    padding: 25px 20px;
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar .logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
}

.sidebar .item {
    display: block;
    padding: 12px 0;
    color: #fff;
    font-size: 17px;
    opacity: 0.85;
    text-decoration: none;
}

.sidebar .item:hover,
.sidebar .item.active {
    opacity: 1;
    font-weight: 600;
}

/* ============================================================
   CONTEÚDO (OFICIAL)
============================================================ */
.content {
    margin-left: 260px;
    padding: 35px 50px;
    width: calc(100% - 260px);
    transition: margin-left .3s ease;
}

/* Se o header usar .main-content, funciona também */
.main-content {
    margin-left: 260px;
    padding: 35px 50px;
    width: calc(100% - 260px);
}

/* ============================================================
   TÍTULOS
============================================================ */
.page-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

.page-subtitle {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

/* ============================================================
   FILTROS
============================================================ */
.filtros {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* ============================================================
   KPI CARDS
============================================================ */
.kpi-container {
    display: flex;
    gap: 20px;
    margin: 25px 0;
}

.kpi-card {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.kpi-card.receita h2 { color: #059669; }
.kpi-card.despesa h2 { color: #dc2626; }
.kpi-card.saldo h2 { color: #1e3a8a; }

/* ============================================================
   BOTÕES EXPORTAÇÃO
============================================================ */
.export-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 18px;
    border-radius: 10px;
    background: #eee;
    border: 1px solid #ddd;
    cursor: pointer;
}

.btn:hover { background: #e2e2e2; }

.btn-primary {
    padding: 10px 18px;
    background: #25677b;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.btn-primary:hover { opacity: .9; }

/* ============================================================
   TABELA
============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

thead { background: #f3f4f6; }

th, td {
    padding: 14px;
    font-size: 15px;
}

tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.valor-negativo { color: #dc2626; font-weight: 600; }
.valor-positivo { color: #059669; font-weight: 600; }

.tag {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: white;
}

.tag.receita { background: #059669; }
.tag.despesa { background: #dc2626; }

/* ============================================================
   RESPONSIVIDADE
============================================================ */
@media (max-width: 768px) {

    .sidebar {
        width: 220px;
    }

    .content,
    .main-content {
        margin-left: 220px;
        width: calc(100% - 220px);
    }
}

@media (max-width: 600px) {

    .sidebar {
        left: -260px;
        transition: 0.3s;
    }

    .sidebar.open {
        left: 0;
    }

    .content,
    .main-content {
        margin-left: 0;
        padding: 20px;
        width: 100%;
    }
}
