@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --institutional: #0D1B2A;
  --secondary: #1B263B;
  --primary: #10B981;
  --success: #34D399;
  --light: #F1F5F9;
  --muted: #94A3B8;
  --line: rgba(241, 245, 249, 0.14);
  --danger: #F87171;
  --warning: #FBBF24;
  --surface: rgba(27, 38, 59, 0.92);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  --page-x: clamp(18px, 2.8vw, 44px);
  --page-y: clamp(22px, 3vw, 44px);
  --section-gap: clamp(18px, 2vw, 28px);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: var(--institutional);
  color: var(--light);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3, strong, th, button, .button, .eyebrow, label, summary {
  font-weight: 700;
}

p, td, input, select, textarea, small, .muted {
  font-weight: 400;
}

.menu-text, .summary-line, .dropdown-item, .last-login {
  font-weight: 600;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 276px;
  padding: 24px 18px;
  background: #08111f;
  border-right: 1px solid var(--line);
  transition: width .2s ease, padding .2s ease;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(16, 185, 129, .08);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .16);
  overflow: hidden;
}
.brand img {
  width: 88px;
  max-height: 74px;
  height: auto;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 0 14px rgba(52, 211, 153, .48));
}
.brand strong, .brand small { display: block; text-shadow: 0 1px 12px rgba(0,0,0,.65); }
.brand small { color: var(--muted); }
nav { display: grid; gap: 8px; }
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  color: var(--light);
  text-decoration: none;
}
nav a.active, nav a:hover { background: rgba(16, 185, 129, 0.16); color: var(--success); }
.menu-icon {
  display: inline-grid;
  width: 26px;
  min-width: 26px;
  height: 26px;
  place-items: center;
  font-size: 1.1rem;
}
.main {
  margin-left: 276px;
  padding: var(--page-y) var(--page-x) 48px;
  min-width: 0;
  transition: margin-left .2s ease;
}
body.nav-collapsed .sidebar {
  width: 86px;
  padding-inline: 14px;
}
body.nav-collapsed .main { margin-left: 86px; }
body.nav-collapsed .brand {
  justify-content: center;
}
body.nav-collapsed .brand img { width: 52px; }
body.nav-collapsed .brand div,
body.nav-collapsed .menu-text {
  display: none;
}
body.nav-collapsed nav a {
  justify-content: center;
  padding-inline: 10px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--section-gap);
  margin-bottom: var(--section-gap);
}
.page-title { flex: 1; min-width: 220px; }
.eyebrow {
  margin: 0 0 4px;
  color: var(--success);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.65rem, 2.2vw, 2.05rem); }
h2, h3 { overflow-wrap: anywhere; }
.month-form {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr) 42px auto;
  align-items: end;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 38, 59, .72);
}
.month-form label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-weight: 700; }
.month-form label span { font-size: .72rem; text-transform: uppercase; }
.month-form input { min-width: 0; height: 42px; }
.month-step {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(241,245,249,.08);
  color: var(--light);
  font-size: 1.8rem;
  line-height: 1;
  text-decoration: none;
}
.month-step:hover { background: rgba(16,185,129,.18); color: var(--success); }
.logout, button, .button {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #062017;
  padding: 10px 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.logout { background: var(--secondary); color: var(--light); }
.button.secondary, button.secondary { background: rgba(241,245,249,.1); color: var(--light); }
.nav-toggle {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  background: rgba(241,245,249,.1);
  color: var(--light);
}
.danger-button { background: rgba(248, 113, 113, .16); color: #fecaca; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #0F1F33;
  color: var(--light);
}
input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--primary);
  padding: 0;
}
input::placeholder { color: #64748B; }
label { color: var(--muted); font-weight: 800; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--section-gap); margin-bottom: var(--section-gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.panel, .metric, .card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel { padding: clamp(18px, 2vw, 22px); margin-bottom: var(--section-gap); overflow-x: auto; }
.metric { min-height: 142px; padding: 18px; }
.metric summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
}
.metric summary::-webkit-details-marker { display: none; }
.metric span, .muted { color: var(--muted); }
.metric strong { display: block; margin-top: 12px; font-size: 1.55rem; }
.green { color: var(--primary); }
.red { color: var(--danger); }
.blue { color: #93C5FD; }
.gold { color: var(--warning); }
.success { color: var(--success); }
.dropdown-list { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.dropdown-item { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.alert {
  padding: 14px;
  border-radius: 8px;
  border-left: 5px solid #93C5FD;
  background: rgba(147, 197, 253, .08);
}
.alert.danger { border-color: var(--danger); background: rgba(248,113,113,.12); }
.alert.warning { border-color: var(--warning); background: rgba(251,191,36,.11); }
.alert.ok { border-color: var(--primary); background: rgba(16,185,129,.12); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  align-items: start;
  gap: 14px;
}
.form-grid label { display: grid; gap: 6px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid > button,
.settings-form > button {
  width: auto;
  min-width: 190px;
  min-height: 46px;
  height: auto;
  align-self: end;
  justify-self: start;
  padding-inline: 22px;
}
.hidden { display: none !important; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.icon-link, .icon-button {
  display: inline-grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  border-radius: 8px;
  border: 0;
  background: rgba(16, 185, 129, .12);
  color: var(--success);
  font-size: 1.2rem;
  text-decoration: none;
  padding: 0;
  line-height: 1;
  cursor: pointer;
}
.icon-link:hover, .icon-button:hover { background: rgba(16, 185, 129, .22); }
.danger-icon {
  background: rgba(248, 113, 113, .14);
  color: #fecaca;
}
.danger-icon:hover { background: rgba(248, 113, 113, .24); }
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-actions form,
.goal-actions form {
  margin: 0;
}
.bar-list { display: grid; gap: 12px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, .8fr) max-content;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.bar-row span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-row strong {
  min-width: 92px;
  text-align: right;
  font-size: .95rem;
}
.bar-track, .progress-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(241,245,249,.16);
}
.bar-fill { height: 100%; background: #93C5FD; }
.bar-fill.income, .bar-fill.expense { background: var(--primary); }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--success)); }
.goal-card header, .panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.goal-card h2 { margin-bottom: 12px; }
.goal-actions {
  display: flex;
  align-items: center;
  justify-items: end;
  gap: 10px;
}
.compact-button {
  min-height: 34px;
  min-width: auto;
  width: max-content;
  padding: 7px 10px;
  font-size: .86rem;
}
.goal-meta { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); }
.projection {
  display: grid;
  grid-template-columns: minmax(130px, 170px) 1fr;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  min-height: 230px;
}
.projection-ring {
  display: grid;
  width: 156px;
  height: 156px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0deg, rgba(241,245,249,.16) 0deg);
}
.projection-ring span {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border-radius: 50%;
  background: var(--secondary);
  font-size: 1.45rem;
  font-weight: 900;
}
.login-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(16px, 4vw, 28px);
  background:
    radial-gradient(circle at 50% 0, rgba(16,185,129,.18) 0, transparent 34%),
    linear-gradient(145deg, #050b13 0, var(--institutional) 44%, #08111f 100%);
}
.login-card {
  width: min(520px, calc(100vw - 32px));
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 27, 42, .94);
  box-shadow: var(--shadow);
  text-align: left;
}
.register-card { width: min(900px, calc(100vw - 32px)); }
.login-logo-frame {
  display: grid;
  place-items: center;
  min-height: 190px;
  margin: -6px -6px 22px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(52, 211, 153, .24), transparent 44%),
    rgba(8, 17, 31, .86);
  border: 1px solid rgba(52, 211, 153, .22);
  overflow: hidden;
}
.login-logo-frame.compact { min-height: 130px; }
.login-logo {
  display: block;
  width: min(300px, 82%);
  max-height: 170px;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 0 22px rgba(52, 211, 153, .58));
}
.login-title { text-align: center; }
.login-card form { display: grid; gap: 14px; }
.login-card .form-grid { display: grid; }
.login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.login-actions .button { text-align: center; }
.error { color: var(--danger); font-weight: 800; }
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 10px;
}
.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(241,245,249,.05);
}
.permission-grid input { width: auto; min-height: auto; }
.profile-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.profile-grid { align-items: start; }
.profile-panel, .profile-email-card { min-height: auto; overflow: hidden; }
.avatar-large {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(52,211,153,.48);
  background: #08111f;
}
.avatar-placeholder {
  display: grid;
  place-items: center;
  color: var(--success);
  font-size: 2.3rem;
  font-weight: 900;
}
.profile-panel form { margin-top: 12px; }
.inline-form {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.inline-form label {
  display: grid;
  gap: 6px;
  flex: 1 1 240px;
  min-width: 0;
}
.inline-form input[type="file"] {
  max-width: 360px;
  min-height: 42px;
  padding: 7px;
}
.inline-form button { min-width: 170px; }
.settings-form .span-3 { grid-column: 1 / -1; margin-top: 12px; }
.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}
.check-row input {
  flex: 0 0 auto;
}

@media (min-width: 1800px) {
  .main {
    padding-inline: clamp(40px, 5vw, 92px);
  }

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

@media (max-width: 1180px) {
  .main {
    padding: var(--page-y) var(--page-x) 42px;
  }

  .metric {
    min-height: 128px;
  }

  .projection {
    grid-template-columns: 140px 1fr;
  }

  .projection-ring {
    width: 132px;
    height: 132px;
  }

  .projection-ring span {
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 900px) {
  :root {
    --page-x: clamp(18px, 5vw, 30px);
    --page-y: clamp(20px, 5vw, 30px);
  }

  .sidebar {
    z-index: 60;
    width: min(84vw, 310px);
    transform: translateX(-100%);
    box-shadow: 24px 0 60px rgba(0, 0, 0, .36);
    transition: transform .22s ease;
  }

  .main,
  body.nav-collapsed .main {
    margin-left: 0;
    padding: var(--page-y) var(--page-x) 42px;
  }

  body.nav-collapsed .sidebar {
    width: min(84vw, 310px);
    padding: 24px 18px;
    transform: translateX(0);
  }

  body.nav-collapsed .brand {
    justify-content: flex-start;
  }

  body.nav-collapsed .brand img {
    width: 88px;
  }

  body.nav-collapsed .brand div,
  body.nav-collapsed .menu-text {
    display: block;
  }

  body.nav-collapsed nav a {
    justify-content: flex-start;
    padding-inline: 12px;
  }

  .nav-toggle {
    position: sticky;
    top: 12px;
    z-index: 45;
  }

  .topbar {
    align-items: flex-start;
  }

  .page-title {
    flex-basis: calc(100% - 120px);
  }

  .month-form {
    width: 100%;
  }

  body.view-cards .responsive-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  body.view-cards .responsive-table thead {
    display: none;
  }

  body.view-cards .responsive-table,
  body.view-cards .responsive-table tbody,
  body.view-cards .responsive-table tr,
  body.view-cards .responsive-table td {
    display: block;
    width: 100%;
  }

  body.view-cards .responsive-table tr {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15, 31, 51, .72);
  }

  body.view-cards .responsive-table tr + tr {
    margin-top: 12px;
  }

  body.view-cards .responsive-table td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(241,245,249,.08);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.view-cards .responsive-table td:last-child {
    border-bottom: 0;
  }

  body.view-cards .responsive-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  body.view-cards .responsive-table td[data-label="Ações"],
body.view-cards .responsive-table td[data-label="Ação"] {
  justify-content: flex-start;
  padding-top: 0;
}
body.view-cards .responsive-table td[data-label="Ações"]::before,
body.view-cards .responsive-table td[data-label="Ações"],
body.view-cards .responsive-table td[data-label="Ação"] {
  justify-content: flex-start;
  padding-top: 0;
}
body.view-cards .responsive-table td[data-label="Ações"]::before,
body.view-cards .responsive-table td[data-label="Ação"]::before {
  display: none;
}

}

@media (max-width: 720px) {
  .settings-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-tab {
    width: 100%;
    text-align: left;
  }

  .summary-line {
    font-size: .88rem;
  }
  .summary-line strong {
    font-size: .92rem;
  }
  .category-admin-row {
    align-items: flex-start;
  }
}

/* Layout corrections */
.form-grid > button,
.settings-form > button {
  width: auto;
  min-width: 190px;
  max-width: 100%;
  min-height: 46px;
  height: auto;
  align-self: end;
  justify-self: start;
}

.login-card .form-grid > button,
.month-form button,
.inline-form button {
  width: 100%;
}

.responsive-table td[data-label="Acessos"] {
  white-space: normal;
  min-width: 260px;
}

.access-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 520px;
}

.access-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--light);
  background: rgba(241, 245, 249, .08);
  font-size: .78rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .form-grid > button,
  .settings-form > button {
    width: 100%;
    justify-self: stretch;
  }

  .bar-row {
    grid-template-columns: minmax(0, 1fr) minmax(72px, .7fr) max-content;
    gap: 8px;
  }

  .bar-row strong {
    min-width: 82px;
    font-size: .86rem;
  }
}
/* Final dashboard, forms and settings corrections */
.finance-metric {
  min-height: 240px;
}

.finance-metric summary {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.finance-metric summary strong {
  margin-top: 0;
  font-size: clamp(1.35rem, 1.9vw, 1.8rem);
  text-align: right;
}

.summary-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.summary-row {
  display: grid;
  gap: 6px;
}

.summary-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}

.summary-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-line strong {
  margin: 0;
  color: var(--light);
  font-size: .98rem;
  white-space: nowrap;
}

.summary-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(241, 245, 249, .16);
}

.summary-fill {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.summary-fill.income-fill {
  background: linear-gradient(90deg, var(--primary), var(--success));
}

.summary-fill.expense-fill {
  background: linear-gradient(90deg, #fb7185, var(--danger));
}

.balance-breakdown .dropdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.balance-breakdown .dropdown-item strong {
  margin: 0;
  font-size: 1rem;
}

.settings-tabs {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  margin-bottom: var(--section-gap);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 38, 59, .58);
}

.settings-tabs .settings-tab {
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 16px !important;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted) !important;
  background: transparent !important;
  font-weight: 700;
}

.settings-tabs .settings-tab.active,
.settings-tabs .settings-tab:hover,
.settings-tabs .settings-tab:focus {
  color: var(--success) !important;
  background: rgba(16, 185, 129, .16) !important;
}

.settings-panel {
  overflow-x: visible;
}

.form-grid > button,
.settings-form > button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  align-self: end;
  justify-self: stretch;
  padding: 8px 14px;
}

.month-form button,
.login-card .form-grid > button,
.inline-form button {
  min-height: 42px;
  height: 42px;
}

@media (max-width: 720px) {
  .settings-tabs {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .settings-tabs .settings-tab {
    width: 100% !important;
  }

  .finance-metric {
    min-height: auto;
  }
}
/* Final planning alignment */
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 4px;
}

.form-actions button {
  width: auto;
  min-width: 240px;
  height: 44px;
}

.plan-actions {
  padding-top: 2px;
}

@media (max-width: 720px) {
  .form-actions {
    justify-content: stretch;
  }

  .form-actions button {
    width: 100%;
    min-width: 0;
  }
}
/* Final dashboard progress bars - high specificity */
.metric.finance-metric .summary-list {
  display: grid !important;
  gap: 16px !important;
  margin-top: 16px !important;
}

.metric.finance-metric .summary-row {
  display: grid !important;
  gap: 7px !important;
}

.metric.finance-metric .summary-line {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 12px !important;
  color: var(--muted) !important;
  font-size: .9rem !important;
  line-height: 1.25 !important;
}

.metric.finance-metric .summary-line span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.metric.finance-metric .summary-line .summary-value {
  display: inline-block !important;
  margin: 0 !important;
  color: var(--light) !important;
  font-size: .98rem !important;
  line-height: 1.2 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

.metric.finance-metric .summary-track {
  display: block !important;
  width: 100% !important;
  height: 9px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: rgba(241, 245, 249, .18) !important;
}

.metric.finance-metric .summary-fill {
  display: block !important;
  height: 100% !important;
  min-width: 5px !important;
  border-radius: inherit !important;
}

.metric.finance-metric .summary-fill.income-fill {
  background: linear-gradient(90deg, var(--primary), var(--success)) !important;
}

.metric.finance-metric .summary-fill.expense-fill {
  background: linear-gradient(90deg, #fb7185, var(--danger)) !important;
}

/* Vecta final UX corrections */
body.nav-collapsed .sidebar {
  overflow: hidden;
  z-index: 55;
}

body.nav-collapsed .sidebar:hover {
  width: 276px;
  padding-inline: 18px;
  overflow: visible;
  box-shadow: 24px 0 70px rgba(0, 0, 0, .38);
}

body.nav-collapsed .sidebar:hover .brand {
  justify-content: flex-start;
}

body.nav-collapsed .sidebar:hover .brand img {
  width: 88px;
}

body.nav-collapsed .sidebar:hover .brand div,
body.nav-collapsed .sidebar:hover .menu-text {
  display: block;
}

body.nav-collapsed .sidebar:hover nav a {
  justify-content: flex-start;
  padding-inline: 12px;
}

.dashboard-grid {
  align-items: stretch;
}

.dashboard-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 258px;
  overflow: hidden;
}

.dashboard-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dashboard-card-header span {
  max-width: 48%;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.22;
}

.dashboard-card-header strong {
  margin: 0 !important;
  font-size: clamp(1.35rem, 1.55vw, 1.75rem) !important;
  line-height: 1.12;
  text-align: right;
}

.finance-card .summary-list,
.goals-card .dropdown-list {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.finance-card .summary-row {
  display: grid;
  gap: 7px;
}

.finance-card .summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.25;
}

.finance-card .summary-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-card .summary-value {
  margin: 0 !important;
  color: var(--light);
  font-size: .98rem !important;
  line-height: 1.2;
  white-space: nowrap;
}

.finance-card .summary-track {
  display: block;
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(241, 245, 249, .16);
}

.finance-card .summary-fill {
  display: block;
  height: 100%;
  min-width: 5px;
  border-radius: inherit;
}

.finance-card .income-fill {
  background: linear-gradient(90deg, var(--primary), var(--success));
}

.finance-card .expense-fill {
  background: linear-gradient(90deg, #fb7185, var(--danger));
}

.balance-card .dashboard-card-header span {
  max-width: 42%;
}

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

.balance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(241, 245, 249, .08);
}

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

.balance-row span {
  color: var(--muted);
  font-weight: 700;
}

.balance-row strong {
  margin: 0 !important;
  font-size: 1.02rem !important;
  text-align: right;
  white-space: nowrap;
}

.balance-row small {
  grid-column: 1 / -1;
  color: rgba(148, 163, 184, .9);
}

.balance-row-main {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.commitment-panel .panel-header {
  align-items: center;
}

.commit-track {
  display: flex !important;
  width: 100% !important;
  height: 18px !important;
  overflow: hidden !important;
  margin: 18px 0 14px !important;
  border-radius: 999px !important;
  background: rgba(241, 245, 249, .14) !important;
  box-shadow: inset 0 0 0 1px rgba(241, 245, 249, .08);
}

.commit-segment {
  display: block !important;
  height: 100% !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
}

.commit-expense {
  background: linear-gradient(90deg, #fb7185, var(--danger)) !important;
}

.commit-goals {
  background: linear-gradient(90deg, var(--primary), var(--success)) !important;
}

.commit-free {
  background: rgba(241, 245, 249, .22) !important;
}

.commit-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--light);
  font-size: .92rem;
}

.commit-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.expense-dot { background: var(--danger); }
.goals-dot { background: var(--success); }
.free-dot { background: rgba(241, 245, 249, .35); }

.planning-panel {
  overflow: visible;
}

.planning-form {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  align-items: end;
}

.planning-form label {
  min-width: 0;
}

.planning-form .plan-insights {
  grid-column: 1 / -1;
}

.plan-insights {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.plan-balloon {
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 5px solid var(--muted);
  background: rgba(241, 245, 249, .07);
  color: var(--light);
  line-height: 1.35;
}

.plan-balloon.ok {
  border-color: var(--primary);
  background: rgba(16, 185, 129, .12);
}

.plan-balloon.warning {
  border-color: var(--warning);
  background: rgba(251, 191, 36, .12);
}

.plan-balloon.danger {
  border-color: var(--danger);
  background: rgba(248, 113, 113, .13);
}

.plan-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
}

.plan-actions button {
  width: min(100%, 260px);
  min-width: 220px;
  height: 46px;
}

input[type="date"],
input[type="month"] {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  width: 22px;
  height: 22px;
  padding: 5px;
  border-radius: 7px;
  background-color: rgba(16, 185, 129, .2);
  filter: invert(70%) sepia(36%) saturate(895%) hue-rotate(112deg) brightness(93%) contrast(89%);
  opacity: 1;
  cursor: pointer;
}

.goal-card header {
  align-items: flex-start;
}

.goal-actions {
  min-width: 76px;
  justify-content: flex-end;
}

.goal-actions strong {
  line-height: 1;
}

.goal-delete,
.goal-card .danger-icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  font-size: 1.05rem;
  border-radius: 10px;
}

@media (max-width: 1320px) {
  .planning-form {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-card {
    min-height: auto;
  }

  .dashboard-card-header span,
  .balance-card .dashboard-card-header span {
    max-width: 52%;
  }

  .planning-form {
    grid-template-columns: 1fr;
  }

  .plan-actions {
    justify-content: stretch;
  }

  .plan-actions button {
    width: 100%;
    min-width: 0;
  }
}
