:root {
    --bg: #f3efe7;
    --panel: rgba(255, 255, 255, 0.88);
    --text: #1d1b1a;
    --muted: #6c655f;
    --accent: #c56b2d;
    --accent-dark: #8b4718;
    --finance-green: #2f7d5a;
    --finance-gold: #d6aa45;
    --finance-ink: #173329;
    --success-soft: #dff4e8;
    --danger-soft: #fde2df;
    --shadow: 0 18px 45px rgba(89, 64, 43, 0.12);
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(214, 170, 69, 0.18), transparent 24%),
        radial-gradient(circle at top right, rgba(47, 125, 90, 0.14), transparent 28%),
        linear-gradient(180deg, #fcfaf5 0%, var(--bg) 100%);
}

.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='280' viewBox='0 0 720 280'%3E%3Cpath d='M0 220 L90 205 L155 210 L250 165 L325 172 L410 120 L490 136 L590 70 L720 96' fill='none' stroke='rgba(47,125,90,0.14)' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M0 240 L110 235 L190 198 L280 205 L360 162 L430 170 L525 124 L620 136 L720 102' fill='none' stroke='rgba(214,170,69,0.16)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='590' cy='70' r='8' fill='rgba(47,125,90,0.18)'/%3E%3Ccircle cx='525' cy='124' r='7' fill='rgba(214,170,69,0.18)'/%3E%3C/svg%3E"),
        linear-gradient(rgba(87, 75, 67, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(87, 75, 67, 0.05) 1px, transparent 1px);
    background-size: 100% 320px, 40px 40px, 40px 40px;
    background-position: top center, top left, top left;
    background-repeat: no-repeat, repeat, repeat;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 85%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    padding-top: 0.65rem;
    background: linear-gradient(180deg, rgba(252, 250, 245, 0.98) 0%, rgba(252, 250, 245, 0.96) 100%);
    backdrop-filter: blur(10px);
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.1rem;
    border-bottom: 1px solid rgba(84, 64, 51, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(252, 250, 245, 0.96) 100%);
    backdrop-filter: blur(18px);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1010;
}

.app-frame {
    min-width: 0;
}

.app-content {
    min-width: 0;
    flex: 1 1 auto;
}

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
}

.page-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.page-toolbar-copy {
    min-width: 0;
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sidebar-brand:hover {
    color: var(--text);
}

.sidebar-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(197, 107, 45, 0.18), rgba(214, 170, 69, 0.32));
    color: var(--finance-ink);
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(197, 107, 45, 0.14);
}

.sidebar-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.sidebar-brand-text {
    font-size: 1rem;
    line-height: 1.1;
}

.sidebar-brand-subtext {
    color: var(--muted);
    font-size: 0.77rem;
    font-weight: 600;
}

.sidebar-toggle {
    white-space: nowrap;
}

.sidebar-section {
    padding: 0.95rem;
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 28px rgba(89, 64, 43, 0.06);
}

.sidebar-section-label {
    margin-bottom: 0.75rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    gap: 0.65rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.68));
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(89, 64, 43, 0.06);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-nav-link:hover,
.sidebar-nav-link:focus {
    color: var(--text);
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(197, 107, 45, 0.2);
    transform: translateX(2px);
    box-shadow: 0 14px 28px rgba(89, 64, 43, 0.1);
}

.sidebar-nav-link.active {
    background:
        linear-gradient(135deg, rgba(197, 107, 45, 0.18), rgba(214, 170, 69, 0.16));
    border-color: rgba(197, 107, 45, 0.32);
    box-shadow: 0 16px 34px rgba(197, 107, 45, 0.14);
}

.sidebar-nav-abbrev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(29, 27, 26, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
}

.sidebar-nav-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-nav-label {
    min-width: 0;
    line-height: 1.15;
}

.sidebar-nav-subtitle {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.15;
}

.sidebar-footer {
    padding: 1rem;
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(197, 107, 45, 0.08), transparent 40%),
        rgba(255, 255, 255, 0.7);
}

.sidebar-footer-chip {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(29, 27, 26, 0.08);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-footer-text {
    color: var(--muted);
    font-size: 0.9rem;
}

.top-nav {
    display: flex;
    width: 100%;
    justify-content: flex-start;
}

.top-nav-surface {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 24px;
    background: rgba(252, 250, 245, 0.99);
    box-shadow: 0 14px 30px rgba(89, 64, 43, 0.1);
    backdrop-filter: blur(16px);
}

.top-nav-surface > .top-nav-extra {
    flex: 1 1 auto;
    min-width: 0;
}

.top-nav-surface > .top-nav-user-card {
    margin-left: auto;
}

.top-nav-user-card {
    border-radius: 18px;
    margin-left: 0;
}

.top-nav-user-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 220px;
    padding: 0.7rem 2rem 0.7rem 0.85rem;
    text-align: left;
}

.top-nav-user-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
}

.top-nav-user-label {
    color: var(--muted);
    display: block;
    font-size: 0.74rem;
    line-height: 1.1;
}

.top-nav-user-toggle::after {
    position: absolute;
    right: 0.8rem;
    top: 50%;
}

.top-nav-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(197, 107, 45, 0.18), rgba(214, 170, 69, 0.32));
    color: var(--finance-ink);
    font-weight: 800;
    line-height: 1;
}

.top-nav-user-photo {
    object-fit: cover;
}

.top-nav-user-avatar-menu {
    width: 2.6rem;
    height: 2.6rem;
    margin-right: 0.3rem;
}

.top-nav-user-menu-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.75rem 0.65rem;
    margin-bottom: 0;
}

.top-nav-user-menu {
    min-width: 200px;
    border: 1px solid rgba(84, 64, 51, 0.1);
    border-radius: 18px;
    padding: 0.45rem;
}

.top-nav-user-menu .dropdown-item {
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
}

.top-nav-user-menu .dropdown-item:active {
    background: rgba(197, 107, 45, 0.12);
    color: var(--text);
}

.top-nav-user-menu .dropdown-item.text-danger:active {
    background: rgba(220, 53, 69, 0.12);
    color: #b02a37;
}

@media (min-width: 992px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1030;
        width: 304px;
        height: 100vh;
        overflow-y: auto;
        border-right: 1px solid rgba(84, 64, 51, 0.08);
        border-bottom: 0;
    }

    .app-content {
        min-width: 0;
        margin-left: 304px;
    }

    .app-shell-public .app-content {
        margin-left: 0;
    }

    body.sidebar-collapsed .app-sidebar {
        width: 96px;
        padding-inline: 0.7rem;
    }

    body.sidebar-collapsed .app-content {
        margin-left: 96px;
    }

    body.sidebar-collapsed .sidebar-brand-text,
    body.sidebar-collapsed .sidebar-brand-subtext,
    body.sidebar-collapsed .sidebar-nav-label,
    body.sidebar-collapsed .sidebar-nav-subtitle,
    body.sidebar-collapsed .sidebar-toggle-text,
    body.sidebar-collapsed .sidebar-footer {
        display: none;
    }

    body.sidebar-collapsed .sidebar-brand-row {
        justify-content: center;
    }

    body.sidebar-collapsed .sidebar-brand-copy {
        display: none;
    }

    body.sidebar-collapsed .sidebar-section {
        padding-inline: 0.5rem;
    }

    body.sidebar-collapsed .sidebar-nav-link {
        justify-content: center;
        padding-inline: 0.55rem;
    }

    body.sidebar-collapsed .sidebar-nav-body {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: relative;
        z-index: 1;
        width: 100%;
        height: auto;
    }

    .app-content {
        width: 100%;
        margin-left: 0;
    }

    body.sidebar-collapsed .sidebar-nav {
        display: none;
    }

    body.sidebar-collapsed .sidebar-footer {
        display: none;
    }
}

.table-fixed {
    table-layout: fixed;
    width: 100%;
}

.table-fixed th,
.table-fixed td {
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.table-dashboard-lancamentos .col-data { width: 92px; }
.table-dashboard-lancamentos .col-descricao { width: 180px; }
.table-dashboard-lancamentos .col-parcela { width: 84px; }
.table-dashboard-lancamentos .col-categoria { width: 120px; }
.table-dashboard-lancamentos .col-tipo { width: 92px; }
.table-dashboard-lancamentos .col-metodo { width: 150px; }
.table-dashboard-lancamentos .col-vencimento { width: 104px; }
.table-dashboard-lancamentos .col-status { width: 110px; }
.table-dashboard-lancamentos .col-pago { width: 72px; }
.table-dashboard-lancamentos .col-valor { width: 110px; }

.table-emprestimos-vencimentos .col-nome { width: 150px; }
.table-emprestimos-vencimentos .col-parcela { width: 96px; }
.table-emprestimos-vencimentos .col-vencimento { width: 112px; }
.table-emprestimos-vencimentos .col-amortizacao { width: 160px; }
.table-emprestimos-vencimentos .col-juros { width: 132px; }
.table-emprestimos-vencimentos .col-status { width: 112px; }
.table-emprestimos-vencimentos .col-receber { width: 124px; }
.table-emprestimos-vencimentos .col-recebido { width: 112px; }
.table-emprestimos-vencimentos .col-pago { width: 84px; }

.table-emprestimos-vencimentos th,
.table-emprestimos-vencimentos td {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
}

.table-emprestimos-cadastro .col-nome { width: 150px; }
.table-emprestimos-cadastro .col-status { width: 104px; }
.table-emprestimos-cadastro .col-valor { width: 120px; }
.table-emprestimos-cadastro .col-meses { width: 72px; }
.table-emprestimos-cadastro .col-data { width: 104px; }
.table-emprestimos-cadastro .col-vencimento { width: 104px; }
.table-emprestimos-cadastro .col-amortizacao { width: 120px; }
.table-emprestimos-cadastro .col-juros { width: 90px; }
.table-emprestimos-cadastro .col-pagar { width: 120px; }
.table-emprestimos-cadastro .col-montante { width: 120px; }
.table-emprestimos-cadastro .col-juros-total { width: 90px; }

.table-veiculos-historico .col-data { width: 98px; }
.table-veiculos-historico .col-veiculo { width: 130px; }
.table-veiculos-historico .col-servico { width: 126px; }
.table-veiculos-historico .col-km { width: 90px; }
.table-veiculos-historico .col-descricao { width: 170px; }
.table-veiculos-historico .col-local { width: 130px; }
.table-veiculos-historico .col-status { width: 90px; }
.table-veiculos-historico .col-valor { width: 100px; }
.table-veiculos-historico .col-acoes { width: 152px; }

.hero-card,
.panel-card,
.metric-card,
.filter-card {
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-card {
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    top: -80px;
    right: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 107, 45, 0.28), transparent 70%);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(29, 27, 26, 0.08);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-card {
    padding: 1.5rem;
}

.hero-saldo-card {
    min-width: min(100%, 320px);
}

.mini-nav-card {
    min-width: 220px;
    padding: 0.75rem 0.9rem;
}

.mini-nav-card strong {
    font-size: 1.1rem;
}

.mini-nav-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dashboard-top-controls {
    margin-top: -0.35rem;
}

.dashboard-action-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
}

.dashboard-month-filter {
    width: min(100%, 260px);
}

.dashboard-month-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.dashboard-month-input {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 575.98px) {
    .dashboard-month-filter {
        width: 100%;
    }
}

.btn-nav {
    border: 1px solid rgba(84, 64, 51, 0.12);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn-nav:hover,
.btn-nav:focus {
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(89, 64, 43, 0.08);
}

.btn-nav-active {
    border-color: rgba(197, 107, 45, 0.36);
    background: linear-gradient(145deg, rgba(245, 225, 196, 0.95), rgba(255, 243, 228, 0.95));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 24px rgba(197, 107, 45, 0.16);
    font-weight: 700;
}

.hero-saldo-stack {
    width: min(100%, 320px);
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

.metric-card strong {
    display: block;
    margin-top: 0.4rem;
    font-size: clamp(1.4rem, 2.5vw, 2.1rem); /*editado por johnny*/
    text-align: center;
    line-height: 1;
}

.mini-metric-card {
    padding: 1rem 1.1rem;
}

.mini-metric-card strong {
    font-size: clamp(0.2rem, 1vw, 1.6rem);
}

.receita-card {
    background: linear-gradient(145deg, #f5fff8, var(--success-soft));
}

.despesa-card {
    background: linear-gradient(145deg, #fff8f8, var(--danger-soft));
}

.saldo-card {
    background: linear-gradient(145deg, #fff9ed, #f6e3c3);
}

.saldo-mes-card {
    background: linear-gradient(145deg, #eef4ff, #dfe9ff);
}

.fatura-card {
    background: linear-gradient(145deg, #eefaf7, #daf3ec);
}

.veiculo-card {
    background: linear-gradient(145deg, #eef7ff, #dce9fb);
}

.veiculo-summary-panel {
    background:
        radial-gradient(circle at top right, rgba(77, 109, 216, 0.12), transparent 32%),
        rgba(255, 255, 255, 0.72);
}

.fatura-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.fatura-item {
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.fatura-item-clickable {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.fatura-item-clickable:hover,
.fatura-item-clickable:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(89, 64, 43, 0.12);
}

.fatura-item-selected {
    border-color: rgba(197, 107, 45, 0.45);
    box-shadow: 0 12px 24px rgba(197, 107, 45, 0.14);
}

.fatura-item-overdue {
    border-color: rgba(217, 107, 95, 0.35);
    background: rgba(253, 226, 223, 0.55);
}

.fatura-item-paid {
    border-color: rgba(67, 160, 71, 0.35);
    background: rgba(232, 245, 233, 0.78);
}

.fatura-item strong.fatura-item-title,
.metric-card strong.cartao-nome-title {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.1;
    margin-top: 0;
}

.fatura-detail-card {
    min-height: 320px;
}

.fatura-expenses {
    max-height: 240px;
    overflow: auto;
}

.fatura-item .badge {
    font-size: 0.72rem;
}

.fatura-item .small {
    font-size: 0.74rem;
}

.emprestimos-dashboard-shell {
    overflow: hidden;
}

.emprestimos-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: stretch;
}

.emprestimos-dashboard-metric-wrap {
    min-width: 0;
}

.emprestimos-dashboard-controls {
    display: none;
}

.emprestimos-dashboard-year {
    min-width: 120px;
}

.emprestimos-dashboard-metric {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
    min-height: 88px;
    width: 100%;
    max-width: 100%;
    padding: 0.55rem 0.72rem 0.6rem;
    border-radius: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66), 0 10px 24px rgba(84, 64, 51, 0.06);
    transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.emprestimos-dashboard-metric.saldo-card {
    background: linear-gradient(145deg, #f7f3ea, #efe0c9);
}

.emprestimos-dashboard-metric.saldo-mes-card {
    background: linear-gradient(145deg, #f8efd9, #efd7ab);
}

.emprestimos-dashboard-metric.receita-card {
    background: linear-gradient(145deg, #f7f1e4, #f1e1c8);
}

.emprestimos-dashboard-metric.despesa-card {
    background: linear-gradient(145deg, #f9f0df, #f0dec0);
}

.emprestimos-dashboard-card-inactive .emprestimos-dashboard-metric {
    opacity: 0.55;
    filter: grayscale(0.12);
    transform: scale(0.99);
}

.emprestimos-dashboard-metric-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.emprestimos-dashboard-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 0 0 auto;
    width: 0.9rem;
    height: 0.9rem;
    cursor: pointer;
}

.emprestimos-dashboard-toggle .form-check-input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
}

.emprestimos-dashboard-toggle-box {
    width: 0.9rem;
    height: 0.9rem;
    border: 1.5px solid rgba(29, 27, 26, 0.18);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.emprestimos-dashboard-toggle .form-check-input:checked + .emprestimos-dashboard-toggle-box {
    border-color: rgba(197, 107, 45, 0.5);
    background: linear-gradient(145deg, rgba(197, 107, 45, 0.18), rgba(214, 170, 69, 0.24));
}

.emprestimos-dashboard-toggle .form-check-input:checked + .emprestimos-dashboard-toggle-box::after {
    content: "";
    position: relative;
    display: block;
    width: 0.32rem;
    height: 0.16rem;
    margin: 0.2rem auto 0;
    border-left: 2px solid var(--finance-ink);
    border-bottom: 2px solid var(--finance-ink);
    transform: rotate(-45deg);
}

.emprestimos-dashboard-metric-copy {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.emprestimos-dashboard-metric span {
    text-align: left;
    font-size: 0.86rem;
    line-height: 1.08;
    font-weight: 800;
    color: rgba(29, 27, 26, 0.82);
}

.emprestimos-dashboard-metric small {
    color: var(--muted);
    font-size: 0.64rem;
    line-height: 1.15;
}

.emprestimos-dashboard-metric strong {
    text-align: left;
    margin-top: auto;
    font-size: clamp(1.08rem, 1.55vw, 1.62rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.emprestimos-dashboard-chart {
    min-height: 280px;
    padding-inline: 0.5rem;
}

.emprestimos-dashboard-chart-monthly {
    min-height: 110px;
}

.emprestimos-dashboard-chart-small {
    min-height: 220px;
    padding-top: 0.15rem;
}

.emprestimos-dashboard-chart-side {
    min-height: 125px;
    max-width: none;
    width: 100%;
    margin-left: auto;
    margin-right: 0;
}

.emprestimos-dashboard-overview {
    margin-bottom: 0.75rem;
}

.emprestimos-dashboard-side-chart-col {
    display: flex;
    align-items: flex-start;
    justify-content: stretch;
}

.emprestimos-dashboard-side-chart-col > .chart-wrap {
    width: 100%;
}

.emprestimos-top-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.emprestimos-top-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.emprestimos-top-actions .emprestimo-top-filter {
    width: 100%;
}

.emprestimos-top-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    min-width: 0;
}

.emprestimos-month-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 84px;
    padding: 0.6rem 0.8rem;
    border-radius: 18px;
}

.emprestimos-month-card span {
    font-size: 0.78rem;
    line-height: 1.08;
}

.emprestimos-month-card strong {
    font-size: 1.08rem;
    line-height: 1.05;
}

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

    .emprestimos-dashboard-metric-wrap {
        width: auto;
    }

    .emprestimos-dashboard-metric {
        min-height: 80px;
        padding: 0.6rem 0.7rem;
    }

    .emprestimos-dashboard-metric strong {
        font-size: 0.98rem;
    }

    .emprestimos-dashboard-chart-small {
        min-height: 200px;
    }

    .emprestimos-dashboard-chart-monthly {
        min-height: 95px;
    }

    .emprestimos-dashboard-chart-side {
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        min-height: 120px;
    }

    .emprestimos-dashboard-side-chart-col {
        justify-content: stretch;
    }

    .emprestimos-top-layout {
        grid-template-columns: 1fr;
    }

    .emprestimos-top-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 575.98px) {
    .emprestimos-dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .emprestimos-top-metrics {
        grid-template-columns: 1fr;
    }
}

.emprestimos-month-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--finance-ink);
    background: linear-gradient(145deg, rgba(47, 125, 90, 0.26), rgba(214, 170, 69, 0.36));
    border: 1px solid rgba(47, 125, 90, 0.38);
    box-shadow: 0 10px 28px rgba(47, 125, 90, 0.14);
    font-weight: 800;
}

.emprestimos-month-chip-icon {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(29, 27, 26, 0.65);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42);
    flex: 0 0 auto;
}

.emprestimos-months-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 0.5rem;
}

.emprestimos-month-item {
    position: relative;
    display: block;
    cursor: pointer;
}

.emprestimos-month-item input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.emprestimos-month-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(29, 27, 26, 0.14);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.emprestimos-month-item:hover .emprestimos-month-pill {
    transform: translateY(-1px);
    border-color: rgba(47, 125, 90, 0.28);
}

.emprestimos-month-item input:checked + .emprestimos-month-pill {
    background: linear-gradient(145deg, rgba(47, 125, 90, 0.22), rgba(214, 170, 69, 0.28));
    border-color: rgba(47, 125, 90, 0.42);
    box-shadow: 0 10px 22px rgba(47, 125, 90, 0.12);
    transform: translateY(-1px);
}

.emprestimos-dashboard-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

#chartEmprestimosMensal {
    cursor: pointer;
}

.filter-card {
    padding: 1rem;
}

.report-hero {
    background:
        radial-gradient(circle at top right, rgba(47, 125, 90, 0.16), transparent 28%),
        radial-gradient(circle at bottom left, rgba(214, 170, 69, 0.16), transparent 24%),
        var(--panel);
}

.report-filter-card {
    position: sticky;
    top: 1.25rem;
}

.report-builder-shell {
    background:
        radial-gradient(circle at top right, rgba(47, 125, 90, 0.12), transparent 28%),
        radial-gradient(circle at bottom left, rgba(214, 170, 69, 0.14), transparent 30%),
        var(--panel);
}

.report-builder-controls,
.report-builder-visual {
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.68);
}

.report-builder-controls {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.report-builder-visual {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.report-builder-chart {
    min-height: 390px;
}

.report-builder-hint {
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(29, 27, 26, 0.06);
}

.filter-checklist {
    display: grid;
    gap: 0.45rem;
    max-height: 14rem;
    overflow: auto;
    padding: 0.2rem 0.1rem;
}

.filter-checklist-compact {
    max-height: 11rem;
}

.filter-checklist .form-check {
    padding-left: 1.8rem;
}

.report-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(29, 27, 26, 0.08);
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 700;
}

.report-layout {
    display: flex;
    flex-direction: column;
}

.report-layout > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

.report-filter-card > .d-flex.flex-column.gap-4 {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem !important;
    align-items: start;
}

.report-filter-card > .d-flex.flex-column.gap-4 > div:first-child,
.report-filter-card > .d-flex.flex-column.gap-4 > .d-grid {
    grid-column: 1 / -1;
}

.report-filter-card .report-filter-field select {
    min-height: 2.5rem;
}

.report-filter-card .filter-checklist-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.45rem 0.9rem;
}

.report-filter-card .filter-checklist-inline .form-check {
    margin: 0;
}

.report-filter-panel {
    overflow: hidden;
}

.table-relatorio .col-data { width: 96px; }
.table-relatorio .col-tipo { width: 92px; }
.table-relatorio .col-descricao { width: 200px; }
.table-relatorio .col-categoria { width: 130px; }
.table-relatorio .col-valor { width: 106px; }
.table-relatorio .col-metodo_pagamento { width: 120px; }
.table-relatorio .col-cartao { width: 100px; }
.table-relatorio .col-status { width: 102px; }
.table-relatorio .col-vencimento { width: 106px; }
.table-relatorio .col-recebido { width: 84px; }
.table-relatorio .col-pago { width: 72px; }
.table-relatorio .col-acoes { width: 180px; }

.empty-state {
    padding: 2rem;
    border: 1px dashed rgba(84, 64, 51, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
    text-align: center;
}

.fatura-expenses .table > :not(caption) > * > * {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.btn-accent {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: 0;
}

.btn-accent:hover,
.btn-accent:focus {
    color: #fff;
    background: linear-gradient(135deg, #b45f25, #733813);
}

.login-shell {
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: 100vh;
    padding-inline: clamp(1rem, 3vw, 3rem);
    background:
        linear-gradient(135deg, rgba(12, 18, 16, 0.72), rgba(12, 18, 16, 0.42)),
        url("../img/1.png") center center / cover no-repeat;
}

.login-card {
    max-width: 680px;
}

.login-card-inner {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(26px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.12);
}

.login-card-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(12, 18, 16, 0.10), rgba(12, 18, 16, 0.24)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 42%);
    pointer-events: none;
}

.login-card-copy {
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.35);
    margin-bottom: 1rem !important;
}

.login-shell .eyebrow,
.login-shell h1,
.login-shell h2,
.login-shell p,
.login-shell label,
.login-shell .text-secondary,
.login-shell .small,
.login-shell .alert {
    color: #fff !important;
}

.login-visual-copy {
    max-width: 24rem;
    color: rgba(255, 255, 255, 0.96);
    font-size: 1rem;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.28);
}

.login-avatar-upload {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.login-avatar-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(197, 107, 45, 0.2), rgba(214, 170, 69, 0.34));
    color: var(--finance-ink);
    font-size: 1.1rem;
    font-weight: 800;
}

.profile-avatar-preview {
    width: 3.2rem;
    height: 3.2rem;
    overflow: hidden;
}

.login-form-shell {
    position: relative;
    z-index: 1;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
}

.login-form-shell,
.login-card-inner {
    padding: 1rem !important;
}

.login-form-shell input[type="text"],
.login-form-shell input[type="password"],
.login-form-shell input[type="email"],
.login-form-shell input[type="number"],
.login-form-shell input[type="date"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.login-form-shell input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.50);
    box-shadow: 0 0 0 0.18rem rgba(255, 255, 255, 0.14);
}

.login-form-shell .display-6,
.login-form-shell .h3 {
    margin-bottom: 0.5rem !important;
}

.login-form-shell .mb-4 {
    margin-bottom: 0.75rem !important;
}

.login-form-shell .vstack.gap-3 {
    gap: 0.75rem !important;
}

.login-form-shell .btn-lg {
    padding: 0.7rem 1rem;
}

.login-form-shell label {
    margin-bottom: 0.35rem;
}

.login-form-shell input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.btn-nav {
    color: var(--text);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(84, 64, 51, 0.1);
    border-radius: 999px;
    padding-inline: 1rem;
}

.btn-nav:hover,
.btn-nav:focus {
    color: var(--text);
    background: rgba(255, 255, 255, 0.95);
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 1rem;
    z-index: 10;
}

@media (min-width: 1200px) {
    .top-nav-surface {
        flex-wrap: nowrap !important;
        gap: 0.16rem;
        width: 100%;
        padding: 0.5rem 0.55rem;
    }

    .top-nav-surface > :first-child {
        flex: 0 0 auto;
    }

    .top-nav-surface > .top-nav-extra {
        flex: 1 1 auto;
    }

    .top-nav-surface > .top-nav-user-card {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .top-nav-extra > div {
        flex-wrap: nowrap !important;
        gap: 0.14rem !important;
    }

    .top-nav-surface .btn-nav {
        padding-inline: 0.52rem;
        padding-block: 0.44rem;
        font-size: 0.95rem;
    }

    .top-nav-surface .mini-nav-card {
        min-width: 100px;
        padding: 0.3rem 1.38rem;
        border-radius: 14px;
    }

    .top-nav-surface .mini-nav-card span {
        font-size: 1.58rem;
    }

    .top-nav-surface .mini-nav-card strong {
        font-size: 1.20rem;
    }

    .top-nav-user-toggle {
        min-width: 132px;
        padding: 0.34rem 0.85rem 0.34rem 0.45rem;
        gap: 0.22rem;
    }

    .top-nav-user-avatar {
        width: 1.45rem;
        height: 1.45rem;
    }
}

.text-secondary {
    color: var(--muted) !important;
}

.table > :not(caption) > * > * {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    background: transparent;
}

.lancamento-row {
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.emprestimo-row {
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.manutencao-row {
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.lancamento-row:hover,
.lancamento-row:focus-visible,
.emprestimo-row:hover,
.emprestimo-row:focus-visible,
.manutencao-row:hover,
.manutencao-row:focus-visible {
    background-color: rgba(197, 107, 45, 0.08);
}

.lancamento-row:focus-visible,
.emprestimo-row:focus-visible,
.manutencao-row:focus-visible {
    outline: 2px solid rgba(197, 107, 45, 0.35);
    outline-offset: -2px;
}

.progress-soft {
    height: 10px;
    border-radius: 999px;
    background: rgba(29, 27, 26, 0.08);
}

.chart-wrap {
    position: relative;
    min-height: 260px;
}

.chart-wrap-donut {
    min-height: 220px;
}

.chart-wrap-wide {
    min-height: 320px;
}

.month-picker-popover {
    position: fixed;
    z-index: 2000;
    width: 288px;
}

.month-picker-card {
    padding: 0.8rem;
    border: 1px solid rgba(84, 64, 51, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 45px rgba(89, 64, 43, 0.18);
}

.month-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.month-picker-header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.month-picker-year {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(197, 107, 45, 0.1);
    font-size: 1rem;
    font-weight: 900;
    color: var(--text);
}

.month-picker-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(84, 64, 51, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-weight: 800;
    line-height: 1;
}

.month-picker-current {
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(84, 64, 51, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.month-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.month-picker-month {
    border: 1px solid rgba(84, 64, 51, 0.12);
    border-radius: 12px;
    padding: 0.55rem 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 700;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.month-picker-month:hover,
.month-picker-nav:hover,
.month-picker-current:hover {
    transform: translateY(-1px);
    border-color: rgba(197, 107, 45, 0.3);
}

.month-picker-month.is-active {
    background: linear-gradient(145deg, rgba(197, 107, 45, 0.14), rgba(214, 170, 69, 0.2));
    border-color: rgba(197, 107, 45, 0.4);
}

.parcelas-box {
    border-top: 1px dashed rgba(84, 64, 51, 0.16);
    padding-top: 1rem;
}

.parcela-card {
    display: block;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
}

.vencimento-item {
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
}

.emprestimo-top-actions {
    width: 100%;
}

.emprestimo-top-filter {
    margin: 0;
}

@media (min-width: 1200px) {
    .emprestimo-top-actions {
        width: auto;
    }
}

@media (max-width: 767.98px) {
    .hero-card,
    .panel-card,
    .metric-card,
    .filter-card {
        border-radius: 22px;
    }
}

@media (max-width: 991.98px) {
    .login-shell {
        padding-inline: 0.75rem;
    }

    .login-card {
        max-width: 100%;
    }

    .login-card-inner {
        border-radius: 24px;
    }

    .login-card-copy {
        margin-bottom: 1rem !important;
    }

    .login-form-shell {
        border-radius: 20px;
    }

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

@media (min-width: 992px) {
    .login-card-inner {
        padding: 1.75rem !important;
    }

    .login-form-shell {
        padding: 1.5rem !important;
    }
}

@media (max-width: 575.98px) {
    .login-shell {
        min-height: 100vh;
        padding: 1rem 0.75rem;
    }

    .login-card-inner {
        border-radius: 20px;
    }
}

@media (max-width: 767.98px) {
    .table-veiculos-historico {
        min-width: 860px;
    }
}

.emprestimo-mini-dashboard {
    position: fixed;
    top: 50%;
    right: 1rem;
    z-index: 1070;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: min(360px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 1rem;
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 24px 60px rgba(89, 64, 43, 0.18);
    transform: translate3d(16px, -50%, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    overflow: hidden;
}

.emprestimo-mini-dashboard.show {
    opacity: 1;
    transform: translate3d(0, -50%, 0);
    pointer-events: auto;
}

.emprestimo-mini-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.emprestimo-mini-dashboard-kicker {
    margin: 0;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.emprestimo-mini-dashboard-body {
    display: grid;
    gap: 1rem;
    overflow: auto;
    padding-right: 0.2rem;
}

.emprestimo-mini-progress {
    padding: 0.9rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(214, 170, 69, 0.12), rgba(47, 125, 90, 0.08));
}

.emprestimo-mini-progress-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(29, 27, 26, 0.08);
}

.emprestimo-mini-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr 1fr;
}

.emprestimo-mini-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(84, 64, 51, 0.08);
    border-radius: 18px;
    background: rgba(252, 250, 245, 0.92);
}

.emprestimo-mini-card span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.emprestimo-mini-card strong,
.emprestimo-mini-meta strong {
    font-size: 0.95rem;
    font-weight: 800;
}

.emprestimo-mini-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.25rem;
    border-top: 1px dashed rgba(84, 64, 51, 0.16);
}

@media (max-width: 1199.98px) {
    .emprestimo-mini-dashboard {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-height: 42vh;
        transform: translate3d(0, 16px, 0);
    }

    .emprestimo-mini-dashboard.show {
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 575.98px) {
    .emprestimo-mini-grid {
        grid-template-columns: 1fr;
    }

    .emprestimo-mini-meta {
        flex-direction: column;
    }

    
}

.text-end {
  text-align: center !important;

}
