/* ======================================================
   FINANCE.CSS
   ------------------------------------------------------
   Folha de estilos da página Finance (SPA Cashen).

   Contém:
     • Layout da página Finance (cards, tabelas, calculadora e notas)
     • Estilos de todos os modais renderizados a partir do index.html
       (emoji, templates, add-item, delete, action, save-template,
        report, toast e drawer de notificações)
     • Componentes auxiliares (status, due-date, delete-mode, etc.)

   Cada seção começa com um cabeçalho ====== para facilitar
   a navegação pelo arquivo.

   Utilize Ctrl + F com o nome da seção em CAIXA ALTA para
   localizar rapidamente qualquer bloco de estilos.
   ====================================================== */


/* ======================================================
   PÁGINA FINANCE — LAYOUT BASE
   ------------------------------------------------------
   Container principal da página, cabeçalho,
   breadcrumb e botão de download.
   ====================================================== */

.finance-page {
	width: 100%;
	padding: 36px 24px;
	font-family: var(--poppins);
}

.finance-page .head-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	grid-gap: 16px;
	flex-wrap: wrap;
}

.finance-page .head-title .left h1 {
	font-size: 36px;
	font-weight: 600;
	margin-bottom: 10px;
	color: var(--dark);
}

.finance-page .head-title .left .breadcrumb {
	display: flex;
	align-items: center;
	grid-gap: 16px;
}

.finance-page .head-title .left .breadcrumb li {
	color: var(--dark);
}

.finance-page .head-title .left .breadcrumb li a {
	color: var(--dark-grey);
	pointer-events: none;
}

.finance-page .head-title .left .breadcrumb li a.active {
	color: var(--blue);
	pointer-events: unset;
}

.finance-page .head-title .btn-download {
	height: 36px;
	padding: 0 16px;
	border-radius: 36px;
	background: var(--blue);
	color: var(--light);
	display: flex;
	justify-content: center;
	align-items: center;
	grid-gap: 10px;
	font-weight: 500;
}

/* ======================================================
   CARDS DE RESUMO (RECEITAS / DESPESAS / SALDO / INVESTIMENTOS)
   ------------------------------------------------------
   Grid de informações financeiras exibido no topo da pagina.
   ====================================================== */

.finance-page .box-info {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	grid-gap: 24px;
	margin-top: 36px;
}

.finance-page .box-info li {
	padding: 24px;
	background: var(--light);
	border-radius: 20px;
	display: flex;
	align-items: center;
	grid-gap: 24px;
}

.finance-page .box-info li .bx {
	width: 80px;
	height: 80px;
	border-radius: 10px;
	font-size: 36px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.finance-page .box-info li:nth-child(4) .bx {
	background:  #fefd9e;
	color: #cac702;
}

.h3-invest {
	color: #cac702;
}

.finance-page .box-info li:nth-child(3) .bx {
	background: var(--light-blue);
	color: rgb(60, 145, 230);
}

.finance-page .box-info li:nth-child(1) .bx {
	background: var(--light-green);
	color: var(--green);
}

.finance-page .box-info li:nth-child(2) .bx {
	background: var(--light-orange);
	color: var(--orange);
}

/* Força a cor individualmente */
.finance-page .box-info li .text h3 {
	font-size: 24px;
	font-weight: 600;
}

.finance-page .box-info li .text p {
	color: var(--dark);
}

/* ======================================================
   CORES SEMÂNTICAS — RECEITAS E DESPESAS
   ------------------------------------------------------
   Utilitários de cor reutilizados em títulos e textos das tabelas.
   ====================================================== */

.despesas {
	color: var(--orange);
	;
}

.receitas {
	color: var(--green);
}

/* ======================================================
   TABELAS DE DESPESAS E RECEITAS
   ------------------------------------------------------
   Estrutura das tabelas, células, status (pago/pendente)
   e estados de interação (hover).
   ====================================================== */

.finance-page .table-data {
	display: flex;
	flex-wrap: wrap;
	grid-gap: 24px;
	margin-top: 24px;
	width: 100%;
	color: var(--dark);
}

.finance-page .table-data>div {
	border-radius: 20px;
	background: var(--light);
	padding: 24px;
	overflow-x: auto;
}

.finance-page .table-data .head {
	display: flex;
	align-items: center;
	grid-gap: 16px;
	margin-bottom: 24px;
}

.finance-page .table-data .head h3 {
	margin-right: auto;
	font-size: 24px;
	font-weight: 600;
}

.finance-page .table-data .head .bx {
	cursor: pointer;
}

.finance-page .table-data .order {
	flex-grow: 1;
	flex-basis: 500px;
}

.finance-page .table-data .order table {
	width: 100%;
	border-collapse: collapse;
}

.finance-page .table-data .order table th {
	padding-bottom: 12px;
	font-size: 13px;
	text-align: left;
	border-bottom: 1px solid var(--grey);
}

.finance-page .table-data .order table td {
	padding: 16px 0;
}

.finance-page .table-data .order table tr td:first-child {
	display: flex;
	align-items: center;
	grid-gap: 12px;
	padding-left: 6px;
}

.finance-page .table-data .order table td img {
	width: 30px;
	height: 30px;
	border-radius: 20%;
	object-fit: cover;
}

.finance-page .table-data .order table tbody tr:hover {
	background: var(--grey);
}

.finance-page .table-data .order table tr td .status {
	font-size: 10px;
	padding: 6px 16px;
	color: var(--light);
	border-radius: 20px;
	font-weight: 700;
}

.finance-page .table-data .order table tr td .status.completed {
	background: var(--blue);
}

.finance-page .table-data .order table tr td .status.process {
	background: var(--blue);
}

.finance-page .table-data .order table tr td .status.pending {
	background: var(--orange);
}

/* ======================================================
   BLOCO DE TO-DO / LISTA RÁPIDA
   ------------------------------------------------------
   Lista lateral de tarefas integrada à área de tabelas.
   ====================================================== */

.finance-page .table-data .todo {
	flex-grow: 1;
	flex-basis: 300px;
}

.finance-page .table-data .todo .todo-list {
	width: 100%;
}

.finance-page .table-data .todo .todo-list li {
	width: 100%;
	margin-bottom: 16px;
	background: var(--grey);
	border-radius: 10px;
	padding: 14px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.finance-page .table-data .todo .todo-list li .bx {
	cursor: pointer;
}

.finance-page .table-data .todo .todo-list li.completed {
	border-left: 10px solid var(--blue);
}

.finance-page .table-data .todo .todo-list li.not-completed {
	border-left: 10px solid var(--orange);
}

.finance-page .table-data .todo .todo-list li:last-child {
	margin-bottom: 0;
}

/* MAIN */
/* CONTENT */

/* ======================================================
   RESPONSIVIDADE — PÁGINA FINANCE
   ------------------------------------------------------
   Ajustes de layout da página Finance para tablets e mobile.
   ====================================================== */

@media screen and (max-width: 768px) {
	#sidebar {
		width: 200px;
	}
	#content {
		width: calc(100% - 60px);
		left: 200px;
	}
	#content nav .nav-link {
		display: none;
	}
}

@media screen and (max-width: 576px) {
	#content nav form .form-input input {
		display: none;
	}
	#content nav form .form-input button {
		width: auto;
		height: auto;
		background: transparent;
		border-radius: none;
		color: var(--dark);
	}
	#content nav form.show .form-input input {
		display: block;
		width: 100%;
	}
	#content nav form.show .form-input button {
		width: 36px;
		height: 100%;
		border-radius: 0 36px 36px 0;
		color: var(--light);
		background: var(--red);
	}
	#content nav form.show~.notification,
	#content nav form.show~.profile {
		display: none;
	}
	.finance-page .box-info {
		grid-template-columns: 1fr;
	}
	.finance-page .table-data .head {
		min-width: 420px;
	}
	.finance-page .table-data .order table {
		min-width: 420px;
	}
	.finance-page .table-data .todo .todo-list {
		min-width: 420px;
	}
}

/* ======================================================
    ÍCONES E INPUTS DE ÍCONE
    ------------------------------------------------------
    Container de ícones reutilizado em formulários e selects de emoji.
    ====================================================== */

.icon-container {
	width: 50px;
	height: 50px;
	cursor: pointer;
	overflow: hidden;
}

.icon-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.icon-input {
	display: none;
}

/* ======================================================
    MODAL — SELEÇÃO DE EMOJI / ÍCONES
    ------------------------------------------------------
    Overlay, header, busca, grid e estados do modal de escolha de emoji.
    ====================================================== */

.emoji-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(33, 33, 33, 0.55);
	backdrop-filter: blur(2px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999999;
	padding: 20px;
}

.emoji-modal {
	width: 100%;
	max-width: 720px;
	height: 85vh;
	background: #1a2339;
	border-radius: 30px;
	border: 1px solid rgba(255,255,255,.06);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow:
        0 25px 80px rgba(0,0,0,.45);
}

/* HEADER */
.emoji-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 28px;
	border-bottom:
        1px solid rgba(255,255,255,.06);
}

.emoji-header-left {
	display: flex;
	align-items: center;
	gap: 16px;
}

.emoji-header-icon {
	width: 58px;
	height: 58px;
	border-radius: 18px;
	background:
        linear-gradient(
            135deg,
            #3b82f6,
            #2563eb
        );
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
}

.emoji-header h2 {
	color: white;
	margin: 0;
	font-family: poppins;
	font-size: 1.25rem;
}

.emoji-header p {
	margin-top: 4px;
	color: #94a3b8;
	font-family: poppins;
	font-size: .92rem;
}

.loadingEmojis {
	color: #ffffff;
	font-family: poppins;
	font-size: .92rem;
	text-align: center;
	margin-top: 40px;
}

/* CLOSE */
.emoji-close {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	border: none;
	background: rgba(255,255,255,.05);
	color: #cbd5e1;
	font-size: 1.4rem;
	cursor: pointer;
	transition: .2s ease;
}

.emoji-close:hover {
	background: rgba(255,255,255,.09);
	transform: scale(1.05);
}

/* SEARCH */
.emoji-search-wrapper {
	padding: 20px 28px;
	position: relative;
}

.emoji-search-wrapper i {
	position: absolute;
	left: 44px;
	top: 50%;
	transform: translateY(-50%);
	color: #64748b;
}

#emojiSearch {
	width: 100%;
	height: 54px;
	border-radius: 16px;
	border: none;
	background: #1e293b;
	padding-left: 52px;
	color: white;
	font-size: 1rem;
}

#emojiSearch:focus {
	outline: none;
	box-shadow:
        0 0 0 2px rgba(59,130,246,.35);
}

/* BODY */
.emoji-container-modern {
	flex: 1;
	overflow-y: auto;
	padding: 0 28px 28px;
}

/* SECTIONS */
.emoji-section {
	margin-bottom: 30px;
}

.emoji-section-title {
	color: white;
	font-size: .95rem;
	font-family: poppins;
	font-weight: 700;
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* GRID */
.emoji-grid {
	display: grid;
	grid-template-columns:
        repeat(auto-fill, minmax(60px, 1fr));
	gap: 12px;
}

/* ITEM */
.emoji-option {
	width: 60px;
	height: 60px;
	border-radius: 18px;
	background: #1e293b;
	border: 1px solid transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: .2s ease;
	font-size: 1.7rem;
}

.emoji-option:hover {
	transform: translateY(-3px);
	border-color: rgba(59,130,246,.5);
	background: #243244;
}

.emoji-option img {
	width: 30px;
	height: 30px;
	object-fit: contain;
	pointer-events: none;
}

/* SCROLLBAR */
.emoji-container-modern::-webkit-scrollbar {
	width: 6px;
}

.emoji-container-modern::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,.12);
	border-radius: 999px;
}

/* ======================================================
    EDIÇÃO INLINE DE CÉLULAS
    ------------------------------------------------------
    Estilos para células editáveis (contenteditable) das tabelas.
    ====================================================== */

td[contenteditable]:focus {
	outline: none;
	border: none;
	/* Evita bordas padrÃ£o */
}

button {
	outline: none;
	border: none;
	background-color: transparent;
}

.expense {
	color: var(--orange);
}

.income {
	color: var(--green);
}

/* ======================================================
    BOTÕES DE STATUS (PAGO / PENDENTE)
    ------------------------------------------------------
    Botões usados nas tabelas para alternar o status de uma linha.
    ====================================================== */

.status-btn {
	min-width: 100px;
	/* Garante um tamanho uniforme */
	padding: 8px 16px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.3s ease, transform 0.2s;
}

.pending {
	background-color: var(--grey);
	/* Cinza claro */
	color: var(--dark);
}

.paid {
	background-color: var(--blue);
	/* Azul claro */
	color: var(--light-blue);
}

.status-btn:hover {
	transform: scale(1.05);
}

/* ======================================================
    SELETOR DE MÊS E ANO
    ------------------------------------------------------
    Selects customizados do cabeçalho da página Finance.
    ====================================================== */

.date-selector {
	display: flex;
	align-items: center;
	gap: 10px;
    /* Espaçamento entre os elementos */
	background: var(--light);
	/* Cor de fundo */
	padding: 10px 15px;
	border-radius: 8px;
}

.date-selector label {
	font-weight: bold;
	color: var(--dark);
	/* Cor do texto */
}

.date-selector select {
	padding: 5px 10px;
	border: 1px solid var(--gray);
	/* Borda mais sutil */
	border-radius: 6px;
	background: var(--white);
	color: var(--blue);
	font-size: 16px;
	cursor: pointer;
	transition: all 0.3s ease;
}

/* Efeito ao passar o mouse */
.date-selector select:hover {
	border-color: var(--blue);
}

/* Efeito ao focar */
.date-selector select:focus {
	outline: none;
	border-color: var(--blue);
	box-shadow: 0 0 5px rgba(0, 122, 255, 0.5);
}

/* ======================================================
    APP — CALCULADORA E BLOCO DE NOTAS
    ------------------------------------------------------
    Bloco lateral com calculadora interativa e área de notas.
    ====================================================== */

.app {
	display: flex;
	justify-content: center;
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	grid-gap: 24px;
	margin-top: 24px;
	width: 100%;
	height: 700px;
	color: var(--dark);
}

.calculator {
	background-color: #22252D;
	width: 100%;
	max-width: 375px;
	height: 90%;
	display: flex;
	flex-direction: column;
	border-radius: 1.5rem;
	overflow: hidden;
}

.display {
	padding: 1.5rem;
	display: flex;
	justify-content: flex-end;
	align-items: flex-end;
	color: white;
	text-align: right;
	flex: 1 1 0%;
}

.display .content {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	width: 100%;
	max-width: 100%;
	overflow: auto;
}

.display .input {
	width: 100%;
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
	color: var(--dark);
	font-weight: 600;
}

.display .output {
	font-size: 3rem;
	font-weight: 700;
	width: 100%;
	white-space: nowrap;
}

.display .operator {
	color: #EB6666;
}

.display .brackets,
.display .percent {
	color: #26FED7;
}

.keys {
	background-color: var(--light);
	padding: 1.5rem;
	border-radius: 1.5rem 1.5rem 0 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(5, 1fr);
	grid-gap: 1rem;
}

.keys .key {
	position: relative;
	cursor: pointer;
	display: block;
	background-color: var(--grey);
	border-radius: 1rem;
	transition: 0.2s;
	user-select: none;
}

.keys .key span {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 2rem;
	font-weight: 700;
	color: var(--dark);
}

.keys .key:hover {
	box-shadow: inset 0px 0px 8px rgba(0, 0, 0, 0.2);
}

.keys .key.operator span {
	color: var(--orange);
}

.keys .key.action span {
	color:var(--blue);
}

.app .order,
.app .calculator {
	flex-grow: 1;
	border-radius: 20px;
	background: var(--light);
	overflow-x: auto;
}

.placeholder {
	color: var(--dark);
	font-weight: 600;
}

.app .order .head h3 {
	font-size: 24px;
	font-weight: 600;
	color: var(--blue);
	margin: 0;
}

.app .order {
	width: 50%;
	height: 90%;
	padding: 12px;
	font-size: 16px;
	border-radius: 20px;
	background: var(--light);
	color: var(--dark);
	resize: none;
	border: none;
}

#notePad {
	width: 100%;
	height: 90%;
	resize: none;
	border: none;
	background: var(--light);
	color: var(--dark);
	padding: 12px;
	outline: none;
	font-family: var(--poppins);
	font-size: 20px;
}

.calculator .keys {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 5px;
	width: 100%;
	height: 70%;
}

/* ======================================================
    MODAL — TEMPLATES DE DESPESAS E RECEITAS
    ------------------------------------------------------
    Listagem, filtros, cards e ações do modal de templates salvos.
    ====================================================== */

.modalTemplates {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(33, 33, 33, 0.55);
	backdrop-filter: blur(2px);
	z-index: 9999;
	padding: 20px;
	font-family: poppins;
}

.template-modal-v2 {
	width: 70%;
	height: 80%;
	background: var(--modal-bg);
	color: var(--modal-text);
	border-radius: 28px;
	padding: 28px 32px;
	/* antes 32px 36px */
	display: flex;
	flex-direction: column;
	gap: 20px;
	box-shadow: var(--modal-shadow);
	border: 1px solid var(--modal-border);
	position: relative;
	overflow: hidden;
	transition: background .25s ease, color .25s ease, border .25s ease;
}

/* bolinhas decorativas */
.template-modal-v2::before {
	content: "";
	position: absolute;
	top: 28px;
	left: 28px;
	width: 22px;
	height: 22px;
	background-image: radial-gradient(circle, var(--modal-dots) 1.3px, transparent 1.6px);
	background-size: 7px 7px;
	opacity: .8;
}

/* HEADER */
.template-header {
	display: flex;
	align-items: center;
	gap: 18px;
	color: var(--modal-text);
}

.template-header-icon {
	font-size: 26px;
	width: 56px;
	height: 56px;
	display: grid;
	place-items: center;
	border-radius: 16px;
	background: var(--modal-header-icon-bg);
	margin-left: 28px;
}

.template-header-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.template-header h2 {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--modal-text);
	letter-spacing: -0.01em;
	margin-left: 2em;
}

.template-subtitle {
	margin: 0;
	font-size: 13px;
	color: var(--modal-subtext);
	margin-left: 3.5em;
}

/* FILTER TABS */
.template-filters {
	display: flex;
	background: var(--modal-secondary);
	border-radius: 12px;
	padding: 5px;
	gap: 4px;
}

.template-filters .filter {
	border: none;
	background: transparent;
	color: var(--modal-subtext);
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 9px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all .2s ease;
}

.template-filters .filter:hover {
	color: var(--modal-text);
}

.template-filters .filter.active {
	background: var(--modal-bg);
	color: var(--modal-text);
	box-shadow: 0 2px 6px rgba(0,0,0,.10);
}

/* CLOSE */
.close {
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	background: var(--modal-close-bg);
	border: 1px solid var(--modal-close-border);
	color: var(--modal-subtext);
	font-size: 20px;
	cursor: pointer;
	transition: .2s ease;
}

.close:hover {
	color: var(--modal-text);
}

/* BODY */
.template-body {
	display: flex;
	gap: 24px;
	overflow: hidden;
	padding: 2px;
	min-height: 0;
	flex: 1;
}

/* GRID */
.template-list {
	flex: 1;
	overflow-y: auto;
	max-height: 100%;
	padding: 20px 20px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 16px;
	align-content: start;
}

.template-list::-webkit-scrollbar {
	width: 6px;
}

.template-list::-webkit-scrollbar-thumb {
	background: var(--modal-border);
	border-radius: 10px;
}

/* CARD */
.template-item {
	position: relative;
	background: var(--modal-card);
	border: 1px solid var(--modal-border);
	border-radius: 18px;
	padding: 18px 14px 14px;
	min-height: 0;
    /* antes 230px – não força altura */
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-self: start;
	box-shadow: 0 4px 14px rgba(0,0,0,.05);
	transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

.template-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 36px rgba(0,0,0,.18);
}

/* =========================
CARD SELECIONADO
========================= */
.template-item.selected {
	border: 2px solid var(--modal-button);
	box-shadow:
    0 0 0 4px rgba(60, 145, 230, 0.15),
    0 18px 36px rgba(0,0,0,.18);
	transform: translateY(-3px) scale(1.01);
}

/* check visual */
.delete-template-btn {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: #ef4444;
	color: white;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 18px;
	transition: .2s ease;
	box-shadow: 0 8px 18px rgba(239, 68, 68, .35);
	z-index: 5;
}

.delete-template-btn:hover {
	transform: scale(1.08);
	background: #dc2626;
}

/* botões do card selecionado */
.template-item.selected .select-template {
	background: #22c55e !important;
	color: white !important;
}

/* BADGE NOVO */
.template-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: var(--modal-badge-bg);
	color: var(--modal-badge-color);
	font-size: 11px;
	padding: 4px 12px;
	border-radius: 999px;
	font-weight: 700;
	letter-spacing: .3px;
	box-shadow: 0 4px 10px rgba(249, 115, 22, .35);
}

/* TÍTULO */
.template-item h4 {
	margin: 0;
	text-align: center;
	font-size: 14px;
	font-weight: 700;
	color: var(--modal-text);
}

/* PREVIEW */
.card-preview {
	background: var(--modal-preview);
	border: 1px solid var(--modal-preview-border);
	border-radius: 12px;
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	font-size: 12.5px;
	color: var(--modal-text);
}

.card-preview .preview-item {
	padding: 6px 0;
	/* antes 9px */
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--modal-divider);
	font-weight: 500;
}

.card-preview .preview-item:last-child {
	border-bottom: none;
}

.card-preview .preview-item span:last-child {
	color: var(--modal-expense-color);
	font-weight: 600;
}

/* BOTÃO INTERNO – padrão laranja */
.select-template {
	margin-top: 7px;
	padding: 10px;
	border: none;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	background: var(--modal-select-orange-bg);
	color: var(--modal-select-orange-color);
	transition: .2s ease;
}

button.select-template {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.select-template:hover {
	background: var(--modal-select-orange-hover);
	transform: translateY(-1px);
}

/* Cards pares ficam com botão azul (igual referência) */
.template-item:nth-child(even) .select-template {
	background: var(--modal-select-blue-bg);
	color: var(--modal-select-blue-color);
}

.template-item:nth-child(even) .select-template:hover {
	background: var(--modal-select-blue-hover);
}

/* ILUSTRAÇÃO LATERAL */
.template-illustration {
	display: flex;
	width: 230px;
	flex-shrink: 0;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 20px 8px;
	gap: 10px;
	color: var(--modal-text);
}

.illustration-circle {
	width: 130px;
	height: 130px;
	border-radius: 50%;
	background: var(--modal-header-icon-bg);
	display: grid;
	place-items: center;
	margin-bottom: 8px;
}

.illustration-folder {
	width: 70px;
	height: 70px;
	border-radius: 18px;
	background: linear-gradient(135deg, var(--modal-button), var(--modal-button-hover));
	display: grid;
	place-items: center;
	font-size: 30px;
	color: #fff;
	box-shadow: 0 14px 30px rgba(60, 145, 230, .35);
}

.template-illustration h3 {
	margin: 8px 0 0;
	font-size: 16px;
	color: var(--modal-text);
	font-weight: 700;
}

.template-illustration p {
	margin: 0;
	font-size: 12.5px;
	color: var(--modal-subtext);
	line-height: 1.5;
}

/* FOOTER */
.template-footer {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	padding-top: 20px;
	border-top: 1px solid var(--modal-divider);
}

.saveTemplateBtn,
.applyTemplateBtn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: var(--modal-footer-hover);
	border: none;
	padding: 8px 6px;
	cursor: pointer;
	text-align: left;
	border-radius: 12px;
	color: var(--modal-text);
	transition: background .2s ease;
}

.saveTemplateBtn:hover,
.applyTemplateBtn:hover {
	background: var(--modal-select-blue-hover);
}

.footer-icon {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	font-size: 20px;
	color: #fff;
	flex-shrink: 0;
}

/* ======================================================
   MODAL — CONFIRMAÇÃO DE AÇÃO GENÉRICA
   ------------------------------------------------------
   Modal compartilhado para confirmações rápidas (ok / cancelar).
   ====================================================== */

.action-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.55);
	backdrop-filter: blur(5px);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: 0.25s;
	z-index: 999999;
}

.action-modal-overlay.active {
	opacity: 1;
	pointer-events: all;
}

.action-modal {
	width: 92%;
	max-width: 420px;
	background: #111827;
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 24px;
	padding: 30px;
	box-shadow:
        0 25px 60px rgba(0,0,0,0.45);
	transform: scale(0.9);
	transition: 0.25s;
}

.action-modal-overlay.active .action-modal {
	transform: scale(1);
}

.action-modal-icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 20px;
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	background: rgba(59,130,246,0.15);
	border: 1px solid rgba(59,130,246,0.25);
}

.action-modal h3 {
	color: white;
	text-align: center;
	font-size: 22px;
	margin-bottom: 12px;
}

.action-modal p {
	text-align: center;
	color: rgba(255,255,255,0.7);
	line-height: 1.5;
	margin-bottom: 28px;
}

.action-modal-buttons {
	display: flex;
	gap: 12px;
}

.action-modal-buttons button {
	flex: 1;
	border: none;
	height: 50px;
	border-radius: 14px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: 0.2s;
}

.action-cancel {
	background: rgba(255,255,255,0.08);
	color: white;
}

.action-cancel:hover {
	background: rgba(255,255,255,0.13);
}

.action-confirm {
	background: #3b82f6;
	color: white;
}

.action-confirm:hover {
	transform: translateY(-2px);
	opacity: 0.92;
}

/* ======================================================
   MODAL — SALVAR NOVO TEMPLATE
   ------------------------------------------------------
   Modal de input para nomear e salvar um template.
   ====================================================== */

.save-template-modal {
	position: fixed;
	inset: 0;
	background: rgba(176, 176, 176, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	transition: 0.25s;
	backdrop-filter: blur(2px);
}

.save-template-modal.active {
	opacity: 1;
	visibility: visible;
}

.save-template-content {
	width: 95%;
	max-width: 420px;
	background: var(--light);
	border-radius: 24px;
	padding: 30px;
	box-shadow: 0 15px 40px rgba(0,0,0,0.25);
	animation: modalPop .25s ease;
}

.save-template-icon {
	width: 70px;
	height: 70px;
	margin: 0 auto 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	background: rgba(60,145,230,0.15);
}

.save-template-content h2 {
	color: var(--dark);
	text-align: center;
	margin-bottom: 10px;
	font-family: poppins;
}

.save-template-content p {
	color: var(--dark);
	text-align: center;
	opacity: 0.7;
	margin-bottom: 22px;
	font-family: poppins;
}

.save-template-content input {
	width: 100%;
	height: 55px;
	border: 2px solid transparent;
	border-radius: 14px;
	padding: 0 16px;
	background: var(--grey);
	font-size: 15px;
	transition: 0.2s;
}

.save-template-content input:focus {
	border-color: var(--blue);
	outline: none;
}

.save-template-actions {
	display: flex;
	gap: 12px;
	margin-top: 24px;
}

.save-template-actions button {
	flex: 1;
	height: 50px;
	border: none;
	border-radius: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: 0.2s;
}

.save-template-actions .cancel-btn {
	background: var(--grey);
	color: var(--dark);
}

.save-template-actions .confirm-btn {
	background: var(--blue);
	color: white;
}

.save-template-actions button:hover {
	transform: translateY(-2px);
}

#templateNameInput {
	font-family: poppins;
	color: var(--dark);
}

.delete-template-btn {
	display: none;
}

/* ======================================================
   RODAPÉ DE MODAIS — ÍCONES E TEXTOS DE INFO
   ------------------------------------------------------
   Elementos auxiliares exibidos no rodapé dos modais de template.
   ====================================================== */

.footer-icon-blue {
	background: linear-gradient(135deg, #60a5fa, var(--modal-button));
}

.footer-icon-green {
	background: linear-gradient(135deg, #34d399, var(--green, #10b981));
}

.footer-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.footer-text strong {
	color: var(--modal-text);
	font-size: 14px;
	font-weight: 700;
}

.footer-text small {
	color: var(--modal-subtext);
	font-size: 12px;
}

/* ======================================================
   RESPONSIVIDADE — MODAIS DE TEMPLATE
   ------------------------------------------------------
   Ajustes dos modais de template em telas menores.
   ====================================================== */

@media (max-width: 860px) {
	.template-body {
		grid-template-columns: 1fr;
	}
	.template-illustration {
		flex-direction: row;
		text-align: left;
	}
	.template-footer {
		grid-template-columns: 1fr;
	}
	.template-header {
		flex-wrap: wrap;
	}
}



/* ======================================================
   MODAL — EXCLUSÃO DE ITENS
   ------------------------------------------------------
   Confirmação destrutiva com lista de itens a serem removidos.
   ====================================================== */

.delete-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(33, 33, 33, 0.55);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity .25s ease,
		visibility .25s ease;
}

.delete-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.delete-modal {
	width: 100%;
	max-width: 420px;
	background:
		linear-gradient(
			145deg,
			#162032,
			#1e2d44
		);
	border: 1px solid rgba(74,158,255,0.12);
	border-radius: 24px;
	padding: 34px;
	text-align: center;
	box-shadow:
		0 20px 80px rgba(0,0,0,.45),
		0 0 0 1px rgba(74,158,255,.04);
	transform: scale(.92);
	transition: transform .25s ease;
}

.delete-modal-overlay.active .delete-modal {
	transform: scale(1);
}

.delete-icon {
	width: 82px;
	height: 82px;
	margin: 0 auto 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		rgba(239,68,68,.12);
	border:
		1px solid rgba(239,68,68,.2);
	color: #ef4444;
	font-size: 2.3rem;
	box-shadow:
		0 0 30px rgba(239,68,68,.12);
}

.delete-modal h2 {
	font-size: 1.6rem;
	font-weight: 700;
	color: #e2e8f0;
	margin-bottom: 12px;
}

.delete-modal p {
	color: #94a3b8;
	font-size: .95rem;
	line-height: 1.7;
	margin-bottom: 30px;
}

.delete-actions {
	display: flex;
	gap: 14px;
}

.delete-actions button {
	flex: 1;
	height: 48px;
	border: none;
	border-radius: 12px;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
	transition: all .25s ease;
}

.cancel-delete {
	background: rgba(255,255,255,.05);
	color: #cbd5e1;
	border: 1px solid rgba(255,255,255,.06);
}

.cancel-delete:hover {
	background: rgba(255,255,255,.08);
	transform: translateY(-2px);
}

.confirm-delete {
	background: #ef4444;
	color: white;
	box-shadow:
		0 10px 25px rgba(239,68,68,.25);
}

.confirm-delete:hover {
	background: #ff5a5a;
	transform: translateY(-2px);
	box-shadow:
		0 15px 35px rgba(239,68,68,.35);
}

/* ======================================================
    BOTÃO DE EXCLUSÃO REUTILIZÁVEL
   ------------------------------------------------------
    Variação de botão destrutivo usado em diferentes contextos.
   ====================================================== */

.delete-btn {
	width: 38px;
	height: 38px;
	border: none;
	border-radius: 10px;
	background: rgba(239,68,68,.08);
	color: #ef4444;
	cursor: pointer;
	font-size: 1.1rem;
	transition: all .25s ease;
}

.delete-btn:hover {
	background: rgba(239,68,68,.18);
	transform: scale(1.08);
	box-shadow:
		0 0 20px rgba(239,68,68,.18);
}

/* ======================================================
   TOAST DE NOTIFICAÇÃO
   ------------------------------------------------------
   Mensagens flutuantes de feedback (sucesso, receita, despesa).
   ====================================================== */

.toast-notification {
	position: fixed;
	bottom: -120px;
	left: 50%;
	transform: translateX(-50%);
	min-width: 320px;
	max-width: 420px;
	padding: 18px 22px;
	border-radius: 22px;
	background: rgba(17, 24, 39, 0.95);
	backdrop-filter: blur(18px);
	border: 1px solid rgba(255,255,255,0.08);
	box-shadow:
        0 15px 45px rgba(0,0,0,0.35),
        0 0 30px rgba(74,158,255,0.12);
	display: flex;
	align-items: center;
	gap: 16px;
	z-index: 999999;
	opacity: 0;
	transition:
        bottom .5s ease,
        opacity .5s ease,
        transform .5s ease;
}

.toast-notification.show {
	bottom: 35px;
	opacity: 1;
	transform: translateX(-50%) scale(1);
}

.toast-icon {
	width: 52px;
	height: 52px;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	flex-shrink: 0;
}

.toast-content h4 {
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 4px;
}

.toast-content p {
	color: #9ca3af;
	font-size: .92rem;
	margin: 0;
}

/* RECEITA */
.toast-notification.income .toast-icon {
	background: rgba(34,197,94,0.18);
	color: #22c55e;
	box-shadow:
        0 0 20px rgba(34,197,94,0.22);
}

/* DESPESA */
.toast-notification.expense .toast-icon {
	background: rgba(239,68,68,0.18);
	color: #ef4444;
	box-shadow:
        0 0 20px rgba(239,68,68,0.22);
}

/*--------*/

/* ======================================================
    ICONES DENTRO DAS TABELAS
   ------------------------------------------------------
   Imagens/emoji renderizados na primeira coluna das tabelas.
   ====================================================== */

.table-icon {
	width: 24px;
	height: 24px;
	object-fit: contain;
	vertical-align: middle;
}

.emoji-option img {
	width: 32px;
	height: 32px;
	object-fit: contain;
	pointer-events: none;
}

/* ===========================================
   ADD ITEM MODAL — Premium Dark UI
   Cole este bloco no seu finance.css
=========================================== */
/* OVERLAY */

/* ======================================================
   MODAL — ADICIONAR ITEM (DESPESA / RECEITA)
   ------------------------------------------------------
   Formulário completo de criação de item, com campos, status e investimento.
   ====================================================== */

.add-item-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(33, 33, 33, 0.55);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.add-item-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* JANELA */
.add-item-modal {
	width: 100%;
	max-width: 700px;
	background: #0d1117;
	border: 0.5px solid rgba(255,255,255,0.1);
	border-radius: 24px;
	padding: 28px 30px 24px;
	display: flex;
	flex-direction: column;
	gap: 22px;
	box-shadow:
    0 50px 100px rgba(0,0,0,0.7),
    0 0 0 0.5px rgba(255,255,255,0.06);
	transform: scale(0.94) translateY(12px);
	transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.25s ease;
	opacity: 0;
	position: relative;
	overflow: hidden;
	font-family: poppins;
}

/* Decoração de fundo */
.add-item-modal::before {
	content: "";
	position: absolute;
	top: -60px;
	right: -60px;
	width: 220px;
	height: 220px;
	background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
	pointer-events: none;
	border-radius: 50%;
}

.add-item-modal-overlay.active .add-item-modal {
	transform: scale(1) translateY(0);
	opacity: 1;
}

/* ══ HEADER ══ */
.aim-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.aim-header-left {
	display: flex;
	align-items: center;
	gap: 14px;
}

.aim-header-icon {
	width: 52px;
	height: 52px;
	border-radius: 15px;
	background: rgba(99,102,241,0.15);
	border: 0.5px solid rgba(99,102,241,0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	flex-shrink: 0;
	box-shadow: 0 0 24px rgba(99,102,241,0.12);
}

.aim-header-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.aim-header-text h2 {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	color: #f0f2f5;
	letter-spacing: -0.02em;
}

.aim-header-text p {
	margin: 0;
	font-size: 13px;
	color: #6b7a99;
}

.aim-close {
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: rgba(255,255,255,0.05);
	border: 0.5px solid rgba(255,255,255,0.09);
	color: #6b7a99;
	font-size: 18px;
	cursor: pointer;
	transition: all .2s ease;
	flex-shrink: 0;
}

.aim-close:hover {
	background: rgba(255,255,255,0.1);
	color: #f0f2f5;
	transform: scale(1.05);
}

/* â”€â”€ BODY â”€â”€ */
.aim-body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 22px;
}

.aim-col {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* â”€â”€ FIELDS â”€â”€ */
.aim-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.aim-label {
	font-size: 12.5px;
	font-weight: 600;
	color: #7a8499;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: 6px;
}

.aim-label-hint {
	font-size: 11px;
	font-weight: 500;
	color: #3d4a63;
	text-transform: none;
	letter-spacing: 0;
	background: rgba(255,255,255,0.04);
	padding: 2px 7px;
	border-radius: 999px;
	border: 0.5px solid rgba(255,255,255,0.07);
}

.aim-label-sm {
	font-size: 11px;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
	color: #5a6680;
}

.aim-input {
	width: 100%;
	height: 46px;
	background: rgba(255,255,255,0.04);
	border: 0.5px solid rgba(255,255,255,0.1);
	border-radius: 12px;
	padding: 0 14px;
	font-size: 14.5px;
	color: #f0f2f5;
	font-family: inherit;
	transition: all 0.2s ease;
	outline: none;
	box-sizing: border-box;
}

.aim-input::placeholder {
	color: rgba(255,255,255,0.22);
}

.aim-input:focus {
	border-color: rgba(99,102,241,0.55);
	background: rgba(99,102,241,0.06);
	box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.aim-input-sm {
	height: 40px;
	font-size: 13.5px;
	text-align: center;
}

.aim-input-date {
	color-scheme: dark;
}

/* ══ ROW HELPERS ══ */
.aim-row {
	display: flex;
	align-items: flex-end;
	gap: 10px;
}

.aim-gap {
	gap: 8px;
}

.aim-flex1 {
	flex: 1;
}

/* ══ EMOJI TRIGGER ══ */
.aim-emoji-trigger {
	width: 62px;
	height: 46px;
	background: rgba(255,255,255,0.04);
	border: 0.5px solid rgba(255,255,255,0.1);
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all .2s ease;
	gap: 2px;
	flex-shrink: 0;
}

.aim-emoji-trigger:hover {
	background: rgba(99,102,241,0.1);
	border-color: rgba(99,102,241,0.4);
	transform: scale(1.04);
}

.aim-emoji-trigger span:first-child {
	font-size: 20px;
	line-height: 1;
}

.aim-emoji-hint {
	font-size: 9px;
	color: #3d4a63;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ══ STATUS GROUP ══ */
.aim-status-group {
	display: flex;
	gap: 8px;
}

.aim-status-btn {
	flex: 1;
	height: 40px;
	border-radius: 10px;
	border: 0.5px solid transparent;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	transition: all .2s ease;
	font-family: inherit;
}

.aim-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
}

.aim-status-pending {
	background: rgba(251,146,60,0.08);
	color: #9b9fa8;
	border-color: rgba(255,255,255,0.07);
}

.aim-status-pending .aim-status-dot {
	background: #fb923c;
	box-shadow: 0 0 6px rgba(251,146,60,0.5);
}

.aim-status-pending.active {
	background: rgba(251,146,60,0.15);
	color: #fb923c;
	border-color: rgba(251,146,60,0.3);
}

.aim-status-paid {
	background: rgba(34,197,94,0.08);
	color: #9b9fa8;
	border-color: rgba(255,255,255,0.07);
}

.aim-status-paid .aim-status-dot {
	background: #22c55e;
	box-shadow: 0 0 6px rgba(34,197,94,0.5);
}

.aim-status-paid.active {
	background: rgba(34,197,94,0.15);
	color: #22c55e;
	border-color: rgba(34,197,94,0.3);
}

.aim-status-btn:hover:not(.active) {
	background: rgba(255,255,255,0.06);
	color: #c0c8d8;
}

/* ══ TOGGLE SWITCH ══ */
.aim-installment-toggle,
.aim-investment-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	padding: 10px 14px;
	background: rgba(255,255,255,0.03);
	border: 0.5px solid rgba(255,255,255,0.08);
	border-radius: 10px;
	transition: all .2s ease;
	user-select: none;
}

.aim-installment-toggle:hover,
.aim-investment-toggle:hover {
	background: rgba(255,255,255,0.05);
}

.aim-toggle-label {
	font-size: 13px;
	color: #7a8499;
	font-weight: 500;
}

.aim-toggle-switch {
	width: 38px;
	height: 22px;
	background: rgba(255,255,255,0.1);
	border-radius: 999px;
	position: relative;
	transition: background .2s ease;
	flex-shrink: 0;
}

.aim-toggle-switch.on {
	background: #6366f1;
}

.aim-toggle-thumb {
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 50%;
	position: absolute;
	top: 3px;
	left: 3px;
	transition: transform .2s cubic-bezier(0.34, 1.5, 0.64, 1);
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.aim-toggle-switch.on .aim-toggle-thumb {
	transform: translateX(16px);
}

/* ══ INSTALLMENT FIELDS ══ */
.aim-installments-fields,
.aim-investment-fields {
	display: none;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	background: rgba(255,255,255,0.02);
	border: 0.5px solid rgba(255,255,255,0.06);
	border-radius: 10px;
	margin-top: 2px;
	animation: aimFadeDown 0.2s ease;
}

.aim-installments-fields.visible,
.aim-investment-fields.visible {
	display: flex;
}
/* ======================================================
    ANIMAÇÕES DO MODAL ADD-ITEM
    ------------------------------------------------------
    Animações auxiliares utilizadas pelo modal de adicionar item.
    ====================================================== */

@keyframes aimFadeDown {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.aim-installment-sep {
	font-size: 20px;
	color: #3d4a63;
	font-weight: 700;
	padding-bottom: 8px;
	flex-shrink: 0;
}

/* ══ INSTALLMENT PREVIEW ══ */
.aim-installment-preview {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 4px;
}

.aim-inst-badge {
	font-size: 12px;
	font-weight: 700;
	color: #818cf8;
	background: rgba(99,102,241,0.15);
	border: 0.5px solid rgba(99,102,241,0.3);
	border-radius: 999px;
	padding: 3px 10px;
	letter-spacing: 0.02em;
}

.aim-inst-label {
	font-size: 11.5px;
	color: #3d4a63;
}

/* ══ INSTALLMENT WRAPPER ══ */
.aim-installments-wrapper,
.aim-investment-wrapper {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* ══ FOOTER ══ */
.aim-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding-top: 6px;
	border-top: 0.5px solid rgba(255,255,255,0.06);
}

.aim-btn-cancel {
	height: 44px;
	padding: 0 22px;
	border-radius: 11px;
	background: rgba(255,255,255,0.05);
	border: 0.5px solid rgba(255,255,255,0.09);
	color: #7a8499;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s ease;
	font-family: inherit;
}

.aim-btn-cancel:hover {
	background: rgba(255,255,255,0.09);
	color: #c0c8d8;
}

.aim-btn-confirm {
	height: 44px;
	padding: 0 24px;
	border-radius: 11px;
	background: #6366f1;
	border: none;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: all .2s ease;
	font-family: inherit;
	box-shadow: 0 4px 16px rgba(99,102,241,0.35);
	letter-spacing: 0.01em;
}

.aim-btn-confirm:hover {
	background: #4f52d9;
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(99,102,241,0.45);
}

.aim-btn-confirm:active {
	transform: translateY(0);
}

.aim-btn-confirm.expense-mode {
	background: #ef4444;
	box-shadow: 0 4px 16px rgba(239,68,68,0.35);
}

.aim-btn-confirm.expense-mode:hover {
	background: #dc2626;
	box-shadow: 0 8px 22px rgba(239,68,68,0.45);
}

/* ══ COLUMN DIVIDER ══ */
.aim-col-divider {
	width: 0.5px;
	background: rgba(255,255,255,0.06);
	flex-shrink: 0;
}

/* ══ INSTALLMENTS IN TABLE ══ */
.installment-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	color: #818cf8;
	background: rgba(99,102,241,0.12);
	border: 0.5px solid rgba(99,102,241,0.25);
	border-radius: 999px;
	padding: 2px 8px;
	margin-left: 6px;
	vertical-align: middle;
	white-space: nowrap;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: all .2s ease;
}

.installment-tag:hover {
	background: rgba(99,102,241,0.22);
	border-color: rgba(99,102,241,0.4);
}


/* ======================================================
    RESPONSIVIDADE — MODAL ADD-ITEM
    ------------------------------------------------------
    Ajustes do modal de adicionar item em telas pequenas.
    ====================================================== */

@media (max-width: 600px) {
	.aim-body {
		grid-template-columns: 1fr;
	}
	.add-item-modal {
		padding: 20px 18px;
		border-radius: 20px;
	}
	.aim-footer {
		flex-direction: column;
	}
	.aim-btn-cancel,
  .aim-btn-confirm {
		width: 100%;
		justify-content: center;
	}
}

/* ======================================================
    MODO DE EXCLUSÃO EM LOTE (TABELAS)
    ------------------------------------------------------
    Ativação do modo de seleção múltipla para excluir linhas.
    ====================================================== */

.delete-mode-btn {
	cursor: pointer;
	color: var(--dark);
	font-size: 16px;
	transition: color .2s ease, transform .2s ease;
}

.delete-mode-btn:hover {
	color: #ef4444;
	transform: scale(1.1);
}

.delete-mode-btn.active {
	color: #ef4444;
}

/* Checkbox de seleção nas linhas */
.row-select-checkbox {
	width: 18px;
	height: 18px;
	accent-color: #ef4444;
	cursor: pointer;
	flex-shrink: 0;
}

/* Linha selecionada */
.finance-page .table-data .order table tbody tr.row-selected {
	background: rgba(239, 68, 68, 0.08);
	outline: 1px solid rgba(239, 68, 68, 0.25);
}

/* Coluna de vencimento */

/* ======================================================
    CÉLULAS DE VENCIMENTO (DUE DATE)
    ------------------------------------------------------
    Estilos das datas de vencimento com estados (atrasado, próximo, vazio).
    ====================================================== */

.due-date-cell {
	font-size: 12px;
	color: var(--dark);
	opacity: 0.7;
	white-space: nowrap;
}

.due-date-cell.overdue {
	color: #ef4444;
	opacity: 1;
	font-weight: 600;
}

.due-date-cell.due-soon {
	color: #fb923c;
	opacity: 1;
	font-weight: 600;
}

.due-date-cell.no-date {
	opacity: 0.3;
	font-style: italic;
}


/* ======================================================
    LISTA DE PREVIEW NO MODAL DE EXCLUSÃO
    ------------------------------------------------------
    Visualização dos itens selecionados antes de confirmar a exclusão.
    ====================================================== */

.delete-items-list {
	max-height: 200px;
	overflow-y: auto;
	margin: 12px 0 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: left;
}

.delete-items-list::-webkit-scrollbar {
	width: 4px;
}

.delete-items-list::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,0.15);
	border-radius: 10px;
}

.delete-preview-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(239,68,68,0.08);
	border: 0.5px solid rgba(239,68,68,0.2);
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 13px;
	color: #e2e8f0;
}

.delete-preview-item .dpi-emoji {
	font-size: 16px;
	flex-shrink: 0;
}

.delete-preview-item .dpi-name {
	flex: 1;
	font-weight: 500;
}

.delete-preview-item .dpi-value {
	color: #f87171;
	font-weight: 600;
	font-size: 12px;
}

/* ======================================================
    INPUTS DE DATA DE VENCIMENTO
    ------------------------------------------------------
    Inputs inline para edição da data de vencimento nas tabelas.
    ====================================================== */

.due-date-input {
	border: none;
	background: transparent;
	font-size: 12px;
	font-family: inherit;
	cursor: pointer;
	outline: none;
	color: inherit;
	width: 110px;
	padding: 4px 6px;
	border-radius: 6px;
	transition: background .2s ease;
	color-scheme: light;
}

.due-date-input:hover {
	background: var(--grey);
}

.due-date-input:focus {
	background: var(--grey);
	outline: 1px solid var(--blue);
}

.due-date-input.no-date {
	opacity: 0.35;
	width: 30px;
}

.due-date-input.no-date:hover,
.due-date-input.no-date:focus {
	opacity: 1;
	width: 110px;
}

.due-date-input.overdue {
	color: #ef4444;
}

.due-date-input.due-soon {
	color: #fb923c;
}

/* ======================================================
    SINO DE NOTIFICAÇÕES (HEADER)
    ------------------------------------------------------
    Ícone do sino com badge de contagem e animações de alerta.
    ====================================================== */

.notification {
	position: relative;
}

.notification .num {
	position: absolute;
	top: -6px;
	right: -8px;
	background: #ef4444;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	border-radius: 999px;
	padding: 0 4px;
	display: flex;
	/* sempre flex, nunca none */
	align-items: center;
	justify-content: center;
	border: 2px solid var(--light);
	transition: background .3s ease, transform .2s ease;
	box-sizing: border-box;
}

.notification:hover .num {
	transform: scale(1.15);
}

/* ======================================================
    DRAWER LATERAL DE NOTIFICAÇÕES
    ------------------------------------------------------
    Painel deslizante com lista, filtros e cards de notificação.
    ====================================================== */

.notif-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.35);
	backdrop-filter: blur(4px);
	z-index: 8888;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}

.notif-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Gaveta */
.notif-drawer {
	position: fixed;
	top: 0;
	right: -420px;
	width: 400px;
	max-width: 95vw;
	height: 100vh;
	background: var(--light, #fff);
	z-index: 8889;
	display: flex;
	flex-direction: column;
	box-shadow: -8px 0 40px rgba(0,0,0,0.15);
	transition: right .3s cubic-bezier(0.34, 1.1, 0.64, 1);
	overflow: hidden;
	font-family: poppins;
}

.notif-drawer.open {
	right: 0;
}

/* Header */
.notif-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 20px 16px;
	border-bottom: 1px solid var(--grey, #eee);
	gap: 12px;
}

.notif-header-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.notif-header-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(239,68,68,0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	flex-shrink: 0;
}

.notif-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--dark);
}

.notif-header p {
	margin: 0;
	font-size: 12px;
	color: var(--dark-grey, #888);
}

.notif-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.notif-mark-all {
	font-size: 11px;
	font-weight: 600;
	color: var(--blue, #3c91e6);
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 8px;
	transition: background .2s;
	white-space: nowrap;
	font-family: inherit;
}

.notif-mark-all:hover {
	background: rgba(60,145,230,0.08);
}

.notif-close {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--grey, #eee);
	border: none;
	font-size: 18px;
	cursor: pointer;
	display: grid;
	place-items: center;
	color: var(--dark);
	transition: background .2s;
	flex-shrink: 0;
	font-family: inherit;
}

.notif-close:hover {
	background: rgba(239,68,68,0.12);
	color: #ef4444;
}

/* Filtros */
.notif-filters {
	display: flex;
	gap: 6px;
	padding: 12px 20px;
	border-bottom: 1px solid var(--grey, #eee);
}

.notif-filter {
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--grey, #eee);
	background: transparent;
	font-size: 12px;
	font-weight: 600;
	color: var(--dark-grey, #888);
	cursor: pointer;
	transition: all .2s ease;
	font-family: inherit;
}

.notif-filter:hover {
	border-color: var(--blue, #3c91e6);
	color: var(--blue, #3c91e6);
}

.notif-filter.active {
	background: var(--blue, #3c91e6);
	border-color: var(--blue, #3c91e6);
	color: #fff;
}

/* Lista */
.notif-list {
	flex: 1;
	overflow-y: auto;
	padding: 12px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.notif-list::-webkit-scrollbar {
	width: 4px;
}

.notif-list::-webkit-scrollbar-thumb {
	background: var(--grey, #eee);
	border-radius: 10px;
}

/* Empty state */
.notif-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 200px;
	opacity: 0.5;
	font-size: 13px;
	color: var(--dark);
}

.notif-empty span {
	font-size: 36px;
}

/* Card de notificações */
.notif-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid var(--grey, #eee);
	background: var(--light, #fff);
	cursor: pointer;
	transition: all .2s ease;
	position: relative;
}

.notif-card:hover {
	border-color: rgba(60,145,230,0.3);
	box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.notif-card.unread {
	background: rgba(60,145,230,0.04);
	border-color: rgba(60,145,230,0.2);
}

.notif-card.overdue-card {
	border-color: rgba(239,68,68,0.25);
	background: rgba(239,68,68,0.03);
}

.notif-card.overdue-card.unread {
	background: rgba(239,68,68,0.06);
}

.notif-card.due-soon-card {
	border-color: rgba(251,146,60,0.25);
	background: rgba(251,146,60,0.03);
}

.notif-card-icon {
	width: 40px;
	height: 40px;
	border-radius: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
}

.notif-card.overdue-card .notif-card-icon {
	background: rgba(239,68,68,0.12);
}

.notif-card.due-soon-card .notif-card-icon {
	background: rgba(251,146,60,0.12);
}

.notif-card-body {
	flex: 1;
	min-width: 0;
}

.notif-card-title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--dark);
	margin-bottom: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.notif-card-desc {
	font-size: 12px;
	color: var(--dark-grey, #888);
	line-height: 1.4;
}

.notif-card-value {
	font-size: 12.5px;
	font-weight: 700;
	margin-top: 4px;
}

.overdue-card .notif-card-value {
	color: #ef4444;
}

.due-soon-card .notif-card-value {
	color: #fb923c;
}

.notif-unread-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--blue, #3c91e6);
	flex-shrink: 0;
	margin-top: 4px;
}

.notif-card:not(.unread) .notif-unread-dot {
	visibility: hidden;
}

/* ======================================================
    ANIMAÇÕES DAS NOTIFICAÇÕES
    ------------------------------------------------------
    Keyframes do sino e do badge de notificação.
    ====================================================== */

@keyframes bellShake {
	0% {
		transform: rotate(0deg);
	}
	15% {
		transform: rotate(18deg);
	}
	30% {
		transform: rotate(-14deg);
	}
	45% {
		transform: rotate(10deg);
	}
	60% {
		transform: rotate(-6deg);
	}
	75% {
		transform: rotate(3deg);
	}
	90% {
		transform: rotate(-1deg);
	}
	100% {
		transform: rotate(0deg);
	}
}

@keyframes badgePop {
	0% {
		transform: scale(1);
	}
	40% {
		transform: scale(1.35);
	}
	70% {
		transform: scale(0.9);
	}
	100% {
		transform: scale(1);
	}
}

.notification.shaking .bxs-bell {
	display: inline-block;
	animation: bellShake 0.5s ease;
}

.notification.shaking .num {
	animation: badgePop 0.4s ease;
}

/* ======================================================
    MODAL — GERAÇÃO DE RELATÓRIO (PDF)
    ------------------------------------------------------
    Configuração, intervalo de datas, preview e ações do relatório.
    ====================================================== */

.report-modal {
	width: 62%;
	height: 80vh;
	background: var(--light);
	border-radius: 28px;
	overflow: scroll;
	z-index: 9999999;
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(255,255,255,.08);
	padding: 1em;
	box-shadow:
        0 30px 80px rgba(0,0,0,.35);
}

.report-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(33, 33, 33, 0.55);
	backdrop-filter: blur(2px);
	display: none;
	z-index: 99999;
	align-items: center;
	justify-content: center;
}

.report-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 5px;
	border-bottom: 1px solid var(--grey);
	min-height: 100px;
}

.report-header h2 {
	margin: 0;
	font-size: 30px;
	font-weight: 700;
	color: var(--dark);
	font-family: poppins;
}

.report-header p {
	margin-top: 4px;
	color: var(--dark-grey);
	font-size: 14px;
	font-family: poppins;
}

.report-header-icon {
	width: 70px;
	height: 70px;
	border-radius: 22px;
	background: linear-gradient(
        135deg,
        var(--blue),
        #2563eb
    );
	color: white;
	font-size: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.report-body {
	flex: 1;
	display: flex;
	gap: 30px;
	padding: 30px;
	overflow: scroll;
}

.report-config {
	width: 380px;
	background: var(--grey);
	border-radius: 22px;
	padding: 24px;
	overflow-y: auto;
}

.report-config h3 {
	color: var(--dark);
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 18px;
	font-family: poppins;
}

.report-period-options,
.report-options {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.report-period-options label,
.report-options label {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--dark);
	font-size: 15px;
	font-weight: 500;
	font-family: poppins;
}

.custom-date-range {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 18px;
	margin-bottom: 28px;
}

.custom-date-range input {
	width: 100%;
	height: 50px;
	padding: 0 16px;
	border-radius: 14px;
	border: 1px solid transparent;
	background: var(--light);
	color: var(--dark);
	font-family: poppins;
	transition: .2s;
}

.custom-date-range input:focus {
	border-color: var(--blue);
	outline: none;
}

.report-preview {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.report-preview h3 {
	color: var(--dark);
	font-size: 20px;
	font-family: poppins;
	margin-bottom: 18px;
}

.preview-card {
	background: var(--grey);
	border-radius: 22px;
	padding: 28px;
	height: 100%;
}

.preview-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 0;
	border-bottom: 1px solid rgba(0,0,0,.08);
}

.preview-item:last-child {
	border-bottom: none;
}

.preview-item span {
	color: var(--dark-grey);
	font-size: 15px;
	font-family: poppins;
}

.preview-item strong {
	color: var(--dark);
	font-size: 18px;
	font-weight: 700;
}

.preview-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 0;
	border-bottom: 1px solid rgba(0,0,0,.08);
}

.preview-item:last-child {
	border-bottom: none;
}

.preview-item span {
	color: var(--dark-grey);
	font-size: 15px;
	font-family: poppins;
}

.preview-item strong {
	color: var(--dark);
	font-size: 18px;
	font-weight: 700;
}

.report-cancel,
.report-generate {
	height: 52px;
	padding: 0 28px;
	border-radius: 14px;
	font-family: poppins;
	font-size: 15px;
	font-weight: 600;
	transition: .2s;
}

.report-cancel {
	background: var(--grey);
	color: var(--dark);
}

.report-cancel:hover {
	transform: translateY(-2px);
}

.report-generate {
	background: linear-gradient(
        135deg,
        #22c55e,
        #16a34a
    );
	color: white;
}

.report-generate:hover {
	transform: translateY(-2px);
	box-shadow:
        0 10px 25px rgba(34,197,94,.35);
}