/* 
   Financeiro V2 - Notion Style CSS
   Minimalist, Clean, Black & White with Soft Grays
*/

:root {
    --notion-bg: #ffffff;
    --notion-sidebar-bg: #f7f6f3;
    --notion-text-main: #37352f;
    --notion-text-secondary: #787774;
    --notion-border: #e9e9e7;
    --notion-hover: #efefed;
    --notion-active: #ebebeb;
    --notion-accent: #2383e2;
    --notion-red: #eb5757;
    --notion-green: #448361;
    --notion-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px;
    --notion-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--notion-bg);
    color: var(--notion-text-main);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    overflow-x: hidden;
}

/* ===== LAYOUT STRUCTURE ===== */
#wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
#sidebar-wrapper {
    width: 240px;
    background-color: var(--notion-sidebar-bg);
    border-right: 1px solid var(--notion-border);
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-heading {
    padding: 24px 16px 12px;
    font-weight: 600;
    color: var(--notion-text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-user {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-user:hover {
    background-color: var(--notion-hover);
}

.sidebar-user img {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    object-fit: cover;
}

.nav-item {
    padding: 4px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    color: var(--notion-text-main);
    text-decoration: none;
    border-radius: var(--notion-radius);
    transition: background 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--notion-hover);
    color: var(--notion-text-main);
}

.nav-link.active {
    background-color: var(--notion-active);
    font-weight: 600;
}

.nav-link i {
    width: 18px;
    text-align: center;
    color: var(--notion-text-secondary);
}

/* ===== CONTENT AREA ===== */
#page-content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    height: 45px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--notion-bg);
    position: sticky;
    top: 0;
    z-index: 900;
}

.breadcrumb-notion {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--notion-text-secondary);
}

.main-content {
    padding: 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px;
    }
    #sidebar-wrapper {
        position: fixed;
        left: -240px;
        height: 100%;
    }
    #wrapper.toggled #sidebar-wrapper {
        left: 0;
    }
}

/* ===== COMPONENTS ===== */

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
/* ===== DASHBOARD CARD COLORS ===== */
.card-income { border-left: 4px solid #448361 !important; background-color: #f0f7f3 !important; }
.card-expense { border-left: 4px solid #eb5757 !important; background-color: #fdf2f2 !important; }
.card-balance { border-left: 4px solid #2383e2 !important; background-color: #f0f7ff !important; }
.card-invest { border-left: 4px solid #f2994a !important; background-color: #fff9f2 !important; }
.card-total { border-left: 4px solid #9b51e0 !important; background-color: #f9f5ff !important; }
.card-score { border-left: 4px solid #27ae60 !important; background-color: #f1f9f4 !important; }
/* Cards */
.notion-card {
    background: var(--notion-bg);
    border: 1px solid var(--notion-border);
    border-radius: var(--notion-radius);
    padding: 16px;
    transition: box-shadow 0.2s;
    height: auto !important; /* Mude de 100% para auto */
    min-height: 0 !important; /* Garante que não haja altura mínima */
}

/* ===== PROGRESS BAR CHART (NOTION STYLE) ===== */
.notion-progress-container {
    margin-top: 15px;
}
.notion-progress-item {
    margin-bottom: 12px;
}
.notion-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--notion-text-main);
    font-weight: 500;
}
.notion-progress-bar-bg {
    height: 8px;
    background: #f1f1f0;
    border-radius: 4px;
    overflow: hidden;
}
.notion-progress-bar-fill {
    height: 100%;
    background: var(--notion-accent);
    border-radius: 4px;
    transition: width 0.6s ease;
}
.progress-fill-expense { background: #eb5757; }
.progress-fill-income { background: #448361; }
/* Tables */
.notion-table-container {
    margin-top: 24px;
    overflow-x: auto;
}

.notion-table {
    width: 100%;
    border-collapse: collapse;
}

.notion-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--notion-text-secondary);
    font-weight: 500;
    border-bottom: 1px solid var(--notion-border);
    text-transform: uppercase;
}

.notion-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--notion-border);
    vertical-align: middle;
}

.notion-table tr:hover {
    background-color: var(--notion-hover);
}

/* Buttons */
.btn-notion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--notion-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid var(--notion-border);
    background: var(--notion-bg);
    color: var(--notion-text-main);
    text-decoration: none;
}

.btn-notion:hover {
    background-color: var(--notion-hover);
}

.btn-notion-primary {
    background-color: var(--notion-accent);
    color: white;
    border-color: var(--notion-accent);
}

.btn-notion-primary:hover {
    background-color: #1a73e8;
}

/* Forms */
.notion-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--notion-border);
    border-radius: var(--notion-radius);
    background: var(--notion-sidebar-bg);
    font-size: 14px;
    transition: border-color 0.2s;
}

.notion-input:focus {
    outline: none;
    border-color: var(--notion-accent);
    background: var(--notion-bg);
}

/* Badges */
.notion-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-income { background: #e1f0e8; color: #1d5c3d; }
.badge-expense { background: #fbe4e4; color: #9b2c2c; }

/* Modals */
.modal-content {
    border-radius: var(--notion-radius);
    border: none;
    box-shadow: var(--notion-shadow);
}

.modal-header {
    border-bottom: 1px solid var(--notion-border);
    padding: 16px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--notion-border);
    padding: 16px 24px;
}

/* Utils */
.text-income { color: var(--notion-green); }
.text-expense { color: var(--notion-red); }
.fw-600 { font-weight: 600; }
