:root {
  --bg: #0b0b0c;
  --bg-2: rgba(255,255,255,0.03);
  --card: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);

  --text: #f5f5f5;
  --muted: #a1a1aa;

  --accent: #f59e0b;
  --danger: #ef4444;
  --warn: #fb923c;
  --ok: #22c55e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top, #111 0%, #050505 100%);
  color: var(--text);
}

/* LAYOUT */
.app {
  display: flex;
  height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 230px;
  backdrop-filter: blur(20px);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, padding 0.25s ease;
  overflow: hidden;
}

/* ── Sidebar collapse button ─────────────────────────── */
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.sidebar-collapse-btn:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
}
.sidebar-collapse-btn i,
.sidebar-collapse-btn svg { width: 15px; height: 15px; transition: transform 0.25s ease; overflow: visible; display: block; }

.sidebar.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }

/* ── Sidebar header layout ───────────────────────────── */
.sidebar-header {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

/* ── Sidebar collapsed (desktop only) ───────────────── */
.sidebar.collapsed {
  width: 72px;
  padding: 20px 12px;
}

.sidebar.collapsed .sidebar-header {
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
}

.sidebar.collapsed .logo-container {
  flex: none;
  justify-content: center;
}

.sidebar.collapsed .sidebar-collapse-btn {
  margin-left: 0;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-shortcut {
  display: none;
}

.sidebar.collapsed .nav-btn {
  justify-content: center;
  gap: 0;
  padding: 10px 0;
}

.sidebar.collapsed .sidebar-footer {
  align-items: center;
}

.logo-icon {
  flex-shrink: 0;
  border-radius: 11px;
  transition: box-shadow 0.3s ease;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(245,158,11,0.25));
  transition: all 0.3s ease;
}

.logo-container:hover .logo-img {
  filter: drop-shadow(0 0 15px rgba(245,158,11,0.5));
  transform: scale(1.1) rotate(-5deg);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.logo-brand {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1;
}

.logo-tagline {
  display: block;
  font-size: 10px;
  color: var(--muted);
  opacity: 0.6;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}

.nav-icon {
  font-size: 18px;
  min-width: 20px;
}

.nav-icon i, .input-group label i {
  width: 18px;
  height: 18px;
}

.nav-label {
  flex: 1;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border-left-color: rgba(255,255,255,0.25);
}

.nav-btn.active {
  background: var(--accent);
  color: #000;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  font-weight: 600;
}

.nav-shortcut {
  font-size: 10px;
  font-family: 'Inter', monospace;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--muted);
  opacity: 0.7;
  line-height: 1.4;
  pointer-events: none;
}

.nav-btn.active .nav-shortcut {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.55);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.sidebar-footer .nav-btn {
  background: rgba(255, 255, 255, 0.02);
  opacity: 0.7;
  font-size: 13px;
  margin-top: 5px;
}

.sidebar-footer .nav-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

/* CONTENT */
.content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

/* DASHBOARD HEADER */
.dashboard-header {
  margin-bottom: 30px;
}

.dashboard-header h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.dashboard-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

#mesAtualText {
  font-size: 13px;
}

/* INPUT GROUPS */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 15px;
}

.input-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.input-helper {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
  margin-top: 4px;
}

.input-row {
  display: flex;
  gap: 30px;
}

/* BUTTON GROUPS */
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.button-group button {
  flex: 1;
}

.btn-primary {
  background: var(--accent) !important;
  color: #000 !important;
  font-weight: 500;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-danger {
  background: var(--danger) !important;
  color: white !important;
  font-weight: 500;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-export-pdf {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: var(--accent);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.btn-export-pdf:hover {
  background: rgba(245, 158, 11, 0.07);
  border-color: rgba(245, 158, 11, 0.42);
}

.btn-export-pdf:active {
  opacity: 0.75;
}

.btn-backup-group {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-backup {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-backup:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.13);
  color: var(--text);
}

.btn-backup:active {
  opacity: 0.7;
}

/* DASHBOARD SETUP */
.dashboard-setup {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 25px;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

/* CARD */
.card {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
}

/* INPUT */
input, select {
  box-sizing: border-box;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

/* BUTTON */
button {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  cursor: pointer;
  transition: 0.2s;
}

button:active {
  transform: scale(0.97);
}

/* STATUS */
.resumo-geral {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.stat-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--warn));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.stat-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
}

.categoria-status {
  margin-top: 0;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.categoria-status:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

#categoriasStatus {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.categorias-container {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

#categoriasStatus .categoria-status:first-child {
  margin-top: 0;
  padding-top: 0;
}

.barra {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  margin-top: 6px;
  overflow: hidden;
}

.barra-fill {
  height: 100%;
  border-radius: 999px;
  transition: all 0.4s ease;
}

/* RADIAL */
.resumo {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
}

.sub {
  color: var(--muted);
  font-size: 14px;
}

#grafico {
  max-width: 100%;
  max-height: 100%;
  margin-top: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.dashboard-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.chart-container {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.chart-container h3 {
  position: absolute;
  top: 20px;
  left: 20px;
  margin: 0;
  font-size: 16px;
}

.chart-container canvas {
  max-width: 100% !important;
  max-height: 100% !important;
}

.grafico-legenda-custom {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  padding: 18px 4px 0;
  max-height: 90px;
  overflow-y: auto;
}

.grafico-legenda-custom::-webkit-scrollbar {
  height: 4px;
  width: 4px;
}

.grafico-legenda-custom::-webkit-scrollbar-track {
  background: transparent;
}

.grafico-legenda-custom::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.grafico-legenda-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}

.grafico-legenda-cor {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* LANÇAMENTOS */
.lancamento-form {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 25px;
}

.lancamentos-section {
  margin-top: 25px;
}

.lancamentos-section h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
}

.lista-lancamentos {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lancamento-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.04);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

.lancamento-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

.lancamento-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.lancamento-descricao {
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.lancamento-categoria {
  font-size: 12px;
  color: var(--muted);
}

.lancamento-valor {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  margin-left: auto;
  margin-right: 15px;
}

.lancamento-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04) !important;
  color: var(--muted) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  padding: 8px !important;
  font-size: 12px !important;
  margin: 0 !important;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
}

.lancamento-delete:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: var(--danger) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.lista-categorias {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* CATEGORIAS EDITOR */
.categorias-editor {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.editor-header {
  margin-bottom: 10px;
}

.editor-header h4 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.editor-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.categoria-editor-item {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  transition: all 0.25s ease;
}

.categoria-editor-item:hover {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
}

.categoria-editor-header {
  margin-bottom: 16px;
}

.categoria-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.categoria-nome {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.categoria-subtitulo {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.categoria-editor-controls {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 10px;
}

.slider-container {
  flex: 0 1 60%;
  min-width: 150px;
}

.percentual-slider {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.percentual-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.percentual-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
}

.percentual-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.percentual-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
}

.input-output {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}

.percentual-input {
  width: 60px !important;
  margin-top: 0 !important;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  padding: 8px !important;
}

.percentual-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.slider-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.slider-label {
  font-weight: 600;
  color: var(--accent);
  font-size: 13px;
  min-width: 40px;
  display: inline-block;
}

.editor-footer {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.total-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}

.total-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.total-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.total-warning {
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: var(--warn);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.total-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--ok);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.btn-salvar-percentuais {
  background: var(--accent) !important;
  color: #000 !important;
  font-weight: 600 !important;
  padding: 12px !important;
  margin-top: 0 !important;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-salvar-percentuais:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-salvar-percentuais:active {
  transform: translateY(0);
}

/* CATEGORIAS MANAGER */
.categorias-manager {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.nova-categoria-form {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.nova-categoria-form h4 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.form-nova-cat {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

.cat-input-nome {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  min-width: 0;
}

.cat-input-nome::placeholder {
  color: var(--muted);
}

.cat-input-nome:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.cat-input-cor {
  width: 50px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-adicionar-cat {
  background: var(--accent) !important;
  color: #000 !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  margin-top: 0 !important;
  white-space: nowrap;
  flex-shrink: 0;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.btn-adicionar-cat:hover {
  opacity: 0.9;
}

.categorias-lista-editor {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.categorias-lista-editor h4 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.categorias-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.categoria-item-editor {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.categoria-item-editor:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
}

.categoria-item-editor.empty-state {
  text-align: center;
  padding: 30px 20px;
}

.categoria-item-color {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.categoria-item-color:hover {
  transform: scale(1.1);
  border-color: rgba(255,255,255,0.3);
}

.categoria-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.categoria-item-nome {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.categoria-item-info {
  font-size: 12px;
  color: var(--muted);
}

.categoria-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-editar-cat {
  background: var(--accent) !important;
  color: #000 !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  margin-top: 0 !important;
  border-radius: 8px;
}

.btn-deletar-cat {
  background: var(--danger) !important;
  color: white !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  margin-top: 0 !important;
  border-radius: 8px;
}

.btn-editar-cat:hover,
.btn-deletar-cat:hover {
  opacity: 0.85;
}

/* PERCENTUAIS CATEGORIAS */
.categorias-percentuais {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.percentuais-header {
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.categoria-percentual-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.categoria-percentual-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.categoria-percentual-nome {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.categoria-percentual-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.percentual-slider {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.percentual-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.percentual-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
}

.percentual-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.percentual-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
}

.percentual-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}

.percentual-input {
  width: 50px !important;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  padding: 6px !important;
  margin-top: 0 !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: var(--text) !important;
}

.percentual-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  min-width: 20px;
}

.percentuais-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  margin-top: 16px;
}

.total-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.total-percentual {
  font-weight: 700;
  font-size: 16px;
}

.total-warning {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.total-success {
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-salvar-percentuais {
  background: var(--accent) !important;
  color: #000 !important;
  font-weight: 600 !important;
  padding: 12px !important;
  margin-top: 0 !important;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-salvar-percentuais:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-salvar-percentuais:active {
  transform: translateY(0);
}

.categorias-existentes {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.categorias-existentes h5 {
  margin: 0 0 15px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* NOTIFICATION */
.notification-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15,15,17,0.96);
  color: #f5f5f5;
  padding: 13px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid var(--accent);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: all 0.28s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 320px;
  z-index: 9998;
  pointer-events: none;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.notification-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.toast-success { border-left-color: var(--ok); }
.toast-error   { border-left-color: var(--danger); }
.toast-warn    { border-left-color: var(--warn); }
.toast-info    { border-left-color: var(--accent); }

/* CONFIRM MODAL */
.confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 9997;
  justify-content: center;
  align-items: center;
}

.confirm-modal.show {
  display: flex;
}

.confirm-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.confirm-container p {
  margin: 0;
  font-size: 16px;
  color: var(--text);
  line-height: 1.5;
}

.confirm-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.confirm-container button {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.confirm-container button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.confirm-container button:active {
  transform: translateY(0);
}

#confirmYes {
  background: var(--accent);
  color: black;
}

#confirmNo {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

#editarCategoriaTitulo {
  margin: 0 0 15px;
  font-size: 16px;
  color: var(--text);
}

#editarCategoriaInput {
  margin-bottom: 15px;
}

#editarCategoriaConfirm {
  background: var(--accent);
  color: black;
}

#editarCategoriaCancel {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

/* SCREEN */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #050505;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 28px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
}
.loading-overlay.show { opacity: 1; pointer-events: auto; }

.loading-logo {
  width: 72px; height: 72px; border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(245,158,11,0.25), 0 0 50px rgba(245,158,11,0.25);
  animation: loaderPulse 1.6s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(245,158,11,0.25), 0 0 30px rgba(245,158,11,0.15); }
  50%       { box-shadow: 0 0 0 1px rgba(245,158,11,0.45), 0 0 60px rgba(245,158,11,0.35); }
}
.loading-name { font-size: 18px; font-weight: 600; letter-spacing: -0.4px; color: var(--text); }
.loading-name .accent { color: var(--accent); }
.loading-bar-track {
  width: 140px; height: 2px;
  background: rgba(255,255,255,0.07); border-radius: 999px; overflow: hidden;
}
.loading-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #fcd34d);
  box-shadow: 0 0 8px rgba(245,158,11,0.6);
  animation: loadingShimmer 1.4s ease-in-out infinite;
  width: 40%;
}
@keyframes loadingShimmer {
  0%   { transform: translateX(-250%); }
  100% { transform: translateX(350%); }
}
.loading-hint {
  font-size: 11px; color: var(--muted); letter-spacing: 0.08em;
  text-transform: uppercase; opacity: 0.5;
}

/* Animações */
@keyframes spinRing {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.05);
  }
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@keyframes dotAnimation {
  0% {
    content: '';
  }
  25% {
    content: '.';
  }
  50% {
    content: '..';
  }
  75% {
    content: '...';
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SCREEN */
.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: screenFadeIn 0.22s ease forwards;
}

@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Aviso de excesso (modal centralizado) ────────────────── */
.aviso-excesso-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.aviso-excesso-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.aviso-excesso-card {
  background: rgba(18,18,20,0.97);
  border: 1px solid rgba(251,146,60,0.45);
  border-radius: 22px;
  padding: 36px 32px 28px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(251,146,60,0.12), 0 24px 80px rgba(0,0,0,0.6), 0 0 60px rgba(251,146,60,0.15);
  transform: scale(0.7) translateY(24px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
}

.aviso-excesso-overlay.show .aviso-excesso-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.aviso-excesso-icone {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(251,146,60,0.14);
  border: 1px solid rgba(251,146,60,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--warn);
}
.aviso-excesso-icone i, .aviso-excesso-icone svg { width: 28px; height: 28px; }

.aviso-excesso-titulo {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--warn);
  letter-spacing: -0.3px;
}

.aviso-excesso-msg {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.aviso-excesso-btn {
  width: 100%;
  padding: 13px !important;
  margin: 0 !important;
  background: var(--warn) !important;
  color: #000 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  border-radius: 12px !important;
  transition: opacity 0.2s, transform 0.2s !important;
}
.aviso-excesso-btn:hover { opacity: 0.88 !important; transform: translateY(-1px) !important; }
.aviso-excesso-btn:active { transform: translateY(0) !important; }

/* ── Category hint bounce ─────────────────────────────────── */
@keyframes catHintPular {
  0%   { transform: translateY(0)   scale(1);    }
  20%  { transform: translateY(-10px) scale(1.12); }
  45%  { transform: translateY(4px)  scale(0.97); }
  65%  { transform: translateY(-5px) scale(1.05); }
  82%  { transform: translateY(2px)  scale(0.99); }
  100% { transform: translateY(0)   scale(1);    }
}
.cat-hint-pular {
  animation: catHintPular 0.62s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ── Category hint ─────────────────────────────────────────── */
.cat-hint {
  font-size: 12px;
  font-weight: 500;
  margin-top: 6px;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.25s;
}
.cat-hint i, .cat-hint svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Transaction item improvements ────────────────────────── */
.lancamento-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0 12px;
}

.lancamento-cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lancamento-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lancamento-date {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  margin-top: 1px;
}

.lancamento-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lancamento-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04) !important;
  color: var(--muted) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  padding: 8px !important;
  font-size: 12px !important;
  margin: 0 !important;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
}

.lancamento-edit:hover {
  background: rgba(245,158,11,0.12) !important;
  color: var(--accent) !important;
  border-color: rgba(245,158,11,0.25) !important;
}

/* ── Stat card animated value ──────────────────────────────── */
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.3s;
}

.stat-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.3s, background 0.3s, transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Category status bar improvements ─────────────────────── */
.cat-status-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}

.cat-status-name {
  font-weight: 500;
  font-size: 13px;
}

.cat-status-pct-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.cat-status-amounts {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 200px;
  }
}

/* =====================
   CALCULADORAS
   ===================== */

.calc-section {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 25px;
}

.calc-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.calc-section-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.calc-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 10px;
  color: var(--accent);
  flex-shrink: 0;
}

.calc-section-icon i {
  width: 20px;
  height: 20px;
}

.calc-section-icon-warn {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.calc-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.calc-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.calc-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--accent);
}

.calc-card-icon i {
  width: 18px;
  height: 18px;
}

.calc-card-title {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.calc-card-desc {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.calc-result {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  display: none;
}

.calc-result.show {
  display: block;
  animation: fadeSlideIn 0.28s ease forwards;
}

.calc-result.hiding {
  display: block !important;
  animation: fadeSlideOut 0.2s ease forwards;
  pointer-events: none;
}

.calc-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.calc-result-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ok);
  opacity: 0.85;
}

.calc-result-close {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 10px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  line-height: 1;
}

.calc-result-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.28);
}

.calc-result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.calc-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.calc-stat-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.calc-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-table-wrapper {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #111113;
}

.calc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.calc-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111113;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.calc-table th:first-child,
.calc-table td:first-child {
  text-align: left;
}

.calc-table td {
  padding: 6px 10px;
  text-align: right;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-table tr:last-child td {
  border-bottom: none;
}

.calc-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.calc-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.4;
}

.calc-alert i {
  flex-shrink: 0;
  margin-top: 1px;
}

.calc-alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--danger);
}

.calc-alert-ok {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--ok);
}

.calc-conclusion {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================
   EMPTY STATES
   ===================== */

.dashboard-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--card);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 14px;
  text-align: center;
  gap: 10px;
}

.dashboard-empty-icon {
  color: var(--muted);
  opacity: 0.35;
  margin-bottom: 4px;
}

.dashboard-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.dashboard-empty-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  max-width: 280px;
  line-height: 1.5;
}

.lancamentos-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--card);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 12px;
  text-align: center;
  gap: 10px;
}

.lancamentos-empty-icon {
  color: var(--muted);
  opacity: 0.35;
  margin-bottom: 4px;
}

.lancamentos-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.lancamentos-empty-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  max-width: 260px;
  line-height: 1.5;
}

/* =====================
   RODAPÉ DAS PÁGINAS
   ===================== */

.screen-footer {
  text-align: center;
  padding: 36px 0 20px;
  color: var(--muted);
  font-size: 12px;
  opacity: 0.5;
  line-height: 2;
  pointer-events: none;
  user-select: none;
}

.screen-footer p {
  margin: 0;
}

.screen-footer-link {
  color: var(--muted);
  text-decoration: none;
  pointer-events: all;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.screen-footer-link:hover {
  color: var(--accent);
  opacity: 1;
}

/* =====================
   GASTOS FIXOS
   ===================== */

.gf-info-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.gf-info-banner i,
.gf-info-banner svg {
  flex-shrink: 0;
  color: var(--accent);
}

.gf-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  background: rgba(255,255,255,0.02);
}

.gf-total-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.gf-total-valor {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

/* =====================
   MOBILE
   ===================== */

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-header {
  display: none;
}

@media (max-width: 768px) {
  .nav-shortcut {
    display: none;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    z-index: 100;
    backdrop-filter: blur(20px);
  }

  .hamburger-btn {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
  }

  .hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.07);
  }

  input, select {
    font-size: 16px;
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .mobile-logo-brand {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
  }

  .sidebar-collapse-btn {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px !important;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    padding: 16px;
    padding-top: 72px;
  }

  .dashboard-header h2 {
    font-size: 20px;
  }

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

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

  .chart-container {
    height: 380px;
    justify-content: flex-start;
    padding-top: 48px;
  }

  .grafico-legenda-custom {
    max-height: 72px;
    gap: 5px 10px;
  }

  .grafico-legenda-item {
    font-size: 11px;
  }

  .input-row {
    flex-wrap: wrap;
    gap: 0;
  }

  .input-row .input-group {
    min-width: 100%;
  }

  .form-nova-cat {
    flex-wrap: wrap;
  }

  .categoria-editor-controls {
    flex-wrap: wrap;
    gap: 12px;
  }

  .categoria-item-editor {
    flex-wrap: wrap;
    align-items: center;
  }

  .categoria-item-actions {
    flex: 0 0 100%;
    justify-content: flex-end;
    margin-top: 6px;
  }

  .btn-editar-cat,
  .btn-deletar-cat {
    flex: 1;
    justify-content: center;
  }

  .button-group {
    flex-wrap: wrap;
  }

  .calc-section {
    padding: 16px;
  }

  .calc-card {
    padding: 16px;
  }

  .calc-result-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-stat-value {
    font-size: 13px;
  }

  .calc-table {
    font-size: 11px;
  }

  .calc-table th,
  .calc-table td {
    padding: 5px 7px;
  }
}