
:root {
    --bg-color: #1C1E27;
    --card-bg: #111217;
    --text-color: #E2E8F0;
    --highlight: #4A6382;
    --border-dark: #203656;
    --green: #10b981;
    --red: #ef4444;
    --blue: #0ea5e9;
    --gray: #94A3B8;
    --nu-purple: #820ad1;
    --sant-red: #ef5350;
    --pag-orange: #ffa726;
    --Sodexo-green: #4ed454;
    --nu-blue: #42a5f5;
    --navy-blue: #071ed3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    
}

html,
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 0;
    margin: 0;
    width: 100%;
    min-width: 1720px;
    overflow-x: auto;
}

html.login-mode,
body.login-mode {
    min-width: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    position: fixed;
}

html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    position: fixed;
    top: 0;
    left: 0;
}

#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    overflow: hidden;
}

.login-card {
    background: var(--card-bg);
    padding: 50px 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    border-top: 4px solid var(--highlight);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-card h2 {
    margin-bottom: 25px;
    font-size: 2rem;
    color: var(--highlight);
    text-align: center;
}

.login-card svg {
    display: block;
    margin-bottom: 20px !important;
    height: 80px;
    width: auto;
}

.login-card input {
    margin-bottom: 15px;
    background: #050e18;
    border: 1px solid #1c2e3e;
    color: #e1e1e6;
    height: 45px;
    border-radius: 6px;
    width: 100%;
}

.login-card input:focus {
    border-color: var(--highlight);
    outline: none;
    background: #081624;
}

.login-card button {
    width: 100%;
    background: var(--highlight);
    margin-top: 10px;
    font-weight: bold;
    padding: 12px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
}

#login-error {
    color: #ff4444 !important;
    margin-top: 15px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

#login-screen footer {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
    color: var(--gray);
    font-size: 0.75rem;
    z-index: 2000;
    padding: 10px;
}

@media (max-height: 700px) {
    .login-card {
        padding: 30px 20px;
    }

    .login-card svg {
        height: 60px;
        margin-bottom: 15px !important;
    }

    .login-card h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
}

header {
    padding: 20px;
    margin-bottom: 15px;
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--highlight)
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.month-selector button {
    background: transparent;
    font-size: 1.5rem;
    padding: 0 10px;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
    padding: 8px 18px;
}

.btn-dashboard {
    background: transparent;
    border: 1px solid var(--highlight);
    color: var(--highlight);
    padding: 8px 20px;
    display: flex;
    align-items: center;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-dashboard:hover {
    background: var(--highlight);
    color: #fff;
}

section {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0 20px 0 18px;
}

.summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: var(--card-bg);
    padding: 9px;
    border-radius: 5px;
    height: 70%;
    width: 80%;
    margin-bottom: 1px;
}

.card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: auto;
    height: 10%;
}

.card strong {
    font-size: 1.4rem;
}

.card.total {
    background: var(--highlight);
    color: #fff;
}

.summary-details {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: start;
}

.status-column {
    display: flex;
    flex-direction: column;
}

.transactions-area {
    display: grid;
    grid-template-columns: 1.2fr 2fr 2fr; 
    gap: 20px;
    width: 100%;
    align-items: start;
}

.mb-2 {
    margin-bottom: 8px;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.card-small {
    background: var(--card-bg);
    padding: 6px 12px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid var(--gray);
    flex: initial;
}

#card-filter-paid:hover, #card-filter-pending:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.info-side span {
    font-size: 0.75rem;
    display: block;
    line-height: 1;
    margin-bottom: 2px;
}

.info-side strong {
    font-size: 1rem;
    line-height: 1.1;
}

.mini-chart-wrapper {
    width: 30px;
    height: 30px;
    position: relative;
}

.account-card {
    color: #ffffff;
    border-left: none;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    min-height: 38px;
}

.account-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.bg-credito {
    background-color: #820ad1;
}

.bg-debito {
    background-color: #ef5350;
}

.bg-pix {
    background-color: #00b37e;
}

.bg-especie {
    background-color: #66bb6a;
}

.bg-outros {
    background-color: #8d8d99;
}

.bg-proj {
    background-color: #f59e0b;
}

.bg-gray-card {
    background-color: #616161;
}

.info-side-acc span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    font-size: 0.7rem;
    display: block;
    margin-bottom: 2px;
}

.info-side-acc strong {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
}

.acc-chart-wrapper {
    width: 40px;
    height: 20px;
    position: relative;
}

.actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%
}

.btn-new {
    background: var(--highlight);
    width: auto;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, opacity 0.2s;
}

.btn-new:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1.8fr 1fr; 
    gap: 20px;
    height: 300px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.chart-box {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 5px;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.chart-box h3 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--gray);
    font-size: 0.9rem;
    height: 20px;
}

.chart-box canvas {
    max-height: 250px !important;
    width: 100% !important;
}

.annual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 350px 350px;
    height: auto !important;
    gap: 20px;
    margin-bottom: 50px;
}

.year-selector {
    display: flex;
    gap: 10px;
}

.btn-year {
    background: var(--bg-color);
    border: 1px solid var(--border-dark);
    padding: 5px 15px;
    border-radius: 20px;
    color: #aaa;
    cursor: pointer;
    transition: 0.3s;
}

.btn-year.active {
    background: var(--highlight);
    color: white;
    border-color: var(--highlight);
    font-weight: bold;
}

.add-reminder-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #444;
}

.add-reminder-box h3 {
    color: var(--highlight);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.reminder-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 100px;
    gap: 10px;
    align-items: center;
}

.reminders-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reminder-card {
    background: var(--bg-color);
    padding: 10px 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--gray);
    transition: 0.2s;
}

.reminder-card:hover {
    transform: translateX(5px);
    background: #3a3a3a;
}

.rem-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rem-title {
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
}

.rem-meta {
    font-size: 0.85rem;
    color: #aaa;
    display: flex;
    gap: 15px;
}

.rem-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rem-actions button {
    background: transparent;
    padding: 5px;
    color: var(--red);
}

.rem-actions button:hover {
    opacity: 0.7;
}

.reminder-card.paid {
    border-left-color: var(--green);
    opacity: 0.6;
}

.reminder-card.overdue {
    border-left-color: var(--red);
    border: 1px solid var(--red);
}

.warning-text {
    color: var(--red);
    font-weight: bold;
    font-size: 0.8rem;
    margin-left: 5px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.table-container h3 {
    margin-bottom: 10px;
    color: #cd6a00;
    border-bottom: 1px solid #cd6a04;
    padding-bottom: 5px;
}

.income-container h3 {
    color: var(--green);
    border-bottom-color: var(--green);
}

.invest-container h3 {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

table {
    width: 100%;
    border-spacing: 0 2px;
}

th {
    color: var(--gray);
    font-weight: normal;
    padding: 10px;
    text-align: left;
    font-size: 0.8rem;
}

td {
    padding: 10px;
    font-size: 0.85rem;
}

td:first-child {
    border-radius: 5px 0 0 5px;
}

td:last-child {
    border-radius: 0 5px 5px 0;
}

.income-text {
    color: var(--green);
}

.expense-text {
    color: var(--red);
}

.invest-text {
    color: var(--blue);
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    background: #444;
    color: #fff;
    margin-right: 5px;
    display: inline-block;
    margin-bottom: 2px;
}

.badge-inst {
    background: var(--highlight);
}

button {
    padding: 10px 20px;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    transition: 0.2s;
}

button:hover {
    opacity: 0.8;
}

.btn-save {
    background: var(--green);
    width: 100%;
    margin-top: 20px;
}

.btn-cancel {
    background: var(--red);
    width: 100%;
    margin-top: 10px;
}

input,
select {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border-radius: 5px;
    color: white;
    font-size: 1rem;
    margin-top: 5px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.type-toggle button {
    background: transparent;
    border: 1px solid #555;
    opacity: 0.5;
    font-size: 0.9rem;
}

.type-toggle button.active {
    opacity: 1;
    border: none;
    font-weight: bold;
}

#btn-outcome.active {
    background: var(--red);
}

#btn-income.active {
    background: var(--green);
}

#btn-invest.active {
    background: var(--blue);
}

.radio-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.radio-group input[type="radio"] {
    display: none;
}

.badge-radio {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #555;
    border-radius: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
    font-size: 0.9rem;
}

input:checked+.badge-radio {
    opacity: 1;
    border-color: transparent;
    font-weight: bold;
}

.badge-radio.green {
    color: var(--green);
}

input:checked+.badge-radio.green {
    background: rgba(4, 211, 97, 0.2);
}

.badge-radio.red {
    color: var(--red);
}

input:checked+.badge-radio.red {
    background: rgba(247, 90, 104, 0.2);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    z-index: 10005;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.label-entradas {
    color: var(--green);
    font-size: 1.2rem;
    font-weight: 400;
}

.label-saidas {
    color: var(--red);
    font-size: 1.2rem;
    font-weight: 400;
}

footer {
    text-align: center;
    color: var(--gray);
    font-size: 0.8rem;
    padding: 20px 0;
    width: 100%;
    margin-top: 20px;
}

#login-screen footer {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
    color: var(--gray);
    font-size: 0.75rem;
    z-index: 2000;
    padding: 10px;
}

#login-screen input:focus {
    background-color: #202024;
    border-color: #820ad1;
    outline: none;
}

.input-edit {
    background: transparent;
    border: none;
    border-bottom: 1px dashed #444;
    color: #f75a68;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    width: 100px;
    outline: none;
    padding-right: 5px;
    height: 30px;
    margin-top: 0;
}

.input-edit:focus {
    border-bottom: 1px solid #820ad1;
    background: rgba(255, 255, 255, 0.05);
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield
}

.reminder-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 10px;
    height: 10px;
    background-color: #f75a68;
    border-radius: 50%;
    border: 1px solid #ffffff;
    z-index: 10;
}

.btn-extrato-bancario {
    background: var(--card-bg);
    padding: 6px 12px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 90%;
    margin-top: 8px;
    text-decoration: none;
    color: var(--sant-red);
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid var(--sant-red);
    transition: 0.2s;
}

.btn-extrato-bancario:hover {
    background: var(--highlight);
    color: #fff;
    border-color: var(--highlight);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-extrato-sodexo {
    background: var(--card-bg);
    padding: 6px 12px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 90%;
    margin-top: 8px;
    text-decoration: none;
    color: var(--Sodexo-green);
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid var(--Sodexo-green);
    transition: 0.2s;
}

.btn-extrato-sodexo:hover {
    background: var(--highlight);
    color: #fff;
    border-color: var(--highlight);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-fatura-nubank {
    background: var(--card-bg);
    padding: 6px 12px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 90%;
    margin-top: 8px;
    text-decoration: none;
    color: var(--nu-purple);
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid var(--nu-purple);
    transition: 0.2s;
}

.btn-parcelamento {
    background: var(--card-bg);
    padding: 6px 12px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 90%;
    margin-top: 8px;
    text-decoration: none;
    color: var(--gray);
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid var(--gray);
    transition: 0.2s;
}

.btn-parcelamento:hover {
    background: var(--highlight);
    color: #fff;
    border-color: var(--highlight);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-comprovantes,
.btn-res-inv {
    background: var(--card-bg);
    padding: 6px 12px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: auto;
    margin-top: 0;
    text-decoration: none;
    color: #485cf7;
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid #071ed3;
    transition: 0.2s;
    white-space: nowrap;
}

.btn-comprovantes:hover,
.btn-res-inv:hover {
    background: var(--highlight);
    color: #fff;
    border-color: var(--highlight);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-fatura-nubank:hover {
    background: var(--highlight);
    color: #fff;
    border-color: var(--highlight);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#annual-screen,
#reminders-screen,
#approvals-screen {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background-color: var(--bg-color);
    z-index: 9999;

    overflow-y: auto;
    overflow-x: hidden;
}

.annual-grid {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

body.no-scroll {
    overflow: hidden !important;
    padding-right: 0px;
}

td {
    background: #333;
    padding: 4px 10px;
    font-size: 0.85rem;
    transition: 0.2s ease-in-out;
    position: relative;
    z-index: 1;
}

td:hover {
    transform: scaleX(1.01);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.btn-dashboard {
    background: transparent;
    border: 1px solid var(--highlight);
    color: var(--highlight);
    padding: 8px 20px;
    display: flex;
    align-items: center;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-dashboard:hover {
    background: var(--highlight);
    color: #fff;
}

td.desc-cell {
    position: relative;
    padding-right: 25px;
}

.btn-note {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    color: #666;
}

tr:hover .btn-note {
    opacity: 1;
}

.btn-note.has-note {
    opacity: 1;
    color: #FBC02D;
}

.btn-note:hover {
    transform: scale(1.2);
    color: #fff;
}

.search-wrapper input:focus {
    border-color: var(--highlight) !important;
    background: #29292e !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(27, 94, 79, 0.4);
}

.right-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.actions-inline {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-color);
    padding-bottom: 0px;
}

.actions-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 0px;
    padding: 0 2px;
}

.links-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tools-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-extrato-bancario,
.btn-extrato-sodexo,
.btn-fatura-nubank,
.btn-parcelamento {
    width: auto !important;
    margin-top: 0 !important;
    height: 45px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    white-space: nowrap;
}

.summary .card {
    width: 80%;
    height: 90px;
    margin: 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}

.summary .card header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 5px;
    flex: 0 0 auto;
}

.summary .card header p {
    margin: 0;
}

.summary .card strong {
    font-size: 1.7rem;
    text-align: center;
    width: 100%;
    display: block;
    line-height: 1.2;
}

.table-select {
    background: transparent;
    border: none;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    padding: 0;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: auto;
    margin-top: 0;
}

.table-select:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.table-select option {
    background-color: var(--bg-color);
    color: #fff;
}

#table-variable th:nth-child(4),
#table-variable td:nth-child(4),
#table-fixed th:nth-child(4),
#table-fixed td:nth-child(4) {
    min-width: 66px;
}

.calc-wrapper {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #444;
}

#calc-display {
    width: 100%;
    height: 60px;
    color: #fff;
    font-size: 2rem;
    text-align: right;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-btn {
    height: 50px;
    font-size: 1.2rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.calc-btn:active {
    transform: scale(0.95);
}

.num-btn {
    background: #383838;
    color: #fff;
    font-weight: bold;
}

.num-btn:hover {
    background: #4d4d4d;
}

.op-btn {
    background: #2b2b2b;
    color: var(--highlight);
    font-weight: bold;
    font-size: 1.3rem;
}

.op-btn:hover {
    background: #3a3a3a;
}

.c-btn {
    color: var(--red) !important;
}

.equal-btn {
    background: var(--highlight);
    color: #fff;
    font-weight: bold;
    border: 1px solid var(--highlight);
}

.equal-btn:hover {
    opacity: 0.9;
}

#draggable-calc {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 260px;
    background: #202020;
    border: 1px solid #444;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1500;
    overflow: hidden;
}

#calc-header {
    padding: 10px 15px;
    background: #2b2b2b;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.calc-wrapper {
    background: #202020;
    padding: 15px;
}

#calc-display {
    width: 100%;
    height: 50px;
    background: #000;
    color: #fff;
    font-size: 1.5rem;
    text-align: right;
    border: 1px solid #333;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.calc-btn {
    height: 40px;
    font-size: 1rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

textarea {
    width: 100%;
    min-height: 50px;
    padding: 15px;
    border-radius: 5px;
    color: white;
    font-size: 1rem;
    margin-top: 5px;
    resize: vertical;
    font-family: inherit;
}

textarea:focus {
    border-color: var(--highlight);
    outline: none;
    background: #29292e;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


header,
.calc-wrapper {
    background: #14151C !important;
    border-bottom: 2px solid var(--border-dark) !important;
}

td {
    background: #14151C !important;
    border-bottom: 1px solid var(--bg-color);
}

input,
select,
textarea,
#calc-display {
    background: #14151C !important;
    border: 1px solid var(--border-dark) !important;
    color: var(--text-color) !important;
}

#search-input {
    background: #14151C !important;
    border: 1px solid var(--border-dark) !important;
}

#login-screen {
    background-image: linear-gradient(rgba(0, 0, 0, 0.312), rgba(0, 0, 0, 0.7)), url('fundofinanceiro.jpg') !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.rem-meta strong {
    color: var(--text-color);
}

.table-container h3 {
    border-bottom: 1px solid var(--border-dark);
}

.table-select {
    border: none !important;
    background: transparent !important;
}

.input-edit {
    border: none !important;
    background: transparent !important;
    border-bottom: none !important;
}

.input-edit:focus {
    border-bottom: 1px solid var(--highlight) !important;
}

#notes-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.note-card {
    background: var(--card-bg);
    border-top: 4px solid var(--highlight);
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
    border-top-color: var(--blue);
}

.note-card h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-right: 30px;
}

.note-card .note-preview {
    color: var(--gray);
    font-size: 0.9rem;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.note-card .note-date {
    font-size: 0.75rem;
    color: #666;
    margin-top: 15px;
    border-top: 1px solid var(--border-dark);
    padding-top: 10px;
}

.btn-delete-note {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    color: var(--red);
    border: none;
    padding: 5px;
    opacity: 0;
    transition: 0.2s;
    cursor: pointer;
}

.note-card:hover .btn-delete-note {
    opacity: 1;
}

.note-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    background: var(--bg-color);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-dark);
    flex-wrap: wrap;
}

.note-toolbar button {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-dark);
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 0;
    transition: 0.2s;
}

.note-toolbar button:hover {
    background: var(--highlight);
    color: #fff;
    border-color: var(--highlight);
}

#note-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

#note-editor:empty:before {
    content: attr(placeholder);
    color: #555;
    pointer-events: none;
    display: block;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content.animate-summary {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes borderPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 229, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 229, 255, 0);
    }
}

.modal-content.animate-summary {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1), borderPulse 2s infinite;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes borderPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 99, 130, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(74, 99, 130, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(74, 99, 130, 0);
    }
}

.modal-content.animate-summary {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1), borderPulse 1s infinite;
    border: 2px solid var(--highlight) !important;
}

.reminder-item-btn {
    width: 100%;
    background: #1A1C24;
    border: 1px solid var(--border-dark);
    padding: 14px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    margin-bottom: 10px;
}

.reminder-item-btn:hover {
    background: #252833;
    border-color: var(--highlight);
    transform: translateX(5px);
}

@media (min-width: 800px) {
    .login-card {
        margin-left: 50vw !important;
    }
}

@keyframes scaleAndGlowCard {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(74, 99, 130, 0.6);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 0 15px rgba(74, 99, 130, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(74, 99, 130, 0);
    }
}

.login-card {
    border: 2px solid var(--highlight) !important;
    animation: scaleAndGlowCard 2s ease-in-out infinite !important;
}

body.discrete-mode #incomeDisplay,
body.discrete-mode #expenseDisplay,
body.discrete-mode #totalDisplay,
body.discrete-mode #paidDisplay,
body.discrete-mode #pendingDisplay,
body.discrete-mode [id^="accVal"],
body.discrete-mode .input-edit,
body.discrete-mode #table-incomes td:nth-child(3),
body.discrete-mode #table-investments td:nth-child(4),
body.discrete-mode #table-fixed td:nth-child(4),
body.discrete-mode #table-variable td:nth-child(4) {
    filter: blur(6px);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

body.discrete-mode .input-edit::placeholder {
    color: transparent;
}

body.discrete-mode #incomeDisplay:hover,
body.discrete-mode #expenseDisplay:hover,
body.discrete-mode #totalDisplay:hover,
body.discrete-mode #paidDisplay:hover,
body.discrete-mode #pendingDisplay:hover,
body.discrete-mode [id^="accVal"]:hover,
body.discrete-mode .input-edit:hover,
body.discrete-mode .input-edit:focus,
body.discrete-mode #table-incomes td:nth-child(3):hover,
body.discrete-mode #table-investments td:nth-child(4):hover,
body.discrete-mode #table-fixed td:nth-child(4):hover,
body.discrete-mode #table-variable td:nth-child(4):hover {
    filter: blur(0);
    opacity: 1;
}

body.discrete-mode .input-edit:hover::placeholder,
body.discrete-mode .input-edit:focus::placeholder {
    color: inherit;
}

#bulk-action-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    border: 1px solid var(--border-dark);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
    padding: 15px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9000;
    transition: bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#bulk-action-bar.visible {
    bottom: 0;
}

.bulk-select-cb {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--highlight);
}

td.desc-cell strong {
    font-size: 0.85rem !important;
}

body {
    background-image: linear-gradient(rgba(28, 30, 39, 0.92), rgba(28, 30, 39, 0.97)), url('fundofinanceiro.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
}

#annual-screen,
#reminders-screen,
#approvals-screen,
#notes-screen {
    background-color: transparent !important;
}

header,
.sticky-top {
    background-color: rgba(20, 21, 28, 0.8) !important;
    backdrop-filter: blur(8px) !important;
}

td {
    background-color: rgba(20, 21, 28, 0.7) !important;
}

body.light-mode {
    --bg-color: #E2E4E9;
    --card-bg: #F8F9FA;
    --text-color: #2D3748;
    --border-dark: #CBD5E1;
    --highlight: #2C5282;
}

body.light-mode {
    background-image: linear-gradient(rgba(226, 228, 233, 0.90), rgba(226, 228, 233, 0.95)), url('fundofinanceiro.jpg') !important;
}

body.light-mode #login-screen {
    background-image: linear-gradient(rgba(226, 228, 233, 0.75), rgba(226, 228, 233, 0.95)), url('fundofinanceiro.jpg') !important;
}

body.light-mode header,
body.light-mode .sticky-top {
    background-color: rgba(226, 228, 233, 0.85) !important;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode p,
body.light-mode label,
body.light-mode th {
    color: var(--text-color);
}

body.light-mode td {
    background-color: #F8F9FA !important;
    border-bottom: 1px solid #E2E8F0;
    color: var(--text-color);
}

body.light-mode td:hover {
    background-color: #EDF2F7 !important;
}

body.light-mode .modal-content,
body.light-mode .add-reminder-box,
body.light-mode .calc-wrapper,
body.light-mode #bulk-action-bar,
body.light-mode #note-drag-header {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-dark);
}

body.light-mode input,
body.light-mode select,
body.light-mode textarea,
body.light-mode #calc-display,
body.light-mode #search-input {
    background: #FFFFFF !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-dark) !important;
}

body.light-mode input:focus,
body.light-mode textarea:focus,
body.light-mode #search-input:focus {
    background: #F8F9FA !important;
    border-color: var(--highlight) !important;
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.3);
}

body.light-mode .table-select option {
    background-color: #FFFFFF;
    color: var(--text-color);
}

body.light-mode .reminder-card,
body.light-mode .note-card,
body.light-mode .reminder-item-btn {
    background: #FFFFFF;
    border: 1px solid var(--border-dark);
    color: var(--text-color);
}

body.light-mode .reminder-card:hover,
body.light-mode .reminder-item-btn:hover {
    background: #EDF2F7;
}

body.light-mode .note-toolbar {
    background: #EDF2F7;
}

body.light-mode .note-toolbar button {
    background: #FFFFFF;
}

body.light-mode #draggable-calc {
    background: var(--card-bg);
}

body.light-mode .num-btn {
    background: #E2E8F0;
    color: #1A202C;
}

body.light-mode .num-btn:hover {
    background: #CBD5E1;
}

body.light-mode .op-btn {
    background: #F1F5F9;
}

body.light-mode #calc-header span {
    color: var(--text-color) !important;
}

body.light-mode .card.total p,
body.light-mode .card.total span,
body.light-mode .card.total strong {
    color: #FFFFFF !important;
}

body.light-mode .account-card .info-side-acc span,
body.light-mode .account-card .info-side-acc strong {
    color: #FFFFFF !important;
}

body.light-mode .badge {
    color: #FFFFFF !important;
}

body.light-mode .btn-dashboard,
body.light-mode .btn-year {
    color: var(--highlight);
    border-color: var(--highlight);
}

th, 
td select, 
td .badge {
    white-space: nowrap;
}

td:last-child, 
td:nth-last-child(2) {
    min-width: 40px;
    text-align: center;
}

body.light-mode .table-select,
body.light-mode .input-edit {
    border: none !important;
    background: transparent !important;
}
body.light-mode .input-edit:focus {
    border-bottom: 1px solid var(--highlight) !important;
}

body.light-mode .type-toggle button {
    color: var(--text-color) !important;
}
body.light-mode .type-toggle button.active {
    color: #ffffff !important;
}

body.light-mode .op-btn {
    color: var(--highlight) !important;
}
body.light-mode .equal-btn {
    color: #ffffff !important;
}

.calendar-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header button {
    background: var(--highlight);
    color: white;
    border: none;
    padding: 5px 20px;
    font-size: 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
}

.calendar-header h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.3rem;
    text-transform: capitalize;
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: var(--gray);
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-cell {
    background: #1A1C24;
    border: 1px solid #2A2D3A;
    border-radius: 8px;
    min-height: 140px;
    padding: 8px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

.calendar-cell:hover:not(.empty) {
    background: #252833;
    border-color: var(--highlight);
    transform: translateY(-2px);
}

.calendar-cell.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-cell.today {
    border: 2px solid var(--highlight);
    background: rgba(74, 99, 130, 0.15);
}

.calendar-cell.selected {
    border: 2px solid #FBC02D;
    background: rgba(251, 192, 45, 0.1);
}

.cell-day {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 5px;
    font-size: 1rem;
    text-align: right;
}

.cell-dots {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    justify-content: flex-end;
}

.dot-income, .dot-expense, .dot-reminder {
    font-size: 0.85rem;
    padding: 5px 6px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 800;
}

.dot-income {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.dot-expense {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.dot-reminder {
    background: rgba(255, 167, 38, 0.15);
    color: #ffa726;
}
#btn-clear-filter:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border-color: #fff !important;
}

body.light-mode .calendar-wrapper {
    background: var(--card-bg);
}
body.light-mode .calendar-cell {
    background: #FFFFFF;
    border-color: var(--border-dark);
}
body.light-mode .calendar-cell:hover:not(.empty) {
    background: #EDF2F7;
}
body.light-mode .calendar-cell.today {
    background: rgba(44, 82, 130, 0.05);
}

#quick-edit-modal {
    justify-content: flex-end;
    align-items: flex-end;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
}

#quick-edit-modal .modal-content {
    margin: 0;
    max-width: 400px;
    border: 1px solid var(--border-dark);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(50px) scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

#quick-edit-modal.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

body.light-mode #quick-edit-modal {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
}