/* =========================
   NINA - IDENTIDADE VISUAL V1
   ========================= */


/* =========================
   RESET / BASE
   ========================= */

* {
    box-sizing: border-box;
}

html {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

body {
    margin: 0;

    background-color: #F4F7F5;

    color: #17312B;

    line-height: 1.5;
}


/* =========================
   CABEÇALHO
   ========================= */

.app-header {
    background-color: #F9FBFA;

    border-bottom: 1px solid #DCE5E1;

    position: sticky;

    top: 0;

    z-index: 100;
}

.header-container {
    max-width: 1440px;

    margin: 0 auto;

    padding: 6px 24px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;
}


/* =========================
   MARCA / LOGO
   ========================= */

.brand {
    display: flex;

    align-items: center;

    text-decoration: none;

    flex-shrink: 0;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    display: block;

    width: auto;

    height: 54px;

    max-width: 200px;

    object-fit: contain;
}


/* =========================
   NAVEGAÇÃO
   ========================= */

.main-nav {
    display: flex;

    align-items: center;

    gap: 24px;
}

.main-nav a {
    color: #475C56;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;
}

.main-nav a:hover {
    color: #0F5C4D;
}

.user-area {
    display: flex;

    align-items: center;

    gap: 14px;

    padding-left: 18px;

    border-left: 1px solid #D5DFDB;
}

.user-name {
    color: #586963;

    font-size: 14px;

    font-weight: 500;
}


/* =========================
   CONTEÚDO
   ========================= */

.page-container {
    max-width: 1440px;

    min-height: calc(100vh - 130px);

    margin: 0 auto;

    padding: 28px 24px 40px;
}


/* =========================
   TÍTULOS
   ========================= */

h1 {
    margin-top: 0;

    margin-bottom: 12px;

    font-size: 36px;

    line-height: 1.2;

    letter-spacing: -1px;

    color: #17312B;
}

h2 {
    margin-top: 32px;

    margin-bottom: 14px;

    color: #21473E;

    font-size: 23px;
}

h3 {
    color: #21473E;
}

p {
    color: #586963;
}


/* =========================
   LINKS
   ========================= */

a {
    color: #0F5C4D;
}

a:hover {
    color: #083F35;
}


/* =========================
   FORMULÁRIOS
   ========================= */

form p {
    margin-bottom: 18px;
}

label {
    display: block;

    margin-bottom: 6px;

    color: #314A43;

    font-size: 14px;

    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;

    max-width: 440px;

    padding: 11px 13px;

    border: 1px solid #BCCBC5;

    border-radius: 8px;

    background-color: #FFFFFF;

    color: #17312B;

    font: inherit;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;

    border-color: #0F5C4D;

    box-shadow: 0 0 0 3px rgba(15, 92, 77, 0.14);
}


/* =========================
   BOTÕES
   ========================= */

button {
    font: inherit;

    cursor: pointer;
}

form button[type="submit"] {
    border: none;

    border-radius: 8px;

    background-color: #0F5C4D;

    color: #FFFFFF;

    padding: 10px 18px;

    font-weight: 600;

    transition:
        background-color 0.15s ease,
        transform 0.05s ease;
}

form button[type="submit"]:hover {
    background-color: #083F35;
}

form button[type="submit"]:active {
    transform: translateY(1px);
}


/* =========================
   BOTÃO SAIR
   ========================= */

.logout-button {
    border: 1px solid #CAD6D1;

    background-color: #FFFFFF;

    color: #475C56;

    font-size: 14px;

    font-weight: 600;

    padding: 7px 12px;

    border-radius: 8px;
}

.logout-button:hover {
    background-color: #DDEBE6;

    color: #083F35;

    border-color: #AFC6BD;
}


/* =========================
   BOTÃO ENTRAR
   ========================= */

.login-link {
    display: inline-block;

    padding: 9px 18px;

    border-radius: 8px;

    background-color: #0F5C4D;

    color: #FFFFFF !important;

    font-weight: 600 !important;
}

.login-link:hover {
    background-color: #083F35;

    color: #FFFFFF !important;
}


/* =========================
   LINHAS SEPARADORAS
   ========================= */

hr {
    border: 0;

    border-top: 1px solid #D7E0DC;

    margin: 32px 0;
}


/* =========================
   TABELAS
   ========================= */

table {
    width: 100%;

    margin-top: 18px;

    border-collapse: collapse;

    background-color: #FFFFFF;

    border: 1px solid #DCE5E1;

    border-radius: 12px;

    overflow: hidden;

    box-shadow: 0 3px 10px rgba(23, 49, 43, 0.06);
}

thead {
    background-color: #DDEBE6;
}

th,
td {
    text-align: left;

    padding: 14px 16px;

    border-bottom: 1px solid #E5ECE9;
}

th {
    background-color: #DDEBE6;

    color: #24473E;

    font-size: 13px;

    font-weight: 700;
}

td {
    color: #425751;

    font-size: 14px;
}

tbody tr:hover {
    background-color: #F4F8F6;
}

tbody tr:last-child td {
    border-bottom: none;
}


/* =========================
   AÇÕES EM TABELA
   ========================= */

td a {
    font-weight: 600;

    text-decoration: none;

    margin-right: 10px;
}

td a:hover {
    text-decoration: underline;
}

td form {
    display: inline;
}


/* =========================
   RODAPÉ
   ========================= */

.app-footer {
    padding: 28px 24px;

    text-align: center;

    border-top: 1px solid #DCE5E1;

    background-color: #F9FBFA;
}

.app-footer p {
    margin: 0;

    font-size: 13px;

    color: #7A8A84;
}


/* =========================
   RESPONSIVIDADE
   ========================= */

@media (max-width: 800px) {

    .header-container {
    padding: 7px 18px;

    flex-direction: row;

    align-items: center;

    gap: 16px;
}

.brand-logo {
    height: 48px;

    max-width: 180px;
}

.main-nav {
    width: auto;

    margin-left: auto;

    flex-wrap: wrap;

    justify-content: flex-end;

    gap: 14px;
}

.user-area {
    border-left: 0;

    padding-left: 0;
}

.page-container {
    padding: 24px 18px 36px;
}
}


/* =========================
   TELAS PEQUENAS
   ========================= */

@media (max-width: 520px) {

    .header-container {
        padding: 10px 16px;
    }

    .brand-logo {
        height: 52px;

        max-width: 180px;
    }

    .main-nav {
        font-size: 13px;

        gap: 12px;
    }

    .user-area {
        width: 100%;

        justify-content: space-between;
    }

    .page-container {
        padding: 28px 16px;
    }

    h1 {
        font-size: 27px;
    }

    input,
    select,
    textarea {
        max-width: 100%;
    }
}

/* =========================
   HOME
   ========================= */

.home-hero {
    margin-bottom: 48px;

    padding: 64px 56px;

    border-radius: 28px;

    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(186, 215, 204, 0.45),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #F9FBFA 0%,
            #EDF4F1 100%
        );

    border: 1px solid #DCE5E1;

    overflow: hidden;
}

.home-hero-content {
    max-width: 720px;
}

.home-eyebrow,
.section-eyebrow {
    display: inline-block;

    margin-bottom: 12px;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    color: #5B7A70;
}

.home-hero h1 {
    margin: 0 0 20px;

    max-width: 700px;

    font-size: clamp(42px, 6vw, 68px);

    line-height: 1.02;

    letter-spacing: -0.045em;

    color: #17312B;
}

.home-subtitle {
    max-width: 620px;

    margin: 0;

    font-size: 18px;
    line-height: 1.7;

    color: #526861;
}

.home-version {
    display: inline-flex;

    margin-top: 28px;

    padding: 8px 14px;

    border: 1px solid #D2E1DB;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.65);

    font-size: 13px;
    font-weight: 600;

    color: #426359;
}


/* =========================
   SEÇÕES DA HOME
   ========================= */

.home-section {
    margin-bottom: 48px;
}

.section-heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 24px;
}

.section-heading h2,
.journey-card h2 {
    margin: 0;

    font-size: 28px;

    letter-spacing: -0.025em;

    color: #17312B;
}


/* =========================
   CARDS DOS MÓDULOS
   ========================= */

.module-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;
}

.module-card {
    min-height: 310px;

    padding: 26px;

    border: 1px solid #DCE5E1;

    border-radius: 22px;

    background: #FFFFFF;

    display: flex;
    flex-direction: column;

    gap: 24px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.module-card:hover {
    transform: translateY(-3px);

    border-color: #C5D8D0;

    box-shadow:
        0 14px 35px rgba(23, 49, 43, 0.08);
}

.module-card-active {
    background:
        linear-gradient(
            180deg,
            #FFFFFF 0%,
            #F6FAF8 100%
        );

    border-color: #BFD5CC;
}

.module-icon {
    width: 48px;
    height: 48px;

    border-radius: 14px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #17312B;

    color: #FFFFFF;

    font-size: 20px;
    font-weight: 700;
}

.module-icon-soft {
    background: #E9F1EE;

    color: #426359;
}

.module-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.module-card-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 14px;
}

.module-card h3 {
    margin: 0;

    font-size: 21px;

    color: #17312B;
}

.module-card p {
    margin: 14px 0 22px;

    color: #64766F;

    font-size: 14px;
    line-height: 1.65;
}

.module-features {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: auto;
}

.module-features span {
    padding: 6px 10px;

    border-radius: 999px;

    background: #F2F6F4;

    color: #587069;

    font-size: 12px;
    font-weight: 600;
}


/* =========================
   STATUS
   ========================= */

.status-badge {
    white-space: nowrap;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;
}

.status-active {
    background: #DDEDE6;

    color: #315E50;
}

.status-soon {
    background: #F4EEE1;

    color: #806B3D;
}

.status-future {
    background: #F0F1F1;

    color: #707776;
}


/* =========================
   JORNADA
   ========================= */

.journey-card {
    display: grid;

    grid-template-columns: auto 1fr;

    gap: 24px;

    align-items: flex-start;

    padding: 32px;

    border-radius: 22px;

    background: #17312B;

    color: #FFFFFF;
}

.journey-number {
    width: 52px;
    height: 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.1);

    font-size: 14px;
    font-weight: 700;
}

.journey-card .section-eyebrow {
    color: #AFC8BE;
}

.journey-card h2 {
    color: #FFFFFF;
}

.journey-card p {
    max-width: 760px;

    margin: 12px 0 0;

    color: #CBDAD4;

    line-height: 1.7;
}


/* =========================
   RESPONSIVIDADE
   ========================= */

@media (max-width: 900px) {

    .module-grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        padding: 44px 32px;
    }

}


@media (max-width: 600px) {

    .home-hero {
        padding: 36px 24px;

        border-radius: 20px;
    }

    .home-hero h1 {
        font-size: 40px;
    }

    .home-subtitle {
        font-size: 16px;
    }

    .journey-card {
        grid-template-columns: 1fr;
    }

}


/* =========================
   CONFIGURAÇÕES
   ========================= */

.settings-header {
    margin-bottom: 44px;
}

.settings-header .section-eyebrow {
    margin-bottom: 10px;
}

.settings-header h1 {
    max-width: 760px;
    margin-bottom: 14px;
}

.settings-header p {
    max-width: 700px;
    margin: 0;

    font-size: 16px;
    line-height: 1.7;

    color: #64766F;
}


/* =========================
   ÁREA DE CONFIGURAÇÕES
   ========================= */

.settings-section {
    margin-bottom: 48px;
}

.settings-section .section-heading {
    margin-bottom: 24px;
}


/* =========================
   GRID
   ========================= */

.settings-section .module-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;
}


/* =========================
   CARDS
   ========================= */

.settings-section .module-card {
    min-height: 245px;

    padding: 26px;

    border: 1px solid #DCE5E1;
    border-radius: 20px;

    background: #FFFFFF;

    display: flex;
    flex-direction: column;

    gap: 20px;

    text-decoration: none;
    color: inherit;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.settings-section .module-card:hover {
    transform: translateY(-3px);

    border-color: #BFD5CC;

    box-shadow:
        0 14px 35px rgba(23, 49, 43, 0.08);

    text-decoration: none;
}


/* =========================
   CARD DISPONÍVEL
   ========================= */

.settings-section .module-card-active {
    background:
        linear-gradient(
            180deg,
            #FFFFFF 0%,
            #F4F9F7 100%
        );

    border-color: #AFCFC2;
}

.settings-section .module-card-active:hover {
    border-color: #8FB9A8;
}


/* =========================
   ÍCONES
   ========================= */

.settings-section .module-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 14px;

    background: #17312B;

    color: #FFFFFF;

    font-size: 19px;
    font-weight: 700;
}

.settings-section .module-icon-soft {
    background: #E9F1EE;

    color: #426359;
}


/* =========================
   CONTEÚDO DO CARD
   ========================= */

.settings-section .module-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.settings-section .module-card-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 12px;
}

.settings-section .module-card h3 {
    margin: 0;

    font-size: 19px;
    line-height: 1.3;

    color: #17312B;
}

.settings-section .module-card p {
    margin: 14px 0 22px;

    font-size: 14px;
    line-height: 1.65;

    color: #64766F;
}


/* =========================
   TAGS
   ========================= */

.settings-section .module-features {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: auto;
}

.settings-section .module-features span {
    padding: 6px 10px;

    border-radius: 999px;

    background: #F2F6F4;

    color: #587069;

    font-size: 12px;
    font-weight: 600;
}


/* =========================
   RESPONSIVIDADE
   ========================= */

@media (max-width: 900px) {

    .settings-section .module-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .settings-header {
        margin-bottom: 32px;
    }

    .settings-section .module-grid {
        grid-template-columns: 1fr;
    }

    .settings-section .module-card {
        min-height: auto;
    }

}

/* =========================
   LINKS DO MENU FINANCEIRO
   ========================= */

.finance-menu-link {
    text-decoration: none;
    color: inherit;
}

.finance-menu-link:hover {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* =========================
   NAVEGAÇÃO / ESTADO DA SESSÃO
   ========================= */

.nav-link {
    position: relative;
    padding: 8px 2px;
}

.nav-link-active {
    color: #17312B !important;
}

.nav-link-active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 2px;

    border-radius: 2px;

    background: #2F695B;
}


.account-link {
    display: flex;

    align-items: center;

    gap: 7px;

    text-decoration: none;
}

.account-link:hover {
    text-decoration: none;
}


.session-indicator {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #4D8C75;

    flex-shrink: 0;
}


.admin-badge {
    padding: 3px 7px;

    border-radius: 999px;

    background: #E8F1ED;

    color: #356454;

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.4px;
}


.public-nav {
    display: flex;

    align-items: center;

    gap: 18px;
}


.visitor-status {
    color: #81908B;

    font-size: 13px;
}


.public-nav-link {
    color: #475C56;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;
}

.public-nav-link:hover {
    color: #0F5C4D;
}


.public-signup-link {
    padding: 8px 13px;

    border: 1px solid #C8D6D1;
    border-radius: 9px;

    color: #2F695B;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
}

.public-signup-link:hover {
    background: #EDF4F1;

    text-decoration: none;
}

/* =========================
   DENSIDADE / APROVEITAMENTO DE TELA V2
   ========================= */

/* Área útil maior em notebooks e monitores largos. */
.header-container,
.page-container {
    max-width: 1440px;
}

.page-container {
    padding-top: 20px;
    padding-bottom: 28px;
}

/* Tipografia um pouco mais compacta para reduzir rolagem sem perder hierarquia. */
h1 {
    margin-bottom: 9px;
    font-size: 32px;
}

h2 {
    margin-top: 24px;
    margin-bottom: 11px;
    font-size: 21px;
}

hr {
    margin: 24px 0;
}

/* Tabelas: mais informação visível por tela. */
table {
    margin-top: 12px;
}

th,
td {
    padding: 10px 12px;
}

th {
    font-size: 12px;
}

td {
    font-size: 13px;
}

/* Formulários globais mais densos. */
form p {
    margin-bottom: 13px;
}

input,
select,
textarea {
    padding: 9px 11px;
}

.app-footer {
    padding: 18px 24px;
}

/* Home: mantém a identidade, mas reduz áreas vazias. */
.home-hero {
    margin-bottom: 30px;
    padding: 40px 42px;
    border-radius: 22px;
}

.home-hero h1 {
    margin-bottom: 14px;
    font-size: clamp(38px, 4.8vw, 56px);
}

.home-subtitle {
    font-size: 17px;
    line-height: 1.55;
}

.home-version {
    margin-top: 20px;
}

.home-section {
    margin-bottom: 32px;
}

.section-heading {
    margin-bottom: 16px;
}

.module-grid {
    gap: 16px;
}

.module-card {
    min-height: 250px;
    padding: 22px;
    gap: 18px;
    border-radius: 18px;
}

.module-card p {
    margin: 10px 0 16px;
    line-height: 1.55;
}

.journey-card {
    padding: 24px 26px;
}

/* Configurações também aproveita a largura adicional. */
.settings-header {
    margin-bottom: 28px;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section .module-grid {
    gap: 16px;
}

.settings-section .module-card {
    min-height: 210px;
    padding: 22px;
    gap: 16px;
}

.settings-section .module-card p {
    margin: 10px 0 16px;
    line-height: 1.5;
}

/* =========================================================
   HUB FINANCEIRO
   ========================================================= */

.finance-header {
    margin-bottom: 24px;
}

.finance-header h1 {
    margin-bottom: 9px;
}

.finance-header p {
    max-width: 760px;
    margin: 0;
    line-height: 1.55;
}

.finance-section {
    margin-bottom: 30px;
}

.finance-section .section-heading {
    margin-bottom: 16px;
}

.finance-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.finance-menu-card {
    position: relative;
    min-width: 0;
    min-height: 176px;
    padding: 18px 18px 17px;

    background: #FFFFFF;
    border: 1px solid #DCE5E1;
    border-radius: 16px;

    display: flex;
    flex-direction: column;

    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease,
        background-color 0.16s ease;
}

.finance-menu-link:hover {
    transform: translateY(-2px);
    border-color: #BFD3CB;
    background: #FBFDFC;
    box-shadow: 0 10px 24px rgba(23, 49, 43, 0.06);
}

.finance-menu-number {
    width: fit-content;
    margin-bottom: 18px;
    padding: 4px 8px;

    background: #ECF3F0;
    border-radius: 999px;

    color: #4B6E64;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.finance-menu-card h3 {
    margin: 0 0 7px;
    color: #17312B;
    font-size: 17px;
    line-height: 1.25;
}

.finance-menu-card p {
    margin: 0;
    color: #667873;
    font-size: 13px;
    line-height: 1.48;
}

/* =========================================================
   TELAS OPERACIONAIS / CRUD
   ========================================================= */

.transactions-page,
.budget-page,
.wealth-page,
.goals-page,
.assets-page,
.categories-page,
.subcategories-page,
.transaction-types-page,
.institutions-page,
.payment-methods-page,
.asset-categories-page,
.users-page {
    max-width: 1440px !important;
}

.transactions-header,
.budget-header,
.wealth-header,
.goals-header,
.assets-header,
.categories-header,
.subcategories-header,
.transaction-types-header,
.institutions-header,
.payment-methods-header,
.asset-categories-header,
.users-header {
    margin-bottom: 18px !important;
}

.panel {
    margin-bottom: 18px !important;
    border-radius: 14px !important;
}

.panel-header {
    padding: 16px 20px !important;
}

.panel-header h2 {
    font-size: 18px !important;
}

.summary-grid {
    gap: 12px !important;
    margin-bottom: 18px !important;
}

.summary-card {
    padding: 15px 16px !important;
    border-radius: 13px !important;
}

.summary-label {
    margin-bottom: 6px !important;
}

.summary-value {
    font-size: 20px !important;
}

.month-navigation {
    margin-bottom: 18px !important;
    padding: 12px 16px !important;
    border-radius: 13px !important;
}

.form-grid {
    gap: 14px !important;
}

.form-actions {
    margin-top: 16px !important;
    padding-top: 16px !important;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
    margin-top: 0;
}

.table-wrapper th,
.table-wrapper td {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

.empty-state {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
}

/* Monitores grandes: usa a largura com moderação, sem esticar demais os cards. */
@media (min-width: 1500px) {
    .header-container,
    .page-container {
        max-width: 1520px;
    }

    .transactions-page,
    .budget-page,
    .wealth-page,
    .goals-page,
    .assets-page,
    .categories-page,
    .subcategories-page,
    .transaction-types-page,
    .institutions-page,
    .payment-methods-page,
    .asset-categories-page,
    .users-page {
        max-width: 1520px !important;
    }
}

@media (max-width: 1100px) {
    .finance-menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-menu-card {
        min-height: 165px;
    }
}

@media (max-width: 800px) {
    .page-container {
        padding-top: 18px;
        padding-bottom: 28px;
    }

    .home-hero {
        padding: 34px 28px;
    }

    .summary-grid {
        gap: 10px !important;
    }
}

@media (max-width: 600px) {
    .finance-menu-grid {
        grid-template-columns: 1fr;
    }

    .finance-menu-card {
        min-height: auto;
    }

    .home-hero {
        padding: 30px 22px;
    }

    .home-hero h1 {
        font-size: 36px;
    }

    .panel-header {
        padding: 14px 16px !important;
    }

    .month-navigation {
        padding: 10px 12px !important;
    }
}

/* =========================================================
   DASHBOARD FINANCEIRO
   ========================================================= */

.dashboard-page {
    max-width: 1520px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.dashboard-header h1 {
    margin-bottom: 7px;
}

.dashboard-header p {
    max-width: 760px;
    margin: 0;
    line-height: 1.55;
}

.dashboard-eyebrow,
.dashboard-panel-kicker {
    display: inline-block;
    margin-bottom: 6px;
    color: #6A7E77;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-top: 4px;
}

.dashboard-period-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #D5E0DC;
    border-radius: 999px;
    background: #FFFFFF;
    color: #3A5A51;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-secondary-link,
.dashboard-panel-header > a,
.dashboard-empty-action {
    text-decoration: none;
    font-weight: 700;
}

.dashboard-secondary-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #BED0C9;
    border-radius: 10px;
    background: #EEF5F2;
    color: #0F5C4D;
    font-size: 13px;
}

.dashboard-secondary-link:hover {
    background: #E2EFEA;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.dashboard-kpi-card {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid #DCE5E1;
    border-radius: 15px;
    background: #FFFFFF;
    box-shadow: 0 6px 20px rgba(23, 49, 43, 0.04);
}

.dashboard-kpi-label {
    display: block;
    min-height: 36px;
    margin-bottom: 8px;
    color: #697A75;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.dashboard-kpi-value {
    display: block;
    margin-bottom: 7px;
    color: #17312B;
    font-size: clamp(21px, 2.1vw, 29px);
    line-height: 1.15;
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}

.dashboard-kpi-note {
    display: block;
    color: #7A8A84;
    font-size: 11px;
    line-height: 1.45;
}

.dashboard-kpi-breakdown {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #E6ECE9;
}

.dashboard-kpi-breakdown-title {
    color: #7A8A84;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dashboard-kpi-breakdown-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    color: #60736C;
    font-size: 11px;
    line-height: 1.35;
}

.dashboard-kpi-breakdown-row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-kpi-breakdown-row > strong {
    flex-shrink: 0;
    color: #29473F;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-value-positive {
    color: #1E6A57 !important;
}

.dashboard-value-negative {
    color: #A44F45 !important;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-standalone-panel {
    margin-bottom: 16px;
}

.dashboard-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid #DCE5E1;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 6px 22px rgba(23, 49, 43, 0.04);
}

.dashboard-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-panel-header h2 {
    margin: 0 0 4px;
    color: #17312B;
    font-size: 19px;
    line-height: 1.25;
}

.dashboard-panel-header p {
    margin: 0;
    color: #74847F;
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-panel-header > a {
    flex-shrink: 0;
    padding-top: 4px;
    color: #0F5C4D;
    font-size: 12px;
}

.dashboard-chart-layout {
    display: grid;
    grid-template-columns: minmax(230px, .82fr) minmax(280px, 1.18fr);
    align-items: center;
    gap: 24px;
}

.dashboard-donut-shell {
    position: relative;
    width: min(100%, 285px);
    aspect-ratio: 1;
    margin: 0 auto;
}

.dashboard-donut-shell canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.dashboard-donut-center {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 48%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.dashboard-donut-center span {
    display: block;
    margin-bottom: 3px;
    color: #7B8A85;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-donut-center strong {
    display: block;
    color: #17312B;
    font-size: clamp(15px, 1.5vw, 20px);
    line-height: 1.15;
}

.dashboard-chart-legend {
    display: grid;
    gap: 3px;
}

.dashboard-legend-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid #EDF1EF;
}

.dashboard-legend-row:last-child {
    border-bottom: 0;
}

.dashboard-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.dashboard-legend-name {
    min-width: 0;
    overflow: hidden;
    color: #405650;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-legend-value {
    display: flex;
    align-items: baseline;
    gap: 7px;
    color: #7A8984;
    font-size: 11px;
    white-space: nowrap;
}

.dashboard-legend-value strong {
    color: #314A43;
    font-size: 12px;
}

.dashboard-budget-total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 10px;
}

.dashboard-budget-total span {
    color: #657873;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-budget-total strong {
    color: #17312B;
    font-size: 31px;
    line-height: 1;
}

.dashboard-progress-track {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #E7EEEB;
}

.dashboard-progress-track-large {
    height: 11px;
    margin-bottom: 18px;
}

.dashboard-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #4E8978;
}

.dashboard-progress-fill-alert {
    background: #B9685C;
}

.dashboard-progress-fill-complete {
    background: #2D7864;
}

.dashboard-budget-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-budget-stats > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #E4EAE7;
    border-radius: 11px;
    background: #F9FBFA;
}

.dashboard-budget-stats span,
.dashboard-budget-stats strong {
    display: block;
}

.dashboard-budget-stats span {
    margin-bottom: 4px;
    color: #798984;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-budget-stats strong {
    color: #29473F;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.dashboard-context-note {
    margin: 13px 0 0;
    color: #83908C;
    font-size: 10px;
    line-height: 1.45;
}

.dashboard-accounts-panel {
    margin-bottom: 16px;
}

.dashboard-account-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    padding: 16px;
    border-radius: 14px;
    background: #F6FAF8;
}

.dashboard-account-summary span,
.dashboard-account-summary small {
    color: #66756F;
}

.dashboard-account-summary strong {
    font-size: 1.7rem;
}

.dashboard-account-summary-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 4px;
}

.dashboard-account-summary-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dashboard-account-summary-projected {
    padding-left: 18px;
    border-left: 1px solid #E4EBE8;
}

.dashboard-account-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #E4EBE8;
    border-radius: 12px;
}

.dashboard-account-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dashboard-account-row span {
    color: #71807A;
    font-size: .86rem;
}

.dashboard-account-balances {
    display: grid;
    grid-template-columns: repeat(2, minmax(112px, 1fr));
    gap: 10px;
    min-width: 250px;
}

.dashboard-account-balance-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.dashboard-account-balance-item strong {
    white-space: nowrap;
}

.dashboard-account-balance-item small {
    color: #83908C;
    font-size: .74rem;
    white-space: nowrap;
}

.dashboard-account-balance-projected {
    padding-left: 10px;
    border-left: 1px solid #E4EBE8;
}

.dashboard-wealth-hero {
    padding: 18px;
    border: 1px solid #E0E8E5;
    border-radius: 13px;
    background: #F8FBF9;
}

.dashboard-wealth-hero span,
.dashboard-wealth-hero strong,
.dashboard-wealth-hero small {
    display: block;
}

.dashboard-wealth-hero span {
    margin-bottom: 7px;
    color: #6E807A;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-wealth-hero strong {
    margin-bottom: 5px;
    color: #17312B;
    font-size: clamp(27px, 3vw, 38px);
    line-height: 1.05;
    letter-spacing: -.03em;
}

.dashboard-wealth-hero small {
    color: #7D8B87;
    font-size: 11px;
}

.dashboard-wealth-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    padding: 12px 4px 0;
}

.dashboard-wealth-comparison > span {
    color: #6F817B;
    font-size: 11px;
}

.dashboard-wealth-comparison > strong {
    color: #17312B;
    font-size: 15px;
    text-align: right;
}

.dashboard-wealth-comparison > strong small {
    color: inherit;
    font-size: 11px;
}

.dashboard-goal-summary {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.dashboard-goal-summary span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #EEF4F1;
    color: #4E6B62;
    font-size: 10px;
    font-weight: 700;
}

.dashboard-goal-list {
    display: grid;
    gap: 14px;
}

.dashboard-goal-item {
    min-width: 0;
}

.dashboard-goal-topline,
.dashboard-goal-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-goal-topline {
    margin-bottom: 7px;
}

.dashboard-goal-topline strong {
    min-width: 0;
    overflow: hidden;
    color: #29473F;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-goal-topline span {
    flex-shrink: 0;
    color: #405B53;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-goal-details {
    margin-top: 6px;
    color: #7B8985;
    font-size: 10px;
}

.dashboard-empty-state {
    display: flex;
    min-height: 250px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 26px;
    border: 1px dashed #CCD9D4;
    border-radius: 13px;
    background: #FAFCFB;
    text-align: center;
}

.dashboard-empty-state-compact {
    min-height: 160px;
}

.dashboard-empty-state strong {
    color: #40564F;
    font-size: 13px;
}

.dashboard-empty-state span {
    max-width: 440px;
    color: #82908B;
    font-size: 11px;
    line-height: 1.5;
}

.dashboard-empty-action {
    margin-top: 8px;
    color: #0F5C4D;
    font-size: 11px;
}

.dashboard-transactions-panel {
    margin-bottom: 4px;
}

.dashboard-transaction-list {
    display: grid;
}

.dashboard-transaction-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 110px 145px;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 11px 4px;
    border-top: 1px solid #EDF1EF;
}

.dashboard-transaction-row:first-child {
    border-top: 0;
}

.dashboard-transaction-date {
    width: 44px;
    padding: 6px 4px;
    border: 1px solid #E0E8E5;
    border-radius: 9px;
    background: #F8FAF9;
    text-align: center;
}

.dashboard-transaction-date strong,
.dashboard-transaction-date span {
    display: block;
}

.dashboard-transaction-date strong {
    color: #29483F;
    font-size: 15px;
    line-height: 1.1;
}

.dashboard-transaction-date span {
    margin-top: 2px;
    color: #83908C;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-transaction-description {
    min-width: 0;
}

.dashboard-transaction-description strong,
.dashboard-transaction-description span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-transaction-description strong {
    margin-bottom: 2px;
    color: #314A43;
    font-size: 12px;
}

.dashboard-transaction-description span {
    color: #83908C;
    font-size: 10px;
}

.dashboard-transaction-type {
    color: #60736C;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
}

.dashboard-transaction-amount {
    color: #29473F;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 1120px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-main-grid,
    .dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-chart-layout {
        grid-template-columns: minmax(220px, .8fr) minmax(260px, 1.2fr);
    }
}

@media (max-width: 760px) {
    .dashboard-header {
        flex-direction: column;
        gap: 14px;
    }

    .dashboard-header-actions {
        width: 100%;
        justify-content: space-between;
        padding-top: 0;
    }

    .dashboard-chart-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-donut-shell {
        max-width: 250px;
    }

    .dashboard-budget-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-transaction-row {
        grid-template-columns: 46px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .dashboard-transaction-type {
        display: none;
    }

    .dashboard-transaction-amount {
        min-width: 110px;
    }
}

@media (max-width: 540px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-label {
        min-height: 0;
    }

    .dashboard-panel {
        padding: 16px;
    }

    .dashboard-panel-header {
        gap: 10px;
    }

    .dashboard-panel-header > a {
        font-size: 10px;
    }

    .dashboard-legend-row {
        grid-template-columns: 9px minmax(0, 1fr);
    }

    .dashboard-legend-value {
        grid-column: 2;
        justify-content: space-between;
    }

    .dashboard-wealth-comparison {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .dashboard-wealth-comparison > strong {
        text-align: left;
    }

    .dashboard-goal-details {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .dashboard-transaction-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .dashboard-transaction-amount {
        grid-column: 2;
        text-align: left;
    }
}

/* =========================
   PLANO DA CONTA / POPOVER
   ========================= */

.plan-menu {
    position: relative;
    flex-shrink: 0;
}

.plan-menu > summary {
    list-style: none;
}

.plan-menu > summary::-webkit-details-marker {
    display: none;
}

.plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.05s ease;
}

.plan-badge:active {
    transform: translateY(1px);
}

.plan-badge-free {
    border-color: #C9DCD4;
    background: #F0F6F3;
    color: #356454;
}

.plan-badge-free:hover,
.plan-menu[open] .plan-badge-free {
    border-color: #AFCBBF;
    background: #E4F0EB;
}

.plan-badge-premium {
    border-color: #E3D1A0;
    background: #FFF6DD;
    color: #6C5723;
}

.plan-badge-premium:hover,
.plan-menu[open] .plan-badge-premium {
    border-color: #D4BC7A;
    background: #FCEFCB;
}

.plan-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 220;
    width: 310px;
    max-width: calc(100vw - 32px);
    padding: 18px;
    border: 1px solid #D9E4DF;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 16px 38px rgba(23, 49, 43, 0.16);
}

.plan-popover::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 20px;
    width: 10px;
    height: 10px;
    border-top: 1px solid #D9E4DF;
    border-left: 1px solid #D9E4DF;
    background: #FFFFFF;
    transform: rotate(45deg);
}

.plan-popover-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #789087;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.10em;
}

.plan-popover-title {
    display: block;
    margin-bottom: 8px;
    color: #17312B;
    font-size: 20px;
    line-height: 1.2;
}

.plan-popover p {
    margin: 0 0 10px;
    color: #586963;
    font-size: 13px;
    line-height: 1.55;
}

.plan-popover .plan-popover-note {
    color: #7A8A84;
    font-size: 12px;
}

.plan-popover-link {
    display: inline-flex;
    margin-top: 3px;
    color: #0F5C4D !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.plan-popover-link:hover {
    color: #083F35 !important;
    text-decoration: underline !important;
}

@media (max-width: 520px) {
    .plan-popover {
        right: -62px;
        width: 290px;
    }

    .plan-popover::before {
        right: 78px;
    }
}

/* =========================================================
   NAVEGAÇÃO CONTEXTUAL
   ========================================================= */

.contextual-navigation {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0 0 18px;
}

.contextual-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #526660;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.18s ease, transform 0.18s ease;
}

.contextual-back-link:hover {
    color: #17312B;
    transform: translateX(-2px);
}

.contextual-back-link:focus-visible {
    outline: 2px solid #7EAC9E;
    outline-offset: 4px;
    border-radius: 4px;
}

@media (max-width: 700px) {
    .contextual-navigation {
        justify-content: flex-start;
        margin-bottom: 14px;
    }
}

/* =========================
   PÁGINAS DE ERRO
   ========================= */

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.error-card {
    width: min(100%, 560px);
    padding: 36px;
    background: #FFFFFF;
    border: 1px solid #DCE5E1;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(23, 49, 43, 0.08);
}

.error-code {
    display: inline-block;
    margin-bottom: 12px;
    color: #60736D;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.error-card h1 {
    margin-bottom: 10px;
}

.error-card p {
    margin: 0 0 24px;
}

.error-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 9px;
    background: #0F5C4D;
    color: #FFFFFF;
    font-weight: 700;
    text-decoration: none;
}

.error-action:hover {
    background: #083F35;
    color: #FFFFFF;
    text-decoration: none;
}

.error-card .error-reference {
    margin: -8px 0 20px;
    color: #60736D;
    font-size: 13px;
}

.error-card .error-reference code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .dashboard-account-summary-values {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dashboard-account-summary-projected {
        padding-left: 0;
        padding-top: 10px;
        border-left: 0;
        border-top: 1px solid #E4EBE8;
    }

    .dashboard-account-list {
        grid-template-columns: 1fr;
    }

    .dashboard-account-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-account-balances {
        width: 100%;
        min-width: 0;
    }
}

/* ---------------------------------------------------------
   Dashboard - limites por meio de pagamento
   --------------------------------------------------------- */
.dashboard-payment-budget-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #E5ECE9;
}

.dashboard-payment-budget-heading {
    margin-bottom: 14px;
}

.dashboard-payment-budget-heading h3 {
    margin: 3px 0 4px;
    color: #213F37;
    font-size: 1rem;
}

.dashboard-payment-budget-heading p {
    margin: 0;
    color: #72817C;
    font-size: 11px;
    line-height: 1.5;
}

.dashboard-payment-budget-list {
    display: grid;
    gap: 12px;
}

.dashboard-payment-budget-item {
    padding: 13px;
    border: 1px solid #E4EAE7;
    border-radius: 12px;
    background: #F9FBFA;
}

.dashboard-payment-budget-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.dashboard-payment-budget-topline > div {
    min-width: 0;
}

.dashboard-payment-budget-topline strong,
.dashboard-payment-budget-topline span {
    display: block;
}

.dashboard-payment-budget-topline > div > strong {
    color: #29473F;
    font-size: 13px;
}

.dashboard-payment-budget-topline > div > span {
    margin-top: 2px;
    color: #7A8984;
    font-size: 10px;
}

.dashboard-payment-budget-topline > strong {
    white-space: nowrap;
    font-size: 13px;
}

.dashboard-payment-budget-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.dashboard-payment-budget-metrics > div {
    min-width: 0;
}

.dashboard-payment-budget-metrics span,
.dashboard-payment-budget-metrics strong {
    display: block;
}

.dashboard-payment-budget-metrics span {
    margin-bottom: 2px;
    color: #87938F;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-payment-budget-metrics strong {
    color: #314A43;
    font-size: 11px;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .dashboard-payment-budget-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Dashboard: seleção do período mensal */
.dashboard-month-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-month-label {
    color: #6A7E77;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-month-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-month-input {
    min-height: 38px;
    min-width: 148px;
    padding: 7px 34px 7px 11px;
    border: 1px solid #D5E0DC;
    border-radius: 10px;
    background: #FFFFFF;
    color: #3A5A51;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.dashboard-month-input:focus,
.dashboard-month-apply:focus {
    outline: 2px solid rgba(15, 92, 77, .18);
    outline-offset: 1px;
    border-color: #88AAA0;
}

.dashboard-month-apply {
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid #356F61;
    border-radius: 10px;
    background: #356F61;
    color: #FFFFFF;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.dashboard-month-apply:hover {
    filter: brightness(.96);
}

@media (max-width: 520px) {
    .dashboard-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-month-form,
    .dashboard-month-controls,
    .dashboard-month-input,
    .dashboard-secondary-link {
        width: 100%;
    }

    .dashboard-month-form {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .dashboard-month-controls {
        align-items: stretch;
    }

    .dashboard-month-input {
        flex: 1;
        min-width: 0;
    }
}

/* ---------------------------------------------------------
   Dashboard - link para composição auditável do saldo projetado
   --------------------------------------------------------- */
.dashboard-account-row {
    flex-wrap: wrap;
}

.dashboard-projection-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 8px;
    color: #4F6B62;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-projection-link:hover {
    color: #17312B;
}

.dashboard-projection-link:focus-visible {
    outline: 2px solid #7EAC9E;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Dashboard: leitura explícita dos dois somatórios do card de despesas. */
.dashboard-expense-summary-block {
    min-width: 0;
}

.dashboard-expense-summary-label {
    display: block;
    margin-bottom: 5px;
    color: #536A63;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-expense-comparison {
    display: block;
    margin-top: 4px;
    color: #7A8A84;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}

.dashboard-expense-composition {
    gap: 7px;
}

.dashboard-expense-total-row {
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid #DCE5E1;
}

.dashboard-expense-total-row > span,
.dashboard-expense-total-row > strong {
    color: #17312B;
    font-weight: 800;
}

.dashboard-expense-cash-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 2px solid #E2EAE6;
}

.dashboard-expense-cash-value {
    display: block;
    margin: 4px 0 7px;
    color: #29473F;
    font-size: clamp(18px, 1.65vw, 23px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

/* ============================================================
   FECHAMENTO MENSAL BÁSICO
   ============================================================ */

.dashboard-monthly-closing {
    margin-top: 1.5rem;
}

.dashboard-monthly-closing-header {
    align-items: flex-start;
}

.dashboard-closing-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border-color, #d9dedb);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-closing-status-complete {
    background: rgba(61, 107, 91, 0.08);
}

.dashboard-closing-status-review,
.dashboard-closing-status-in_progress {
    background: rgba(184, 139, 55, 0.09);
}

.dashboard-closing-status-future {
    background: rgba(93, 101, 105, 0.07);
}

.dashboard-closing-notice {
    margin: 1rem 0 0;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    background: rgba(93, 101, 105, 0.06);
    font-size: 0.88rem;
}

.dashboard-closing-notice-attention {
    background: rgba(184, 139, 55, 0.09);
}

.dashboard-closing-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.dashboard-closing-kpi,
.dashboard-closing-summary-item,
.dashboard-closing-readiness-item {
    border: 1px solid var(--border-color, #e1e5e2);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.42);
}

.dashboard-closing-kpi {
    padding: 1rem;
}

.dashboard-closing-kpi > span,
.dashboard-closing-summary-item > span,
.dashboard-closing-readiness-item span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    opacity: 0.7;
}

.dashboard-closing-kpi > strong {
    display: block;
    font-size: 1.18rem;
}

.dashboard-closing-kpi small,
.dashboard-closing-summary-item small,
.dashboard-closing-readiness-item small {
    display: block;
    margin-top: 0.35rem;
    line-height: 1.45;
    opacity: 0.72;
}

.dashboard-closing-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.dashboard-closing-summary-item {
    padding: 1rem;
}

.dashboard-closing-summary-item > strong {
    display: block;
    font-size: 1rem;
}

.dashboard-closing-readiness {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.dashboard-closing-readiness-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
}

.dashboard-closing-readiness-item strong {
    display: block;
}

.dashboard-closing-readiness-item a {
    flex: 0 0 auto;
    font-size: 0.84rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .dashboard-closing-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-closing-summary-grid,
    .dashboard-closing-readiness {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dashboard-closing-kpis {
        grid-template-columns: 1fr;
    }

    .dashboard-closing-readiness-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

.home-module-link {
    color: inherit;
    text-decoration: none;
}

.dashboard-project-milestones {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 8px;
}
.dashboard-project-milestones span {
    text-align: center;
    font-size: 10px;
    opacity: .45;
    padding-top: 5px;
    border-top: 2px solid currentColor;
}
.dashboard-project-milestones span.is-reached {
    opacity: 1;
    font-weight: 700;
    color: #55786d;
}

.dashboard-projects-panel,
.dashboard-wishlist-panel {
    min-width: 0;
}

.dashboard-wishlist-list {
    display: grid;
    gap: 8px;
}

.dashboard-wishlist-item {
    display: block;
    padding: 10px 12px;
    border: 1px solid #E3EBE7;
    border-radius: 10px;
    background: #F8FBF9;
    color: #29473F;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-wishlist-item:hover {
    border-color: #C8D8D1;
    background: #F2F7F4;
}

.dashboard-wishlist-item:focus-visible {
    outline: 2px solid #7A9B90;
    outline-offset: 2px;
}

/* =========================
   LEGAL / PRIVACIDADE
   ========================= */
.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-top: 10px;
}

.footer-legal-links a {
    color: #60756E;
    font-size: 12px;
    text-decoration: none;
}

.footer-legal-links a:hover {
    text-decoration: underline;
}
