:root {
  --ink: #17211e;
  --muted: #66716d;
  --line: #e5e9e7;
  --paper: #f6f7f4;
  --white: #fff;
  --green: #17594a;
  --green-2: #287b66;
  --mint: #dff1e9;
  --orange: #e69a57;
  --red: #c95c54;
  --blue: #3d7ca6;
  --shadow: 0 18px 60px rgba(25, 50, 43, 0.12);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3,
.brand {
  font-family: Manrope, sans-serif;
}
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}
.spinner {
  width: 30px;
  height: 30px;
  margin: auto;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    rotate: 360deg;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  font-size: 20px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font: 800 21px Manrope;
}
.public-header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: auto;
  padding: 0 24px;
}
.btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  vertical-align: middle;
  text-align: center;
  border: 0;
  border-radius: 11px;
  padding: 11px 18px;
  font-weight: 700;
}
.btn-primary {
  background: var(--green);
  color: white;
  box-shadow: 0 8px 20px rgba(23, 89, 74, 0.18);
}
.btn-primary:hover {
  background: #104a3d;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
}
.btn-soft {
  background: var(--mint);
  color: var(--green);
}
.btn-danger {
  background: #f9e4e2;
  color: #a33e37;
}
.wide {
  width: 100%;
  padding: 14px;
}
.hero {
  max-width: 1180px;
  margin: auto;
  padding: 80px 24px 120px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 80px;
  min-height: 680px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--green);
}
.hero h1 {
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.055em;
  margin: 20px 0;
}
.hero h1 em {
  font-family: "DM Sans";
  font-weight: 400;
  color: var(--green);
}
.hero-copy > p {
  font-size: 19px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 570px;
}
.hero-copy > .btn {
  margin: 18px 0 30px;
  padding: 15px 22px;
}
.hero-points {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.hero-points span::first-letter {
  color: var(--green);
}
.hero-visual {
  position: relative;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -35px -30px;
  background: #dcebe4;
  border-radius: 50% 45% 55% 48%;
  transform: rotate(-5deg);
}
.mock-card {
  position: relative;
  background: white;
  padding: 28px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}
.mock-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.mock-head span {
  color: var(--muted);
}
.mock-head b {
  font-size: 25px;
}
.mock-progress {
  height: 7px;
  background: #edf0ee;
  border-radius: 8px;
  margin: 18px 0 28px;
}
.mock-progress i {
  display: block;
  width: 68%;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}
.mock-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.mock-row div {
  display: flex;
  flex-direction: column;
}
.mock-row small,
.mock-row div small {
  color: var(--muted);
  margin-top: 3px;
}
.cat-icon,
.summary-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 800;
}
.cat-icon .ui-icon,
.summary-icon .ui-icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.85;
}
.summary-icon .ui-icon {
  width: 20px;
  height: 20px;
}
.orange {
  background: #fff0e3;
  color: #b86825;
}
.green {
  background: var(--mint);
  color: var(--green);
}
.blue {
  background: #e2eef5;
  color: var(--blue);
}
.red {
  background: #f8e5e3;
  color: var(--red);
}
.positive {
  color: var(--green) !important;
}
.pill {
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}
.pill.paid {
  background: var(--mint);
  color: var(--green);
}
.pill.pending {
  background: #fff0e3;
  color: #a65b1d;
}
.how {
  background: var(--white);
  padding: 100px max(24px, calc((100vw - 1180px) / 2));
  text-align: center;
}
.how h2 {
  font-size: 40px;
  margin: 14px 0 50px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: left;
}
.feature {
  border-top: 2px solid var(--green);
  padding: 24px 8px;
}
.feature > span {
  color: var(--green);
  font-weight: 800;
}
.feature h3 {
  margin: 24px 0 10px;
}
.feature p {
  color: var(--muted);
  line-height: 1.65;
}
footer {
  text-align: center;
  padding: 34px;
  color: var(--muted);
  font-size: 13px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 17, 0.55);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
}
.modal {
  position: relative;
  background: white;
  width: min(460px, 100%);
  padding: 34px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin: auto;
}
.modal-large {
  width: min(760px, 100%);
}
.modal h2 {
  margin: 12px 0 8px;
}
.modal > p {
  color: var(--muted);
}
.modal-close {
  position: absolute;
  right: 18px;
  top: 14px;
  background: none;
  border: 0;
  font-size: 28px;
  color: var(--muted);
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 16px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8deda;
  background: white;
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--ink);
  outline: 0;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 89, 74, 0.1);
}
textarea {
  min-height: 85px;
  resize: vertical;
}
.login-modal .brand-mark {
  margin-bottom: 22px;
}
.login-modal .wide {
  margin-top: 24px;
}
.login-modal small {
  display: block;
  color: var(--orange);
  margin-top: 14px;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 245px 1fr;
}
aside {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #133e35;
  color: white;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
}
.brand-light {
  color: white;
  padding: 0 10px;
}
.brand-light .brand-mark {
  background: #f1ba75;
  color: #133e35;
}
.profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 10px;
  margin: 28px 0 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.profile > span,
.user-row > span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.profile div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.profile b {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile small {
  font-size: 10px;
  color: #a7c3bb;
}
.nav-item,
.logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  color: #b9cec8;
  padding: 12px 14px;
  border-radius: 10px;
  margin: 3px 0;
  text-align: left;
}
.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.nav-item span {
  font-size: 18px;
}
.logout {
  margin-top: auto;
}
.workspace {
  min-width: 0;
  padding: 32px 42px;
}
.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  margin-bottom: 35px;
}
.workspace-head h1 {
  margin: 0;
  font-size: 27px;
}
.workspace-head p {
  color: var(--muted);
  margin: 5px 0 0;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.head-actions select {
  min-width: 190px;
}
.icon-btn {
  border: 1px solid var(--line);
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 21px;
}
.mobile-brand {
  display: none;
}
.content-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted);
}
.content-head > div {
  display: flex;
  flex-direction: column;
}
.month-control {
  display: flex;
  align-items: center;
  gap: 14px;
  text-transform: capitalize;
  color: var(--ink);
}
.month-control button {
  border: 1px solid var(--line);
  background: white;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.summary,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.summary {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.summary div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.summary small {
  color: var(--muted);
}
.summary b {
  font: 800 20px Manrope;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 20px;
}
.panel {
  padding: 24px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
}
.panel-head h2 {
  font-size: 17px;
  margin-bottom: 4px;
}
.panel-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.text-btn {
  border: 0;
  background: none;
  color: var(--green);
  font-weight: 700;
}
.record-list {
  display: flex;
  flex-direction: column;
}
.record-row {
  display: grid;
  grid-template-columns: auto 1fr auto 75px;
  gap: 13px;
  align-items: center;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  color: var(--ink);
}
.record-row > div {
  display: flex;
  flex-direction: column;
}
.record-row small {
  color: var(--muted);
  margin-top: 3px;
}
.record-row > strong {
  text-align: right;
}
.status-panel {
  text-align: center;
}
.donut {
  width: 175px;
  height: 175px;
  margin: 20px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--blue) calc(var(--paid) * 1%), #f3b46f 0);
  position: relative;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 18px;
  background: white;
  border-radius: 50%;
}
.donut div {
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.donut b {
  font: 800 27px Manrope;
}
.donut span {
  font-size: 12px;
  color: var(--muted);
}
.legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.legend span {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot.blue {
  background: var(--blue);
}
.dot.orange {
  background: #f3b46f;
}
.calendar-panel {
  overflow: auto;
}
.weekdays,
.calendar {
  min-width: 760px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.weekdays span {
  text-align: center;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}
.day {
  min-height: 118px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  padding: 8px;
  overflow: hidden;
}
.day:nth-child(7n) {
  border-right: 1px solid var(--line);
}
.day b {
  font-size: 12px;
}
.day.muted {
  background: #fafbfa;
}
.day-item {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border: 0;
  border-radius: 6px;
  margin-top: 6px;
  padding: 5px;
  font-size: 10px;
  text-align: left;
}
.day-item.expense {
  background: #fff0e3;
  color: #8f4b18;
}
.day-item.income {
  background: var(--mint);
  color: var(--green);
}
.day > small {
  font-size: 10px;
  color: var(--muted);
}
.empty-state {
  text-align: center;
  max-width: 520px;
  margin: 100px auto;
}
.empty-state > div {
  font-size: 50px;
  color: var(--green);
}
.empty-state h2 {
  margin: 20px 0 8px;
}
.empty-state p,
.empty-inline {
  color: var(--muted);
}
.empty-inline {
  text-align: center;
  padding: 50px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.type-toggle label {
  flex-direction: row;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.type-toggle input,
.check input {
  width: auto;
}
.check {
  flex-direction: row;
  align-items: center;
}
.file-label a {
  color: var(--green);
  font-weight: 600;
}
.agenda-item-wrap,
.record-row-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.agenda-item-wrap .agenda-item,
.record-row-wrap .record-row {
  min-width: 0;
}
.quick-pay-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--mint) 72%, var(--surface));
  color: var(--green);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 7px 11px;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.quick-pay-button svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}
.quick-pay-button:hover {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  transform: translateY(-1px);
}
.quick-pay-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 28%, transparent);
  outline-offset: 2px;
}
.quick-pay-button:active { transform: translateY(0); }
@media (max-width: 600px) {
  .agenda-item-wrap,
  .record-row-wrap { gap: 7px; }
  .quick-pay-button {
    min-width: 36px;
    min-height: 36px;
    padding: 8px;
  }
  .quick-pay-button span { display: none; }
}
.record-attachment-field {
  display: grid;
  gap: 10px;
}
.attachment-current {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.attachment-current > span,
.attachment-current > span:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.attachment-current svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}
.attachment-removed {
  color: var(--danger);
  font-weight: 600;
}
@media (max-width: 600px) {
  .attachment-current,
  .attachment-current > span:last-child {
    align-items: stretch;
    flex-direction: column;
  }
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.user-list {
  display: flex;
  flex-direction: column;
}
.user-row {
  display: grid;
  grid-template-columns: auto 1fr 210px 100px 70px;
  gap: 13px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.user-row:first-child {
  border-top: 0;
}
.user-row > span:first-child {
  background: var(--mint);
  color: var(--green);
}
.user-row > div {
  display: flex;
  flex-direction: column;
}
.user-row small {
  color: var(--muted);
}
.switch {
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 11px;
}
.switch input {
  display: none;
}
.switch i {
  width: 34px;
  height: 19px;
  border-radius: 20px;
  background: #cdd5d1;
  position: relative;
}
.switch i::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  background: white;
  border-radius: 50%;
  left: 2px;
  top: 2px;
  transition: 0.2s;
}
.switch input:checked + i {
  background: var(--green);
}
.switch input:checked + i::after {
  left: 17px;
}
.role {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
}
.toast-area {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--green);
  color: white;
  padding: 13px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.toast.danger {
  background: var(--red);
}
@media (max-width: 1050px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    gap: 35px;
  }
  .hero h1 {
    font-size: 50px;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .user-row {
    grid-template-columns: auto 1fr 180px 90px;
  }
  .user-row .role {
    display: none;
  }
}
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 45px;
  }
  .hero h1 {
    font-size: 43px;
  }
  .hero-visual {
    margin: 20px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .app-shell {
    display: block;
  }
  aside {
    position: fixed;
    z-index: 20;
    bottom: 0;
    top: auto;
    width: 100%;
    height: 67px;
    padding: 8px;
    display: block;
  }
  aside .brand,
  aside .profile,
  aside .logout {
    display: none;
  }
  aside nav {
    display: flex;
    justify-content: space-around;
  }
  .nav-item {
    width: auto;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    padding: 6px 10px;
  }
  .nav-item span {
    font-size: 16px;
  }
  .workspace {
    padding: 22px 16px 90px;
  }
  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .workspace-head h1 {
    font-size: 23px;
  }
  .head-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .head-actions select {
    flex: 1;
    min-width: 130px;
  }
  .head-actions .btn {
    font-size: 12px;
    padding: 10px;
  }
  .content-head {
    align-items: flex-start;
    gap: 12px;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .summary {
    padding: 14px;
  }
  .summary b {
    font-size: 15px;
  }
  .record-row {
    grid-template-columns: auto 1fr auto;
  }
  .record-row .pill {
    display: none;
  }
  .panel {
    padding: 17px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .user-row {
    grid-template-columns: auto 1fr;
  }
  .user-row .switch,
  .user-row .role {
    grid-column: 2;
  }
  .mock-card {
    padding: 20px;
  }
  .public-header {
    height: 68px;
  }
  .how {
    padding-top: 70px;
  }
  .how h2 {
    font-size: 31px;
  }
}

/* Aplicação da marca oficial */
.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(24, 59, 150, 0.16));
}

.brand-light .brand-logo {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  filter: drop-shadow(0 9px 16px rgba(0, 0, 0, 0.28));
}

.auth-brand.logo-only {
  justify-content: center;
  margin-bottom: 24px;
}

.auth-logo {
  display: block;
  width: 148px;
  height: 148px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(11, 35, 101, 0.2));
}

.google-login {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}

.google-login:hover {
  background: var(--hover);
  border-color: #aeb9cf;
}

.google-login:disabled {
  opacity: 0.65;
  cursor: wait;
}

.google-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-divider span {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .public-header .brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .auth-logo {
    width: 126px;
    height: 126px;
  }
}

.day-item.expense-pending {
  background: #fbe4e2;
  color: #a43f38;
}
.day-item.expense-paid {
  background: #e2eef5;
  color: #27678f;
}
.day-item > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.paid-check {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  border-radius: 50%;
  background: #3d7ca6;
  color: white;
  font-size: 10px;
  font-style: normal;
}

/* Refinamento visual OrganizaContas */
body {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  letter-spacing: -0.008em;
  background: #f7f8f6;
}
h1,
h2,
h3,
.brand {
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.brand {
  font-size: 18px;
}
.brand-mark {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  border-radius: 13px;
  background: linear-gradient(145deg, #26715f, #124b3f);
  box-shadow: 0 8px 20px rgba(15, 71, 59, 0.2);
}
.btn {
  min-height: 42px;
  font-weight: 600;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}
.btn-primary {
  background: linear-gradient(135deg, #1d6655, #124b3f);
  box-shadow: 0 9px 24px rgba(18, 75, 63, 0.18);
}
.workspace {
  max-width: 1600px;
  width: 100%;
  margin-inline: auto;
}
.workspace-head h1 {
  font-weight: 600;
  letter-spacing: -0.04em;
}
.workspace-head p {
  font-size: 13px;
}
.summary,
.panel {
  border-color: #e7ebe8;
  box-shadow: 0 8px 30px rgba(30, 54, 47, 0.035);
}
.summary b {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.panel-head h2 {
  font-weight: 600;
}
.profile b,
.record-row b,
.user-row b {
  font-weight: 600;
}
.record-row strong {
  font-weight: 600;
}
.eyebrow {
  font-weight: 600;
  letter-spacing: 0.15em;
}
.icon-btn {
  transition: 0.18s ease;
  color: #315c51;
}
.icon-btn:hover {
  border-color: #96b8ae;
  background: #f0f7f4;
}
.head-actions select {
  height: 42px;
  background-color: white;
}
.nav-item,
.logout {
  font-weight: 500;
}
.nav-item.active {
  box-shadow: inset 3px 0 #f1ba75;
}
.modal-backdrop {
  background: rgba(12, 25, 21, 0.64);
  backdrop-filter: blur(9px);
}
.modal {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: 38px;
  box-shadow: 0 28px 90px rgba(7, 28, 22, 0.24);
  animation: modal-in 0.22s ease-out;
}
.modal h2 {
  font-size: 25px;
  letter-spacing: -0.045em;
  margin-top: 10px;
}
.modal > p {
  font-size: 14px;
  line-height: 1.55;
}
.modal-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 23px;
  line-height: 1;
  transition: 0.18s ease;
}
.modal-close:hover {
  background: #f0f3f1;
  color: var(--ink);
}
label {
  font-weight: 500;
  color: #34433f;
  gap: 8px;
  margin-top: 18px;
}
input,
select,
textarea {
  min-height: 46px;
  border-color: #dce3df;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  transition:
    border 0.18s ease,
    box-shadow 0.18s ease;
}
textarea {
  min-height: 100px;
}
.type-toggle {
  margin-top: 22px;
}
.type-toggle label {
  min-height: 48px;
  align-items: center;
  margin: 0;
  font-weight: 600;
  background: #fafbfa;
}
.type-toggle label:has(input:checked) {
  border-color: #4d8b7b;
  background: #edf7f3;
  color: #17594a;
  box-shadow: 0 0 0 2px rgba(23, 89, 74, 0.08);
}
.modal-actions {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.auth-backdrop {
  background:
    radial-gradient(
      circle at 25% 20%,
      rgba(53, 126, 106, 0.38),
      transparent 38%
    ),
    linear-gradient(145deg, #102f28, #071d18);
}
.login-modal {
  width: min(440px, 100%);
  padding: 42px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 34px;
  font:
    600 17px "Plus Jakarta Sans",
    sans-serif;
}
.auth-brand .brand-mark {
  width: 42px;
  height: 42px;
}
.login-modal .eyebrow {
  display: block;
  margin-bottom: 12px;
}
.login-modal h2 {
  font-size: 29px;
  margin: 0 0 8px;
}
.login-modal > p {
  margin-bottom: 26px;
}
.login-modal .wide {
  margin-top: 28px;
  min-height: 50px;
}
.login-modal .auth-note {
  color: #78837f;
  text-align: center;
  margin: 16px 0 0;
}
.login-modal #configHint:empty {
  display: none;
}
.form-grid {
  gap: 2px 18px;
}
.user-row {
  min-height: 72px;
}
.toast {
  font-weight: 500;
  border-radius: 13px;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .workspace {
    padding: 28px 24px;
  }
  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 26px;
  }
  .head-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .head-actions select {
    flex: 1;
    min-width: 180px;
  }
  .user-row {
    grid-template-columns: auto 1fr 190px;
  }
  .user-row .switch:nth-of-type(2),
  .user-row .role {
    grid-column: 3;
  }
  .summary-grid {
    gap: 12px;
  }
}

@media (max-width: 760px) {
  body {
    background: #f7f8f6;
  }
  .workspace {
    padding: 18px 14px 94px;
  }
  .workspace-head {
    gap: 16px;
    margin-bottom: 22px;
  }
  .mobile-brand {
    display: block;
    color: #1c6655;
    font:
      600 12px "Plus Jakarta Sans",
      sans-serif;
    letter-spacing: 0.02em;
    margin-bottom: 7px;
  }
  .workspace-head h1 {
    font-size: 24px;
  }
  .head-actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    width: 100%;
    gap: 8px;
  }
  .head-actions select {
    width: 100%;
    min-width: 0;
    grid-column: 1/2;
  }
  .head-actions .icon-btn {
    width: 42px;
  }
  .head-actions .btn-soft {
    grid-column: 1/2;
  }
  .head-actions #newRecord {
    grid-column: 2/4;
    white-space: nowrap;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .summary {
    padding: 14px 12px;
    gap: 10px;
    min-width: 0;
  }
  .summary-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .summary small {
    font-size: 11px;
  }
  .summary b {
    font-size: 14px;
    white-space: nowrap;
  }
  .panel {
    padding: 16px;
    border-radius: 15px;
  }
  .panel-head {
    align-items: flex-start;
    gap: 12px;
  }
  .record-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
  }
  .record-row .cat-icon {
    width: 36px;
    height: 36px;
  }
  .record-row > div {
    min-width: 0;
  }
  .record-row b,
  .record-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .record-row > strong {
    font-size: 12px;
  }
  .content-head {
    font-size: 12px;
  }
  .month-control {
    gap: 8px;
  }
  .month-control strong {
    font-size: 13px;
  }
  .calendar-panel {
    padding: 10px;
    scrollbar-width: thin;
  }
  .calendar-panel::after {
    content: "Deslize para os lados para ver o mês completo";
    display: block;
    position: sticky;
    left: 0;
    width: max-content;
    margin: 10px auto 0;
    color: var(--muted);
    font-size: 10px;
  }
  .user-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 17px 0;
  }
  .user-row .switch,
  .user-row .switch:nth-of-type(2),
  .user-row .role {
    grid-column: 2;
    width: max-content;
  }
  .user-row > div {
    min-width: 0;
  }
  .user-row b,
  .user-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .modal-backdrop {
    place-items: end center;
    padding: 0;
  }
  .modal {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    margin: 0;
    border-radius: 24px 24px 0 0;
    padding: 30px 20px calc(22px + env(safe-area-inset-bottom));
    overflow-y: auto;
    animation: sheet-in 0.24s ease-out;
  }
  .modal-large {
    width: 100%;
  }
  .modal h2 {
    font-size: 23px;
    padding-right: 32px;
  }
  .modal-close {
    position: sticky;
    float: right;
    right: 0;
    top: 0;
    margin-top: -6px;
    z-index: 2;
    background: #f0f3f1;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-grid .full {
    grid-column: 1;
  }
  .modal-actions {
    position: sticky;
    bottom: calc(-22px - env(safe-area-inset-bottom));
    z-index: 3;
    margin: 24px -20px calc(-22px - env(safe-area-inset-bottom));
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 25px rgba(15, 40, 33, 0.08);
  }
  .modal-actions .btn-primary {
    flex: 1;
  }
  .login-modal {
    align-self: center;
    width: calc(100% - 24px);
    margin: auto;
    border-radius: 24px;
    padding: 32px 24px;
    max-height: calc(100dvh - 24px);
  }
  .auth-brand {
    margin-bottom: 28px;
  }
  .login-modal h2 {
    font-size: 27px;
  }
  .login-modal input {
    font-size: 16px;
  }
  .toast-area {
    left: 12px;
    right: 12px;
    bottom: 82px;
  }
  .toast {
    text-align: center;
  }
  .nav-item.active {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.11);
  }
  @keyframes sheet-in {
    from {
      transform: translateY(100%);
    }
    to {
      transform: none;
    }
  }
}

@media (max-width: 390px) {
  .public-header {
    padding-inline: 16px;
  }
  .brand {
    font-size: 16px;
  }
  .hero {
    padding-inline: 18px;
  }
  .hero h1 {
    font-size: 37px;
  }
  .head-actions {
    grid-template-columns: 1fr auto;
  }
  .head-actions .icon-btn {
    grid-row: 1;
  }
  .head-actions #newManagement {
    display: none;
  }
  .head-actions .btn-soft {
    grid-column: 1/2;
  }
  .head-actions #newRecord {
    grid-column: 2/3;
    font-size: 0;
  }
  .head-actions #newRecord::after {
    content: "+ Novo";
    font-size: 12px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .summary b {
    font-size: 16px;
  }
  .content-head > span {
    display: none;
  }
  .modal {
    padding-inline: 17px;
  }
  .modal-actions {
    margin-inline: -17px;
    padding-inline: 17px;
  }
}

/* Período de vencimento e resumo financeiro da agenda */
.calendar-date-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--status-info) 18%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--status-info-bg) 38%, var(--surface));
}

.calendar-date-range-copy,
.calendar-custom-period,
.calendar-date-inputs {
  display: flex;
  align-items: center;
}

.calendar-date-range-copy {
  min-width: 220px;
  gap: 11px;
}

.calendar-date-range-copy > span:last-child,
.calendar-custom-period > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.calendar-date-range-copy b {
  color: var(--ink);
  font-size: 12px;
}

.calendar-date-range-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.calendar-date-range-icon,
.calendar-custom-period-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--status-info-bg);
  color: var(--status-info);
}

.calendar-date-range-icon .ui-icon,
.calendar-custom-period-icon .ui-icon {
  width: 17px;
  height: 17px;
}

.calendar-date-inputs {
  gap: 9px;
}

.calendar-date-inputs label {
  display: flex;
  min-width: 150px;
  flex-direction: column;
  gap: 5px;
}

.calendar-date-inputs label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.calendar-date-inputs input {
  width: 100%;
  height: 42px;
  margin: 0;
  border-color: var(--line);
  background: var(--field);
  color: var(--ink);
  font-size: 12px;
}

.calendar-date-separator {
  align-self: flex-end;
  padding-bottom: 13px;
  color: var(--muted);
  font-size: 10px;
}

.calendar-custom-period {
  min-width: 0;
  gap: 11px;
}

.calendar-custom-period small {
  color: var(--status-info);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.calendar-custom-period b {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-custom-period button {
  min-height: 34px;
  margin-left: 4px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--status-info);
  font-size: 10px;
  font-weight: 750;
}

.calendar-custom-period button:hover {
  border-color: color-mix(in srgb, var(--status-info) 42%, var(--line));
  background: var(--surface-soft);
}

.calendar-layout-switch button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.period-payment-summary {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(320px, 1fr);
  gap: 14px 28px;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--status-warning) 20%, var(--line));
  border-radius: 17px;
  background:
    linear-gradient(
      110deg,
      color-mix(in srgb, var(--status-warning-bg) 44%, var(--surface)) 0%,
      var(--surface) 54%
    );
}

.period-payment-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.period-payment-main-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.period-payment-main-icon .ui-icon {
  width: 21px;
  height: 21px;
}

.period-payment-main > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.period-payment-main > div > span,
.period-payment-metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.period-payment-main b {
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: clamp(22px, 2.2vw, 29px);
  letter-spacing: -0.04em;
}

.period-payment-main small,
.period-payment-metrics small {
  color: var(--muted);
  font-size: 10px;
}

.period-payment-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.period-payment-metrics > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 12px 16px;
}

.period-payment-metrics > div + div {
  border-left: 1px solid var(--line);
}

.period-payment-metrics b {
  overflow: hidden;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: 15px;
  text-overflow: ellipsis;
}

.period-payment-metrics > div:last-child b {
  color: var(--status-info);
}

.period-payment-progress {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
}

.period-payment-progress > span {
  overflow: hidden;
  height: 6px;
  flex: 1;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-info) 12%, var(--surface-soft));
}

.period-payment-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--status-info);
  transition: width 0.3s ease;
}

.period-payment-progress small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

html[data-theme="dark"] .calendar-date-range,
html[data-theme="dark"] .period-payment-summary {
  background: color-mix(in srgb, var(--surface-raised) 78%, #0a0d13);
}

html[data-theme="dark"] .calendar-custom-period button {
  background: var(--surface-raised);
}

@media (max-width: 820px) {
  .calendar-date-range {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .calendar-date-inputs {
    width: 100%;
  }

  .calendar-date-inputs label {
    min-width: 0;
    flex: 1;
  }

  .period-payment-summary {
    grid-template-columns: 1fr;
  }

  .period-payment-progress {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .calendar-date-range {
    margin-bottom: 12px;
    padding: 12px;
  }

  .calendar-date-range-copy small {
    max-width: 240px;
  }

  .calendar-date-inputs {
    display: grid;
    grid-template-columns: 1fr 18px 1fr;
    align-items: end;
    gap: 6px;
  }

  .calendar-date-separator {
    padding-bottom: 14px;
    text-align: center;
  }

  .calendar-date-inputs input {
    min-width: 0;
    height: 46px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .calendar-custom-period {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .calendar-custom-period button {
    min-height: 38px;
    margin-left: 0;
  }

  .period-payment-summary {
    gap: 16px;
    padding: 17px 14px;
    border-radius: 15px;
  }

  .period-payment-main-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .period-payment-main b {
    font-size: 23px;
  }

  .period-payment-metrics {
    grid-template-columns: 1fr;
  }

  .period-payment-metrics > div {
    padding: 12px 13px;
  }

  .period-payment-metrics > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .period-payment-progress {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }
}

@media (max-width: 390px) {
  .calendar-date-range-copy small {
    display: none;
  }

  .calendar-date-inputs {
    grid-template-columns: 1fr;
  }

  .calendar-date-separator {
    display: none;
  }

  .calendar-custom-period {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .calendar-custom-period button {
    grid-column: 1 / -1;
  }
}

.calendar-content-head > .calendar-custom-period {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: row;
  align-items: center;
}

@media (max-width: 760px) {
  .calendar-content-head > .calendar-custom-period {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .calendar-content-head > .calendar-custom-period {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .period-payment-progress > span {
    width: 100%;
    flex: 0 0 6px;
  }
}

@media (max-width: 390px) {
  .calendar-content-head > .calendar-custom-period {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

/* Progresso das despesas que ainda aguardam pagamento */
.pending-payment-panel {
  display: grid;
  grid-template-columns: auto minmax(210px, 1.25fr) minmax(165px, auto) minmax(
      180px,
      0.8fr
    ) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--status-warning) 22%, var(--line));
  border-radius: 16px;
  background: linear-gradient(
    105deg,
    color-mix(in srgb, var(--status-warning-bg) 48%, var(--surface)) 0%,
    var(--surface) 48%
  );
}

.pending-payment-panel.is-complete {
  border-color: color-mix(in srgb, var(--status-success) 22%, var(--line));
  background: linear-gradient(
    105deg,
    color-mix(in srgb, var(--status-success-bg) 50%, var(--surface)) 0%,
    var(--surface) 48%
  );
}

.pending-payment-icon {
  display: grid;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  place-items: center;
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.is-complete .pending-payment-icon {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.pending-payment-icon .ui-icon {
  width: 21px;
  height: 21px;
}

.pending-payment-copy,
.pending-payment-total {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.pending-payment-copy {
  gap: 3px;
}

.pending-payment-copy > small {
  color: var(--status-warning);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.is-complete .pending-payment-copy > small {
  color: var(--status-success);
}

.pending-payment-copy h2 {
  margin: 0;
  font-size: 15px;
}

.pending-payment-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.pending-payment-total {
  gap: 2px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.pending-payment-total small,
.pending-payment-total span {
  color: var(--muted);
  font-size: 10px;
}

.pending-payment-total b {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  line-height: 1.25;
}

.pending-payment-progress {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.pending-payment-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.pending-payment-progress > i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--status-warning-bg);
}

.pending-payment-progress > i > span {
  display: block;
  width: var(--payment-progress);
  height: 100%;
  border-radius: inherit;
  background: var(--status-info);
  transition: width 0.35s ease;
}

.is-complete .pending-payment-progress > i {
  background: var(--status-success-bg);
}

.is-complete .pending-payment-progress > i > span {
  background: var(--status-success);
}

.pending-payment-action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.pending-payment-action:hover {
  border-color: color-mix(in srgb, var(--status-info) 38%, var(--line));
  background: var(--surface-soft);
  color: var(--status-info);
}

.pending-payment-action > span {
  font-size: 16px;
  line-height: 1;
}

@media (max-width: 1050px) {
  .pending-payment-panel {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .pending-payment-total {
    border-left: 0;
    text-align: right;
  }

  .pending-payment-progress {
    grid-column: 2 / 4;
  }

  .pending-payment-action {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .pending-payment-panel {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    padding: 16px 14px;
    border-radius: 14px;
  }

  .pending-payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .pending-payment-copy h2 {
    font-size: 14px;
  }

  .pending-payment-total {
    grid-column: 1 / -1;
    align-items: flex-start;
    padding: 13px 0 0;
    border-top: 1px solid var(--line);
    text-align: left;
  }

  .pending-payment-total b {
    font-size: 21px;
  }

  .pending-payment-progress {
    grid-column: 1 / -1;
  }

  .pending-payment-action {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    min-height: 42px;
    justify-self: stretch;
  }
}

/* Contornos suaves no tema claro */
html:not([data-theme="dark"]) {
  --line: #e6eaf1;
  --surface-soft: #f8f9fb;
  --hover: #f2f5f9;
}

html:not([data-theme="dark"]) input,
html:not([data-theme="dark"]) select,
html:not([data-theme="dark"]) textarea {
  border-color: #dde3ec;
}

html:not([data-theme="dark"]) .modal {
  border-color: #eef1f6;
}

html:not([data-theme="dark"]) :is(
    .panel,
    .summary,
    .calendar-filters,
    .settings-management,
    .theme-options button,
    .google-login,
    .icon-btn,
    .month-control button,
    .card-editor-preview,
    .record-card-field,
    .summary-detail-total
  ) {
  border-color: var(--line);
}

:is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid rgba(49, 87, 213, 0.42);
  outline-offset: 2px;
}

.payment-card {
  border-color: color-mix(in srgb, var(--card-bg) 82%, #d8deea);
}

.payment-card::after {
  border-color: rgba(255, 255, 255, 0.28);
}

/* Assistente de comandos por voz */
.voice-assistant-backdrop {
  position: fixed;
  z-index: 170;
  inset: 0;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 20px;
  background: rgba(6, 11, 24, 0.62);
  backdrop-filter: blur(9px);
}

.voice-assistant {
  position: relative;
  width: min(560px, 100%);
  margin: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(6, 11, 24, 0.26);
  animation: modal-in 0.22s ease-out;
}

.voice-assistant-close {
  position: absolute;
  top: 15px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}

.voice-assistant-close:hover {
  background: var(--hover);
  color: var(--ink);
}

.voice-assistant-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 16px;
}

.voice-assistant-heading > div {
  min-width: 0;
}

.voice-assistant h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.voice-assistant-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.voice-orb {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  place-items: center;
  background: #e8efff;
  color: #3157d5;
}

.voice-orb::before,
.voice-orb::after {
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(74, 118, 234, 0.35);
  border-radius: inherit;
  content: "";
  opacity: 0;
}

.voice-orb .ui-icon {
  width: 24px;
  height: 24px;
}

.voice-assistant-backdrop.is-listening .voice-orb {
  background: linear-gradient(145deg, #4a76ea, #294bbb);
  color: #fff;
}

.voice-assistant-backdrop.is-listening .voice-orb::before {
  animation: voice-pulse 1.7s ease-out infinite;
}

.voice-assistant-backdrop.is-listening .voice-orb::after {
  animation: voice-pulse 1.7s 0.55s ease-out infinite;
}

@keyframes voice-pulse {
  0% {
    scale: 0.94;
    opacity: 0.75;
  }
  100% {
    scale: 1.62;
    opacity: 0;
  }
}

#voiceTranscript {
  min-height: 58px;
  margin: 22px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

.voice-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.voice-examples > small {
  width: 100%;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.voice-examples button {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  text-align: left;
}

.voice-examples button:hover {
  border-color: #b7c7ef;
  background: #f2f5ff;
  color: #294bbb;
}

.voice-assistant-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.voice-assistant-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.voice-assistant-actions .ui-icon {
  width: 17px;
  height: 17px;
}

.voice-privacy {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.voice-privacy .ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.voice-assistant-backdrop.is-unsupported .voice-orb {
  background: var(--surface-soft);
  color: var(--muted);
}

.voice-choice-modal .summary-detail-list {
  margin-top: 14px;
}

html[data-theme="dark"] .voice-examples button:hover {
  border-color: #455a91;
  background: #1b315f;
  color: #b6c9fa;
}

html[data-theme="dark"] .voice-orb {
  background: #1b315f;
  color: #a9c2ff;
}

@media (max-width: 760px) {
  .voice-assistant-backdrop {
    align-items: end;
    padding: 0;
  }

  .voice-assistant {
    width: 100%;
    max-height: min(88vh, 720px);
    overflow-y: auto;
    margin: 0;
    padding: 25px 18px calc(20px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 24px 24px 0 0;
    animation: voice-sheet-in 0.24s ease-out;
  }

  .voice-assistant-heading {
    padding-right: 28px;
  }

  .voice-assistant h2 {
    font-size: 19px;
  }

  .voice-orb {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .voice-examples {
    flex-direction: column;
  }

  .voice-examples button {
    width: 100%;
    min-height: 38px;
  }

  .voice-assistant-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@keyframes voice-sheet-in {
  from {
    translate: 0 30px;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .voice-orb::before,
  .voice-orb::after {
    animation: none !important;
  }
}

/* Voz na navegação e encerramento de sessão nas configurações */
.voice-sidebar-command:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mobile-nav-voice .ui-icon,
.voice-sidebar-command .ui-icon,
.settings-logout-button .ui-icon {
  width: 18px;
  height: 18px;
}

.settings-session-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0 20px;
}

.settings-session-card .settings-card-head {
  grid-column: 1 / -1;
}

.settings-session-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.settings-session-profile > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  place-items: center;
  background: #e8efff;
  color: #3157d5;
  font-size: 11px;
  font-weight: 750;
}

.settings-session-profile > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.settings-session-profile b,
.settings-session-profile small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-session-profile b {
  font-size: 12px;
}

.settings-session-profile small {
  color: var(--muted);
  font-size: 10px;
}

.settings-logout-button {
  display: inline-flex;
  min-width: 150px;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

html[data-theme="dark"] .settings-session-profile > span {
  background: #1b315f;
  color: #aec4fb;
}

@media (max-width: 760px) {
  .settings-session-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .settings-session-card .settings-card-head {
    grid-column: 1;
    margin-bottom: 4px;
  }

  .settings-logout-button {
    width: 100%;
    min-height: 44px;
  }
}

/* Tema, ícones e navegação mensal */
:root {
  color-scheme: light;
  --surface: #fff;
  --surface-soft: #f7f8f6;
  --surface-raised: #fff;
  --sidebar: #133e35;
  --field: #fff;
  --hover: #f0f5f2;
  --overlay: rgba(12, 25, 21, 0.64);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf5f1;
  --muted: #9caaa5;
  --line: #293b36;
  --paper: #101815;
  --white: #17211e;
  --surface: #17211e;
  --surface-soft: #101815;
  --surface-raised: #1c2925;
  --sidebar: #0a211b;
  --field: #1b2824;
  --hover: #22332e;
  --mint: #173b31;
  --green: #61b99e;
  --green-2: #70c9ad;
  --blue: #70aed3;
  --red: #ef837c;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  --overlay: rgba(2, 8, 6, 0.76);
}
.ui-icon {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.public-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  transition: 0.18s ease;
}
.theme-toggle:hover {
  background: var(--hover);
  border-color: #669687;
}
.mobile-new-record {
  display: none;
}
.mobile-nav-logout {
  display: none;
}
.head-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.logout .ui-icon {
  width: 17px;
}
.nav-item .ui-icon {
  width: 19px;
  height: 19px;
}
.nav-item small {
  font: inherit;
}
.month-control {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  text-transform: none;
}
.month-arrow {
  width: 42px !important;
  height: 46px !important;
  display: grid;
  place-items: center;
  border-radius: 12px !important;
  color: var(--ink);
  transition: 0.18s ease;
}
.month-arrow:hover {
  border-color: #78a99b;
  background: var(--hover);
}
.month-field {
  position: relative;
  display: block;
  margin: 0;
  min-width: 190px;
}
.month-field span {
  position: absolute;
  left: 13px;
  top: 6px;
  z-index: 1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
}
.month-field input {
  height: 46px;
  min-height: 46px;
  padding: 18px 11px 3px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}
.month-today {
  width: auto !important;
  height: 38px !important;
  margin-left: 3px;
  padding: 0 13px;
  border-radius: 10px !important;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}
.hero h1 em,
.donut b {
  font-family: "Inter", sans-serif;
}
.summary,
.panel,
.mock-card,
.modal {
  background: var(--surface);
}
input,
select,
textarea,
.icon-btn,
.month-control button {
  background-color: var(--field);
  color: var(--ink);
}

html[data-theme="dark"] body {
  background: var(--paper);
  color: var(--ink);
}
html[data-theme="dark"] .public-header .brand,
html[data-theme="dark"] .workspace,
html[data-theme="dark"] .record-row {
  color: var(--ink);
}
html[data-theme="dark"] .how {
  background: #131d1a;
}
html[data-theme="dark"] .hero-visual::before {
  background: #16362d;
}
html[data-theme="dark"] .mock-progress {
  background: #293a35;
}
html[data-theme="dark"] .mock-row,
html[data-theme="dark"] .record-row,
html[data-theme="dark"] .user-row {
  border-color: var(--line);
}
html[data-theme="dark"] .btn-ghost {
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .btn-soft {
  background: #1b3c33;
  color: #80d0b7;
}
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .modal-close:hover {
  background: var(--hover);
  color: var(--ink);
}
html[data-theme="dark"] label {
  color: #c4d0cc;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  border-color: #344640;
  background: var(--field);
  color: var(--ink);
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: #5fae97;
  box-shadow: 0 0 0 3px rgba(95, 174, 151, 0.14);
}
html[data-theme="dark"] .type-toggle label {
  background: #192520;
}
html[data-theme="dark"] .type-toggle label:has(input:checked) {
  background: #1b3b32;
  color: #80d0b7;
  border-color: #4e967f;
}
html[data-theme="dark"] .modal {
  border-color: #2b3e38;
}
html[data-theme="dark"] .modal-actions {
  background: rgba(23, 33, 30, 0.97);
}
html[data-theme="dark"] .donut::after {
  background: var(--surface);
}
html[data-theme="dark"] .day.muted {
  background: #121b18;
}
html[data-theme="dark"] .day {
  border-color: #2c3c37;
}
html[data-theme="dark"] .day-item.expense-pending {
  background: #452522;
  color: #ffaaa4;
}
html[data-theme="dark"] .day-item.expense-paid {
  background: #203c4d;
  color: #9ed1ee;
}
html[data-theme="dark"] .day-item.income {
  background: #19392f;
  color: #8bd6be;
}
html[data-theme="dark"] .summary,
.panel {
  border-color: #283934;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
}
html[data-theme="dark"] .auth-backdrop {
  background:
    radial-gradient(
      circle at 25% 20%,
      rgba(53, 126, 106, 0.25),
      transparent 38%
    ),
    linear-gradient(145deg, #071712, #020a08);
}

@media (max-width: 760px) {
  aside {
    height: 76px;
    padding: 7px 9px calc(7px + env(safe-area-inset-bottom));
    background: var(--sidebar);
    box-shadow: 0 -10px 35px rgba(6, 24, 19, 0.18);
  }
  aside nav {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    gap: 2px;
  }
  .nav-item {
    width: 100%;
    height: 57px;
    justify-content: center;
    align-items: center;
    padding: 6px 2px;
    border-radius: 11px;
    gap: 3px;
  }
  .nav-item .ui-icon {
    width: 20px;
    height: 20px;
  }
  .nav-item small {
    font-size: 10px;
    white-space: nowrap;
  }
  .mobile-nav-logout {
    display: flex;
  }
  .mobile-new-record {
    display: flex;
    position: relative;
    top: -17px;
    width: 58px;
    height: 58px;
    margin: auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1px;
    border: 5px solid var(--sidebar);
    border-radius: 50%;
    background: linear-gradient(145deg, #2a806a, #17594a);
    color: white;
    box-shadow: 0 10px 24px rgba(9, 42, 34, 0.34);
  }
  .mobile-new-record .ui-icon {
    width: 23px;
    height: 23px;
  }
  .mobile-new-record small {
    font-size: 10px;
    font-weight: 600;
  }
  .mobile-new-record:disabled {
    opacity: 0.5;
  }
  .workspace {
    padding-bottom: 104px;
  }
  .head-actions {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }
  .head-actions .theme-toggle {
    grid-column: 4;
    grid-row: 1;
  }
  .head-actions .btn-soft {
    grid-column: 1/3;
  }
  .head-actions #newRecord {
    display: none;
  }
  .content-head {
    flex-direction: column;
    align-items: stretch;
  }
  .month-control {
    width: 100%;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 42px auto !important;
    gap: 7px;
  }
  .month-field {
    min-width: 0;
    width: 100%;
  }
  .month-field input {
    width: 100%;
    font-size: 14px;
  }
  .month-today {
    margin-left: 0;
    padding-inline: 11px;
  }
  .calendar-panel {
    margin-top: 4px;
  }
  html[data-theme="dark"] .modal-close {
    background: var(--hover);
  }
  html[data-theme="dark"] .modal-actions {
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 390px) {
  .head-actions {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .head-actions .theme-toggle {
    grid-column: 3;
  }
  .head-actions .btn-soft {
    grid-column: 1/2;
  }
  .month-control {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }
  .month-arrow {
    width: 38px !important;
  }
  .month-today {
    grid-column: 1/-1;
    width: 100% !important;
  }
  .nav-item small {
    font-size: 10px;
  }
  .mobile-new-record {
    width: 56px;
    height: 56px;
  }
}

/* Identidade azul OrganizaContas */
:root {
  --green: #3157d5;
  --green-2: #4a76ea;
  --mint: #e8efff;
  --blue: #3157d5;
  --sidebar: #172a5b;
  --brand-deep: #21399b;
  --brand-bright: #4a76ea;
  --brand-ice: #e8efff;
  --brand-cyan: #72c7f4;
}
.brand-mark {
  background: linear-gradient(145deg, var(--brand-bright), var(--brand-deep));
  box-shadow: 0 9px 24px rgba(49, 87, 213, 0.25);
}
.btn-primary {
  background: linear-gradient(135deg, #4a76ea, #294bbb);
  box-shadow: 0 10px 26px rgba(49, 87, 213, 0.24);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #426de1, #233fa6);
}
aside {
  background: linear-gradient(180deg, #172a5b 0%, #111f46 100%);
}
.brand-light .brand-mark {
  background: linear-gradient(145deg, #7bd3fb, #4a76ea);
  color: white;
}
.profile small {
  color: #b7c7f3;
}
.nav-item,
.logout {
  color: #bac6e9;
}
.nav-item.active {
  box-shadow: inset 3px 0 #72c7f4;
  background: rgba(114, 199, 244, 0.12);
}
.mobile-brand {
  color: #3157d5;
}
.btn-soft {
  background: #e8efff;
  color: #294bbb;
}
.icon-btn {
  color: #3157d5;
}
.icon-btn:hover,
.theme-toggle:hover,
.month-arrow:hover {
  border-color: #8ca8ef;
  background: #f0f4ff;
}
.month-today {
  color: #3157d5;
}
.hero-visual::before {
  background: linear-gradient(145deg, #e8efff, #d8e5ff);
}
.mock-progress i {
  background: linear-gradient(90deg, #3157d5, #72c7f4);
}
.hero h1 em {
  color: #3157d5;
}
.eyebrow,
.feature > span,
.text-btn {
  color: #3157d5;
}
.feature {
  border-color: #3157d5;
}
.positive {
  color: #3157d5 !important;
}
.green {
  background: #e8efff;
  color: #3157d5;
}
.pill.paid {
  background: #e8efff;
  color: #294bbb;
}
.dot.blue {
  background: #3157d5;
}
.donut {
  background: conic-gradient(#3157d5 calc(var(--paid) * 1%), #efaa67 0);
}
input:focus,
select:focus,
textarea:focus {
  border-color: #4a76ea;
  box-shadow: 0 0 0 3px rgba(74, 118, 234, 0.13);
}
.type-toggle label:has(input:checked) {
  border-color: #6c8ce1;
  background: #eef3ff;
  color: #294bbb;
  box-shadow: 0 0 0 2px rgba(49, 87, 213, 0.08);
}
.user-row > span:first-child {
  background: #e8efff;
  color: #3157d5;
}
.switch input:checked + i {
  background: #3157d5;
}
.empty-state > div {
  color: #3157d5;
}
.day-item.income {
  background: #e8efff;
  color: #294bbb;
}
.day-item.expense-paid {
  background: #dce8ff;
  color: #2648a9;
}
.paid-check {
  background: #3157d5;
}
.auth-backdrop {
  background:
    radial-gradient(
      circle at 22% 18%,
      rgba(74, 118, 234, 0.42),
      transparent 38%
    ),
    radial-gradient(
      circle at 82% 78%,
      rgba(114, 199, 244, 0.18),
      transparent 35%
    ),
    linear-gradient(145deg, #101d43, #070e24);
}
.mobile-new-record {
  background: linear-gradient(145deg, #5c87f2, #294bbb);
  border-color: var(--sidebar);
  box-shadow: 0 12px 28px rgba(28, 55, 139, 0.38);
}

html[data-theme="dark"] {
  --green: #82a4ff;
  --green-2: #9bb7ff;
  --mint: #1c2b59;
  --blue: #82a4ff;
  --sidebar: #0c1735;
  --brand-deep: #3157d5;
  --brand-bright: #82a4ff;
  --brand-ice: #1c2b59;
  --brand-cyan: #72c7f4;
}
html[data-theme="dark"] aside {
  background: linear-gradient(180deg, #101d43 0%, #080f25 100%);
}
html[data-theme="dark"] .mobile-brand,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .feature > span,
html[data-theme="dark"] .text-btn {
  color: #9bb7ff;
}
html[data-theme="dark"] .hero-visual::before {
  background: linear-gradient(145deg, #172653, #15213f);
}
html[data-theme="dark"] .btn-soft {
  background: #1c2b59;
  color: #aac0ff;
}
html[data-theme="dark"] .icon-btn {
  color: #9bb7ff;
}
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .month-arrow:hover {
  border-color: #4f68a8;
  background: #202d50;
}
html[data-theme="dark"] .type-toggle label:has(input:checked) {
  background: #1c2b59;
  color: #b5c7ff;
  border-color: #536fb7;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: #82a4ff;
  box-shadow: 0 0 0 3px rgba(130, 164, 255, 0.14);
}
html[data-theme="dark"] .day-item.income {
  background: #1c2b59;
  color: #b5c7ff;
}
html[data-theme="dark"] .day-item.expense-paid {
  background: #203665;
  color: #aac5ff;
}
html[data-theme="dark"] .auth-backdrop {
  background:
    radial-gradient(
      circle at 25% 20%,
      rgba(74, 118, 234, 0.3),
      transparent 38%
    ),
    linear-gradient(145deg, #0b1430, #030713);
}

/* Tema escuro neutro e estados financeiros */
.pill {
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}
.pill.paid {
  background: #e5edff;
  color: #2449ad;
  border-color: #cbd9ff;
}
.pill.received {
  background: #eee7ff;
  color: #6840a5;
  border-color: #dfd0ff;
}
.pill.pending {
  background: #ffebe8;
  color: #ac3e35;
  border-color: #ffd3ce;
}
.day-item.income-pending {
  background: #edf3ff;
  color: #3157d5;
}
.day-item.income-received {
  background: #eee7ff;
  color: #6840a5;
}
html[data-theme="dark"] {
  --ink: #f1f3f7;
  --muted: #9ca3ad;
  --line: #2a2e36;
  --paper: #08090b;
  --white: #111318;
  --surface: #111318;
  --surface-soft: #08090b;
  --surface-raised: #171a20;
  --sidebar: #050608;
  --field: #16191f;
  --hover: #20242b;
  --overlay: rgba(0, 0, 0, 0.8);
  --mint: #1d2948;
}
html[data-theme="dark"] body {
  background: #08090b;
}
html[data-theme="dark"] aside {
  background: linear-gradient(180deg, #0b0d11 0%, #030405 100%);
  border-right: 1px solid #20242b;
}
html[data-theme="dark"] .how {
  background: #0d0f13;
}
html[data-theme="dark"] .hero-visual::before {
  background: linear-gradient(145deg, #171b24, #11141a);
}
html[data-theme="dark"] .mock-progress {
  background: #272b32;
}
html[data-theme="dark"] .modal,
html[data-theme="dark"] .summary,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .mock-card {
  background: #111318;
  border-color: #292d35;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #16191f;
  border-color: #30353e;
}
html[data-theme="dark"] .type-toggle label {
  background: #15181d;
  border-color: #30353e;
}
html[data-theme="dark"] .modal-actions {
  background: rgba(17, 19, 24, 0.98);
  border-color: #292d35;
}
html[data-theme="dark"] .day.muted {
  background: #0c0e11;
}
html[data-theme="dark"] .day {
  border-color: #292d35;
}
html[data-theme="dark"] .donut::after {
  background: #111318;
}
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .month-arrow:hover {
  background: #20242b;
}
html[data-theme="dark"] .pill.paid {
  background: #1b315f;
  color: #b7ccff;
  border-color: #294783;
}
html[data-theme="dark"] .pill.received {
  background: #382654;
  color: #dec3ff;
  border-color: #56377e;
}
html[data-theme="dark"] .pill.pending {
  background: #4b211e;
  color: #ffb8b0;
  border-color: #74322d;
}
html[data-theme="dark"] .day-item.expense-pending {
  background: #49211e;
  color: #ffb0a8;
}
html[data-theme="dark"] .day-item.expense-paid {
  background: #1d315a;
  color: #b8ceff;
}
html[data-theme="dark"] .day-item.income-pending {
  background: #1c263d;
  color: #a9c1ff;
}
html[data-theme="dark"] .day-item.income-received {
  background: #35244e;
  color: #dec3ff;
}
html[data-theme="dark"] .auth-backdrop {
  background:
    radial-gradient(
      circle at 25% 20%,
      rgba(67, 101, 197, 0.22),
      transparent 38%
    ),
    linear-gradient(145deg, #090b10, #000);
}

/* Sistema semântico e hierarquia mobile-first */
:root {
  --status-success: #16845b;
  --status-success-bg: #e5f6ee;
  --status-info: #3157d5;
  --status-info-bg: #e5edff;
  --status-warning: #9a5a08;
  --status-warning-bg: #fff3dc;
  --status-danger: #b93d35;
  --status-danger-bg: #ffebe8;
}
.head-actions #newRecord {
  min-width: 210px;
  padding-inline: 20px;
}
.summary-icon.success,
.income-icon {
  background: var(--status-success-bg);
  color: var(--status-success);
}
.summary-icon.info {
  background: var(--status-info-bg);
  color: var(--status-info);
}
.summary-icon.danger,
.expense-icon {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}
.positive {
  color: var(--status-success) !important;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 68px;
  font-weight: 600;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill.paid {
  background: var(--status-info-bg);
  color: var(--status-info);
  border-color: #cbd9ff;
}
.pill.received {
  background: var(--status-success-bg);
  color: var(--status-success);
  border-color: #c8eadb;
}
.pill.pending {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border-color: #f1d7a8;
}
.pill.overdue {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border-color: #ffd0ca;
}
.day-item.expense-pending {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}
.day-item.expense-overdue {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}
.day-item.expense-paid {
  background: var(--status-info-bg);
  color: var(--status-info);
}
.day-item.income-pending {
  background: #eef2f7;
  color: #52606e;
}
.day-item.income-received {
  background: var(--status-success-bg);
  color: var(--status-success);
}
.day-item.income-received .paid-check {
  background: var(--status-success);
}
html[data-theme="dark"] {
  --status-success: #67d3a4;
  --status-success-bg: #16382b;
  --status-info: #a9c2ff;
  --status-info-bg: #1b315f;
  --status-warning: #f2c16f;
  --status-warning-bg: #453417;
  --status-danger: #ffaaa2;
  --status-danger-bg: #49211e;
}
html[data-theme="dark"] .summary-icon.success,
html[data-theme="dark"] .income-icon {
  background: var(--status-success-bg);
  color: var(--status-success);
}
html[data-theme="dark"] .summary-icon.info {
  background: var(--status-info-bg);
  color: var(--status-info);
}
html[data-theme="dark"] .summary-icon.danger,
html[data-theme="dark"] .expense-icon {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}
html[data-theme="dark"] .positive {
  color: var(--status-success) !important;
}
html[data-theme="dark"] .pill.paid {
  background: var(--status-info-bg);
  color: var(--status-info);
  border-color: #294783;
}
html[data-theme="dark"] .pill.received {
  background: var(--status-success-bg);
  color: var(--status-success);
  border-color: #275c47;
}
html[data-theme="dark"] .pill.pending {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border-color: #675026;
}
html[data-theme="dark"] .pill.overdue {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border-color: #74322d;
}
html[data-theme="dark"] .day-item.expense-pending {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}
html[data-theme="dark"] .day-item.expense-overdue {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}
html[data-theme="dark"] .day-item.expense-paid {
  background: var(--status-info-bg);
  color: var(--status-info);
}
html[data-theme="dark"] .day-item.income-pending {
  background: #252a32;
  color: #bdc4ce;
}
html[data-theme="dark"] .day-item.income-received {
  background: var(--status-success-bg);
  color: var(--status-success);
}

@media (max-width: 760px) {
  .record-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 4px;
    min-height: 68px;
    padding: 12px 0;
  }
  .record-row .cat-icon {
    grid-column: 1;
    grid-row: 1/3;
    align-self: center;
  }
  .record-row > div {
    grid-column: 2;
    grid-row: 1/3;
    justify-content: center;
  }
  .record-row > strong {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    font-size: 12px;
  }
  .record-row > .pill {
    display: inline-flex;
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    min-width: 0;
    padding: 3px 7px;
    font-size: 10px;
  }
  .record-row > .pill::before {
    width: 5px;
    height: 5px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .panel-head p {
    font-size: 11px;
  }
  .status-panel .legend {
    max-width: 300px;
    margin-inline: auto;
  }
}

/* Seleção mobile simples: somente mudança de fundo */
.nav-item.active {
  border: 0;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@media (max-width: 760px) {
  .nav-item.active {
    border: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .type-toggle label:has(input:checked) {
    border-color: transparent;
    box-shadow: none;
    background: #e8efff;
    color: #294bbb;
  }

  html[data-theme="dark"] .type-toggle label:has(input:checked) {
    border-color: transparent;
    box-shadow: none;
    background: #252b38;
    color: #b8c9f5;
  }
}

/* Cadastro de despesas recorrentes */
.recurrence-card,
.recurrence-context {
  grid-column: 1 / -1;
  margin: 12px 0 8px;
  padding: 16px;
  border: 1px solid #dbe4fa;
  border-radius: 14px;
  background: #f5f8ff;
}

.recurrence-card[hidden] {
  display: none;
}

.recurrence-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--ink);
  cursor: pointer;
}

.recurrence-toggle input {
  width: 19px;
  height: 19px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #3157d5;
}

.recurrence-toggle span,
.recurrence-context {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.recurrence-toggle b,
.recurrence-context b {
  font-size: 14px;
  font-weight: 700;
}

.recurrence-toggle small,
.recurrence-context small,
.recurrence-options label > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.recurrence-options {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #dbe4fa;
}

.recurrence-options[hidden] {
  display: none;
}

.recurrence-options label > small {
  margin-top: -4px;
}

html[data-theme="dark"] .recurrence-card,
html[data-theme="dark"] .recurrence-context {
  border-color: #29334a;
  background: #141925;
}

html[data-theme="dark"] .recurrence-options {
  border-top-color: #29334a;
}

@media (max-width: 760px) {
  .recurrence-card,
  .recurrence-context {
    grid-column: 1;
    margin-top: 10px;
    padding: 14px;
  }

  .recurrence-options {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Navegação e calendário mobile mais legíveis */
.weekdays,
.calendar {
  min-width: 840px;
}

.day {
  min-height: 150px;
}

.day-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  gap: 3px;
  padding: 6px 7px;
}

.day-item > span {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 650;
  line-height: 1.25;
}

.day-item > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.2;
  opacity: 0.86;
}

@media (max-width: 760px) {
  .mobile-new-record {
    gap: 0;
  }

  .mobile-new-record .ui-icon {
    width: 27px;
    height: 27px;
  }

  .calendar-panel {
    -webkit-overflow-scrolling: touch;
  }

  .weekdays,
  .calendar {
    min-width: 840px;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
  }

  .day-item {
    font-size: 10px;
  }
}

/* Detalhamento dos totais e prioridades do dia */
.summary-action {
  position: relative;
  width: 100%;
  color: var(--ink);
  text-align: left;
  appearance: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.summary-action:hover {
  transform: translateY(-2px);
  border-color: #b8c9f5;
  box-shadow: 0 12px 28px rgba(49, 87, 213, 0.1);
}

.summary-action:focus-visible {
  outline: 3px solid rgba(49, 87, 213, 0.2);
  outline-offset: 2px;
}

.summary-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.today-alert {
  display: grid;
  grid-template-columns: minmax(230px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #f1d39f;
  border-radius: 16px;
  background: #fff8eb;
}

.today-alert-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.today-alert-heading > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.today-alert-heading strong {
  color: #714308;
  font-size: 16px;
}

.today-alert-heading small {
  color: #8a5b1d;
  font-size: 12px;
}

.today-alert-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  background: #f5b84f;
  color: #4e2c00;
  font-size: 19px;
  font-weight: 800;
}

.today-alert-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 230px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.today-alert-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(154, 90, 8, 0.16);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-align: left;
}

.today-alert-item:hover {
  border-color: rgba(154, 90, 8, 0.34);
  background: #fff;
}

.today-alert-item > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.today-alert-item b,
.today-alert-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-alert-item b {
  font-size: 12px;
}

.today-alert-item small {
  color: #8a5b1d;
  font-size: 10px;
}

.today-alert-item > strong {
  color: #714308;
  font-size: 12px;
  white-space: nowrap;
}

.today-alert-open {
  color: #8a5b1d;
  font-size: 10px;
  font-weight: 700;
}

.summary-detail-modal > p {
  max-width: 650px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.summary-detail-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.summary-detail-total > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.summary-detail-total small,
.summary-detail-total > span {
  color: var(--muted);
  font-size: 11px;
}

.summary-detail-total b {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 22px;
}

.summary-detail-list {
  display: flex;
  flex-direction: column;
  max-height: min(430px, 48vh);
  overflow-y: auto;
  scrollbar-width: thin;
}

.summary-detail-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.summary-detail-row:hover {
  background: var(--hover);
}

.summary-detail-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.summary-detail-copy b,
.summary-detail-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-detail-copy b {
  font-size: 13px;
}

.summary-detail-copy small {
  color: var(--muted);
  font-size: 10px;
}

.summary-detail-row > strong {
  font-size: 12px;
  white-space: nowrap;
}

.summary-detail-empty {
  padding: 38px 18px;
  color: var(--muted);
  text-align: center;
}

html[data-theme="dark"] .summary-action:hover {
  border-color: #3b4a6e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .today-alert {
  border-color: #5a4522;
  background: #241d12;
}

html[data-theme="dark"] .today-alert-heading strong,
html[data-theme="dark"] .today-alert-item > strong {
  color: var(--status-warning);
}

html[data-theme="dark"] .today-alert-heading small,
html[data-theme="dark"] .today-alert-item small,
html[data-theme="dark"] .today-alert-open {
  color: #d9aa5e;
}

html[data-theme="dark"] .today-alert-icon {
  background: #5a4119;
  color: var(--status-warning);
}

html[data-theme="dark"] .today-alert-item {
  border-color: #4d3c21;
  background: rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] .today-alert-item:hover {
  border-color: #735728;
  background: rgba(255, 255, 255, 0.065);
}

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

  .summary {
    min-height: 76px;
  }

  .today-alert {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 14px;
  }

  .today-alert-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .today-alert-open {
    display: none;
  }

  .summary-detail-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .summary-detail-row > .cat-icon {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .summary-detail-copy {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .summary-detail-row > strong {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
  }

  .summary-detail-row > .pill {
    display: inline-flex;
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    min-width: 0;
    padding: 3px 7px;
    font-size: 10px;
  }
}

/* Score financeiro e central de configurações */
.dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  align-items: start;
}

.upcoming-panel {
  grid-column: 1;
  grid-row: 1 / 3;
}

.budget-score-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.dashboard-grid > .status-panel {
  grid-column: 2;
  grid-row: 2;
}

.budget-gauge {
  position: relative;
  width: min(100%, 240px);
  height: 126px;
  margin: 2px auto 8px;
}

.budget-gauge svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.budget-gauge path {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
}

.budget-gauge-track {
  stroke: #e8ebf1;
}

.budget-gauge-progress {
  stroke: #3157d5;
  animation: budget-gauge-in 0.6s ease-out both;
}

.score-warning .budget-gauge-progress,
.score-limit .budget-gauge-progress {
  stroke: #dc8a18;
}

.score-over .budget-gauge-progress {
  stroke: var(--status-danger);
}

@keyframes budget-gauge-in {
  from {
    stroke-dasharray: 0 100;
  }
}

.budget-gauge-value {
  position: absolute;
  left: 50%;
  bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

.budget-gauge-value b {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.budget-gauge-value span {
  color: var(--muted);
  font-size: 10px;
}

.budget-gauge-scale {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.budget-score-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 4px 0 14px;
  text-align: left;
}

.budget-score-status > span {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #3157d5;
}

.score-warning .budget-score-status > span,
.score-limit .budget-score-status > span {
  background: #dc8a18;
}

.score-over .budget-score-status > span {
  background: var(--status-danger);
}

.budget-score-status > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.budget-score-status b {
  font-size: 12px;
}

.budget-score-status small {
  color: var(--muted);
  font-size: 10px;
}

.budget-score-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.budget-score-values span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}

.budget-score-values b {
  color: var(--ink);
  font-size: 11px;
}

.budget-score-empty {
  text-align: center;
}

.budget-score-empty .panel-head {
  text-align: left;
}

.budget-empty-indicator {
  display: flex;
  width: 190px;
  height: 96px;
  margin: 4px auto 15px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 13px;
  border: 13px solid #e8ebf1;
  border-bottom: 0;
  border-radius: 190px 190px 0 0;
}

.budget-empty-indicator span {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 26px;
}

.budget-empty-indicator small,
.budget-score-empty > p {
  color: var(--muted);
  font-size: 11px;
}

.budget-score-empty > p {
  max-width: 250px;
  margin: 0 auto 10px;
  line-height: 1.5;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.settings-card {
  min-width: 0;
}

.settings-budget {
  grid-column: 1 / -1;
}

.settings-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.settings-card-head h2 {
  margin: 0 0 3px;
  font-size: 17px;
}

.settings-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.settings-month {
  width: 170px;
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.settings-month input {
  min-height: 38px;
  margin-top: 3px;
  padding-block: 7px;
  font-size: 12px;
}

.settings-card-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  background: #e8efff;
  color: #3157d5;
}

.settings-card-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.settings-budget-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.settings-budget-preview > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.settings-budget-preview small {
  color: var(--muted);
  font-size: 10px;
}

.settings-budget-preview b {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
}

.expense-limit-form {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: end;
}

.currency-field {
  position: relative;
}

.currency-field > span {
  position: absolute;
  left: 13px;
  top: 50%;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transform: translateY(-50%);
}

.currency-field input {
  padding-left: 40px;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.settings-actions-wrap {
  flex-wrap: wrap;
  margin-top: 18px;
}

.settings-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.settings-actions .ui-icon {
  width: 16px;
  height: 16px;
}

.settings-management {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.settings-management small,
.settings-management span,
.settings-readonly,
.settings-empty {
  color: var(--muted);
  font-size: 11px;
}

.settings-management b {
  font-size: 14px;
}

.settings-management span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}

.settings-empty p {
  margin: 0;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.theme-options button {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.theme-options button.active {
  background: #e8efff;
  color: #294bbb;
}

.theme-options .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.theme-options button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.theme-options b {
  font-size: 11px;
}

.theme-options small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-link {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 0;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}

.settings-link:hover {
  background: var(--hover);
}

.settings-link b {
  color: var(--muted);
  font-size: 20px;
}

html[data-theme="dark"] .budget-gauge-track,
html[data-theme="dark"] .budget-empty-indicator {
  stroke: #2a2e36;
  border-color: #2a2e36;
}

html[data-theme="dark"] .settings-card-icon,
html[data-theme="dark"] .theme-options button.active {
  background: #1b315f;
  color: #a9c2ff;
}

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

  .budget-score-panel,
  .upcoming-panel,
  .dashboard-grid > .status-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .budget-score-panel {
    order: 0;
  }

  .upcoming-panel {
    order: 1;
  }

  .dashboard-grid > .status-panel {
    order: 2;
  }
}

@media (max-width: 760px) {
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .settings-budget {
    grid-column: 1;
  }

  .settings-card {
    padding: 17px;
  }

  .settings-card-head {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }

  .settings-month {
    width: 100%;
    margin-left: 0;
  }

  .expense-limit-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-actions .btn {
    width: 100%;
  }

  .settings-actions-wrap {
    align-items: stretch;
  }

  .theme-options {
    grid-template-columns: 1fr;
  }

  .theme-options button {
    min-height: 52px;
  }

  .budget-score-panel {
    padding: 18px;
  }
}

/* Agenda mensal e gerenciamento de séries recorrentes */
.calendar-content-head {
  align-items: center;
}

.calendar-content-head > .calendar-layout-switch {
  display: flex;
  flex-direction: row;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.calendar-layout-switch button {
  display: flex;
  min-height: 38px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.calendar-layout-switch button.active {
  background: #e8efff;
  color: #294bbb;
}

.calendar-layout-switch .ui-icon {
  width: 16px;
  height: 16px;
}

.agenda-panel {
  padding: 6px 22px;
}

.agenda-day {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.agenda-day:last-child {
  border-bottom: 0;
}

.agenda-day > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.agenda-day > header > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.agenda-day > header b {
  font-size: 13px;
  text-transform: capitalize;
}

.agenda-day > header small,
.agenda-day > header > span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.agenda-date-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.agenda-day.today .agenda-date-number {
  background: #3157d5;
  color: #fff;
}

.agenda-items {
  display: flex;
  flex-direction: column;
  margin-left: 49px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 68px;
  padding: 11px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.agenda-item:first-child {
  border-top: 0;
}

.agenda-item:hover {
  background: var(--hover);
}

.agenda-item-copy,
.agenda-item-value {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.agenda-item-copy {
  gap: 3px;
}

.agenda-item-copy b,
.agenda-item-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-item-copy b {
  font-size: 13px;
}

.agenda-item-copy small {
  color: var(--muted);
  font-size: 11px;
}

.agenda-item-value {
  align-items: flex-end;
  gap: 5px;
}

.agenda-item-value > b {
  font-size: 12px;
}

.recurrence-scope {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.recurrence-scope label {
  display: flex;
  min-width: 0;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid #dbe4fa;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.recurrence-scope label:has(input:checked) {
  border-color: transparent;
  background: #e8efff;
  color: #294bbb;
}

.recurrence-scope input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #3157d5;
}

.recurrence-scope label > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.recurrence-scope label > span > b {
  font-size: 11px;
}

.recurrence-scope label > span > small {
  font-size: 10px;
  line-height: 1.25;
}

html[data-theme="dark"] .calendar-layout-switch button.active,
html[data-theme="dark"] .recurrence-scope label:has(input:checked) {
  background: #1b315f;
  color: #a9c2ff;
}

html[data-theme="dark"] .recurrence-scope label {
  border-color: #29334a;
  background: #191e28;
}

@media (max-width: 760px) {
  .calendar-content-head {
    gap: 12px;
  }

  .calendar-content-head .month-control,
  .calendar-layout-switch {
    width: 100%;
  }

  .calendar-content-head > .calendar-layout-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-direction: row;
  }

  .calendar-layout-switch button {
    min-height: 42px;
  }

  .agenda-panel {
    padding: 4px 15px;
  }

  .agenda-day {
    padding: 16px 0;
  }

  .agenda-day > header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .agenda-day > header > span:last-child {
    display: none;
  }

  .agenda-items {
    margin-left: 0;
  }

  .agenda-item {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
    min-height: 72px;
  }

  .agenda-item-value > b {
    max-width: 105px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .agenda-item .pill {
    font-size: 10px;
  }

  .recurrence-scope {
    grid-template-columns: 1fr;
  }

  .recurrence-scope label {
    min-height: 54px;
  }
}

@media (max-width: 390px) {
  .agenda-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .agenda-item .cat-icon {
    grid-row: 1 / 3;
  }

  .agenda-item-value {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Agrupamento temporal da visão geral e confirmação de logout */
.dashboard-record-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-record-group + .dashboard-record-group {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.dashboard-record-group > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 0 -8px;
  padding: 8px;
  border-radius: 11px;
  list-style: none;
  cursor: pointer;
}

.dashboard-record-group > summary::-webkit-details-marker {
  display: none;
}

.dashboard-record-group > summary:hover,
.dashboard-record-group > summary:focus-visible,
.dashboard-record-group[open] > summary {
  background: var(--surface-soft);
}

.dashboard-record-group > summary:focus-visible {
  outline: 3px solid rgba(49, 87, 213, 0.18);
  outline-offset: 2px;
}

.dashboard-record-group > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin: -4px 4px 0 2px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.dashboard-record-group[open] > summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
}

.dashboard-record-group > summary > div {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.dashboard-record-group > summary > div > span {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #3157d5;
}

.dashboard-record-group.previous > summary > div > span {
  background: #8792a2;
}

.dashboard-record-group > summary > div > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.dashboard-record-group > summary b {
  font-size: 12px;
  font-weight: 700;
}

.dashboard-record-group > summary > div small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-record-group > summary > strong {
  display: inline-flex;
  min-width: 30px;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-align: center;
  white-space: nowrap;
}

.dashboard-record-group > summary > strong small {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.dashboard-record-group > .record-list {
  padding-top: 6px;
}

.logout-confirm-modal {
  width: min(430px, 100%);
  text-align: center;
}

.logout-confirm-icon {
  display: grid;
  width: 52px;
  height: 52px;
  clear: both;
  margin: 12px auto 18px;
  place-items: center;
  border-radius: 16px;
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.logout-confirm-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.logout-confirm-modal .eyebrow {
  display: block;
}

.logout-confirm-modal h2 {
  margin: 8px 0;
  padding: 0;
}

.logout-confirm-modal > p {
  max-width: 350px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.logout-confirm-modal .modal-actions {
  justify-content: center;
}

.logout-confirm-modal .modal-actions .btn {
  min-width: 145px;
}

html[data-theme="dark"] .logout-confirm-modal .btn-danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

@media (max-width: 760px) {
  .dashboard-record-groups {
    gap: 6px;
  }

  .dashboard-record-group + .dashboard-record-group {
    padding-top: 6px;
  }

  .dashboard-record-group > summary > div small {
    max-width: 220px;
  }

  .logout-confirm-modal h2 {
    padding: 0;
    text-align: center;
  }

  .logout-confirm-modal .modal-actions {
    position: static;
    margin: 24px 0 0;
    padding: 18px 0 0;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
  }

  .logout-confirm-modal .modal-actions .btn {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .dashboard-record-group > summary > div small {
    max-width: 180px;
  }

  .dashboard-record-group > summary > strong small {
    display: none;
  }
}

/* Filtros da agenda e leitura mensal por categoria */
.calendar-filters {
  margin-bottom: 16px;
  padding: 16px 18px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.calendar-filter-fields {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(2, minmax(180px, 0.8fr));
  gap: 12px;
}

.calendar-filter-fields > label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.calendar-filter-fields > label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calendar-filter-fields input,
.calendar-filter-fields select {
  width: 100%;
  height: 44px;
  margin: 0;
  border-color: var(--line);
  background: var(--field);
  color: var(--ink);
  font-size: 12px;
}

.calendar-search-field > div {
  position: relative;
}

.calendar-search-field .ui-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.calendar-search-field input {
  padding-left: 40px;
}

.calendar-filter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.calendar-filter-meta b {
  color: var(--ink);
  font-size: 11px;
}

.calendar-filter-clear {
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #3157d5;
  font-size: 10px;
  font-weight: 700;
}

.calendar-filter-clear:hover {
  text-decoration: underline;
}

.agenda-sorted-panel {
  padding-top: 18px;
}

.agenda-sorted-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.agenda-sorted-head b {
  font-size: 12px;
}

.agenda-sorted-head span {
  color: var(--muted);
  font-size: 10px;
}

.agenda-sorted-items {
  margin-left: 0;
}

.expense-insights-panel {
  margin-bottom: 20px;
  overflow: hidden;
}

.expense-insights-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.expense-insights-head > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.expense-insights-head > div > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.expense-insights-head h2 {
  overflow: hidden;
  margin: 0;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-insights-head small {
  color: #3157d5;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.expense-insights-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--status-info-bg);
  color: var(--status-info);
}

.expense-insights-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.expense-insights-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.expense-insights-content {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.15fr);
  gap: 24px;
  padding-top: 20px;
}

.expense-insights-narrative {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding-right: 24px;
  border-right: 1px solid var(--line);
}

.expense-insights-narrative > p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.expense-insights-narrative > div {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 1.4fr;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}

.expense-insights-narrative > div > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.expense-insights-narrative > div > span:first-child {
  padding-left: 0;
}

.expense-insights-narrative > div > span + span {
  border-left: 1px solid var(--line);
}

.expense-insights-narrative b {
  overflow: hidden;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-insights-narrative small {
  color: var(--muted);
  font-size: 10px;
}

.expense-category-ranking {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.expense-category-row {
  display: grid;
  grid-template-columns: 18px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 9px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.expense-category-row:first-child {
  padding-top: 0;
}

.expense-category-row:last-of-type {
  border-bottom: 0;
}

.expense-category-row:hover {
  background: var(--hover);
}

.expense-category-position {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.expense-category-row .cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.expense-category-copy,
.expense-category-copy > span,
.expense-category-row > strong {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.expense-category-copy {
  gap: 8px;
}

.expense-category-copy > span {
  gap: 2px;
}

.expense-category-copy b,
.expense-category-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-category-copy b {
  font-size: 12px;
}

.expense-category-copy small,
.expense-category-row > strong small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.expense-category-copy > i {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--status-danger-bg);
}

.expense-category-copy > i > span {
  display: block;
  width: var(--category-share);
  height: 100%;
  border-radius: inherit;
  background: var(--status-danger);
}

.expense-category-row > strong {
  align-items: flex-end;
  gap: 2px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
  white-space: nowrap;
}

.expense-category-more {
  padding: 9px 8px 0;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.expense-insight-empty {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.expense-insight-empty .ui-icon {
  width: 22px;
  height: 22px;
  color: var(--status-info);
}

html[data-theme="dark"] .calendar-filter-clear,
html[data-theme="dark"] .expense-insights-head small {
  color: var(--status-info);
}

@media (max-width: 980px) {
  .calendar-filter-fields {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-search-field {
    grid-column: 1 / -1;
  }

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

  .expense-insights-narrative {
    padding: 0 0 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .calendar-filters {
    padding: 14px;
    border-radius: 14px;
  }

  .calendar-filter-fields {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .calendar-search-field {
    grid-column: auto;
  }

  .calendar-filter-fields input,
  .calendar-filter-fields select {
    height: 46px;
  }

  .agenda-sorted-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .expense-insights-panel {
    padding: 17px 14px;
  }

  .expense-insights-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .expense-insights-head > div {
    width: 100%;
  }

  .expense-insights-head h2 {
    font-size: 15px;
  }

  .expense-insights-badge {
    margin-left: 54px;
  }

  .expense-insights-content {
    gap: 14px;
    padding-top: 16px;
  }

  .expense-insights-narrative {
    gap: 16px;
    padding-bottom: 16px;
  }

  .expense-insights-narrative > p {
    font-size: 13px;
    line-height: 1.65;
  }

  .expense-insights-narrative > div {
    grid-template-columns: 0.75fr 0.8fr 1.45fr;
  }

  .expense-insights-narrative > div > span {
    padding-inline: 8px;
  }

  .expense-insights-narrative b {
    font-size: 12px;
  }

  .expense-category-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 9px;
    padding-inline: 4px;
  }

  .expense-category-position {
    display: none;
  }

  .expense-category-row .cat-icon {
    width: 34px;
    height: 34px;
  }

  .expense-category-row > strong {
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .expense-insights-badge {
    margin-left: 0;
  }

  .expense-category-row > strong small {
    display: none;
  }
}

/* Cartões e identificação de faturas */
.settings-cards {
  grid-column: 1 / -1;
}

.settings-card-cta {
  margin-left: auto;
  white-space: nowrap;
}

.settings-card-cta .ui-icon,
.card-action .ui-icon,
.record-card-select-row .ui-icon {
  width: 16px;
  height: 16px;
}

.cards-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.managed-card {
  min-width: 0;
}

.payment-card {
  position: relative;
  display: flex;
  aspect-ratio: 1.586 / 1;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  overflow: hidden;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--card-ink) 14%, transparent);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--card-bg) 24%, transparent);
  color: var(--card-ink);
}

.payment-card::before,
.payment-card::after {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.payment-card::before {
  top: -45%;
  right: -20%;
  width: 75%;
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--card-ink) 10%, transparent);
}

.payment-card::after {
  right: 12%;
  bottom: -50%;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--card-ink) 16%, transparent);
}

.payment-card-top,
.payment-card-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.payment-card-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.payment-card-brand .ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.payment-card-brand b {
  overflow: hidden;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-card-logo-wrap {
  position: relative;
  display: grid;
  width: 54px;
  height: 30px;
  flex: 0 0 54px;
  place-items: center;
}

.payment-card-logo-fallback {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.payment-card-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-card-bottom {
  align-items: flex-end;
}

.payment-card-bottom > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.payment-card-bottom small {
  opacity: 0.72;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.payment-card-bottom b {
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.managed-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 3px 0;
}

.managed-card-meta > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.managed-card-meta > span b,
.managed-card-meta > span small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.managed-card-meta > span b {
  font-size: 12px;
}

.managed-card-meta > span small {
  color: var(--muted);
  font-size: 10px;
}

.managed-card-meta > div {
  display: flex;
  gap: 4px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.card-action:hover {
  background: var(--surface-soft);
  color: #3157d5;
}

.managed-card.is-archived .payment-card {
  filter: saturate(0.35);
  opacity: 0.62;
}

.archived-cards {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.archived-cards summary {
  padding: 16px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.cards-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.cards-empty .ui-icon {
  width: 28px;
  height: 28px;
  color: #3157d5;
}

.cards-empty > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cards-empty b {
  font-size: 12px;
}

.cards-empty span {
  color: var(--muted);
  font-size: 10px;
}

.secondary-modal-backdrop {
  z-index: 180;
}

.card-editor-modal {
  width: min(850px, 100%);
}

.card-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 26px;
  margin-top: 22px;
}

.card-editor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.card-editor-fields > .full,
.card-color-field,
.card-day-fields {
  grid-column: 1 / -1;
}

.card-editor-fields label > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.card-color-field {
  min-width: 0;
  margin: 8px 0 18px;
  padding: 0;
  border: 0;
}

.card-color-field legend {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.card-color-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-color-row input[type="color"] {
  width: 50px;
  height: 42px;
  flex: 0 0 50px;
  padding: 3px;
  cursor: pointer;
}

.card-color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-color-presets button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--preset-color);
  box-shadow: 0 0 0 1px var(--line);
}

.card-color-presets button.active {
  box-shadow: 0 0 0 2px #3157d5;
}

.card-day-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card-editor-preview {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.card-editor-preview > small {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.card-editor-preview > p {
  margin: 11px 3px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.record-card-field {
  margin: 2px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.record-card-field[hidden] {
  display: none;
}

.record-card-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.record-card-select-row label {
  margin: 0;
}

.record-card-select-row .btn {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#recordCardPreview {
  width: min(300px, 100%);
  margin-top: 14px;
}

#recordCardPreview .payment-card {
  min-height: 140px;
}

.record-card-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.record-card-empty .ui-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #3157d5;
}

.record-card-empty > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.record-card-empty b {
  color: var(--ink);
  font-size: 10px;
}

.record-card-empty small {
  font-size: 10px;
  line-height: 1.4;
}

.calendar-filter-fields.has-card-filter {
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(145px, 0.75fr));
}

@media (max-width: 1050px) {
  .cards-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-filter-fields.has-card-filter {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .settings-card-head {
    flex-wrap: wrap;
  }

  .settings-card-cta {
    width: 100%;
    min-height: 44px;
    margin-left: 0;
  }

  .cards-gallery {
    grid-template-columns: 1fr;
  }

  .payment-card {
    min-height: 0;
  }

  .card-editor-layout,
  .card-editor-fields,
  .card-day-fields {
    grid-template-columns: 1fr;
  }

  .card-editor-layout {
    gap: 18px;
  }

  .card-editor-fields > .full,
  .card-color-field,
  .card-day-fields {
    grid-column: auto;
  }

  .card-editor-preview {
    grid-row: 1;
  }

  .record-card-select-row {
    grid-template-columns: 1fr;
  }

  .record-card-select-row .btn {
    justify-content: center;
  }

  #recordCardPreview {
    width: 100%;
  }

  .calendar-filter-fields.has-card-filter {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .managed-card-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .managed-card-meta > div {
    justify-content: flex-end;
  }

  .payment-card {
    padding: 17px;
    border-radius: 16px;
  }

  .card-editor-preview,
  .record-card-field {
    padding: 12px;
  }
}

/* Planejamento de caixa */
.cash-planning-teaser {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 17px 18px;
  border: 1px solid color-mix(in srgb, var(--status-info) 22%, var(--line));
  border-radius: 16px;
  background:
    linear-gradient(
      120deg,
      color-mix(in srgb, var(--status-info-bg) 52%, var(--surface)) 0%,
      var(--surface) 62%
    );
}

.cash-planning-teaser.is-critical {
  border-color: color-mix(in srgb, var(--status-danger) 28%, var(--line));
  background:
    linear-gradient(
      120deg,
      color-mix(in srgb, var(--status-danger-bg) 48%, var(--surface)) 0%,
      var(--surface) 62%
    );
}

.cash-planning-teaser.is-warning {
  border-color: color-mix(in srgb, var(--status-warning) 28%, var(--line));
  background:
    linear-gradient(
      120deg,
      color-mix(in srgb, var(--status-warning-bg) 48%, var(--surface)) 0%,
      var(--surface) 62%
    );
}

.cash-planning-teaser.is-healthy {
  border-color: color-mix(in srgb, var(--status-success) 25%, var(--line));
  background:
    linear-gradient(
      120deg,
      color-mix(in srgb, var(--status-success-bg) 42%, var(--surface)) 0%,
      var(--surface) 62%
    );
}

.cash-planning-teaser-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: var(--status-info-bg);
  color: var(--status-info);
}

.cash-planning-teaser.is-critical .cash-planning-teaser-icon {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.cash-planning-teaser.is-warning .cash-planning-teaser-icon {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.cash-planning-teaser.is-healthy .cash-planning-teaser-icon {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.cash-planning-teaser-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.cash-planning-teaser > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.cash-planning-teaser small {
  color: var(--status-info);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.cash-planning-teaser.is-critical small {
  color: var(--status-danger);
}

.cash-planning-teaser.is-warning small {
  color: var(--status-warning);
}

.cash-planning-teaser.is-healthy small {
  color: var(--status-success);
}

.cash-planning-teaser b {
  font-family: Manrope, sans-serif;
  font-size: 14px;
}

.cash-planning-teaser p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.cash-planning-teaser > button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid color-mix(in srgb, var(--status-info) 28%, var(--line));
  border-radius: 10px;
  background: var(--surface);
  color: var(--status-info);
  font-size: 10px;
  font-weight: 750;
}

.cash-planning-teaser > button:hover {
  background: var(--surface-soft);
}

.settings-cash-planning {
  grid-column: 1 / -1;
}

.cash-planning-settings-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cash-planning-settings-fields > label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 10px;
}

.cash-planning-settings-fields input,
.cash-planning-settings-fields select {
  width: 100%;
  min-height: 44px;
  margin: 0;
}

.cash-planning-settings-fields label > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.35;
}

.cash-planning-settings-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cash-planning-settings-actions > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 10px;
}

.cash-planning-settings-actions > span b {
  color: var(--ink);
}

#recordPriorityField > small {
  margin-top: -2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.35;
}

.cash-planning-empty {
  display: flex;
  min-height: 480px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  border: 1px dashed color-mix(in srgb, var(--status-info) 32%, var(--line));
  border-radius: 20px;
  background: var(--surface);
  text-align: center;
}

.cash-planning-empty > span:first-child {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 19px;
  background: var(--status-info-bg);
  color: var(--status-info);
}

.cash-planning-empty > span:first-child .ui-icon {
  width: 27px;
  height: 27px;
}

.cash-planning-empty > small {
  color: var(--status-info);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.cash-planning-empty h2 {
  max-width: 480px;
  margin: 8px 0;
  font-size: 24px;
}

.cash-planning-empty p {
  max-width: 520px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.cash-planning-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cash-planning-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cash-planning-page-head h2 {
  margin: 4px 0 2px;
  font-size: 22px;
}

.cash-planning-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.cash-planning-page-head .btn {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cash-planning-page-head .ui-icon {
  width: 16px;
  height: 16px;
}

.cash-late-income-alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--status-warning) 28%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--status-warning-bg) 52%, var(--surface));
  color: var(--status-warning);
}

.cash-late-income-alert > .ui-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.cash-late-income-alert b {
  font-size: 11px;
}

.cash-late-income-alert p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.cash-health-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(190px, 0.4fr);
  align-items: center;
  gap: 24px;
  padding: 23px;
  border: 1px solid color-mix(in srgb, var(--status-success) 26%, var(--line));
  border-radius: 19px;
  background:
    linear-gradient(
      120deg,
      color-mix(in srgb, var(--status-success-bg) 60%, var(--surface)) 0%,
      var(--surface) 66%
    );
}

.cash-health-card.is-warning {
  border-color: color-mix(in srgb, var(--status-warning) 28%, var(--line));
  background:
    linear-gradient(
      120deg,
      color-mix(in srgb, var(--status-warning-bg) 60%, var(--surface)) 0%,
      var(--surface) 66%
    );
}

.cash-health-card.is-critical {
  border-color: color-mix(in srgb, var(--status-danger) 28%, var(--line));
  background:
    linear-gradient(
      120deg,
      color-mix(in srgb, var(--status-danger-bg) 58%, var(--surface)) 0%,
      var(--surface) 66%
    );
}

.cash-health-status {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 14px;
}

.cash-health-status > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--status-success-bg);
  color: var(--status-success);
  font-size: 17px;
  font-weight: 850;
}

.cash-health-card.is-warning .cash-health-status > span {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.cash-health-card.is-critical .cash-health-status > span {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.cash-health-status > div {
  min-width: 0;
}

.cash-health-status small {
  color: var(--status-success);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cash-health-card.is-warning .cash-health-status small {
  color: var(--status-warning);
}

.cash-health-card.is-critical .cash-health-status small {
  color: var(--status-danger);
}

.cash-health-status h2 {
  margin: 4px 0 5px;
  font-size: clamp(18px, 2vw, 24px);
}

.cash-health-status p {
  max-width: 790px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.cash-health-minimum {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.cash-health-minimum small,
.cash-health-minimum span {
  color: var(--muted);
  font-size: 10px;
}

.cash-health-minimum b {
  overflow: hidden;
  font-family: Manrope, sans-serif;
  font-size: 20px;
  text-overflow: ellipsis;
}

.cash-health-card.is-critical .cash-health-minimum b {
  color: var(--status-danger);
}

.cash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.cash-kpis article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.cash-kpis article > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--status-info);
}

.cash-kpis article > span .ui-icon {
  width: 17px;
  height: 17px;
}

.cash-kpis article > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.cash-kpis small,
.cash-kpis em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-kpis b {
  overflow: hidden;
  font-family: Manrope, sans-serif;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-kpis .negative,
.cash-timeline-value .negative,
.cash-cycle-result .negative b {
  color: var(--status-danger);
}

.cash-planning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  align-items: start;
  gap: 16px;
}

.cash-strategy-panel,
.cash-attention-panel,
.cash-timeline-panel {
  padding: 20px;
}

.cash-cycle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cash-cycle {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.cash-cycle > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.cash-cycle > header > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--status-success-bg);
  color: var(--status-success);
}

.cash-cycle > header .ui-icon {
  width: 17px;
  height: 17px;
}

.cash-cycle header div {
  min-width: 0;
}

.cash-cycle header small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-cycle h3 {
  overflow: hidden;
  margin: 2px 0 0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-cycle header > strong {
  color: var(--status-success);
  font-family: Manrope, sans-serif;
  font-size: 13px;
}

.cash-cycle > p {
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.cash-cycle > p b {
  color: var(--ink);
}

.cash-cycle-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.cash-cycle-result > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 10px 11px;
}

.cash-cycle-result > span + span {
  border-left: 1px solid var(--line);
}

.cash-cycle-result small {
  color: var(--muted);
  font-size: 10px;
}

.cash-cycle-result b {
  overflow: hidden;
  font-family: Manrope, sans-serif;
  font-size: 12px;
  text-overflow: ellipsis;
}

.cash-cycle-result .positive b {
  color: var(--status-success);
}

.cash-planning-inline-empty {
  padding: 26px 18px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.cash-attention-count {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--status-danger-bg);
  color: var(--status-danger);
  font-size: 10px;
  font-weight: 800;
}

.cash-attention-list {
  display: flex;
  flex-direction: column;
}

.cash-attention-list > button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 62px;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.cash-attention-list > button:first-child {
  border-top: 0;
}

.cash-attention-list > button:hover {
  background: var(--hover);
}

.cash-attention-list .category-icon-badge {
  width: 34px;
  height: 34px;
}

.cash-attention-list button > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.cash-attention-list button > span b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-attention-list button > span small {
  color: var(--muted);
  font-size: 10px;
}

.cash-attention-list button > strong {
  font-family: Manrope, sans-serif;
  font-size: 10px;
}

.cash-attention-list button > i {
  grid-column: 2 / -1;
  justify-self: start;
  margin-top: -8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--status-warning-bg);
  color: var(--status-warning);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.cash-attention-list button > i.partial,
.cash-attention-list button > i.uncovered {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.cash-attention-panel.is-clear {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.cash-attention-panel.is-clear > span {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--status-success-bg);
  color: var(--status-success);
}

.cash-attention-panel.is-clear h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.cash-attention-panel.is-clear p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.cash-timeline-panel > .panel-head > span {
  color: var(--muted);
  font-size: 10px;
}

.cash-timeline-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  padding: 10px 13px;
  border-radius: 11px;
  background: var(--surface-soft);
}

.cash-timeline-start span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.cash-timeline-start b {
  font-family: Manrope, sans-serif;
  font-size: 12px;
}

.cash-timeline {
  display: flex;
  flex-direction: column;
}

.cash-timeline-event {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(125px, auto) minmax(82px, auto);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 68px;
  padding: 10px 4px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.cash-timeline-event:hover {
  background: var(--hover);
}

.cash-timeline-marker {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.cash-timeline-event.is-income .cash-timeline-marker {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.cash-timeline-event.is-partial .cash-timeline-marker,
.cash-timeline-event.is-uncovered .cash-timeline-marker {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.cash-timeline-marker .ui-icon {
  width: 17px;
  height: 17px;
}

.cash-timeline-copy,
.cash-timeline-value {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.cash-timeline-copy b,
.cash-timeline-value > b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-timeline-copy small,
.cash-timeline-value small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-timeline-value {
  align-items: flex-end;
  text-align: right;
}

.cash-timeline-value > b {
  font-family: Manrope, sans-serif;
  font-size: 11px;
}

.cash-coverage {
  justify-self: end;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--status-success-bg);
  color: var(--status-success);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.cash-coverage.reserve {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.cash-coverage.partial,
.cash-coverage.uncovered {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.cash-coverage.income {
  background: var(--status-info-bg);
  color: var(--status-info);
}

.cash-planning-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.cash-planning-note .ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--status-info);
}

html[data-theme="dark"] .cash-planning-teaser,
html[data-theme="dark"] .cash-health-card,
html[data-theme="dark"] .cash-late-income-alert {
  background: color-mix(in srgb, var(--surface-raised) 82%, #090b10);
}

html[data-theme="dark"] .cash-planning-teaser-icon,
html[data-theme="dark"] .cash-health-status > span {
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
}

html[data-theme="dark"] .cash-planning-page-head .btn-soft {
  border-color: var(--line);
  background: var(--surface-raised);
  color: #a9c2ff;
}

@media (max-width: 1100px) {
  .cash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .cash-planning-settings-fields {
    grid-template-columns: 1fr 1fr;
  }

  .cash-planning-settings-fields > label:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .planning-nav-item {
    display: none !important;
  }

  .nav-item.mobile-planning-parent {
    border: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .cash-planning-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .cash-planning-page-head .btn {
    align-self: flex-start;
  }

  .cash-health-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cash-health-minimum {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .cash-health-minimum span {
    grid-column: 1;
  }

  .cash-health-minimum b {
    grid-row: 1 / 3;
    grid-column: 2;
  }
}

@media (max-width: 600px) {
  .cash-planning-teaser {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px;
  }

  .cash-planning-teaser > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .cash-planning-settings-fields {
    grid-template-columns: 1fr;
  }

  .cash-planning-settings-fields > label:last-child {
    grid-column: auto;
  }

  .cash-planning-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cash-planning-settings-actions > span {
    margin-right: 0;
  }

  .cash-planning-settings-actions .btn {
    width: 100%;
  }

  .cash-planning-empty {
    min-height: 420px;
    padding: 24px 18px;
  }

  .cash-planning-empty h2 {
    font-size: 20px;
  }

  .cash-health-card {
    padding: 17px 14px;
    border-radius: 16px;
  }

  .cash-health-status {
    gap: 11px;
  }

  .cash-health-status > span {
    width: 39px;
    height: 39px;
    border-radius: 11px;
  }

  .cash-health-status h2 {
    font-size: 17px;
  }

  .cash-kpis {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cash-kpis article {
    padding: 13px;
  }

  .cash-strategy-panel,
  .cash-attention-panel,
  .cash-timeline-panel {
    padding: 16px 14px;
  }

  .cash-cycle > header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cash-cycle header > strong {
    grid-column: 2;
  }

  .cash-cycle-result {
    grid-template-columns: 1fr;
  }

  .cash-cycle-result > span + span {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .cash-timeline-event {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
    min-height: 76px;
  }

  .cash-timeline-value {
    grid-column: 3;
    grid-row: 1;
  }

  .cash-coverage {
    grid-column: 2 / -1;
    justify-self: start;
    margin-top: -9px;
  }

  .cash-planning-note {
    padding-bottom: 8px;
  }
}

@media (max-width: 390px) {
  .cash-planning-page-head .btn {
    width: 100%;
    justify-content: center;
  }

  .cash-health-minimum {
    grid-template-columns: 1fr;
  }

  .cash-health-minimum b {
    grid-row: auto;
    grid-column: auto;
  }

  .cash-timeline-event {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .cash-timeline-value {
    grid-column: 2;
    grid-row: auto;
    align-items: flex-start;
    text-align: left;
  }

  .cash-coverage {
    grid-column: 2;
    margin-top: 0;
  }
}

/* Autorização segura para simular pagamentos após o vencimento */
.record-delay-field {
  margin: 2px 0 8px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--status-warning) 24%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--status-warning-bg) 35%, var(--surface));
}

.record-delay-field[hidden],
.record-delay-options[hidden] {
  display: none;
}

.record-delay-toggle {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  color: var(--ink);
  cursor: pointer;
}

.record-delay-toggle input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: #3157d5;
}

.record-delay-toggle > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.record-delay-toggle b {
  font-size: 13px;
}

.record-delay-toggle small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

.record-delay-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid color-mix(in srgb, var(--status-warning) 22%, var(--line));
}

.record-delay-options label {
  margin: 0;
}

.record-delay-options label > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.record-delay-options label > div:focus-within {
  border-color: #3157d5;
}

.record-delay-options input {
  min-width: 0;
  border: 0;
  background: transparent;
}

.record-delay-options label > div > span {
  padding-right: 12px;
  color: var(--muted);
  font-size: 10px;
}

.record-delay-options > p {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 7px;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.record-delay-options > p .ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--status-warning);
}

/* Estratégia adaptativa entre recebimentos */
.cash-adaptive-panel {
  padding: 20px;
}

.cash-adaptive-panel.is-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.cash-adaptive-icon,
.cash-adaptive-head > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--status-info-bg);
  color: var(--status-info);
}

.cash-adaptive-icon .ui-icon,
.cash-adaptive-head > span .ui-icon {
  width: 20px;
  height: 20px;
}

.cash-adaptive-panel small {
  color: var(--muted);
}

.cash-adaptive-panel.is-empty > div > small,
.cash-adaptive-head > div > small {
  color: var(--status-info);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.cash-adaptive-panel.is-empty h2,
.cash-adaptive-head h2 {
  margin: 4px 0;
  font-size: 15px;
}

.cash-adaptive-panel.is-empty p,
.cash-adaptive-head p {
  max-width: 800px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.cash-adaptive-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cash-adaptive-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: stretch;
  gap: 9px;
  margin: 17px 0 13px;
}

.cash-adaptive-comparison > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.cash-adaptive-comparison > i {
  align-self: center;
  color: var(--muted);
  font-size: 16px;
  font-style: normal;
}

.cash-adaptive-comparison small,
.cash-adaptive-comparison em {
  overflow: hidden;
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-adaptive-comparison b {
  overflow: hidden;
  font-family: Manrope, sans-serif;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-adaptive-comparison .is-baseline b {
  color: var(--status-danger);
}

.cash-adaptive-comparison .is-optimized {
  border-color: color-mix(in srgb, var(--status-success) 28%, var(--line));
  background: color-mix(in srgb, var(--status-success-bg) 48%, var(--surface));
}

.cash-adaptive-comparison .is-optimized b {
  color: var(--status-success);
}

.cash-deferral-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.cash-deferral-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 72px;
  padding: 11px 13px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.cash-deferral-item:first-child {
  border-top: 0;
}

.cash-deferral-item:hover {
  background: var(--hover);
}

.cash-deferral-item .category-icon-badge {
  width: 36px;
  height: 36px;
}

.cash-deferral-copy,
.cash-deferral-value {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.cash-deferral-copy b,
.cash-deferral-value b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-deferral-copy small,
.cash-deferral-copy em,
.cash-deferral-value small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-deferral-copy em {
  color: var(--status-info);
  font-weight: 650;
}

.cash-deferral-value {
  align-items: flex-end;
  text-align: right;
}

.cash-deferral-value b {
  font-family: Manrope, sans-serif;
  font-size: 11px;
}

.cash-adaptive-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--status-warning-bg) 55%, var(--surface));
}

.cash-adaptive-warning .ui-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--status-warning);
}

.cash-adaptive-warning p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.cash-adaptive-warning b {
  color: var(--ink);
}

.cash-timeline-event.is-deferred .cash-timeline-marker {
  background: var(--status-info-bg);
  color: var(--status-info);
}

.cash-coverage.deferred {
  background: var(--status-info-bg);
  color: var(--status-info);
}

html[data-theme="dark"] .record-delay-field,
html[data-theme="dark"] .cash-adaptive-warning {
  background: color-mix(in srgb, var(--surface-raised) 86%, #090b10);
}

html[data-theme="dark"] .cash-adaptive-comparison .is-optimized {
  background: color-mix(in srgb, var(--status-success-bg) 22%, var(--surface-raised));
}

@media (max-width: 760px) {
  .record-delay-options {
    grid-template-columns: 1fr;
  }

  .record-delay-options > p {
    grid-column: auto;
  }

  .cash-adaptive-panel.is-empty {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cash-adaptive-panel.is-empty .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .cash-adaptive-comparison {
    grid-template-columns: 1fr 1fr;
  }

  .cash-adaptive-comparison > i {
    display: none;
  }

  .cash-adaptive-comparison .is-cost {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .record-delay-field,
  .cash-adaptive-panel {
    padding: 14px;
  }

  .cash-deferral-item {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 11px;
  }

  .cash-deferral-value {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
  }

  .cash-deferral-copy small,
  .cash-deferral-copy em,
  .cash-deferral-value small {
    white-space: normal;
  }
}

@media (max-width: 390px) {
  .cash-adaptive-comparison {
    grid-template-columns: 1fr;
  }

  .cash-adaptive-comparison .is-cost {
    grid-column: auto;
  }
}

/* Keep standalone button icons beside the label, including modal actions. */
.btn > .ui-icon {
  flex-shrink: 0;
  margin: 0;
  align-self: center;
}
